1. AndyOpie150's Avatar
    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:

    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
    at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Instructio
    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
    at org.jf.dexlib.Code.Format.Instruction3rc.<init>(Instruction3rc.java:7
    at org.jf.dexlib.Code.Format.Instruction3rc.<init>(Instruction3rc.java:4
    at org.jf.dexlib.Code.Format.Instruction3rc$Factory.makeInstruction(Inst
    at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(Instructio
    ... 6 more
    Error occured at code address 0
    code_item @0x133320

    Any clue as to what I'm missing, what I need to do?
    08-03-2012 12:49 AM
  2. ThatGuyLurkin's Avatar
    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
    08-03-2012 12:59 AM
  3. AndyOpie150's Avatar
    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.
    08-03-2012 01:16 AM
  4. Phatninja55's Avatar
    @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
    08-03-2012 01:21 AM
  5. AndyOpie150's Avatar
    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.
    08-03-2012 01:26 AM
  6. Phatninja55's Avatar
    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
    08-03-2012 01:36 AM
  7. AndyOpie150's Avatar
    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!
    08-03-2012 01:43 AM
  8. ThatGuyLurkin's Avatar
    Your decompiling Framework.jar, correct?

    You should be able to just

    Apktool d framework.jar Framework

    Sent from my VM670 using Tapatalk 2
    08-03-2012 02:17 AM
  9. AndyOpie150's Avatar
    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.
    08-03-2012 02:57 AM
  10. ThatGuyLurkin's Avatar
    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
    08-03-2012 01:56 PM
  11. yuanbyu's Avatar
    Hi, have you managed to deodex those framework odex files? I am also interested in doing it.
    02-14-2013 03:06 PM
  12. AndyOpie150's Avatar
    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.
    02-14-2013 08:34 PM