forprevious / smali

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

Exception occured when I used "-r" option. #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
I use baksmali to disassembly a dex file.
When i use the "-r ALL" option, baksmail throws a Exception.
when i erase the "-r ALL" option, baksmali works well.
whether i use the option incorrectly?

What is the exact smali/baksmali command that you ran?
java -jar baksmali-1.2.6.jar c:\eclipse_workspace\AndroidTest\bin\classes.dex 
-r ALL

What version of smali/baksmali are you using? What rom are you working
from?
baksmali-1.2.6 on winXP Professional sp3

What is the airspeed velocity of an unladen swallow?

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

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find 
superclass Ljunit/framework/TestCase;
        at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass(ClassPath.java:784)
        at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:668)
        at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:280)
        at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:163)
        at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:131)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:105)
        at org.jf.baksmali.main.main(main.java:278)
Error while loading class Landroid/test/AndroidTestCase; from file 
.\framework.zip
Error while loading ClassPath class Landroid/test/AndroidTestCase;

Original issue reported on code.google.com by liuzhe0...@gmail.com on 7 Mar 2011 at 2:57

GoogleCodeExporter commented 9 years ago
You need to find what jar/apk contains that class, and add it to the classpath 
that baksmali searches, with the -c option. Failing that, you can try the -I 
option to ignore these types of errors. Although I don't recall offhand if the 
-I and the -r option play well together :)

Original comment by JesusFr...@gmail.com on 7 Mar 2011 at 3:53

GoogleCodeExporter commented 9 years ago
Thank you for you replying.
when I input "baksmali-1.2.6.jar 
c:\eclipse_workspace\AndroidTest\bin\classes.dex -r ALL -I" this time, I can 
obtain all output files, though there are some 
Exceptions(ClassNotFoundException) printed.

By the way, I find "android.jar" contains "junit/framework/TestCase", and I put 
it and "baksmali-1.2.6.jar" to the same path, but the Exception still exists.

"android.jar" is android 2.2 sdk for windows.

Original comment by liuzhe0...@gmail.com on 7 Mar 2011 at 6:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had to include the core-junit.jar as part of the boot classes path. Add it to 
the -c option as JesusFr mentioned.

Original comment by rans...@gmail.com on 25 Jun 2011 at 10:42