hosijyun / smali

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

difficulties de-odexing 1 file #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am having issues trying to de-odex one .apk for the Cliq. I run the
following command and get the error at the bottom. i know this is a
bootclass issue. any advice would be greatly appreciated.

command: java -jar baksmali-1.2.1.jar -c :com.motorola.obex.jar -x
blur-services.odex

What version are you using? v1.2.1

Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Util.ExceptionWithContext: Could not find class
Ljavax/servlet/htt
p/HttpServlet;
        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(ClassPa
th.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.j
ava:58)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:71)
        at org.jf.baksmali.main.main(main.java:268)
Error while loading class Lnet/oauth/signature/Echo; from file
blur-services.ode
x

Original issue reported on code.google.com by JrEE...@gmail.com on 15 Mar 2010 at 6:13

GoogleCodeExporter commented 9 years ago
i should have added above. but i have tried adding every .jar from the 
frameworks
folder to the bootclass path and get that same error. i have no clue what this 
file
is dependent to.

Original comment by JrEE...@gmail.com on 16 Mar 2010 at 12:14

GoogleCodeExporter commented 9 years ago
Keep in mind that it doesn't have to be a file in /system/framework. It could 
also be
a file in /system/app. You might try using the axmlprinter2 utility on the 
manifest
file and see what other libraries it depends on. Also, you can find the base
BOOTCLASSPATH for the rom in the /init.rc file.

If nothing else, just disassemble all the jars and apks from the rom, and do a 
find
-name "HttpServlet.java"

Original comment by JesusFre...@gmail.com on 16 Mar 2010 at 3:21

GoogleCodeExporter commented 9 years ago
Thanks JF. So the depency will lie in one of those 2 folders? Nowhere else 
possibly?

Original comment by JrEE...@gmail.com on 16 Mar 2010 at 5:36

GoogleCodeExporter commented 9 years ago
i disassembled all the jars and apks and there is nothing named 
"HttpServlet.java" :/

Original comment by JrEE...@gmail.com on 16 Mar 2010 at 6:29

GoogleCodeExporter commented 9 years ago
sorry, my mistake. should be HttpServlet.smali

Original comment by JesusFr...@gmail.com on 17 Mar 2010 at 12:13

GoogleCodeExporter commented 9 years ago
still not finding it. is it possible it could lie somewhere else?

Original comment by JrEE...@gmail.com on 17 Mar 2010 at 12:38

GoogleCodeExporter commented 9 years ago
I've taken a look at a cliq rom, and agree. The HttpServlet class is nowhere to 
be
found. If anything tried to use the net.oath.signature.Echo class, dalvik would 
throw
an exception because it couldn't find the superclass 
javax.servlet.http.HttpServlet

In baksmali, I made the assumption that there wouldn't be any missing classes 
like
this. Which apparently is an incorrect assumption. I'll need to figure out how 
to
have baksmali handle this case.

Original comment by JesusFr...@gmail.com on 20 Mar 2010 at 12:46

GoogleCodeExporter commented 9 years ago

Original comment by JesusFr...@gmail.com on 20 Mar 2010 at 12:46

GoogleCodeExporter commented 9 years ago
Thank you sir! I love your status on modmymoto "Itty Bitty Modder" lol.

Original comment by JrEE...@gmail.com on 20 Mar 2010 at 12:54

GoogleCodeExporter commented 9 years ago
I've fixed this in 1.2.2. You need to deodex that file with the -I option
(--ignore-errors). It will still spit out a number of errors, but instead of
stopping, it will continue to disassemble the rest of the classes. The classes 
that
it couldn't deodex will simply be missing.

This "shouldn't" cause any problems, because if any of those classes were 
actually
used anywhere, dalvik would likely raise an exception and it wouldn't work. But
you'll obviously want to test it out and make sure there are no problems

Original comment by JesusFr...@gmail.com on 3 Apr 2010 at 11:26

GoogleCodeExporter commented 9 years ago
thanks man I am testing now!

Original comment by JrEE...@gmail.com on 4 Apr 2010 at 2:23

GoogleCodeExporter commented 9 years ago
great, let me know if you run into any issues. It should deodex and re-assemble 
fine.
But if it actually runs or not is the real question! ;)

Original comment by JesusFr...@gmail.com on 4 Apr 2010 at 2:27

GoogleCodeExporter commented 9 years ago
and it booted up!! JF thanks once again for your superb work!

Original comment by JrEE...@gmail.com on 4 Apr 2010 at 4:52

GoogleCodeExporter commented 9 years ago
Great! Thanks for the follow up :)

Original comment by JesusFr...@gmail.com on 4 Apr 2010 at 7:08