adb

Collecting adb commands log

Remarks#

Make sure that your automation does not use adb kill-server command.

in Windows

Open a Command Prompt window and run the following commands:

adb kill-server
set ADB_TRACE=sockets
adb nodaemon server 2>&1 | for /f "usebackq tokens=7*" %a in (`findstr /c:"): '"`) do @echo %a %b >> %USERPROFILE%\Desktop\adb_host_log.txt

Now you can run your Android automation. When done run adb kill-server in another Command Prompt window. Now the adb_host_log.txt file on your Desktop contains the log of all commands all adb clients have sent to the adb host.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow