-
-
Notifications
You must be signed in to change notification settings - Fork 277
Hi, guys,
Currently we just setup linux board farm, but later we may want to extend that to android boards too. So, is adb support in labgrid plan?
Thanks!
All reactions
Replies: 3 comments 5 replies
As we don't have any Android boards in our labs, we don't have concrete plans for adb support. How would it be used? 'labgrid-client adb' and you get the interactive adb prompt?
All reactions
YES, labgrid-client adb shell something like this to check board status, and maybe more command needed like adb push to push files, adb install to install test apk, and adb shell am instrument -w com.android.mediaframeworktest/.MediaFrameworkTestRunner to test apk.
This could be helpful when we debug some tests which no need UI.
E.g. we could adb push some apks to device, and directly call instrument command to run our custom tests to check issues.
Meanwhile, we could also install one CTS package to devices, and directly run one test when encountered CTS failure.
Something like above, for the scenario which need UI assist, maybe something like "remote view server" needed be installed in devices, but this could be another topic.
All reactions
OK. For adb push and adb install we'll need to copy files to the exporter. However, I'd like to avoid having to parse all the possible ADB CLI commands. Do the commands have a fixed structure that would allow that?
All reactions
The full commands is here
Basically, I guess we could category these as next:
action = args[0]
if action == 'push':
drv.push(...) # labgrid-client -p imx8mm-evk-sh01 adb push local remote
# -- sync_to_resource needed
elif action == 'pull':
drv.pull(...) # labgrid-client -p imx8mm-evk-sh01 adb pull remote local
# -- not sure if labgrid can handle that, it's used to pull some files from device to linux pc
elif action == 'install':
drv.install(...) # labgrid-client -p imx8mm-evk-sh01 adb install file
# -- sync_to_resource needed
elif action == "shell" and len(args) == 1
drv.shell(...) # labgrid-client -p imx8mm-evk-sh01 adb shell
# -- this to open an interact shell
else:
drv(*args) # others like "labgrid-client -p imx8mm-evk-sh01 adb shell ls", "labgrid-client -p imx8mm-evk-sh01 adb get-serialno"
# -- directly call the command
All reactions
ADB itself is "client server" so if server would run close to device and listen then maybe better way would be for labgrid client to only setup the link?
All reactions
FYI This has now been merged into labgrid
All reactions
Nice, thanks @ep1cman . I haven't had a chance to try this, I do need to read/feel it later, this one: #1564, right?
Before that, a quick question: does it support adb kill-server or restart? How you make sure such operations won't impact other users with other android device on the same board server? Thanks.
All reactions
Nice, thanks @ep1cman . I haven't had a chance to try this, I do need to read/feel it later, this one: #1564, right?
Before that, a quick question: does it support adb kill-server or restart? How you make sure such operations won't impact other users with other android device on the same board server? Thanks.
It runs single device adb servers so it shouldn't affect other devices
All reactions
-
👍 1