Skip to content

Navigation Menu

Sign in
Sign up

Adb support in plan? #1102

atline started this conversation in General
Mar 20, 2023 · 3 comments · 5 replies
Discussion options

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!

You must be logged in to vote

Replies: 3 comments 5 replies

Comment options

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?

You must be logged in to vote
3 replies
Comment options

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.

Comment options

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?

Comment options

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
Comment options

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?

You must be logged in to vote
0 replies
Comment options

FYI This has now been merged into labgrid

You must be logged in to vote
2 replies
Comment options

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.

Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /