This issue causes the following Chromium Telemetry failure:
(ERROR) 2016-02-16 17:36:08,660 network_controller_backend.InstallTestCa:139 Failed to install test certificate authority on target platform. Browsers may fall back to ignoring certificate errors.
Traceback (most recent call last):
File ".../chromium/src/third_party/catapult/telemetry/telemetry/internal/platform/network_controller_backend.py", line 135, in InstallTestCa
self._platform_backend.InstallTestCa(self._wpr_ca_cert_path)
File ".../chromium/src/third_party/catapult/telemetry/telemetry/internal/platform/android_platform_backend.py", line 547, in InstallTestCa
self._device_cert_util.install_cert(overwrite_cert=True)
File ".../chromium/src/third_party/catapult/telemetry/third_party/webpagereplay/adb_install_cert.py", line 163, in install_cert
raise CertInstallError('Cert Install Failed')
CertInstallError: Cert Install Failed
The su command requires its first argument to be an integer in Android M:
https://android.googlesource.com/platform/system/extras/+/lollipop-release/su/su.c#43 (Android L) https://android.googlesource.com/platform/system/extras/+/marshmallow-release/su/su.c#39 (Android M)
Therefore, the AndroidCertInstaller._adb_su_shell() method needs to execute su 0 args instead of su -c args if the device is running Android M (see https://code.google.com/p/chromium/codesearch#chromium/src/build/android/devil/android/device_utils.py&l=320).
This issue causes the following Chromium Telemetry failure: