Skip to content
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

Supporting adb shell with v2 protocol #470

Open
dfriederich opened this issue Aug 2, 2023 · 1 comment
Open

Supporting adb shell with v2 protocol #470

dfriederich opened this issue Aug 2, 2023 · 1 comment

Comments

@dfriederich
Copy link

When using adb shell currently, adb-kit shell is not using the v2 protocol.
This causes that when a command fails on the device, adb-kit is not aware of this, and hence is not reporting an error.
In addition we don't have stdout/stderr separation, and while supporting stdin I did not see a way to end a stdin stream while also keeping the output alive.
All those things can be acomplished with using the v2 protocol, which is used when a service request is not using just 'shell:cmd", but instead 'shell,v2:cmd'.

I did implement this support atop of adb-kit, by basically following the adb shell implementation, just extending it a bit to be also able to send the ,v2 part along, and then to split the returned Duplex into stdout/stderr/stdin and the exit code.
I can prepare a CR if there is a good chance of that it would be included in a future build :-). Just let me know.

Thanks

@denis99999
Copy link

@dfriederich you have to ensure there is no regression issue in particular on STF!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants