[Script] [Unmaintained] Quick Deodex Tool (v1.0.2)

Search This thread

mbc07

Senior Member
Dec 12, 2013
830
993
26
Sony Xperia M
Sony Xperia X
Due ART changes, Quick Deodex doesn't work with Android Lollipop/Marshmallow/Nougat ROMs. I might update this script some day, but due other priorities and lack of time, this tool is currently unmaintained.

Well, if you ever tried to deodex a single APK file you should know how tricky this process can be. Searching XDA we find various tools and tutorials in how to deodex but most of them may look complicated enough to make a newbie or an user that never messed around with Android system give up. So, I wrote my own script to simplify two tasks: deodexing and zipaligning. I also made this script with newbies in mind, so, I did my best to make this tool as straightforward, small and portable as possible.


Requirements
• For Linux, you need OpenJDK 6 or newer
• For Windows, you need Java SE runtime 6 or newer


Instructions
• Download the script and extract it somewhere
• Grab a copy of the folders "framework", "app" and "priv-app" (optional, KitKat only) and put them inside "files" folder
• Run quick_deodex.bat (or quick_deodex.sh on Linux) and wait while the files are being deodexed
• After the script finishes, all files inside the folders you copied before will now be deodexed and zipaligned.
Any file that fail to deodex will be skipped and left intact, so you can fix what caused the problem and run the tool again. If all files fail to deodex, make sure Java runtimes are installed properly


Frequently Asked Questions
Q: I keep getting "Framework not found" error. What should I do?
A: For most APKs you can only deodex if you have the framework files, so, I made this a requirement, even if you want to deodex only a single file. In that case, grab a copy of "framework" folder from the same ROM you got the APK and run this script again, it'll fix that.

Q: I'm trying to deodex an entire ROM but some files get errors and aren't deodexed. What should I do?
A: This usually occur only if the files you're trying to deodex and the framework are from different ROM versions. If the files are all from the same ROM version and you're still getting this, try updating smali and baksmali components used by this script by downloading an updated copy and replacing the ones this script uses (located in "tools" folder).


Changelog
Version 1.0.2
• Minor bug fixes (Linux only)

Version 1.0.1
• Now compatible with Linux

Version 1.0
• Initial release
 

Attachments

  • QuickDeodex_1.0.zip
    1.9 MB · Views: 1,195
  • QuickDeodex_1.0.1.zip
    2.4 MB · Views: 787
  • QuickDeodex_1.0.2.zip
    2.4 MB · Views: 14,130
Last edited:

216Monster

Senior Member
Oct 17, 2011
1,232
363
Ohio
Hey, has anyone tested the Linux version? Did it worked? Linux users, leave some feedback ;)

I will test out the Linux script later, in the process of doing clean install of 14.04 and setting up build environment, currently the windows verison is running though, looks like you have done a very nice job here, thank you a lot.
 

DarkAngel

Senior Member
Aug 1, 2006
639
357
Arizona
I keep getting this error in Ubuntu 14.04. ( Using Java7 Open JDK AMD64 version )

Exception:
Code:
JNLParseException[ Could not parse launch file. Error at line 0.]
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)
Wrapped Exception:

Code:
Failed to find the '<' charater that marks the end of a CDATA element. Exception parsing xml at line 0
    at com.sun.deploy.xml.XMLParser.skipPCData(Unknown Source)
    at com.sun.deploy.xml.XMLParser.nextToken(Unknown Source)
    at com.sun.deploy.xml.XMLParser.parse(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)
 

DarkAngel

Senior Member
Aug 1, 2006
639
357
Arizona
@mbc07 I did keep seeing that and even made sure my path was set for Java. I'll see what I can come up with.

Having switched to a new Laptop has had me looking for new things as I was already set up before. ADB/Fastboot, JOdin3/Heimdall I can do fine. Windows I'm good to go as well I just rather do more/learn more in Linux this time around.
 
Last edited:

DarkAngel

Senior Member
Aug 1, 2006
639
357
Arizona
@mbc07

I tried it once again, this time uninstalling & purging all copies of Java ( only had version 7 & 8 though ) and then reinstalled version 7 only. I still get the same error. I did also try updating the smali and baksmali components just in case but no dice.

-------------------------------------

Windiows version, on the other hand, did go smoothly with no problems for me at all. Deodexed both folder perfectly w/ no errors ( JB 4.2.2 ). Tried them on a phone I have and all is working perfectly. :good:
 
Last edited:

Desno365

Senior Member
May 31, 2013
315
470
Milan
desno365.net
With Dalvik runtime the deodexed files works well but when switching to ART I'm having bootloop.

