Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop buffering of adb shell output

Tags:

adb

I observed this new behavior in adb v1.0.39. The command:

adb shell getevent -l

gives the output below:

Observe that the last line is not complete

Observe that the last line is incomplete. This happens on many different devices. The same command is working without buffering in adb v1.0.32.

How do I stop adb shell output buffering in adb v1.0.39?

like image 795
Anshuman Chatterjee Avatar asked Oct 26 '25 12:10

Anshuman Chatterjee


1 Answers

Use adb exec-out instead of adb shell command to force the new adb to use the raw mode and avoid stdout buffering.

For more info read comments in shell_service.cpp

like image 173
Alex P. Avatar answered Oct 29 '25 09:10

Alex P.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!