Closed Bug 1502190 Opened Last year Closed Last year

[modevice] ADBDevice() fails on moto g5 due to permissions issue in /system/

Categories

(Testing :: Mozbase, defect)

defect
Not set

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: bc, Assigned: bc)

References

Details

Attachments

(3 files, 3 obsolete files)

I'm attempting to update the Docker images used at a Bitbar which means using the latest published mozdevice. Unfortunately this borks on the moto-g5 with

[worker:error] Traceback (most recent call last):
[worker:error]   File "/builds/taskcluster/script.py", line 92, in main
[worker:error]     device = ADBAndroid(device=env['DEVICE_SERIAL'])
[worker:error]   File "/usr/local/lib/python2.7/dist-packages/mozdevice/adb_android.py", line 96, in __init__
[worker:error]     require_root=require_root)
[worker:error]   File "/usr/local/lib/python2.7/dist-packages/mozdevice/adb.py", line 655, in __init__
[worker:error]     raise ADBError("ADBDevice.__init__: ls could not be found")
[worker:error] ADBError: ADBDevice.__init__: ls could not be found

This is because the shell user can't access /system/rfs: Permission denied which causes the return code to be 1 which we count as a failure.

We might be able to just do ls /sdcard instead of ls /system and if someone doesn't have /sdcard we can just tell them to go away.
Sakari @ Bitbar tested a number of devices and found  /sdcard was available on about 300 devices and all tested had it available. 11 of 280 devices failed the check for /system.
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&group_state=expanded&revision=9ad263f93218f22dfef3bbb18e8244b482947451

This won't fix the g5s until it is released on pypi. Geoff, once the try run is sufficiently complete could you go ahead and release mozdevice 1.4 please?
Attachment #9020333 - Flags: review?(jmaher)
Attachment #9020333 - Flags: feedback?(gbrown)
Once the new mozdevce 1.1.4 is available on pypi, we can bump the requirements to use it. Wait to land this until after the mozdevice 1.1.4 release.
Attachment #9020334 - Flags: review?(jmaher)
Blocks: 1502353
Comment on attachment 9020331 [details] [diff] [review]
bug-1502190-ADBDevice-init-use-ls-sdcard.patch

Review of attachment 9020331 [details] [diff] [review]:
-----------------------------------------------------------------

sort of rubber stamp territory here- we have been back and forth over the years on /sdcard or not- this gets us moving forward.  Curious if there are emulator issues.
Attachment #9020331 - Flags: review?(jmaher) → review+
(In reply to Bob Clary [:bc:] from comment #3)
> This won't fix the g5s until it is released on pypi. Geoff, once the try run
> is sufficiently complete could you go ahead and release mozdevice 1.4 please?

gbrown@mozpad2:~/src/testing/mozbase/mozdevice$ python setup.py sdist upload
...
Submitting dist/mozdevice-1.1.4.tar.gz to https://upload.pypi.org/legacy/
Server response (200): OK
Attachment #9020333 - Flags: feedback?(gbrown) → feedback+
Sorry, I messed that up the first time. Fixed now, but at 1.1.5.

gbrown@mozpad2:~/src/testing/mozbase/mozdevice$ python setup.py sdist upload
...
Submitting dist/mozdevice-1.1.5.tar.gz to https://upload.pypi.org/legacy/
Server response (200): OK
Attachment #9020333 - Attachment is obsolete: true
Attachment #9020369 - Flags: review+
Ok. I'll just need to adjust the mozdevice requirement patches. Thanks.
Attachment #9020334 - Attachment is obsolete: true
Attachment #9020371 - Flags: review+
Just realized I missed

/testing/mozbase/mozrunner/setup.py
15:    'mozdevice>=1.*',
Attachment #9020371 - Attachment is obsolete: true
Attachment #9020377 - Flags: review?(gbrown)
Attachment #9020377 - Flags: review?(gbrown) → review+
Pushed by bclary@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b8ee17253d7
[mozdevice] ADBDevice() should use ls /sdcard to detect ls version, r=jmaher.
https://hg.mozilla.org/integration/mozilla-inbound/rev/dec76ef6d620
release mozdevice 1.1.5, r=gbrown.
https://hg.mozilla.org/integration/mozilla-inbound/rev/43d1a6288fb9
bump mozdevice requirements for raptor, marionette, mozrunner, r=gbrown.
Blocks: 1504117
Blocks: 1483695
You need to log in before you can comment on or make changes to this bug.