How to convert a .odex file to a dex file 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
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