android-perf-testing icon indicating copy to clipboard operation
android-perf-testing copied to clipboard

EnablePostTestDumpsys rule not working

Open marcosholgado opened this issue 8 years ago • 2 comments

I have completed the codelab and everything is fine except from the EnablePostTestDumpsys rule. Every time it gets executed the output is a blank file. I have tried with different phones (Nexus 5X, Samsung S7...) using Android N and HTC using Marshmallow but I haven't been able to get anything different.

Running the command line is fine (adb shell dumpsys gfxinfo com.google.android.perftesting framestat) but it doesn't work when running the LocalPerfTests tasks.

However if I use an emulator everything works fine and I get some data.

Any ideas?

marcosholgado avatar May 02 '17 12:05 marcosholgado

I also get a blank file and noticed this error:

Permission Denial: can't dump gfxinfo from from pid=20594, uid=10086 without permission android.permission.DUMP

When trying to add the DUMP permission to the android manifest, I found this:

"Permissions with the protection level signature or signatureOrSystem are only granted to system app. If an app is a regular non-system app, it will never be able to use these permissions."

+1 for a solution to this that doesn't require rooting the phone and installing the app as a system app

argo49 avatar Oct 19 '17 22:10 argo49

There is no solution to this with the current architecture, as Android doesn't allow access to DUMP permission for third-party apps. There is an alternative though - FrameMetrics

arsent avatar Feb 19 '19 16:02 arsent