AppManager
AppManager copied to clipboard
Cant reset optimization profile in adb mode
Please check before submitting an issue
- [x] I know what my device, OS and App Manager versions are
- [x] I know how to take logs
- [x] I know how to reproduce the issue which may not be specific to my device
Describe the bug
In adb mode I have set an optimisation profile but I can no longer reset it
I don't know if it's possible to bypass this or if you need root privileges
To Reproduce
No response
Expected behavior
No response
Screenshots
No response
Logs
====> op=DEXOPT, pkg=com.miui.calculator, failed=dexopt-mode
java.lang.SecurityException: Only the system can clear all profile data
at android.os.Parcel.createExceptionOrNull(Parcel.java:2426)
at android.os.Parcel.createException(Parcel.java:2410)
at android.os.Parcel.readException(Parcel.java:2393)
at android.os.Parcel.readException(Parcel.java:2335)
at android.content.pm.IPackageManager$Stub$Proxy.clearApplicationProfileData(IPackageManager.java:7549)
at io.github.muntashirakon.AppManager.apk.dexopt.DexOptimizer.clearApplicationProfileData(DexOptimizer.java:59)
at io.github.muntashirakon.AppManager.batchops.BatchOpsManager.opPerformDexOpt(BatchOpsManager.java:894)
at io.github.muntashirakon.AppManager.batchops.BatchOpsManager.performOp(BatchOpsManager.java:279)
at io.github.muntashirakon.AppManager.batchops.BatchOpsManager.performOp(BatchOpsManager.java:226)
at io.github.muntashirakon.AppManager.batchops.BatchOpsService.onHandleIntent(BatchOpsService.java:141)
at io.github.muntashirakon.AppManager.types.ForegroundService$ServiceHandler.handleMessage(ForegroundService.java:73)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.pm.PackageManagerService.enforceSystemOrRoot(PackageManagerService.java:12542)
at com.android.server.pm.PackageManagerService.clearApplicationProfileData(PackageManagerService.java:22883)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:3459)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8628)
at android.os.Binder.execTransactInternal(Binder.java:1182)
Device info
- Device: Redmi Note 9 Pro
- OS Version: Android 12 (MIUI 14)
- App Manager Version: 4.0.5
- Mode: ADB
Additional context
No response
You can try pm compile --reset -a. Not sure if it works or not, I've implemented that feature a long time ago, forgot some details.
There's a similar situation going on. I can set a profile, but I cannot reset it.
I was just testing this feature on com.miui.calculator and finally noticed that you can set a profile on any app but you can't reset it
I see. I'll add a notice there.