Status Update
Comments
ze...@google.com <ze...@google.com>
jb...@google.com <jb...@google.com>
sh...@google.com <sh...@google.com> #2
pr...@gmail.com <pr...@gmail.com> #3
Yes, I'm working on debuggable apps. I tracked this issue down to here:
https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-main/profiler/native/perfd/cpu/simpleperf.cc#129 https://android.googlesource.com/platform/tools/base/+/refs/heads/mirror-goog-studio-main/transport/native/utils/device_info.android.cc#71
As you can see, if ro.build.type
!= user
then we assume that su
must be present, and if it's not there then both KillSimpleperf()
and GetRecordCommand()
will fail.
sh...@google.com <sh...@google.com> #4
You are right that the code assumes su
must be present on non-user build types. This assumption is true on most of devices shipped by OEMs, and all emulator images shipped by Google.
As you are probably also aware, a workaround is to use the user
build, which should be accessible for anyone who can access the userdebug flavor.
Your suggestion to add a check for the existence of su
is technically feasible. However, the profiler team has many priorities and we have little resources to work on this issue. The number of developers who work on a userdebug devices without su
is limited. So I'm marking this issue as infeasbile, due to engineering hours. Sorry for any inconvenience. Pleas reply to this issue if you have any further questions.
Description
Because of how non-user builds are treated in platform/tools/base, transport is blindly assuming that non-user build must have a su binary. Replacing these checks with some kind of
is_su_present_
would fix that. There are many userdebug devices without su binary in the wild so it'd be nice if that was corrected.Studio Build: 4.2.1 Version of Gradle Plugin: n/a Version of Gradle: n/a Version of Java: 11 OS: Linux
Steps to Reproduce: