Closed Bug 1633894 Opened 4 years ago Closed 4 years ago

[mozdevice] mozdevice initialization fails on devices where /sdcard does not exist

Categories

(Testing :: Mozbase, enhancement, P2)

Version 3
enhancement

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

Details

(Whiteboard: [kaios])

Attachments

(1 file)

On my KaiOS image, /sdcard is a broken link:

$ adb shell ls -l /sdcard
lrw-r--r-- 1 root root 21 2020-04-24 03:06 /sdcard -> /storage/self/primary
$ adb shell ls -l /storage/self/primary
lrwxrwxrwx 1 root root 19 1970-01-01 00:00 /storage/self/primary -> /mnt/user/0/primary
$ adb shell ls -l /mnt/user/0/primary
ls: /mnt/user/0/primary: No such file or directory

This causes mozdevice to raise:

adb ADBDevice: {'_require_root': True, '_logger': <mozlog.structuredlog.StructuredLogger object at 0x7fcc1a6b0310>, '_adb_version': '', '_adb_host': None, '_adb_port': None, '_timeout': 300, '_polling_interval': 0.1, '_adb_path': 'adb', '_verbose': True}
adb Using adb 1.0.41
adb shell_output: adb -s emulator-5554 wait-for-device shell id; echo adb_returncode=$?, timeout: 300, root: False, timedout: None, exitcode: 0, output: uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:su:s0
adb adbd running as root
adb Check for su -c failed
adb shell_output: adb -s emulator-5554 wait-for-device shell su 0 id; echo adb_returncode=$?, timeout: 300, root: False, timedout: None, exitcode: 0, output: uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:su:s0
adb su 0 supported
Traceback (most recent call last):
  File "kaiosxpcshelltests.py", line 570, in <module>
    main()
  File "kaiosxpcshelltests.py", line 558, in main
    xpcsh = XPCShellRemote(options, log)
  File "kaiosxpcshelltests.py", line 243, in __init__
    verbose=verbose)
  File "/usr/local/lib/python2.7/dist-packages/mozdevice/adb.py", line 685, in __init__
    raise ADBTimeoutError("ADBDevice: /sdcard not found.")
mozdevice.adb.ADBTimeoutError: ADBDevice: /sdcard not found.

Because:

https://searchfox.org/mozilla-central/rev/2bfe3415fb3a2fba9b1c694bc0b376365e086927/testing/mozbase/mozdevice/mozdevice/adb.py#694

Changing to /system works for KaiOS. I'm checking existing android-em/android-hw....

Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a79c849e288e
[mozdevice] Use /system instead of /sdcard for ls test; r=bc
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Whiteboard: [kaios]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: