CleanExpert
CleanExpert copied to clipboard
ads clean
- [ ] ads scan
- [ ] ads clean
- [ ] ui
hang while clear all unused data
@sunil-singh-chaudhary
Yeah, an exception occurred when calling freeStorageAndNotify
via refection.
08-10 13:37:52.758 15976-24549/org.mazhuang.cleanexpert W/System.err: java.lang.reflect.InvocationTargetException
08-10 13:37:52.758 15976-24549/org.mazhuang.cleanexpert W/System.err: at java.lang.reflect.Method.invoke(Native Method)
08-10 13:37:52.759 15976-24549/org.mazhuang.cleanexpert W/System.err: at org.mazhuang.cleanexpert.util.CleanUtil.freeAllAppsCache(CleanUtil.java:93)
08-10 13:37:52.760 15976-24549/org.mazhuang.cleanexpert W/System.err: at org.mazhuang.cleanexpert.ui.JunkCleanActivity$5.run(JunkCleanActivity.java:297)
08-10 13:37:52.760 15976-24549/org.mazhuang.cleanexpert W/System.err: at java.lang.Thread.run(Thread.java:818)
08-10 13:37:52.761 15976-24549/org.mazhuang.cleanexpert W/System.err: Caused by: java.lang.SecurityException: Neither user 10235 nor current process has android.permission.CLEAR_APP_CACHE.
08-10 13:37:52.761 15976-24549/org.mazhuang.cleanexpert W/System.err: at android.os.Parcel.readException(Parcel.java:1599)
08-10 13:37:52.761 15976-24549/org.mazhuang.cleanexpert W/System.err: at android.os.Parcel.readException(Parcel.java:1552)
08-10 13:37:52.762 15976-24549/org.mazhuang.cleanexpert W/System.err: at android.content.pm.IPackageManager$Stub$Proxy.freeStorageAndNotify(IPackageManager.java:4093)
08-10 13:37:52.762 15976-24549/org.mazhuang.cleanexpert W/System.err: at android.app.ApplicationPackageManager.freeStorageAndNotify(ApplicationPackageManager.java:1736)
08-10 13:37:52.762 15976-24549/org.mazhuang.cleanexpert W/System.err: at android.content.pm.PackageManager.freeStorageAndNotify(PackageManager.java:4092)
08-10 13:37:52.762 15976-24549/org.mazhuang.cleanexpert W/System.err: ... 4 more
Thanks for reporting.
It seems that protectionLevel
of android.permission.CLEAR_APP_CACHE
has changed to signature|privileged
, so third party app cannot be granted with it in regular way. System cache clean method via freeStorageAndNotify
won't work in new Android devices. Bad news!
https://github.com/android/platform_frameworks_base/tree/master/core/res#L1725
have you solved that bug or any alternative for Cache Clean?
@bhavikgandhi007 I just catch that exception, and did not continue work on new solution for cache clean.
@mzlogin Well, Could you provide an example of how to clean cache without using CLEAR_APP_CACHE permission for ANDROID > 6.0?
Also you may should simple-warning update the README.md file for that bad news.