Closed shadowzoom closed 5 years ago
apktool, everything in the PATH (im on windows 10)
Tried with --skip-resources
objection patchapk --source appname.apk --skip-resources
No architecture specified. Determining it using `adb`...
Detected target device architecture as: arm64-v8a
Using latest Github gadget version: 12.4.0
Patcher will be using Gadget version: 12.4.0
Unpacking snapchat.apk
App already has android.permission.INTERNET
Unable to determine the launchable activity using aapt, trying to manually parse the AndroidManifest for activity aliases...
Traceback (most recent call last):
File "C:\Python37\Scripts\objection-script.py", line 11, in <module>
load_entry_point('objection==1.5.0', 'console_scripts', 'objection')()
File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python37\lib\site-packages\click-7.0-py3.7.egg\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\console\cli.py", line 322, in patchapk
patch_android_apk(**locals())
File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\commands\mobile_packages.py", line 161, in patch_android_apk
patcher.inject_load_library()
File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\utils\patchers\android.py", line 528, in inject_load_library
activity = self._get_launchable_activity().replace('.', '/')
File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\utils\patchers\android.py", line 294, in _get_launchable_activity
manifest = self._get_android_manifest()
File "C:\Python37\lib\site-packages\objection-1.5.0-py3.7.egg\objection\utils\patchers\android.py", line 239, in _get_android_manifest
return ElementTree.parse(os.path.join(self.apk_temp_directory, 'AndroidManifest.xml'))
File "C:\Python37\lib\xml\etree\ElementTree.py", line 1197, in parse
tree.parse(source, parser)
File "C:\Python37\lib\xml\etree\ElementTree.py", line 598, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
Cleaning up temp files...
Failed to cleanup with error: [WinError 2] Не удается найти указанный файл: 'C:\\Users\\Admin\\AppData\\Local\\Temp\\tmpo2vbc0rp.apktemp.objection.apk'
There are two things going on here. The first, apktool
cant rebuild the app. I suggest you try and decode and build the app manually with apktool
first. This way, if there is anything you need to edit to get it to build again, you know what it may be and can use the --pause
flag to give you a chance to do so before objection
rebuilds the patched APK. On that same topic, make sure you have the latest apktool
too.
The second, with the --skip-resources
flag, we should actually update the patcher to not try and parse the AndroidManifest.xml
file as it won't be decoded with this flag. That being said, the patcher failed there because aapt
could not determine which launchable activity to patch he loadLibrary()
call to. Unfortunately, this is also something you are going to have to approach manually to investigate. In a future version, I will add the ability to specify a class to patch which will allow you to at least launch the gadget sometime in the applications lifecycle.
Any tips how to fix this?