New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 846032 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

out/Debug/bin/chrome_public_apk launch fails for non-rooted devices

Project Member Reported by agrieve@chromium.org, May 23 2018

Issue description

There's no reason this should require root.

E    1.229s launch(HT69B0201161)  Failed to set flags
Traceback (most recent call last):
  File "/usr/local/google/home/samans/chrm/src/build/android/apk_operations.py", line 127, in launch
    changer.ReplaceFlags(flags)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/flag_changer.py", line 113, in ReplaceFlags
    self._SetPermissive()
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/flag_changer.py", line 180, in _SetPermissive
    self._device.SetEnforce(enabled=False)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/decorators.py", line 57, in timeout_retry_wrapper
    retry_if_func=retry_if_func)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/utils/timeout_retry.py", line 158, in Run
    error_log_func=error_log_func)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 189, in JoinAll
    self._JoinAll(watcher, timeout)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 161, in _JoinAll
    thread.ReraiseIfException()
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/utils/reraiser_thread.py", line 84, in run
    self._ret = self._func(*self._args, **self._kwargs)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/utils/timeout_retry.py", line 151, in <lambda>
    child_thread = reraiser_thread.ReraiserThread(lambda: func(*args, **kwargs),
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl
    return f(*args, **kwargs)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/device_utils.py", line 2536, in SetEnforce
    check_return=True)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/decorators.py", line 51, in timeout_retry_wrapper
    return impl()
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/decorators.py", line 47, in impl
    return f(*args, **kwargs)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/device_utils.py", line 1112, in RunShellCommand
    output = handle_large_output(cmd, large_output)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/device_utils.py", line 1081, in handle_large_output
    return handle_large_command(cmd)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/device_utils.py", line 1063, in handle_large_command
    return handle_check_return(cmd)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/device_utils.py", line 1054, in handle_check_return
    return run(cmd)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/device_utils.py", line 1050, in run
    return self.adb.Shell(cmd)
  File "/usr/local/google/home/samans/chrm/src/third_party/catapult/devil/devil/android/sdk/adb_wrapper.py", line 538, in Shell
    command, output, status=status, device_serial=self._device_serial)
AdbShellCommandFailedError: (device: HT69B0201161) shell command run via adb failed on the device:
  command: setenforce 0
  exit status: 1
  output:
  - setenforce: Couldn't set enforcing status to '0': Permission denied
 

Comment 1 by wnwen@chromium.org, May 23 2018

This stems from: https://crbug.com/699082

  def _SetPermissive(self):
    """Set SELinux to permissive, if needed.

    On Android N and above this is needed in order to allow Chrome to read the
    command line file.

    TODO(crbug.com/699082): Remove when a better solution exists.
    """

Not sure if we have a workaround for N+ phones that aren't rooted.

Comment 2 by wnwen@chromium.org, May 23 2018

Status: Assigned (was: Available)

Comment 3 by wnwen@chromium.org, May 24 2018

Cc: wnwen@chromium.org
Owner: ----
Status: Available (was: Assigned)
Making available if anyone would like to dig into the SELinux issue.
Labels: DevX
Status: Untriaged (was: Available)
Available, but no owner or component? Please find a component, as no one will ever find this without one.
Labels: QuickFix
Status: Available (was: Untriaged)

Sign in to add a comment