Hi Dear MIUI Fan's!
Today i'll show you how to Optimize all APP for running it faster, smoother and with less battery power! I'm not Android developer but i try explain all with simple word for better understanding for normal user. If you are ready than i can start!))
To this moment your device use ART JIT Compiler for running apps. ART JIT - is a Android Runtime Just in Time. This mean Android compile code every time for running app.
But ART have profile compiler AOT (Ahead of Time) and he is not activate for app in android, but you can activate it from ADB SHELL.
1.The user runs the app, which then triggers ART to load the .dex file.
2. JIT is enabled for any application that is not compiled according to the speed compilation filter (which says "compile as much as you can from the app").
3. The JIT profile data is dumped to a file in a system directory that only the application can access.
4. The AOT compilation (dex2oat) daemon parses that file to drive its compilation.
And now let's look at the pros and cons:
- Run APP faster
- Use less power
- Applications install a little longer (but not very noticeably)
- Use more storage
This is not recomend to use on device with 16\32 GB storage
If briefly the following commands make it possible to compile the code into an offline profile (.aot file) to run applications.
Do not forget!! The more applications installed, the more space will be taken after a new compilation.
Here is a resoult
Download Platform-tools and run CMD from folder Platform-tool
Enable USB Debugging and USB debugging Secure Settings in Developer options your device.
To force compilation, run the following:
adb shell cmd package compile
Common use cases for force compiling a specific package:
My-Package is apk name from Settings
photo_2020-06-22_21-23-14.jpg (84.01 KB, Downloads: 15)
2020-06-23 02:35:25 Upload
photo_2020-06-22_21-23-08.jpg (63 KB, Downloads: 19)
2020-06-23 02:35:25 Upload
If command right and all ok, you will see Success word after commandadb shell cmd package compile -m speed -f com.tencent.mobileqq
adb shell cmd package compile -m speed -f my-package
Common use cases for force compiling all packages:
adb shell cmd package compile -m speed -f -a
Example i compile all APP
Clearing profile data (revert all back)
To clear profile data and remove compiled code, run the following with ROOT:
adb shell cmd package compile --reset my-package
adb shell cmd package compile --reset -a
[MIUI with Tom #22] How You Can Check ARB Version MIUI ROM before Downgrade!
[MIUI with Tom #20] How to use ADB and FASTBOOT Command directly from CMD!
Thanks to all for your time!
Also thanks to Admin MIUI Community!
[MIUI with Tom #3] How to set 6 toogle in status bar, and Desktop Grid in MIUI 11 China Without Root
In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .