0

I've read several Stackoverflow threads but decided to ask the question again because most threads are outdated. Currently i've created Espresso Tests and i want to get some kind of performance data while the test runs and after its finished. As far as i know you can get those data with the dumpsys via adb. By far i cant figure out to get the data i want (meminfo for example) without having the "android.permission.DUMP".

Is there any way currently to get the permission for testing purposes? I would like to get these infos on real devices aswell as on Emulator. By far i tried to get the permission via code (run adb command), use the Espresso Grant Permission Rule class, put the permission in a debug AndoridManifest.xml but none of those solutions worked.

Can anyone help me?

Edit: I've asked this again because the other Threads are outdated and i hope for a solution that may have came up in the last years!

Lars
  • 794
  • 7
  • 21
  • Possible duplicate of [Dumpsys permission denial in java](https://stackoverflow.com/questions/11113349/dumpsys-permission-denial-in-java) – iVoid May 23 '18 at 16:47
  • the "duplicate" is about 5 Years old. I've seen this thread before and it doesn't help me by far. Thats why i decided to ask this question again. I thought that maybe in 5 Years someone found a way to achieve this permission for Testing in Android. – Lars May 24 '18 at 07:24
  • It's a policy change by Google done 5 years ago for improving security. You can't dumpsys without being system app or signed app. Nothing has changed in this policy since then. – iVoid May 25 '18 at 06:34
  • Ive found the codelab: https://codelabs.developers.google.com/codelabs/android-perf-testing/index.html?index=..%2F..%2Findex#0 by far i'am trying to set it up for my project. I'am not sure if its working. Because it was updated in the last 5 Years but probably working with the policy change by Google. – Lars May 26 '18 at 08:10

0 Answers0