Now you can easily deodex applications on Android 5.0 Lollipop to get more free space and make theming a lot easier. If you have been in the Android community long enough to learn about custom ROMs and root, then you know there are two types of firmwares and applications: odexed and deodexed.
Every ROM that comes pre-installed on a phone is odexed but developers deodex them for a handful of reasons. Deodexed apps are easier to customize and theme. If you like themes and really like to customize your phone, then deodexed apps are a must.
Also Read: How To Optimize and Make Android Media Scanner Faster
Deodexed apps also take less space. All parts of an app are put together so they are not scattered around the phone. So, the same files are inside a package to prevent conflict with other apps.
Google recently announced Android 5.0 Lollipop which brings many features. One of the biggest change is switching from Davlik to ART runtime system. This makes the phone a lot of faster but this comes with a few issues. The most popular framework for Android, Xposed, does not work with ART because the decryption process of applications on Lollipop has changed.
Fortunately, a tool has been launched which allows you to easily deodex all Android 5.0 Lollipop applications.
In stock Android Lollipop framework, priv-app folder we have .apk files and .jar files. When you look at the sub-folder called .odex files they have a specific folder for ART runtime which compresses both modes.
- .odex.art.xz -> The art mode to native file.
- .odex.xz -> 7zip * .odex appears when you unzip the file.
- .odex.xz unpack the file compression, uses the * .odex file.
Deodexing applications on Android 5.0 Lollipop
Preparations
Before starting with the guide, there are a few things that you need. You have to download the deodex tool and also pull the APK and odex.xz file of the application.
Download deodex tool here.
- Extract the downloaded .7z file to your computer.
- Open the folder, hold shift, click the right mouse button and select Open Command Window here. This will open the command prompt window.
- Move both files to the folder.
- Type “7za x *.odex.xz ” and hit Enter. This will decompress the .xz file. The result will be a odex file.
- Now type “oat2dex.bat *.odex and press Enter. With this you will confirm that the DEX file OAT file header are present. If you receive an error during this part, the app won’t get converted.
- Type “oat2dex.bat *.odex temp.dex. and press Enter. This will create a .temp.dex. file which is a odex file with the old structure.
- Enter “java -jar baksmali-2.0.3.jar -a 21 -x temp.dex -o deodex” and press Enter. This will decompile the file and will create a deodex folder output.
- Now type “java -jar smali-2.0.3,jar -a 21 deodex -o classes.dex” to recompile the output.
- Now, to put classes.dex into an APK file, use the command 7za u -tzip *.apk classes.dex.
Also Read: How to Odex Nexus 5 for Faster Performance and Better Battery Life
You have successfully deodexed an Android 5.0 Lollipop application. You can follow the same process for all other applications.