Error while trying to deodex a framework.odex

AndyOpie150

Well-known member
May 15, 2011
1,254
32
0
I have the SDK (adb.exe in my system path).
I have the jdk1.6.0_33 (java.exe in my system path)
I have smali.jar and baksmali.jar (renamed them to this) in C:\smali
I have the framework folder in C:\
I put the framework.jar and the framework.odex into C:\smali

I open up a command prompt in the smali folder and type in this:
java -java baksmali.jar -d C:\framework -x framework.odex

When I hit the enter key I get this:


UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: regCount does not match the number of a
rguments of the method
at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithCont
ext.java:54)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Instructio
nIterator.java:92)
at org.jf.dexlib.CodeItem.readItem(CodeItem.java:154)
at org.jf.dexlib.Item.readFrom(Item.java:77)
at org.jf.dexlib.OffsettedSection.readItems(OffsettedSection.java:48)
at org.jf.dexlib.Section.readFrom(Section.java:143)
at org.jf.dexlib.DexFile.<init>(DexFile.java:431)
at org.jf.baksmali.main.main(main.java:269)
Caused by: java.lang.RuntimeException: regCount does not match the number of arg
uments of the method
at org.jf.dexlib.Code.Format.Instruction3rc.checkItem(Instruction3rc.jav
a:129)
at org.jf.dexlib.Code.Format.Instruction3rc.<init>(Instruction3rc.java:7
9)
at org.jf.dexlib.Code.Format.Instruction3rc.<init>(Instruction3rc.java:4
4)
at org.jf.dexlib.Code.Format.Instruction3rc$Factory.makeInstruction(Inst
ruction3rc.java:145)
at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Instructio
nIterator.java:84)
... 6 more
Error occured at code address 0
code_item @0x133320

Any clue as to what I'm missing, what I need to do?
 
Try APKTOOL d framework.jar


Works better. Btw, Hi Andy. :)


Edit: I don't.believe you can decompile a .odex without deodexing.

Sent from my VM670 using Tapatalk 2
 
Last edited:
Please explain further: where should the smali.jar and baksmali.jar be put. Etc. etc.
Yes I do realize I need to first deodex the framework.odex before I can decompile and edit the framework.jar. That's where I'm at right now, stuck scratching my head because of the error while trying to deodex the framework.odex.
 
Last edited:
@AndyOpie after you pm ex me, I tried to deodex it but got the same error. Couldn't find anything related to it.

Sent from my LG-VM670 using Tapatalk
 
What method/utility did you use.

I think I'm going to try just deodexing the whole mess, just to get the framework.jar, so I can decompile it.
 
I tried the same way you did. Ill try again tomorrow. Maybe after I get some sleep I can be more help.

Sent from my LG-VM670 using Tapatalk
 
Just tried again after putting the smali folder I made in the C:\ into my system path and got:
'java' is not recognized as an internal or external command,
operable program or batch file.
??????????????????????????????


Waiting for ThatGuyLurking to reply in answer to my question. Pretty please!
 
Your decompiling Framework.jar, correct?

You should be able to just

Apktool d framework.jar Framework

Sent from my VM670 using Tapatalk 2
 
The framework.jar is part of an odexed framework.jar. Which is part of a odexed ROM The framework.jar is only12KB instead of 1300KB because the rest is in the framework.odex.
If you try to decompile the framework.jar it winds up being empty.
I have to put the two files into one folder and then deodex the odexed on. The output should give me the original files in the original framework.jar that was odexed. This is what I'm trying to do.
After I get done editing the deodexed framework.jar I will need to odex it then put it back in with the rest of the odexed files. Then I can zip the ROM, sign the ROM, create an MD5 sum, then flash it and see how everything works.
 
Your allowed to decompile a odexed file? I always thought people Deodexed messed with it, and odexed to flash.

Sent from my LG-VM670 using Tapatalk 2
 
You have to de-odex while ROM is installed on phone. You have to de-odex the whole shooting match at once.
This means you have to have the ported ROM already set for installation, with the exception of the framework.jar.
 

Members online

Forum statistics

Threads
954,377
Messages
6,961,476
Members
3,163,013
Latest member
wesamo