zhangwenan / smali

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

"Error occured while loading boot class path files" #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.java -jar baksmali-1.2.jar -x services.odex
2.
3.

What is the expected output? What do you see instead?
.odex files should deodex. 

What version of the product are you using? On what operating system?
baksmali-1.2 on Ubuntu 9.10

Please provide any additional information below.
Error im getting when I deodex services.odex.
This is what I get when I rename, or delete the framework jar files. 

java -jar baksmali-1.2.jar -x services.odex

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ValidationException: class
Landroid/content/DialogInterface$OnCancelListener; cannot be resolved.
    at
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedValidationExc
eption(ClassPath.java:391)
    at
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getSuperclass(ClassPath
.java:395)
    at
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces(Clas
sPath.java:676)
    at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:532)
    at org.jf.dexlib.Code.Analysis.ClassPath.loadDexFile(ClassPath.java:127)
    at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.java:118)
    at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:64)
    at
org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath(ClassPath.java:54)
    at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:68)
    at org.jf.baksmali.main.main(main.java:263)

Original issue reported on code.google.com by oban...@gmail.com on 4 Mar 2010 at 2:00

GoogleCodeExporter commented 9 years ago
Have you identified which jar file the class
"Landroid/content/DialogInterface$OnCancelListener;" is in?

Original comment by JesusFr...@gmail.com on 4 Mar 2010 at 2:10

GoogleCodeExporter commented 9 years ago
Actually, I need to add more info to that error message to be able to resolve 
this
type of error in the future. For now, just tell me what rom you're trying to 
deodex,
and I'll take a look and see what the problem is

Original comment by JesusFr...@gmail.com on 4 Mar 2010 at 2:12

GoogleCodeExporter commented 9 years ago
im trying to deodex services.odex in /system/framework from the Gumbo 1.5c ROM. 
I got
it from here...

http://forum.androidcentral.com/htc-hero-roms-hacks/6699-cdma-hero-rom-gumbo-rom
-1-5c.html

Original comment by oban...@gmail.com on 4 Mar 2010 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by JesusFr...@gmail.com on 4 Mar 2010 at 2:17

GoogleCodeExporter commented 9 years ago
Here is what im doing...I adb pulled all the .jar files you mentioned into a 
folder
by themselves. I also downloaded baksmali-1.2 and smali-1.2 and placed them 
into the
same folder. I then renamed and deleted the .jar files you said to delete. I 
tried the 
java -jar baksmali-1.2.jar -x services.odex  And thats when I got that message. 
Did I
do it right?

Original comment by oban...@gmail.com on 4 Mar 2010 at 2:18

GoogleCodeExporter commented 9 years ago
I've found the issue in baksmali. You'll have to wait until I fix it - there's 
no
workaround. I'm hoping to get the fix in this evening. And I'll try and do a 
bugfix
release soonish.

Original comment by JesusFr...@gmail.com on 4 Mar 2010 at 3:38

GoogleCodeExporter commented 9 years ago
Thanks for your effort I appreciate it! Looking forward to a new release...

Original comment by oban...@gmail.com on 4 Mar 2010 at 3:47

GoogleCodeExporter commented 9 years ago
Same exact error with a few varying class paths running v1.2 on Windows 7 x64-

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ValidationException: class 
Lcom/htc/preference/HtcPreference$OnPreferenceChangeListener; cannot be 
resolved.
        at 
org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.unresolvedValidationExc
eptio
n(ClassPath.java:391)
        at org.jf.dexlib.Code.Analysis.ClassPath$UnresolvedClassDef.getSuperclass
(ClassPath.java:395)
        at 
org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInterfaces
(ClassPath.java:676)
        at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:532)
        at org.jf.dexlib.Code.Analysis.ClassPath.loadDexFile(ClassPath.java:127)

        at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:69)
        at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath
(ClassPath.java:54)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:68)
        at org.jf.baksmali.main.main(main.java:263)

Thanks for all you do eagerly looking forward to your bugfix! :)

Original comment by markcmil...@gmail.com on 5 Mar 2010 at 3:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks obannvi,

Got past that hurdle now I'm on a new error and I'm not 100% sure where to go 
from 
there though it looks like it's missing a dependency to deodex?

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Could not find class Lcom/htc/preferenc
e/HtcListPreference;
        at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:183)
        at org.jf.dexlib.Code.Analysis.ClassPath.access$700(ClassPath.java:42)
        at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadSuperclass
(ClassPath.java:689)
        at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:575)
        at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:187)
        at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:80)
        at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPath
(ClassPath.java:58)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:71)
        at org.jf.baksmali.main.main(main.java:268)
Error while loading class Lcom/android/phone/CLIRListPreference; from file Phone
.odex

Don't want to clutter up this issue but I really don't think this s a specfic 
issue 
to baksmali anymore.

Original comment by markcmil...@gmail.com on 5 Mar 2010 at 4:43

GoogleCodeExporter commented 9 years ago
Mark,
I would create a new bug report and post it. Also, make sure in the bug report 
you
put the command you're using...

Vince

Original comment by oban...@gmail.com on 5 Mar 2010 at 4:45

GoogleCodeExporter commented 9 years ago
Yeah, the HTC roms typically have a lot more in the BOOTCLASSPATH than the 
standard 5
jars. You'll need to find the BOOTCLASSPATH and tell baksmali to use that with 
the -c
option. You only need to add the names of the jar files, not the full path. For
example, the standard BOOTCLASSPATH would look like:

-c core.jar:ext.jar:framework.jar:android.policy.jar:services.jar

You can find the BOOTCLASSPATH in /init.rc

Original comment by JesusFr...@gmail.com on 5 Mar 2010 at 4:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This is fixed in 1.2.1

Original comment by JesusFr...@gmail.com on 6 Mar 2010 at 6:28

GoogleCodeExporter commented 9 years ago
I have the same issue when I try to do java -jar baksmali-1.2.3.jar -x 
com.htc.framework.odex.  Am I doing something wrong?

Original comment by mp.jesus...@gmail.com on 19 Jun 2010 at 6:01

GoogleCodeExporter commented 9 years ago
mp.jesusfreak09 - what is the error that you are getting?

Original comment by JesusFr...@gmail.com on 19 Jun 2010 at 1:12

GoogleCodeExporter commented 9 years ago
Well, I figured it out.  Let's just mark this one down as user error.  My 
apologies.

Original comment by mp.jesus...@gmail.com on 21 Jun 2010 at 6:17

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
On executing following command,

>java -jar baksmali-1.2.6.jar -o C:\decompiledBinary -x C:\temp\classes.dex

prompts me with following error:

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Cannot locate boot class path file cor
.jar
        at org.jf.dexlib.Code.Analysis.ClassPath.loadBootClassPath(ClassPath.ja
a:237)
        at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:1
5)
        at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(Cl
ssPath.java:110)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:98)
        at org.jf.baksmali.main.main(main.java:278)

Anyone help really appreciated.

thanks.

Original comment by summaira...@gmail.com on 26 May 2011 at 12:07

GoogleCodeExporter commented 9 years ago
summaira: You need to specify the directory that contains the framework files 
with the -d option. please see 
http://code.google.com/p/smali/wiki/DeodexInstructions

Original comment by JesusFr...@gmail.com on 26 May 2011 at 4:24