Added system property (dumpstate.unroot).
Dumpstate starts off as root but drops root as soon as it's done with some important commands and actions that need root privilege. After that, on non-user builds it's still possible to assume root with 'su root <cmd>', which it does with AsRoot() option. This means that the output of such commands (i.e. commands that are run after dropping root, and require root priviliges) on user-debug builds differ from those on user devices. This can make it hard for developers to anticipate what bugreports from user builds are going to look like. dumpstate.unroot property allows ignoring the availability of "su" in non-user builds and emulate the user build behavior for those commands. Fixes: 117980186 Test: adb shell setprop dumpstate.unroot true && \ adb shell cmd activity bug-report --progress Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test --gtest_filter=DumpstateTest.RunCommandAsRootNonUserBuild_withUnroot Test: adb shell /data/nativetest64/dumpstate_test/dumpstate_test --gtest_filter=DumpstateTest.RunCommandAsRootIfAvailableOnDebugBuild_withUnroot Change-Id: I8d8d2f0733a8d13754c7d2e6a0d323c73afcbbbb
Loading
Please register or sign in to comment