Skip to content

Instantly share code, notes, and snippets.

@Sarverott
Created December 13, 2023 08:32
Show Gist options
  • Save Sarverott/7ae01f64ea8b65d1d95774a085d1637d to your computer and use it in GitHub Desktop.
Save Sarverott/7ae01f64ea8b65d1d95774a085d1637d to your computer and use it in GitHub Desktop.
# sample for playing with android debugging stuff
from ppadb.client import Client as AdbClient
#client = AdbClient(host="127.0.0.1", port=5037)
client = AdbClient() # default is thesame as above
devList = client.devices()
#print(dev[0].__dict__) # see what we got here
print("\n### CONNECTED DEVICES LIST ###")
for i in range( len( devList ) ):
print(f'\n devList[ {i} ] ')
print("serial identifier: ", devList[ i ].serial) #
print(f'result of ls in "{devList[ i ].shell("pwd")}":')
print(devList[ i ].shell("ls -al"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment