I've been trying to achieve a functionality similar to what's available in the Androguard GUI, where you can extract strings, methods, and API calls from APKs. How can I do that programmatically?
from androguard.core.bytecodes import apk
from androguard.core.bytecodes import dvm
a = apk.APK('app.apk')
# Load the DEX file
d = dvm.DalvikVMFormat(a.get_dex())
# Iterate through the methods
for method in d.get_methods():
print(method.get_name(), method.get_descriptor())