New issue
Advanced search Search tips

Issue 922228 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

remove_preinstalled_webview script fails with "ailed to enable modification of system apps on non-rooted device"

Project Member Reported by jam@chromium.org, Jan 15

Issue description

jam@jam-linux:~/android/src$ android_webview/tools/remove_preinstalled_webview.py
Uninstalling updates from emulator-5554...
Removing system images from emulator-5554...
Traceback (most recent call last):
  File "android_webview/tools/remove_preinstalled_webview.py", line 120, in <module>
    sys.exit(main())
  File "android_webview/tools/remove_preinstalled_webview.py", line 116, in main
    device_utils.DeviceUtils.parallel(devices).pMap(RemovePreinstalledWebViews)
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/utils/parallelizer.py", line 263, in pMap
    r.pFinish(None)
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/utils/parallelizer.py", line 135, in pFinish
    self._objs.JoinAll()
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 198, in JoinAll
    self._JoinAll(watcher, timeout)
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 170, in _JoinAll
    thread.ReraiseIfException()
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 93, in run
    self._ret = self._func(*self._args, **self._kwargs)
  File "android_webview/tools/remove_preinstalled_webview.py", line 89, in RemovePreinstalledWebViews
    UninstallWebViewSystemImages(device)
  File "android_webview/tools/remove_preinstalled_webview.py", line 60, in UninstallWebViewSystemImages
    system_app.RemoveSystemApps(device, WEBVIEW_PACKAGES)
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/android/tools/system_app.py", line 55, in RemoveSystemApps
    with EnableSystemAppModification(device):
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/usr/local/google/home/jam/android/src/third_party/catapult/devil/devil/android/tools/system_app.py", line 112, in EnableSystemAppModification
    str(device))
devil.android.device_errors.CommandFailedError: (device: emulator-5554) Failed to enable modification of system apps on non-rooted device
jam@jam-linux:~/android/src$ adb shell getprop ro.build.fingerprint
google/sdk_gphone_x86/generic_x86:9/PSR1.180720.061/5075414:userdebug/dev-keys

 
My script (remove_preinstalled_webview.py [1]) definitely enables root, and it seems devil tries as well [2], yet this still fails.

jbudorick@ do you know if this is a devil bug or an issue with the emulator?

[1] https://cs.chromium.org/chromium/src/android_webview/tools/remove_preinstalled_webview.py?l=1&rcl=8ee8373ae9828abad9ed511dff1fddaac7479955
[2] https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/tools/system_app.py?l=111&rcl=96320b515106e029ad6326b81cb6feef5660c6a8
Looks like -writable-system needs to be added when starting the emulator. I made suggestions to https://docs.google.com/document/d/1RvorDadxWRNFDv7QyeG1WdwasMexJJvSaiAKyaImEbs/edit#
Nice find. jbudorick@ what do you think about adding a clearer exception (or user-visible logging) to the devil method? If not, I could add this to my script.
Owner: ntfschr@chromium.org
Status: Assigned (was: Untriaged)
I'll see if I can give better output for the script.

Sign in to add a comment