Open mstange opened 3 months ago
Oh, I just learned that su
isn't something that's provided by Android, it's provided by the rooting mechanism.
I think it's fine to modify SystemWideProfiler class in app_profiler.py to support your case "having su, but not adb root". It would be great if you'd like send a patch for review. Some instructions are in https://android.googlesource.com/platform/system/extras/+/master/simpleperf/doc/README.md#bugs-and-contribution. Otherwise, I can make the change for you.
Description
I have a rooted Android phone.
When I run
./app_profiler.py --system_wide
, I get the following output:After debugging, I found out that the scripts have a way to use
adb root
+adb unroot
if thero.build.type
is notuser
. But my phone's build type isuser
, andadb root
printsadbd cannot run as root in production builds
.However, I can run simpleperf as root manually using
adb shell su -c "..."
.Could we adjust the scripts so that they do this?
cc @yabinc