吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 738|回复: 1
收起左侧

[Android 求助] objection 给某 apk 注入 gadget 报错

[复制链接]
WTLR 发表于 2024-8-1 15:31
objection 给 apk 注入 gadget 报错,在此之前试了一个apk正常注入,但是换了个apk就报错,不知道怎么解决


这个是注入成功的apk的日志信息:

[Asm] 纯文本查看 复制代码
(frida_14.2.8) E:\Security\Frida\frida_14.2.8\Scripts>objection patchapk -V 14.2.18 -s "C:\Users\Laptop\Desktop\HookDemo.apk" -c "C:\Users\Laptop\Desktop\gadget_config.txt"
No architecture specified. Determining it using `adb`...
Detected target device architecture as: x86_64
Using manually specified version: 14.2.18
Patcher will be using Gadget version: 14.2.18
Detected apktool version as: 2.9.3
Running apktool empty-framework-dir...
I: Removing 1.apk framework file...
Press any key to continue . . .
Unpacking C:\Users\Laptop\Desktop\HookDemo.apk
App already has android.permission.INTERNET
Target class not specified, searching for launchable activity instead...
Reading smali from: C:\Users\Laptop\AppData\Local\Temp\tmppen70ft9.apktemp\smali\com/xiaojianbang/app/MainActivity.smali
Injecting loadLibrary call at line: 21
Attempting to fix the constructors .locals count
Current locals value is 0, updating to 1:
Writing patched smali back to: C:\Users\Laptop\AppData\Local\Temp\tmppen70ft9.apktemp\smali\com/xiaojianbang/app/MainActivity.smali
Copying Frida gadget to libs path...
Adding a gadget configuration file...
Rebuilding the APK with the frida-gadget loaded...
Built new APK with injected loadLibrary and frida-gadget
Performing zipalign
Zipalign completed
Signing new APK.
Signed the new APK
Copying final apk from C:\Users\Laptop\AppData\Local\Temp\tmppen70ft9.apktemp.aligned.objection.apk to C:\Users\Laptop\Desktop\HookDemo.objection.apk in current directory...
Cleaning up temp files...



这个是注入失败的apk的日志:
[Asm] 纯文本查看 复制代码
(frida_14.2.8) E:\Security\Frida\frida_14.2.8\Scripts>objection patchapk -V 14.2.18 -s "C:\Users\Laptop\Desktop\huluxia.
apk" -c "C:\Users\Laptop\Desktop\gadget_config.txt"
No architecture specified. Determining it using `adb`...
Detected target device architecture as: x86_64
Using manually specified version: 14.2.18
Patcher will be using Gadget version: 14.2.18
Detected apktool version as: 2.9.3
Running apktool empty-framework-dir...
I: Removing 1.apk framework file...
Press any key to continue . . .
Unpacking C:\Users\Laptop\Desktop\huluxia.apk
An error may have occurred while extracting the APK.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/vpi__tab_unselected_focused_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/vpi__tab_selected_pressed_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/hwpush_list_activated_emui.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/vpi__tab_unselected_pressed_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/hwpush_pic_ab_number_light.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/hwpush_progress.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/hwpush_ab_bottom_emui.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/vpi__tab_selected_focused_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/vpi__tab_selected_holo.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/hwpush_background_emui.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/drawer_bg.9.png". Renaming it to *.png.
W: Cant find 9patch chunk in file: "drawable-xhdpi-v4/hwpush_pic_ab_number.9.png". Renaming it to *.png.

Exception in thread Thread-10:
Traceback (most recent call last):
  File "C:\.pyenv\pyenv-win\versions\3.8.10\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\.pyenv\pyenv-win\versions\3.8.10\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\.pyenv\pyenv-win\versions\3.8.10\lib\subprocess.py", line 1370, in _readerthread
    buffer.append(fh.read())
UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 2897: illegal multibyte sequence
Traceback (most recent call last):
  File "C:\.pyenv\pyenv-win\versions\3.8.10\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\.pyenv\pyenv-win\versions\3.8.10\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "E:\Security\Frida\frida_14.2.8\Scripts\objection.exe\__main__.py", line 7, in <module>
  File "e:\security\frida\frida_14.2.8\lib\site-packages\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "e:\security\frida\frida_14.2.8\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "e:\security\frida\frida_14.2.8\lib\site-packages\click\core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "e:\security\frida\frida_14.2.8\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "e:\security\frida\frida_14.2.8\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "e:\security\frida\frida_14.2.8\lib\site-packages\objection\console\cli.py", line 373, in patchapk
    patch_android_apk(**locals())
  File "e:\security\frida\frida_14.2.8\lib\site-packages\objection\commands\mobile_packages.py", line 192, in patch_android_apk
    patcher.inject_internet_permission()
  File "e:\security\frida\frida_14.2.8\lib\site-packages\objection\utils\patchers\android.py", line 428, in inject_internet_permission
    if internet_permission in self._get_appt_output():
  File "e:\security\frida\frida_14.2.8\lib\site-packages\objection\utils\patchers\android.py", line 317, in _get_appt_output
    self.aapt = o.out
  File "e:\security\frida\frida_14.2.8\lib\site-packages\delegator.py", line 126, in out
    self.__out = self.std_out.read()
ValueError: I/O operation on closed file.
Cleaning up temp files...

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

怜渠客 发表于 2024-8-1 20:17
看日志是apk解压缩失败了
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-12-15 02:02

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表