Androguard: 'NameError: name 'AnalyzeAPK' is not defined' error

2k Views Asked by At

I am trying to use androguard to analyze a malware apk file but am facing the following error.

In [1]: a,d,dx = AnalyzeAPK("malware.apk", decompiler="dad")

NameError Traceback (most recent call last) /usr/local/lib/python3.7/site-packages/androguard/cli/main.py in 1 a,d,dx = AnalyzeAPK("malware.apk", decompiler="dad")

NameError: name 'AnalyzeAPK' is not defined

I have tried re installing androguard but no change. How can i fix this?

2

There are 2 best solutions below

0
On

You can import AnalyzeAPK by running:

from androguard.misc import AnalyzeAPK
0
On

You can try to update to the latest version of androguard. Also, it might be helpful to include the absolute path to the .apk file