wxthon / smali

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

baksmali reported java.lang.NullPointerException #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
When I ran "baksmali -d framwork -a 16 -x framwork/framework.odex -o 
framework_out", it reported following exceptions, and no files were decompiled 
in framework_out.

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.NullPointerException
    at org.jf.dexlib.StringIdItem.getStringValue(StringIdItem.java:135)
    at org.jf.dexlib.StringIdItem.getConciseIdentity(StringIdItem.java:121)
    at org.jf.dexlib.Item.addExceptionContext(Item.java:177)
    at org.jf.dexlib.Item.readFrom(Item.java:79)
    at org.jf.dexlib.IndexedSection.readItems(IndexedSection.java:50)
    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:280)

What is the exact smali/baksmali command that you ran?
baksmali -d framwork -a 16 -x framwork/framework.odex -o framework_out

What version of smali/baksmali are you using? What rom are you working
from?
baksmali-1.4.2.jar
Samsung SGS2 Jelly Bean Stock Rom 4.1.2, downloaded from 
http://www.hotfile.com/dl/225703324/0b8b43b/I9100XWLSW_I9100XEULS5_XEU.zip.html 

What is the airspeed velocity of an unladen swallow?

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

I have downloaded the whole "/system/framework/" into the "framework" directory.

Original issue reported on code.google.com by zhuerg...@gmail.com on 16 Aug 2013 at 6:52

GoogleCodeExporter commented 9 years ago
It seems there's no class.dex file in the framework.jar. Following is the 
output when unzipping the jar file. Does anybody know why there's no class.dex 
in the jar file? This framework.jar is pulled from 
/system/framework/framework.jar.

unzip framework.jar -d tmp/
Archive: framework.jar
   creating: tmp/META-INF/
  inflating: tmp/META-INF/MANIFEST.MF  
  inflating: tmp/preloaded-classes   

Original comment by zhuerg...@gmail.com on 19 Aug 2013 at 12:19

GoogleCodeExporter commented 9 years ago
An odexed jar/apk doesn't have a classes.dex. It is removed to save space, 
after the odex file is created. This doesn't/shouldn't have anything to do with 
the NPE that you reported. I'll take a look and see what's going on there.

Original comment by jesusfreke@jesusfreke.com on 19 Aug 2013 at 4:32

GoogleCodeExporter commented 9 years ago
This should be working in baksmali >= 2.0

Original comment by jesusfreke@jesusfreke.com on 7 Dec 2013 at 10:59