Issue
I'm a total beginner and I struggle to acces to the ADB devices list and print it.
here is my starting code:
import ppadb
from ppadb.client import Client
adb = Client(host='localhost', port=5037)
devices = adb.devices()
This code succeed to find all the ABD devices connect to my computer. Unfortunately, when i type this
print (devices)
the console return
[<ppadb.device.Device object at 0x00000139C6FC8F40>]
How can I manage to have acces to a usable list ?
thanks in advance for your help
Solution
What you need is to loop through the Device
objects and return the serial
for device in devices:
print (device.serial)
this roughly corresponds to the outcome of adb devices
.
Answered By - Lino
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.