pure-python-adb
pure-python-adb copied to clipboard
adb shell return value
Is there capability to get return value of command execution via 'adb shell' ?
Hi Ragenvald
The return value of shell function is the command result
example
print(device.shell("echo hello world !"))
>> hello world !
Hi Ragenvald
The return value of
shellfunction is thecommandresultexample
print(device.shell("echo hello world !")) >> hello world !
thank you for your answer, but I'm looking for the numeric return value. For example, the return value of command which finished with error (ls /asdfasdfasdf)
You could do
print(device.shell("echo hello world; echo $?"))