• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root First Ever All In One Deodex Kitchen

andrizoid

Android Expert
Mar 25, 2010
2,266
358
31
Andrizoids_Deodex_Kitchen_V4

What started as a simple script to help me deodex a single file has turned into a full fledged project.

This is the first ever all in one deodex kitchen for linux.

V3 now does EVERYTHING for you, all you need to do is change the paths and choose your rom!
Make sure to read the README file first!

Bugs

These files will not deodex in the Plain Jane Rom, when trying you get an error about superclasspaths or something.
-Bluetooth.odex
-HtcFootprints..odex
-HtcLocationPicker.odex
-htcmsgwidgets.odex
-Settings.odex
-com.htc.resources.jar

Extract to your desktop, then check out the README file for full instructions.

Changelog
V4
Fixed some of the code, added the optional make-rom.sh which adds the freshly de-odexed files to the original rom and signs it making it ready to flash.
V3
Everything is fully automated, and will deodex the whole rom rather than one file at a time. Smali and Baksmali version updated to 1.2.3
V2
Added setup.sh to make things easier.
V1
Original script.
 
deodexing a rom makes a possible to edit .png files to like say the rosie laucnher, real cool stuff
if only i could figure out how to use it lol

+1 ...also, here's a pretty good explanation that I found (that helped me a smidge):

what is deodexing?

Here's the key portion of the above post so save a link-click for you:

The Java virtual machine in Android is a Dalvik Virtual Machine, designed to operate on processor-constrained and memory-constrained devices like smart phones.

The files that a Dalvik Virtual machine consumes are DEX files - which are Java files rendered by a utility called dx. After the files are rendered by DX they are loaded into a virtual machine and the classes in them are optimized by a utility called dexopt. This results in an "optimized DEX" - an ODEX.

To hack such code, the files must be "DE-ODEX'ed," if you will, which is accomplished with a utility called deodexerent.

Still not 100% clear to me, but made me know a little bit more than I did before. ;)
 
  • Like
Reactions: QuasiNerd
Upvote 0
Thanks this is just what I needed. I just wanted to let you know that there were a lot of minor errors in the script. Mostly spelling errors that caused the scrip to not run. I was able to edit them and it seems to be running well. Right now I'm deodexing froyo ota FRF91 and it seems to be working. I'll let you know if my rom doesn't boot.:p
 
Upvote 0
Thanks this is just what I needed. I just wanted to let you know that there were a lot of minor errors in the script. Mostly spelling errors that caused the scrip to not run. I was able to edit them and it seems to be running well. Right now I'm deodexing froyo ota FRF91 and it seems to be working. I'll let you know if my rom doesn't boot.:p

no minor errors when i ran it. all you need to do is edit the inputs and it runs just fine.

i havent tried to boot a rom after it was deodexed though. there may be issues with those few files that wont deodex. i was looking into it last night but i got side tracked with another project.

Those files wouldnt deodex on the PlainJane rom, i havent tested it on any others
 
Upvote 0
no minor errors when i ran it. all you need to do is edit the inputs and it runs just fine.

i havent tried to boot a rom after it was deodexed though. there may be issues with those few files that wont deodex. i was looking into it last night but i got side tracked with another project.

Those files wouldnt deodex on the PlainJane rom, i havent tested it on any others
Are you sure you uploaded the right files because one of the errors was to sign the files with "signjar.jar" instead of signapk.jar which means none of the apks would be signed.

BTW, so far it's deodexing every file including bluetooth.apk. Thanks for this kitchen, it makes deodexing a lot easier.
 
Upvote 0
Are you sure you uploaded the right files because one of the errors was to sign the files with "signjar.jar" instead of signapk.jar which means none of the apks would be signed.

BTW, so far it's deodexing every file including bluetooth.apk. Thanks for this kitchen, it makes deodexing a lot easier.

Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 $input.zip $input.apk
rm -r $input.zip

taken stright from the file i uploaded. are you sure you only changed input=xxx and path=xxx



my bad. tyour right. the script for the jar files isnt setup as perfect as it should be. thanks for pointing it out
 
Upvote 0
Just wanted to follow up. The script completed without error and I copied everything out of both apk and jar output folders and had to copy framework-res.apk which didn't get copied to any of the output folders. Anyway, the rom wouldn't boot. It just hung at the first bootscreen. Maybe I did something wrong?

If I can make a suggestion, maybe you should make the script recompile the rom and sign it. I look forward to see where you take this kitchen. Thanks again.
 
Upvote 0
Just wanted to follow up. The script completed without error and I copied everything out of both apk and jar output folders and had to copy framework-res.apk which didn't get copied to any of the output folders. Anyway, the rom wouldn't boot. It just hung at the first bootscreen. Maybe I did something wrong?

If I can make a suggestion, maybe you should make the script recompile the rom and sign it. I look forward to see where you take this kitchen. Thanks again.

that was something i had planned for the next version, to have it copy everything back into the rom and sign that up.

ill look into it a bit and see if i can see why its not booting. i havent tried one yet so ill give it a shot.
 
Upvote 0
Nice... Would you mind posting the edited kitchen files you used because the one I tried to fix wouldn't boot. I'm sure I must have made a mistake.

V4 is coming tomorrow morning, and i added the option to repackage it all into a rom and sign it with the make-rom.sh script

i also fixed those little errors.

second time i flashed the de-odexed rom it boot looped. kinda odd since it booted just fine originally.

when i tried to de-odex the plain jane rom it didnt even get past the boot logo. im not THAT familiar with de-odexing and all that, but it seems to me that some roms have more trouble that others.

i also noticed an error with the android.policy.jar in the stock rooted rom. it went by too quickly for me to catch, but it still created the .dex file so i guess it wasnt too big of an error
 
Upvote 0
when i tried to de-odex the plain jane rom it didnt even get past the boot logo.

That's exactly what happened to me. I notice your kitchen doesn't touch framework-res.apk, do you think the problem is that file needs to be resigned with testkeys like the rest of the rom? I would test that theory but I'm leaving for work and don't want to mess up my phone before leaving. :p
 
Upvote 0
That's exactly what happened to me. I notice your kitchen doesn't touch framework-res.apk, do you think the problem is that file needs to be resigned with testkeys like the rest of the rom? I would test that theory but I'm leaving for work and don't want to mess up my phone before leaving. :p

well since framework-res.apk doesnt have a corresponding odex file i saw no reason to mess with it. i will add that it though just in case.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones