Part 2: Unknown option
I am on A14 on Pixel 7 Pro When the script gets to Part 2. It gets an error of "Error: Unknown option: --compile-layouts"
Same issue on PixelOS A14 on Xiaomi 11 Lite NE 5G.
Same thing on PixelOS A14 on OnePlus 9RT
Same error here on HyperOS A14 Xiaomi 13U
Run it separately: su -c cmd package compile -a --compile-layouts
DoulosTrieste
I did run it separately, I use command line pm compile -a --compile-layouts and the --compile-layouts is a unknow option, even I type pm -h to see the documents there's no --compile-layouts option under compile, but I have no problem skipping this, all app runs smoothly
My stock miui android14 doesn't know the --compile-layouts option too but the other ones works just fine. It increased the art-cache size 2.5x and the whole art-cache and dalvik-cache takes up 7GB in total. It's way more than my xiaomi mibox.
Also I tried this tweak on my xiaomi MIBOX4 and it breaks wifi and bluetooth drivers for some reason. BT remote doesn't work and usb mouse or keyboard don't work either. I tried to reset the cache but it doesn't work without root so, I tried to re-do the default optimisations again but it didn't fix the problem. I had to factory-reset the mibox to fix the driver problem.
So, be careful doing this optimisation tweaks folks. Apperantly it could cause serious problems on some devices.
A14
adb shell
pm compile -a -f -m speed-profile
pm compile -a -f compile-layouts
pm bg-dexopt-job