Hello,I am facing some trouble due to a change in android-4.4_r1: https://android.googlesource.com/platform/frameworks/base.git/+/3714141d287c965ea3451831dd5167f63f8db87bThis change to the protectionLevel for BATTERY_STATS to system|signature refers to an issue #10971287 that I believe is not in the public issue tracker and the change was not listed in any changelog that I could find. The comment of the permission in the manifest still says "<!-- Allows an application to collect battery statistics -->"The problem with the change is that if affects a serie of apps (mine is called BetterBatteryStats) that is using the formerly known batteryinfo now called batterystats service to retrieve valuable detailed info. The same service is used by the settings - battery overview. On the other hand experiencing with copying the apk to /system/app on my phone (on kitkat) shows some difference in behaviour from previous android versions as I still get the error:W/PackageManager( 458): Not granting permission android.permission.BATTERY_STATS to package ......Now my questions to that change:- I would be really interested in knowing the details about the issue motivating the change from protectionLevel "dangerous" to "system|signature" (a hint about why copying my apk to /system/app does not work as it used to be for would be great too so that I can go on with testing)- Knowing that there are quite a few apps (like mine) using this permission to improve user experience by showing battery hogs I would like to request moving that permission back to "dangerous"CheersSven
Hello,I am facing some trouble due to a change in android-4.4_r1: https://android.googlesource.com/platform/frameworks/base.git/+/3714141d287c965ea3451831dd5167f63f8db87bThis change to the protectionLevel for BATTERY_STATS to system|signature refers to an issue #10971287 that I believe is not in the public issue tracker and the change was not listed in any changelog that I could find. The comment of the permission in the manifest still says "<!-- Allows an application to collect battery statistics -->"The problem with the change is that if affects a serie of apps (mine is called BetterBatteryStats) that is using the formerly known batteryinfo now called batterystats service to retrieve valuable detailed info. The same service is used by the settings - battery overview. On the other hand experiencing with copying the apk to /system/app on my phone (on kitkat) shows some difference in behaviour from previous android versions as I still get the error:W/PackageManager( 458): Not granting permission android.permission.BATTERY_STATS to package ......Now my questions to that change:- I would be really interested in knowing the details about the issue motivating the change from protectionLevel "dangerous" to "system|signature" (a hint about why copying my apk to /system/app does not work as it used to be for would be great too so that I can go on with testing)
- Knowing that there are quite a few apps (like mine) using this permission to improve user experience by showing battery hogs I would like to request moving that permission back to "dangerous"
CheersSven
Hi Sven,
On Monday, November 4, 2013 3:08:35 AM UTC+5:30, Sven Knispel wrote:Hello,I am facing some trouble due to a change in android-4.4_r1: https://android.googlesource.com/platform/frameworks/base.git/+/3714141d287c965ea3451831dd5167f63f8db87bThis change to the protectionLevel for BATTERY_STATS to system|signature refers to an issue #10971287 that I believe is not in the public issue tracker and the change was not listed in any changelog that I could find. The comment of the permission in the manifest still says "<!-- Allows an application to collect battery statistics -->"The problem with the change is that if affects a serie of apps (mine is called BetterBatteryStats) that is using the formerly known batteryinfo now called batterystats service to retrieve valuable detailed info. The same service is used by the settings - battery overview. On the other hand experiencing with copying the apk to /system/app on my phone (on kitkat) shows some difference in behaviour from previous android versions as I still get the error:W/PackageManager( 458): Not granting permission android.permission.BATTERY_STATS to package ......Now my questions to that change:- I would be really interested in knowing the details about the issue motivating the change from protectionLevel "dangerous" to "system|signature" (a hint about why copying my apk to /system/app does not work as it used to be for would be great too so that I can go on with testing)yea there is no mentioning of any reason for the issue: 10971287 and also i think it is some kind of private issue raised by internal team, since it is also not visible anywhere else including https://code.google.com/p/android/issues/list.
And as far as talking about copying apk to system-app, Yea definitely it wont work, as because of the simple reason that, putting your app in /system/app/ at runtime doesn't give it the system signature, and while if any app is signed with platform signature than only it will be granted the permission with system|signature, And thus if you sign your app with any system signature than only your app will get the feature you are desiring.
- Knowing that there are quite a few apps (like mine) using this permission to improve user experience by showing battery hogs I would like to request moving that permission back to "dangerous"i think for reverting that commit, you should raise this issue/suggestion @https://code.google.com/p/android/issues/list with mentioning about this link: (https://android.googlesource.com/platform/frameworks/base/+/3714141d287c965ea3451831dd5167f63f8db87b%5E%21/) and see what happens.
> so I was expecting the presence in /system/app to be enough to pass the> test on permissionLevel 18It should, though it is conceivable some rules here changed with Android 4.4.