Before starting with wiping the Dalvik Cache, we should understand Dalvik and Dalvik Cache. By understanding these two, I mean that Dalvik and Dalvik Cache are two different things with different meanings. Dalvik (without Cache) is a Virtual Machine which actually runs your Android Apps on your Android Device. Dalvik-Cache is the Cache Area of the Davik Virtual Machine and it is created when Dalvik Virtual Machine optimizes your app to run. Read More Here to Understand Dalvik and Dalvik Cache.

How Dalvik Cache Works?

When you are installing a custom ROM on your Android device, in the guide you found on the internet, you get to a point where you have to Wipe Dalvik Cache. If you read about Dalvik and Dalvik Cache you should understand that Dalvik Cache is a file created when you have installed a new Android application and you start it for the first time. At that moment your Android device performs necessary modifications and optimizations on the application’s DEX File ( the file that contains all the Dalvik byte code of the application ). After that it will cache the results and the results will be the optimized version of DEX file, this time called ODEX file which is stored in the /data/dalvik-cache directory. The second time when you will run the same application it will no need any optimization, it will just read the Dalvik Cache file.

Theoretically you can remove Dalvik Cache to save some space on your phone, but this is temporary till you will restart you Android Device or will run the Applications you have on your phone, when you do this, Dalvik will take the Dex file and will optimize it and will save it as Odex file.

What Wiping Does?

wipe dalvik cacheWhen you just got a new Android Application and you start it, it will be optimized. Also when you install a new ROM, the first time when it boots up, Dalvik will go through all apps you have installed and will extract the Dex file, will optimize it and will save it as Odex in cache. It is very necessary to wipe Dalvik Cache when you are installing a new ROM. If you wont do it, Dalvik will skip to optimize the apps you have installed because it will find Odex cached files and will not need to recreate them. As the result the applications will not be optimized for the current Android ROM and you will probably get a “Force close” issues.

That’s why Wiping Dalvik Cache is necessary when installing a new ROM, also you can do it many times as you want, it does nothing bad, it will just delete the Odex cached files and when you are starting an app or restarting the device the Odex will be automatically recreated.


Leave a Reply