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 1


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

  • That's right, I have Android 8.1 Commented Aug 17, 2018 at 5:51
  • So wiping it after installing a kernel is pointless?
    – beeshyams
    Commented Aug 17, 2018 at 5:56
  • 2
    @beeshyams With my expertise in Android, I'd say it's pointless as long as ART (or every Java thing) is left intact.
    – iBug
    Commented 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.
    – Grimoire
    Commented Aug 27, 2018 at 0:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .