Closed Bug 1482970 Opened 6 years ago Closed 6 years ago

ADBRootError: Can not run command ls -a /storage/sdcard0/ as root!

Categories

(Testing :: mozregression, defect)

Version 3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1482843

People

(Reporter: miketaylr, Unassigned)

Details

I'm trying to run mozregression on an unrooted Samsung Galaxy Tab S2 running Android 7. I also get the same error on my Pixel running Android 9.

mozregression --version
2.3.30


mozregression --app=fennec --good=61

**********
You should use a config file. Please use the --write-config command line flag to help you create one.
**********

 0:00.32 INFO: No 'bad' option specified, using 2018-08-13
 0:00.83 INFO: Using date 2018-05-07 for release 61
 0:06.71 INFO: Testing good and bad builds to ensure that they are really good and bad...
 0:06.71 INFO: Downloading build from: https://archive.mozilla.org/pub/mobile/nightly/2018/05/2018-05-07-16-37-13-mozilla-central-android-api-16/fennec-62.0a1.multi.android-arm.apk
===== Downloaded 100% =====
 0:12.07 INFO: Running mozilla-central build for 2018-05-07
 0:12.10 INFO: application_buildid: 20180507163713
 0:12.10 INFO: application_changeset: 2d95d70298e248161b629ef1d0d57049c0b62d71
 0:12.10 INFO: application_name: Fennec
 0:12.10 INFO: application_repository: https://hg.mozilla.org/mozilla-central
 0:12.10 INFO: application_version: 62.0a1
 0:12.10 INFO: package_name: org.mozilla.fennec_aurora
 0:13.09 INFO: /system/bin/ls -1A supported
 0:13.20 INFO: Native cp support: True
 0:13.42 INFO: Native chmod -R support: True
 0:13.64 INFO: Setting SELinux Permissive Mode
 0:13.64 WARNING: Unable to set SELinux Permissive due to Can not run command setenforce Permissive as root!.
 0:27.89 ERROR: Unable to start the application
Traceback (most recent call last):

  File "/usr/local/lib/python2.7/site-packages/mozregression/launchers.py", line 66, in start
    self._start(**kwargs)

  File "/usr/local/lib/python2.7/site-packages/mozregression/launchers.py", line 366, in _start
    self.remote_profile = "/".join([self.adb.test_root,

  File "/Users/mitaylor/Library/Python/2.7/lib/python/site-packages/mozdevice/adb.py", line 798, in test_root
    if self._try_test_root(test_root):

  File "/Users/mitaylor/Library/Python/2.7/lib/python/site-packages/mozdevice/adb.py", line 814, in _try_test_root
    if not self.is_dir(base_path, root=True):

  File "/Users/mitaylor/Library/Python/2.7/lib/python/site-packages/mozdevice/adb.py", line 1572, in is_dir
    return self.shell_bool('ls -a %s/' % path, timeout=timeout, root=root)

  File "/Users/mitaylor/Library/Python/2.7/lib/python/site-packages/mozdevice/adb.py", line 1158, in shell_bool
    timeout=timeout, root=root)

  File "/Users/mitaylor/Library/Python/2.7/lib/python/site-packages/mozdevice/adb.py", line 1073, in shell
    raise ADBRootError('Can not run command %s as root!' % cmd)

ADBRootError: Can not run command ls -a /storage/sdcard0/ as root!

 0:27.89 ERROR: Unable to start the application
 0:27.90 INFO: Last good revision: 2d95d70298e248161b629ef1d0d57049c0b62d71 (2018-05-07)
 0:27.90 INFO: First bad revision: bf79440c1376b1e1114ba653917e1577d7b1007b (2018-08-13)
 0:27.90 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2d95d70298e248161b629ef1d0d57049c0b62d71&tochange=bf79440c1376b1e1114ba653917e1577d7b1007b

 0:27.90 INFO: To resume, run:
 0:27.90 INFO: /usr/local/bin/mozregression --app=fennec --repo=mozilla-central --good=2018-05-07 --bad=2018-08-13
Thanks for the report! I believe this is a duplicate, should have a fix available in not too long.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Cool!

miketaylr: This should have been fixed by mozdevice 4.0.0 and mozregression 4.0.11.

You need to log in before you can comment on or make changes to this bug.