3

I am using an app for some benchmarking purpose

When I install the app I'm getting these logs from packagemanager. The android version is Marshmallow and I know that the app targetSdkVersion is 22 (so I expect this to work with M)

09-07 02:24:05.407  1174  1204 W PackageManager: Not granting permission android.permission.READ_PHONE_STATE to package com.antutu.ABenchMark because it was previously installed without
09-07 02:24:05.407  1174  1204 W PackageManager: Not granting permission android.permission.READ_EXTERNAL_STORAGE to package com.antutu.ABenchMark because it was previously installed without
09-07 02:24:05.407  1174  1204 W PackageManager: Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.antutu.ABenchMark because it was previously installed without

I am installing the app from a script once the boot completes

pm install -r /system/priv-app/Benchmarking/app/app-debug.apk > /dev/kmsg
pm grant com.antutu.ABenchMark android.permission.READ_PHONE_STATE
pm grant com.antutu.ABenchMark android.permission.WRITE_EXTERNAL_STORAGE
pm grant com.antutu.ABenchMark android.permission.READ_EXTERNAL_STORAGE
am start -n com.antutu.ABenchMark/com.antutu.ABenchMark.ABenchMarkStart -e 74Sd42l35nH e57b6eb9906e27062fc7fcfcc820b957a5c33b649 > /dev/kmsg

Also I am using a h/w emulator instead of development board so its like trying a fresh OS each time and install app

Ton van den Heuvel
  • 10,157
  • 6
  • 43
  • 82

1 Answers1

0

When you uninstall it before you install it again your problem will probably be fixed

 pm uninstall -r /system/priv-app/Benchmarking/app/app-debug.apk > /dev/kmsg
Rahul Kumar
  • 5,120
  • 5
  • 33
  • 44
Rick
  • 23
  • 8
  • Actually I'm using a hardware emulator so each time it's like trying a fresh version of OS, so will the above make a difference ? (just asking) – Hariprasad C R Mar 01 '17 at 11:10
  • not in all cases I think. but im working on a project at the moment and when i dont delete the program from my test device before i install it for some reason it wont clear the database stored on the device. so im not sure if it works. but I think its worth giving a try? – Rick Mar 01 '17 at 11:14