utils/android: Fix error detection in adb_shell()

If we execute a command such as:
'am start -a android.intent.action.VIEW -d nothing'
on Hikey960 with AOSP master, we do get an error message:
'Error: Activity not started, unable to resolve Intent ...'
but the error code is set to 0. Furthermore, that error message
is outputted to STDERR and not STDOUT.

The current error checking in adb_shell() is done by either
reading the error code or finding an error string in the
standard output. This commit adds a check of the error output,
and also changes the regular expression that is used to find
an error string as it wasn't generic enough.
1 file changed
tree: 0bf9664132f71991b954c890d877206e64e498ae
  1. devlib/
  2. doc/
  3. src/
  4. .gitignore
  5. README.rst
  6. setup.py