Bug 54341 - Deployment fails with "'ps' output not recognized" on device's new OS version
Summary: Deployment fails with "'ps' output not recognized" on device's new OS version
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Greg Munn
Depends on:
Reported: 2017-03-31 14:19 UTC by Jim Horvath
Modified: 2017-04-05 20:23 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jim Horvath 2017-03-31 14:19:15 UTC
On a Kindle Fire running Fire OS (released late March 2017), deployment of Xamarin app now fails:

2>Starting deploy Amazon KFTBWI ...
2>Deploying Amazon KFTBWI ...
2>Build started.
2>'ps' output not recognized
2>Build succeeded.
2>An error occured. See full exception on logs for more details.
2>'ps' output not recognized

I've reproduced this on 2 devices.  Deployment works fine while on previous version (, then after allowing update to it fails.

I manually did a 'ps' and saw that there is some strange output - it appears that one entry in the "user" column is garbled/shown as ASCII characters, like so:


root      51    2     0      0     ffffffff 00000000 S ksmd
root      52    2     0      0     ffffffff 00000000 S fsnotify_mark
root      66    2     0      0     ffffffff 00000000 S ion_mm_carveout
└áß≡█-Θ░LΓ╨M  2     0      0     ffffffff 00000000 S
root      68    2     0      0     ffffffff 00000000 S binder
root      69    2     0      0     ffffffff 00000000 S kworker/u9:0
root      70    2     0      0     ffffffff 00000000 S ovl_eng_wq


If Xamarin is still manually parsing PS output, I suspect that these characters are causing the problem.
Comment 1 Jim Horvath 2017-03-31 14:52:58 UTC
Looking at the code for Mono.AndroidTools.Internal.AdbOutputParsing.GetPackagePidFromPsInternal(), it appears the problem is that the ps output header indicates there will be 8 columns of data, but this odd username overwrites column 2's data and so the string.Split() gets less data than expected, resulting in failure.
Comment 2 Greg Munn 2017-04-05 20:23:37 UTC
Fixed in androidtools/9e0c733