phablet-test-run doesn't work with emulators out of the box, looks for 'usb' in adb
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Phablet Tools |
Fix Committed
|
Undecided
|
Unassigned | ||
phablet-tools (Ubuntu) |
Fix Released
|
Medium
|
Sergio Schvezov |
Bug Description
phablet-test-run includes the following code to select a "default" device to connect to:
if test -z $ANDROID_SERIAL; then
ANDROID_
fi
export ANDROID_
But this doesn't match the output of 'adb devices' for the ubuntu emulator:
$ adb devices -l
List of devices attached
emulator-5554 device product:occam model:Nexus_4 device:mako
$
I think phablet-test-run should just default to whichever device is the first listed, regardless of whether it's connected over usb:
ANDROID_
Or else, not set ANDROID_SERIAL at all by default, and pass through the normal behavior of adb: succeed without warning if a single device is connected, require $ANDROID_SERIAL or -s to be specified if there are multiple devices present.
Related branches
- Ricardo Salveti (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 59 lines (+5/-17)1 file modifiedphablet-test-run (+5/-17)
Changed in phablet-tools (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
On 18/01/14 19:26, Steve Langasek wrote: SERIAL= $(adb devices -l | grep usb | cut -f 1 -d " " | head -n1) SERIAL= $ANDROID_ SERIAL SERIAL= $(adb devices -l | awk '/device .*product/ { print
> Public bug reported:
>
> phablet-test-run includes the following code to select a "default"
> device to connect to:
>
> if test -z $ANDROID_SERIAL; then
> ANDROID_
> fi
> export ANDROID_
>
> But this doesn't match the output of 'adb devices' for the ubuntu
> emulator:
>
> $ adb devices -l
> List of devices attached
> emulator-5554 device product:occam model:Nexus_4 device:mako
>
> $
>
> I think phablet-test-run should just default to whichever device is the
> first listed, regardless of whether it's connected over usb:
>
> ANDROID_
> $1; q }')
>
> Or else, not set ANDROID_SERIAL at all by default, and pass through the
> normal behavior of adb: succeed without warning if a single device is
> connected, require $ANDROID_SERIAL or -s to be specified if there are
> multiple devices present.
This is the default behaviour for most tools and what to expect from
Android; I'm guessing someone had reasons to add this for ci or QA; I'll
track it down and ask if they have a use case for this; if not; changing
it to feel as the other helper tools.
Cheers