CleanExpert icon indicating copy to clipboard operation
CleanExpert copied to clipboard

ads clean

Open mzlogin opened this issue 9 years ago • 5 comments

  • [ ] ads scan
  • [ ] ads clean
  • [ ] ui

mzlogin avatar Jan 20 '16 14:01 mzlogin

hang while clear all unused data

sunil-singh-chaudhary avatar Aug 09 '16 13:08 sunil-singh-chaudhary

@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

mzlogin avatar Aug 10 '16 05:08 mzlogin

have you solved that bug or any alternative for Cache Clean?

bhavikgandhi007 avatar Feb 26 '17 11:02 bhavikgandhi007

@bhavikgandhi007 I just catch that exception, and did not continue work on new solution for cache clean.

mzlogin avatar Feb 26 '17 14:02 mzlogin

@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.

Dentrax avatar Sep 05 '18 12:09 Dentrax