soga07 / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Baksmali is broken for Ice Cream Sandwich #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?

Cannot deodex ICS odex files.

What is the exact smali/baksmali command that you ran?

java -jar baksmali.jar -x Camera.odex

What version of smali/baksmali are you using? What rom are you working
from?

1.2.8 ICS SDK image

What is the airspeed velocity of an unladen swallow?

The average airspeed velocity of an unladen European Swallow is roughly 11 
meters per second, or 24 miles an hour. 

Please provide any additional information below: error messages, symptoms,
etc.

Error occurred while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Cannot locate boot class path file 
core.odex
    at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.java:237)
    at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath.java:145)
    at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(ClassPath.java:110)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:104)
    at org.jf.baksmali.main.main(main.java:282)

Original issue reported on code.google.com by dastin1...@gmail.com on 19 Oct 2011 at 8:00

GoogleCodeExporter commented 9 years ago
A couple of things - since honeycomb introduced some new odex opcodes that 
baksmali doesn't support, I would assume those opcodes are used in ICS as well, 
which will also prevent baksmali from being able to deodex ICS odexes. I will 
be able to address this issue once the source for ICS is released. For more 
information, see issue 58

However, the error message you posted seems to indicate that you aren't running 
into that particular issue. It looks like baksmali can't locate the framework 
files it needs in order to be able to deodex. The boot classpath files need to 
either be in your current directory, or you can specify where they are located 
with the -d option. See the DeodexInstructions wiki page for more information.

You might also want to take a look at the BOOTCLASSPATH on the emulator, and 
set it with -c if it doesn't match baksmali's default.

Original comment by jesusfreke@jesusfreke.com on 19 Oct 2011 at 1:58

GoogleCodeExporter commented 9 years ago
I'm deodex Launcher2.odex from ICS 4.0.1 SDK
baksmali 1.2.9 compiled from git 19.10.2011
Too many error (>4000 lines to screen):
Error occured while disassembling class 
Lcom.android.launcher2.Workspace$ZoomInInterpolator; - skipping class
java.lang.RuntimeException: regCount does not match the number of arguments of 
the method
        at org.jf.dexlib.Code.Format.Instruction35c.checkItem(Instruction35c.java:150)
        at org.jf.dexlib.Code.Format.Instruction35c.<init>(Instruction35c.java:76)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeDirectEmpty(MethodAnalyzer.java:3411)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1022)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:208)
        at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:378)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:300)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:323)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:292)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:136)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:201)
        at org.jf.baksmali.main.main(main.java:282)

Error occured while disassembling class 
Lcom.android.launcher2.Workspace$ZoomOutInterpolator; - skipping class
java.lang.RuntimeException: regCount does not match the number of arguments of 
the method
        at org.jf.dexlib.Code.Format.Instruction35c.checkItem(Instruction35c.java:150)
        at org.jf.dexlib.Code.Format.Instruction35c.<init>(Instruction35c.java:76)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeDirectEmpty(MethodAnalyzer.java:3411)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1022)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:208)
        at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:378)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:300)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:323)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:292)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:136)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:201)
        at org.jf.baksmali.main.main(main.java:282)

Original comment by Sokolov....@gmail.com on 19 Oct 2011 at 7:52

GoogleCodeExporter commented 9 years ago
Sokolov... - That does appear like a possible issue with baksmali for ICS. 
However, I can't fix any ICS issues until the source is out.

Original comment by jesusfreke@jesusfreke.com on 21 Oct 2011 at 4:10

GoogleCodeExporter commented 9 years ago
Question.  How did this ROM Developer deodex this ICS Rom from sdk build?

http://forums.androidcentral.com/sprint-nexus-s-4g-rooting-roms-hacks/127806-rom
-ics-sdk-port-wip.html

Original comment by derekrey...@gmail.com on 28 Oct 2011 at 10:22

GoogleCodeExporter commented 9 years ago
It doesent say anywhere that the rom is deodexed. 
Its an sdk port. Easy to get running but pretty much always broken.
You have quite a bit or reading to do it sounds like before you start talking 
about de-odexing
Jesus freke knows what he's talking about. 
If it could be done he would have done it already.
He is the OG 
Don't question him like that

Original comment by Socast...@gmail.com on 28 Oct 2011 at 10:52

GoogleCodeExporter commented 9 years ago
Socast, 

You do realize who this is right?  This is myn, The guy behind the Warm Roms 
and founder of Team Synergy. 2600+ Thanks on XDA.

http://forum.xda-developers.com/search.php?searchid=97611172

Anyways, the ICS SDK Port for the Nexus S is indeed DeOdexed,  that's why I 
posed the intelligent question :)

Still would love to here an answer from JesusFreke himself.

Original comment by derekrey...@gmail.com on 29 Oct 2011 at 2:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
If it is in fact deodexed, my best guess is that someone implemented the new 
odex opcodes for baksmali, and then deodexed it. It probably isn't that 
difficult to do, I just can't do it until the source is officially released, 
due to.. various constraints.

Original comment by jesusfreke@jesusfreke.com on 29 Oct 2011 at 5:44

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
FIXED! ICS is now supported in 1.3.0 :)

Original comment by jesusfreke@jesusfreke.com on 21 Nov 2011 at 7:47