Every time I do an OS update, it removes the root so I need to re-root my phone using TWRP. TWRP gives me the option to wipe the Dalvik Cache after flashing any sort of item. I understand that there is a good reason to wipe Dalvik after flashing a ROM. However, if all I did was an OTA update to my OS and flashed Magisk to root my phone, is there any benefit to wiping Dalvik cache?
1 Answer
As you mentioned you're using Magisk for root, I'm assuming you're running on Android 5 or up.
The answer would be no. You can safely ignore the "Wipe Dalvik Cache" after OTA updating and re-rooting.
Dalvik cache is compiled binary code (optimized DEX) for your installed applications, so it usually makes sense to wipe them if you removed/replaced your apps in recovery, or modified the ART runtime (like installing Xposed Framework). The odex files for system apps usually come with the system image and does not reside in the user dalvik-cache directory. Therefore there's no need to wipe cache if you root your phone or flash a new recovery, but recommended if anything related to application runtime has changed (e.g. Xposed).
-
-
-
2@beeshyams With my expertise in Android, I'd say it's pointless as long as ART (or every Java thing) is left intact.– iBugCommented Aug 17, 2018 at 6:05
-
It's worth mentioning that the Dalvik cache is automatically pruned at startup, so, even if you removed an app from recovery, purging it would probably be just a waste of time.– GrimoireCommented Aug 27, 2018 at 0:54