We are reader supported. External links may earn us a commission.

Android

Android Power User: What are ODEX, DEODEX, and Zipalign? (Video)

By Joe Levi September 25, 2012, 2:10 pm
Android Power User

ODEX and DEODEX are terms that are thrown around a lot when we're talking about Custom ROMs. Some ROMs are DEODEXED, others are not. What does that mean and why do we have them?

If you haven't already watched the last couple episodes of Android Power User, you might want to. In those episodes we talk about the JIT Compiler, and the Dalvik Cache and Dalvik VM. If you've already watched those or have a solid understanding of them, let's dive right in!

Android apps are stored in .APK files (that stands for "Android Package", in case you were wondering). Like we talked about, the files themselves aren't pre-compiled, at least not in the traditional meaning of the word. Dalvik instead uses .DEX and .ODEX files to help speed things along.

POCKETNOW VIDEO OF THE DAY

What is an .ODEX file?

An .ODEX file is an "optimized Dalvik executable" file, sort of like an .EXE in windows. The .ODEX is compressed to save space, and contains bits and pieces of its application that are optimized before Android boots. This helps speed up the boot process and pre-loads parts of the application.

The downside? To save space, the .ODEX file contains parts of the program and the .APK contains the rest. That means it's fairly difficult to get inside an .ODEX file to make changes, whereas it's fairly easy to make changes inside an .APK.

What is DEODEX?

First off, it's not a file extension like .ODEX is, rather, apps that are DEODEXed are assembled in such a way that they aren't "pre-optimized" and the bits that would have gone into a separate .ODEX file are put into classes.dex files and kept inside the .APK. This allows for easy modification and theming.

Most Custom ROMs come DEODEXed.

Where does Zipalign fit in?

According to Developer.Android.com, Zipalign is an "archive alignment tool that provides important optimization to Android application (.apk) files". It's an extra step that all developers are advised to do before releasing their app to the public. Zipaligning one's app makes sure that all its uncompressed data "starts with a particular alignment relative to the start of the file". There's a lot of technical reasoning behind this, but the overall benefit is a reduction in the amount of RAM that is used while the zipaligned app is running.

Search

Latest Articles

iOS

Here's how the Apple iPod changed the world in 21 years

iPod was an industry-changing device at its time, and it had a massive impact on modern smartphones, and the way we listen to music. We take a last look at the now-discontinued Apple iPod and the history it leaves behind.

By Roland Udvarlaki May 11, 2022, 10:00 am
iOS

How to use Mic Modes in VOIP and FaceTime Calls

This guide will go over the steps you need to follow to activate one of the available Mic Mode settings on Apple Devices to begin using the feature and improve your calling experience.

By Aryan Suren May 10, 2022, 10:00 am
Phones

This iPhone 14 feature might urge users to upgrade

Until now, it appeared that iPhone 14 would only be a minor upgrade over the iPhone 13 series. However, a new leak suggests that the iPhone 14 will come with one feature that might urge users to upgrade.

By Sanuj Bhatia May 9, 2022, 5:00 am