-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get STDOUT and STDERR separately, and exit code of command #4
Comments
I think this is possible because the Eg: >adb shell asdf > NUL
/system/bin/sh: asdf: not found
>adb shell echo Hello > NUL
> But not sure how to do it at the code level |
Yes definitely. ADB server (and client) writes to STDOUT and STDERR separately, both in USB and |
I just did some quick testing on the emulators, and it looks like shell protocol is only available in devices that are running Android 7.0 or higher. Looks like you can detect whether it's supported by running >adb features
cmd
shell_v2
|
Hmm you are correct. Shell protocol was added in Android 7: https://android.googlesource.com/platform/system/core/+/0955c66b226db7a7f34613f834f7b0a145fd407d But even targeting Android 7+, it covers 73.7% of active Android devices, as per today's Play Store stats. Not a bad deal, I think. |
@tananaev @cgutman is it possible? Everything else I need works fine so far up to Android 10.
The text was updated successfully, but these errors were encountered: