abines / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

Error output when using source() or get_source(). #131

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load an apk: a, d, dx = AnalyzeAPK("/home/vm/KeyEvent.apk"
2. Use: d.CLASS_Landroid_samples_keyevent_Event.source() or 
d.CLASS_Landroid_samples_keyevent_Event.METHOD_onCreate.source()

What do you see instead?

In [2]: d.CLASS_Landroid_samples_keyevent_Event.METHOD_onCreate.source()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/vm/androguard/androlyze.py in <module>()
----> 1 d.CLASS_Landroid_samples_keyevent_Event.METHOD_onCreate.source()

/home/vm/androguard/androguard/core/bytecodes/dvm.pyc in source(self)
   2819             :rtype: string
   2820         """
-> 2821         self.CM.decompiler_ob.display_source(self)
   2822 
   2823     def get_source(self):

AttributeError: 'NoneType' object has no attribute 'display_source'

What version of the product are you using? On what operating system?

Androguard 1.9 / androlyze 2.0

Please provide any additional information below.

Original issue reported on code.google.com by reypimpo...@gmail.com on 12 Jul 2013 at 1:28

GoogleCodeExporter commented 8 years ago
Ok, I got it. I haven't properly indicated the decompiler:

a, d, dx = AnalyzeAPK("/home/vm/KeyEvent.apk", decompiler="ded")

Sorry, now it works.

Original comment by reypimpo...@gmail.com on 8 Aug 2013 at 8:11