Monday 8 June 2015

Odex and Deodex


Odex and Deodex




What is Odex ?

Every android phone has a virtual machine called dalvik virtual machine. Dalvik is java based virtual machine That virtual machine creates a kind of files called odex file. Now what the heck is odex file. Every application has a main java file by which application can function. When you install any kind of application that java file gets compiled to java byte code. Now java byte code is not compatible on android devices so java byte code is send to dalvik virtual machine and the dalvik virtual machine performs some modification and optimizations on the dex file and then it caches the resulting odex file to /data/dalvik-cache so that it dosent have to perform the optimization process every time when it loads the application. Like wise their are so many odex file collected at /data/dalvik-cache and this is called dalvik cache which we wipe before flashing any kind of system and rom.

Odexing

This also a process used by developers to increase the speed of the rom.

But this kind of roms can create problems to your device while flashing because they are kind of big in size and you
might get the errors in precompiled odex file(dalvik byte code).
So must avoid such a kind of rom and system images or you can deodex it using a tool name  dsixda's kitchen.

Whats Deodex ?

Deodex is a process used by developers to reduce the size of rom.

In this process all the odex files (Dalvik cache) is removed from zip file of rom or system which was created by dalvik virtual machine
so when you flash the rom to your devices it creates new odex files for the applications included in the particular rom.
If you dont wipe the dalvik cache then the odex files which were stored in previous rom will create many problems like battery drain etc....

No comments:

Post a Comment