FORUMS

Galaxy S6 & Edge get €100 Price Cut—New Models Incoming

Samsung has dropped the price of both the Galaxy S6 and S6 Edge by … more

How To Port Fully Featured Sony Xperia Z4 Camera

Xperia Z4’s hardware may not impress, but its software is definitely … more

Experimental TWRP Available For Moto G 2015

XDA Senior Member squid2 has posted experimental builds of TWRP for the Moto G … more

Sunday Debate: How Can We Get a No-Compromise Phone?

Join us in a fun Sunday Debate on Compromises. Come with your opinions and … more

[Script] Quick Deodex Tool (v1.0.2)

486 posts
Thanks Meter: 593
 
Post Reply Subscribe to Thread Email Thread
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

Please note Quick Deodex doesn't work with Lollipop ROMs yet. The directory layout changed and the process differs a little bit. I'm analysing how odex files works in Lollipop and will update the script accordingly. Thanks for the patience

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
Attached Files
File Type: zip QuickDeodex_1.0.zip - [Click for QR Code] (1.91 MB, 401 views)
File Type: zip QuickDeodex_1.0.1.zip - [Click for QR Code] (2.44 MB, 278 views)
File Type: zip QuickDeodex_1.0.2.zip - [Click for QR Code] (2.44 MB, 5738 views)
Last edited by mbc07; 24th November 2014 at 12:23 AM.
The Following 38 Users Say Thank You to mbc07 For This Useful Post: [ View ]
 
 
22nd April 2014, 01:51 PM |#2  
Junior Member
Thanks Meter: 4
 
More
+1
It work without errors.
thanks man, it's first tools that perfectly worked.
5th May 2014, 07:32 PM |#3  
mbc07's Avatar
OP Senior Member
Thanks Meter: 593
 
Donate to Me
More
Hey, has anyone tested the Linux version? Did it work? Linux users, leave some feedback
Last edited by mbc07; 15th September 2014 at 03:06 AM.
The Following 5 Users Say Thank You to mbc07 For This Useful Post: [ View ]
8th June 2014, 03:15 PM |#4  
216Monster's Avatar
Senior Member
Flag Cleveland
Thanks Meter: 340
 
More
Quote:
Originally Posted by mbc07

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.
9th June 2014, 11:20 PM |#5  
mbc07's Avatar
OP Senior Member
Thanks Meter: 593
 
Donate to Me
More
Version 1.0.2 is out, it fixes "Permission denied" errors that may occur in some Linux distros...
Last edited by mbc07; 9th June 2014 at 11:33 PM.
The Following 4 Users Say Thank You to mbc07 For This Useful Post: [ View ]
10th June 2014, 02:14 AM |#6  
216Monster's Avatar
Senior Member
Flag Cleveland
Thanks Meter: 340
 
More
Quote:
Originally Posted by mbc07

Version 1.0.2 is out, it fixes "Permission denied" errors that may occur in some Linux distros...

Still haven't gotten around to it, If all else fails, I will get time this weekend, stuck doing some cad drawings the next few days!
11th June 2014, 09:47 PM |#7  
DarkAngel's Avatar
Senior Member
Flag Arizona
Thanks Meter: 352
 
More
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)
11th June 2014, 10:55 PM |#8  
mbc07's Avatar
OP Senior Member
Thanks Meter: 593
 
Donate to Me
More
@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...
The Following 2 Users Say Thank You to mbc07 For This Useful Post: [ View ]
12th June 2014, 09:07 AM |#9  
DarkAngel's Avatar
Senior Member
Flag Arizona
Thanks Meter: 352
 
More
@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 by DarkAngel; 12th June 2014 at 05:40 PM.
14th June 2014, 11:37 AM |#10  
DarkAngel's Avatar
Senior Member
Flag Arizona
Thanks Meter: 352
 
More
@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.
Last edited by DarkAngel; 14th June 2014 at 12:17 PM.
23rd June 2014, 12:49 PM |#11  
Desno365's Avatar
Senior Member
Flag Milan
Thanks Meter: 468
 
Donate to Me
More
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)

Read More
Post Reply Subscribe to Thread

Tags
apk, deodex, jar, odex, zipalign
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes