sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.46k stars 854 forks source link

[bug] Fails to pull github tags. #366

Closed waruqi closed 4 years ago

waruqi commented 4 years ago

Describe the bug

Objection has successfully downloaded libfrida-gadget.so, but after that it always fails to pull git tags due to network problems, but since it has successfully obtained gadget, why do I need to pull tags from github every time?

No architecture specified. Determining it using `adb`...
Detected target device architecture as: arm64-v8a
Traceback (most recent call last):
  File "/usr/local/bin/objection", line 11, in <module>
    load_entry_point('objection==1.9.1', 'console_scripts', 'objection')()
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/objection/console/cli.py", line 366, in patchapk
    patch_android_apk(**locals())
  File "/usr/local/lib/python3.7/site-packages/objection/commands/mobile_packages.py", line 153, in patch_android_apk
    github_version = github.get_latest_version()
  File "/usr/local/lib/python3.7/site-packages/objection/utils/patchers/github.py", line 52, in get_latest_version
    self.gadget_version = self._call(self.GITHUB_LATEST_RELEASE)['tag_name']
KeyError: 'tag_name'

To Reproduce Steps to reproduce the behavior:

objection patchapk -s xxx.apk

Sometimes works fine

No architecture specified. Determining it using `adb`...
Detected target device architecture as: arm64-v8a
Using latest Github gadget version: 12.8.20
Patcher will be using Gadget version: 12.8.20

BTW, My apk package has only the armv7 so library., why would it detect the badget library injected into arm64? It will affect the abi loading priority of apk

leonjza commented 4 years ago

The checkin with GitHub is to see if there is a newer gadget to download. If you want to stay on a specific version, you can specify the --gadget-version flag. This will also stop objection from checking in remotely to see if there are newer versions. If you believe the architecture was detected incorrectly, you can correct it with the --architecture flag.

subvert0r commented 1 year ago

Why is this happening? I am getting this error randomly as well..