Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when requesting debug mode decompilation #36

Closed
Tungstwenty opened this issue Sep 21, 2012 · 3 comments
Closed

Errors when requesting debug mode decompilation #36

Tungstwenty opened this issue Sep 21, 2012 · 3 comments
Labels

Comments

@Tungstwenty
Copy link

(this is mentioned on the 1.5.0 release notes of XDA thread, but reporting here as I'm not sure whether it's the same situation and I see no other open issue)

When attempting to decompile most apks with -d, errors such as these ones will be issued for lots of classes:

Error occured while disassembling class Lorg.achartengine.chart.PointStyle; - skipping class
java.lang.NullPointerException
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeAgetObject(MethodAnalyzer.java:2409)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:759)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:325)
at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:281)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:103)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:185)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:72)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)

Error occured while disassembling class Lorg.achartengine.renderer.XYMultipleSeriesRenderer; - skipping class
java.lang.NullPointerException
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeAgetWide(MethodAnalyzer.java:2340)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:756)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:325)
at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:297)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:104)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:185)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:72)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:131)
at brut.apktool.Main.main(Main.java:68)

These examples were obtained on the 1.10.5.0 version of the BBS app, http://forum.xda-developers.com/showthread.php?t=1179809
2 different errors (perhaps there are additional types) - analyzeAgetWide, analyzeAgetObject.

Still in this example, XYMultipleSeriesRenderer fails but simpler classes like XYSeriesRenderer or plain interfaces / abstract classes don't raise errors.

@iBotPeaches
Copy link
Owner

I'm working with JesusFreke to add some of this stuff to baksmali, as this is outside of my knowledge. I don't know how debug mode works and thinking of removing it entirely from Apktool

@Tungstwenty
Copy link
Author

Please see my other comment on issue #35.
My main suggestion is to try to keep the smali stuff as close as possible to upstream, in order to take advantage of the improvements they might be adding and not lose functionaries such as this -d and -r.
Of course this requires that you understand that stuff to keep it working while at the same time have the eventual changes required for apktool :)

@iBotPeaches
Copy link
Owner

Smali is fully up to date. There is only about 6 line changes I do for apktool.

I'll see about passing more commands to smali.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants