FORUMS

[SOLVED] How to deodex?

1,043 posts
Thanks Meter: 300
 
By L0cke, Senior Member on 13th October 2010, 01:52 PM
Post Reply Email Thread
Hi, is it possible to just deodex one apk or do you have to do an entire ROM?

Basically I have a 'Rosie.apk' and 'Rosie.odex', but want to deodex it so I can get to the 'classes.dex' file. Can someone let me know how I might go about this?
The Following User Says Thank You to L0cke For This Useful Post: [ View ] Gift L0cke Ad-Free
13th October 2010, 08:14 PM |#2  
ddotpatel's Avatar
Senior Member
Flag Leeds, UK
Thanks Meter: 7
 
More
Try apktool? Might be Linux only, can't remember sorry.

Sent from my HTC Hero using XDA App
14th October 2010, 01:48 PM |#3  
L0cke's Avatar
OP Senior Member
Flag Royston
Thanks Meter: 300
 
More
Have successfully done what I wanted now

For info, this is what I did.

Created a new folder called 'system' in c:\android-sdk\tools. Obtained the odexed framework folder and placed that in the system folder. Then created a folder called app in the system folder and placed the Rosie.apk and Rosie.odex inside.

Then via cmd, entered the 'system/app' folder, so for me it was...

c:\android-sdk\tools\system\app

From there I ran the following command to end of that path: baksmali.jar -d ../framework -x Rosie.odex

This produced an out folder will all the decompiled .smali files etc. From there I was able to get to the Launcher.smali that i wanted, but to recompile to a classes.dex file you simply run the following command: smali.jar out

This produces an 'out.dex' that you can rename to 'classes.dex'

I am sure there are other commands that you can use to name files accordingly etc but this is what worked for me for what I wanted, so hopefully it will be of some help to people... if they can understand anything I've written.

The Following 4 Users Say Thank You to L0cke For This Useful Post: [ View ] Gift L0cke Ad-Free
20th October 2010, 02:55 PM |#4  
Senior Member
Thanks Meter: 47
 
More
Quote:
Originally Posted by jpool81

Have successfully done what I wanted now

For info, this is what I did.

Created a new folder called 'system' in c:\android-sdk\tools. Obtained the odexed framework folder and placed that in the system folder. Then created a folder called app in the system folder and placed the Rosie.apk and Rosie.odex inside.

Then via cmd, entered the 'system/app' folder, so for me it was...

c:\android-sdk\tools\system\app

From there I ran the following command to end of that path: baksmali.jar -d ../framework -x Rosie.odex

This produced an out folder will all the decompiled .smali files etc. From there I was able to get to the Launcher.smali that i wanted, but to recompile to a classes.dex file you simply run the following command: smali.jar out

This produces an 'out.dex' that you can rename to 'classes.dex'

I am sure there are other commands that you can use to name files accordingly etc but this is what worked for me for what I wanted, so hopefully it will be of some help to people... if they can understand anything I've written.

If I needed to, how can I recompile back to Rosie.odex (for example). Do I just rename the out.dex file to Rosie.odex or is there another step to get it back to the original version. Here is why I am asking...I wanted to change a few lines in a file in the services.odex file. I deodexed it with the method explained above and now I want to put that file back on my device. Am I going about this the wrong way? Do I need to follow a different process to get it back to the services.odex file?

Thanks.
The Following User Says Thank You to hotwired34 For This Useful Post: [ View ] Gift hotwired34 Ad-Free
27th May 2013, 10:53 PM |#5  
Junior Member
Thanks Meter: 1
 
More
Could somebody possibly deodex this apk file for me, Ive been at it all day...

I'll be forever in your debit

Code:
http://speedy.sh/4dJ6f/deodex3.rar
The Following User Says Thank You to redgreen9 For This Useful Post: [ View ] Gift redgreen9 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes