androguard / androguard

Reverse engineering and pentesting for Android applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decompilation crashes during export

zebrapurring opened this issue · comments

Describe what you wanted to do

Running the following command:

androguard decompile --format dot --output ./out ./myapp.apk

Causes the following crash during the export stage:

Traceback (most recent call last):
  File "~/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "~/.pyenv/versions/3.10.4/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "~/.local/lib/python3.10/site-packages/androguard/cli/cli.py", line 619, in <module>
    entry_point()
  File "~/.local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "~/.local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "~/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "~/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "~/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "~/.local/lib/python3.10/site-packages/androguard/cli/cli.py", line 301, in decompile
    export_apps_to_format(fname, s, output, limit,
  File "~/.local/lib/python3.10/site-packages/androguard/cli/main.py", line 165, in export_apps_to_format
    buff = method2dot(vmx.get_method(method))
  File "~/.local/lib/python3.10/site-packages/androguard/core/bytecode.py", line 285, in method2dot
    method = mx.get_method()
AttributeError: 'NoneType' object has no attribute 'get_method'

System Information

  • Androguard Version: 4.1.1
  • Python Version: 3.10.4
  • Operating System: macOS Sonoma 14.4.1