Tested with Nexus 4 stock 4.4.4 KTU84P (during the deodex process there wasn't any errors) and clean install (factory reset) :)
 

klembo1957

Member
Jan 29, 2013
25
5
63
Glassboro
THANK YOU!!!!

Well, if you ever tried to deodex a single APK file you should know how tricky this process can be. Searching XDA we find various tools and tutorials in how to deodex but most of them may look complicated enough to make a newbie or an user that never messed around with Android system give up. So, based in Kamome tool and @RyokoN work, I wrote my own script to simplify two tasks: deodexing and zipaligning. I also made this script with newbies in mind, so, I did my best to make this tool as straightforward, small and portable as possible.


Requirements
• For Linux, you need OpenJDK 6 or newer
• For Windows, you need Java SE runtime 6 or newer


Instructions
• Download the script and extract it somewhere
• Grab a copy of the folders "framework", "app" and "priv-app" (optional, KitKat only) and put them inside "files" folder
• Run quick_deodex.bat (or quick_deodex.sh on Linux) and wait while the files are being deodexed
• After the script finishes, all files inside the folders you copied before will now be deodexed and zipaligned.
Any file that fail to deodex will be skipped and left intact, so you can fix what caused the problem and run the tool again. If all files fail to deodex, make sure Java runtimes are installed properly


Frequently Asked Questions
Q: I keep getting "Framework not found" error. What should I do?
A: For most APKs you can only deodex if you have the framework files, so, I made this a requirement, even if you want to deodex only a single file. In that case, grab a copy of "framework" folder from the same ROM you got the APK and run this script again, it'll fix that.

Q: I'm trying to deodex an entire ROM but some files get errors and aren't deodexed. What should I do?
A: This usually occur only if the files you're trying to deodex and the framework are from different ROM versions. If the files are all from the same ROM version and you're still getting this, try updating smali and baksmali components used by this script by downloading an updated copy and replacing the ones this script uses (located in "tools" folder).

Q: I want to deodex a KitKat ROM, but it have an additional "priv-app" folder with .odex files. Is this script compatible?
A: Yes, it is. When "priv-app" folder is present, the script handle it accordingly. Otherwise the script assumes it's a JellyBean ROM or older and skips "priv-app".


Changelog
Version 1.0.2
• Minor bug fixes (Linux only)

Version 1.0.1
• Now compatible with Linux

Version 1.0
• Initial release

Thank you so much!!! My phone doesn't play nice with deodexing. I've tried before to deodex my files with the kitchen, but always had problems. This tool is so easy to use, and it seems to work perfectly!!!! I have an old phone (LG Spectrum), and I am still a NOOB, but with your tool, I now have a debloated, customized deodexed zipaligned rom I can flash with no problems!!!!!
 
Last edited:

mbc07

Senior Member
Dec 12, 2013
830
993
26
Sony Xperia M
Sony Xperia X
works perfectly .. just wanted to know how can i know is it zipling or not?

The script zipalign the file right after it gets deodexed. If the zipalign process fails, the script will output "FAILED" and the file will remain untouched.
In other words, if you got "DONE" in the script, the file were successfully deodexed and zipaligned...
 
Last edited:
  • Like
Reactions: SVR and manan001

modfiles

Member
Jun 7, 2013
26
4
Nice tool but not working in windows 64bit but working fine in 32bit
Downloaded the latest update of smali/baksmali but the result is almost 50% ERROR, others DONE
 

mbc07

Senior Member
Dec 12, 2013
830
993
26
Sony Xperia M
Sony Xperia X
Nice tool but not working in windows 64bit but working fine in 32bit
Downloaded the latest update of smali/baksmali but the result is almost 50% ERROR, others DONE
The script works perfectly in 64-bit editions of Windows. However, you need also to install 64-bit edition of Java, otherwise it won't work. About your errors, check your input files, if possible, try to find another tool that successfully deodex them and tell me which tool is so I can take a look and fix Quick Deodex :good:
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    Due ART changes, Quick Deodex doesn't work with Android Lollipop/Marshmallow/Nougat ROMs. I might update this script some day, but due other priorities and lack of time, this tool is currently unmaintained.

    Well, if you ever tried to deodex a single APK file you should know how tricky this process can be. Searching XDA we find various tools and tutorials in how to deodex but most of them may look complicated enough to make a newbie or an user that never messed around with Android system give up. So, I wrote my own script to simplify two tasks: deodexing and zipaligning. I also made this script with newbies in mind, so, I did my best to make this tool as straightforward, small and portable as possible.


    Requirements
    • For Linux, you need OpenJDK 6 or newer
    • For Windows, you need Java SE runtime 6 or newer


    Instructions
    • Download the script and extract it somewhere
    • Grab a copy of the folders "framework", "app" and "priv-app" (optional, KitKat only) and put them inside "files" folder
    • Run quick_deodex.bat (or quick_deodex.sh on Linux) and wait while the files are being deodexed
    • After the script finishes, all files inside the folders you copied before will now be deodexed and zipaligned.
    Any file that fail to deodex will be skipped and left intact, so you can fix what caused the problem and run the tool again. If all files fail to deodex, make sure Java runtimes are installed properly


    Frequently Asked Questions
    Q: I keep getting "Framework not found" error. What should I do?
    A: For most APKs you can only deodex if you have the framework files, so, I made this a requirement, even if you want to deodex only a single file. In that case, grab a copy of "framework" folder from the same ROM you got the APK and run this script again, it'll fix that.

    Q: I'm trying to deodex an entire ROM but some files get errors and aren't deodexed. What should I do?
    A: This usually occur only if the files you're trying to deodex and the framework are from different ROM versions. If the files are all from the same ROM version and you're still getting this, try updating smali and baksmali components used by this script by downloading an updated copy and replacing the ones this script uses (located in "tools" folder).


    Changelog
    Version 1.0.2
    • Minor bug fixes (Linux only)

    Version 1.0.1
    • Now compatible with Linux

    Version 1.0
    • Initial release
    5
    Hey, has anyone tested the Linux version? Did it work? Linux users, leave some feedback ;)
    4
    Version 1.0.2 is out, it fixes "Permission denied" errors that may occur in some Linux distros...
    2
    @DarkAngel if it's a Java error, then it's related either to smali/baksmali or to the input files, not to the script itself. I would suggest testing the files you're trying to deodex in other tools, if they work, report to me what tool worked so I can try to figure out what's wrong in Quick Deodex...
    2
    works perfectly .. just wanted to know how can i know is it zipling or not?

    The script zipalign the file right after it gets deodexed. If the zipalign process fails, the script will output "FAILED" and the file will remain untouched.
    In other words, if you got "DONE" in the script, the file were successfully deodexed and zipaligned...