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

AttributeError: 'NoneType' object has no attribute 'replace' #22

Closed
hitfzyangdianshi opened this issue Jul 1, 2024 · 1 comment
Closed

Comments

@hitfzyangdianshi
Copy link

apk: https://drive.google.com/file/d/1zmJMWgPpSZF0UXjY0BTFlg-wWnyaB-35/view?usp=sharing
game: com.EngineOrganic.HAX_Demo https://sidequestvr.com/app/3366/hax-demo

[DEBUG] Auto-detected your frida version: 16.2.1
[DEBUG] Downloading the frida gadget library(16.2.1) for arm64
[DEBUG] Checking internet permission and extractNativeLibs settings
[DEBUG] Adding 'android.permission.INTERNET' permission to AndroidManifest.xml
[DEBUG] Searching for the main activity in the smali files
Traceback (most recent call last):
  File "E:\ProgramData\Anaconda3\envs\frida\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "E:\ProgramData\Anaconda3\envs\frida\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "E:\ProgramData\Anaconda3\envs\frida\Scripts\frida-gadget.exe\__main__.py", line 7, in <module>
    sys.exit(run())
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\scripts\cli.py", line 270, in run
    inject_gadget_into_apk(apk_path, arch, decompiled_path)
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\scripts\cli.py", line 200, in inject_gadget_into_apk
    insert_loadlibary(decompiled_path, main_activity, load_library_name)
  File "E:\ProgramData\Anaconda3\envs\frida\lib\site-packages\scripts\cli.py", line 93, in insert_loadlibary
    target_relative_path = main_activity.replace(".", os.sep)
AttributeError: 'NoneType' object has no attribute 'replace'
ksg97031 added a commit that referenced this issue Jul 2, 2024
- Update version to 1.3.9
- Modify inject_gadget_into_apk function to accept main_activity as an optional parameter
- Update CLI to include --main-activity option
- Handle cases where the main activity is not found or needs to be specified manually
@ksg97031
Copy link
Owner

ksg97031 commented Jul 2, 2024

@hitfzyangdianshi
I have patched the issue where the main activity was not found.
Please upgrade to the newer version 1.3.9 (pip install frida-gadget --upgrade) and try again.

@ksg97031 ksg97031 closed this as completed Jul 2, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants