Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I am trying to decompile a system app. Unfortunately there is no classes.dex for this particular system app. There is only a *.odex. I know I have to deodex this so that I get a .dex file. I have looked at smali but evry time I run it I get the following error. Baksmali tells me to use the following syntax:(I am running on windows hence I cant use the bash wrapper provided)

java -jar baksmali-1.3.3.jar -x name.odex

However it throws a top level exception:

UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: regCount does not match the number of a
rguments of the method
share|improve this question
    
This really is beyond the scope of this site. This site is primarily concerned with helping people use their Android devices. A site like xda-developers is probably better suited for this. –  Al E. Jun 26 '12 at 14:27
    
Okay. I didnt know that. Will post it there. –  Sab Jun 26 '12 at 14:42
    
Since this is also apparently a programming issue, Stack Overflow might also be an appropriate venue. –  Al E. Jun 26 '12 at 14:43
    
Okay. I guess I wont try to delete it since I have got a couple of answers here which may be helpful. Thanks for the heads up:) –  Sab Jun 26 '12 at 14:47
add comment

closed as off topic by jlehenbauer, Al E., Matthew Read Jun 26 '12 at 18:27

Questions on Android Enthusiasts Stack Exchange are expected to relate to Android within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Might be better to use the all in one tool that could help you published courtesy of Sony Ericsson and its open source.

To quote from their wiki page:

Support odex applications and libraries

Use this for the right reason, not for the wrong reason (such as rampant piracy etc, and in no way am I implying anything)

In fact this saved my bacon at one stage when I could not remember whether I bundled a jpeg in a apk that I built and had to go through that tool to confirm my "blonde moment"

Edit: Another thing I noticed - you're missing a switch, for example, this was pulled from here (Credit to the Madteam forum):

java -jar baksmali.jar -d C:\framework -x TouchWiz30Launcher.odex

You need the framework-res.apk (this can be found in /system/framework on the handset) in place hence the -d directory

share|improve this answer
    
looks like a glorified apktool to me. dex2jar was also helpful at one time but i can't really remember if it also did odex. –  svarog Jun 26 '12 at 14:30
    
Nope. dex2jar does not support odex. Otherwise it really is a good tool when combined with the power of jad or jd-gui –  Sab Jun 26 '12 at 14:43
    
The switch you are talking about is not really required is what I understand from this article-code.google.com/p/smali/wiki/DeodexInstructions –  Sab Jun 26 '12 at 14:55
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.