Closed lwasyl closed 1 year ago
Thanks for the suggestion.
I did consider ANDROID_SERIAL
but it seems like one can always create a temporary shell alias to do that instead.
show a device picker when multiple devices are connected, so instead of the command failing, I'd be able to choose which device to run the command on
This is nice. Right now, there is a warning but you are right, it can definitely improve.
opt-in to running a command on all devices, accepting that the output might be not helpful.
I like this idea, may by -m
mode for certain commands like uninstall
or rotate
where there isn't a desire to care about the output?
I did consider ANDROID_SERIAL but it seems like one can always create a temporary shell alias to do that instead.
The hurdle I aimed to improve is extracting the proper value of ANDROID_SERIAL
. For example if I start two different emulators, they might have different serial values (5554 or 5556), so I'd need to create more aliases with all the possible values beforehand. This, coupled with different serial values when wifi debugging is used means you'd need several aliases with just a handful of devices. That's why I suggested to have adbe
set proper ANDROID_SERIAL
for me
mode for certain commands like uninstall or rotate where there isn't a desire to care about the output?
Exactly, I think there's a number of commands that either realistically never fail (like show-taps
) or the failure would mean the desired result is achieved (like uninstall)
. If it's possible to only allow such multi-device mode for particular commands, I think it makes perfect sense :+1:
Exactly, I think there's a number of commands that either realistically never fail (like show-taps) or the failure would mean the desired result is achieved (like uninstall). If it's possible to only allow such multi-device mode for particular commands, I think it makes perfect sense
Indeed.
Do you know sufficient Python and would you like to add a new -m
parameter?
You can start by adding it to exactly one command say show-taps
and then add it to more commands later on.
Most of the glue code to run against particular ANDROID_SERIAL
is already there.
What you are looking for is a function to just get a list of serials and that's present as well (see adbe devices
command) and run against all the serials one by one while printing the result.
A device picker would be great, I've been using a similar script for a few years and it makes a huge difference. I wound add that a "run on all devices" sound be added of anyone is taking the time to add a device picker. (I might do it, but I've written about 50 lines of python my whole life)
@stavfx Thanks I will consider adding it.
As of now, --serial
is supported.
This allows you to run against a particular device.
Reopening https://github.com/ashishb/adb-enhanced/issues/128 as new issue, per Github's suggestion:
I think having some sort of multiple devices support might be a nice addition, or at least some sort of
enhanced
wrapping around existing multi-device capabilities ofadb
. Couple of ideas/suggestions that I feel would make my workflow easier:adbe animations <on|off>
oradbe start <app_name>
ANDROID_SERIAL
, so subsequent commands use that device tooadbe select-device
could be introduced to make it easier to setANDROID_SERIAL
for subsequent adb runs?I realize all of those are tricky and require a bit more thought than simply adding a new command (e.g. what if currently used device is disconnected?) but choosing the device with regular
adb
is clunky and seems like something thatadbe
could improve upon