Skip to content

Add 'objection signapk' command to facilitate split APK patching#375

Merged
leonjza merged 2 commits intosensepost:masterfrom
mtschirs:signapk
Feb 17, 2021
Merged

Add 'objection signapk' command to facilitate split APK patching#375
leonjza merged 2 commits intosensepost:masterfrom
mtschirs:signapk

Conversation

@mtschirs
Copy link
Copy Markdown
Contributor

@mtschirs mtschirs commented May 12, 2020

Split APKs consist of a base.apk and additional split_config.*.apk files. In order to use them with objection, the APK which contains the main activity - usually base.apk - has to be patched and the remaining APKs have to be signed (and potentially zipaligned if modified) with objection's signing key.

To simplify this process, I added a new 'objection signapk' command similar to 'objection patchapk'. Handling split APKs is then done as follows:

objection patchapk -s base.apk
objection signapk split_*.apk
adb install-multiple *.objection.apk

@mtschirs mtschirs mentioned this pull request May 12, 2020
@dragouf
Copy link
Copy Markdown

dragouf commented May 24, 2020

thanks for this PR. It works after installing apksigner:

sudo apt install apksigner

'-p',
'4',
self.apk_temp_frida_patched,
self.apk_temp_frida_patched if os.path.exists(self.apk_temp_frida_patched) else self.apk_source,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will modify the original APK, yeah? I would like to completely avoid modifying the source application.

@leonjza
Copy link
Copy Markdown
Member

leonjza commented Aug 13, 2020

@mtschirs ping :)

@nicoloboatto
Copy link
Copy Markdown

Worked like a charm!

@leonjza leonjza merged commit 724019a into sensepost:master Feb 17, 2021
@leonjza
Copy link
Copy Markdown
Member

leonjza commented Feb 17, 2021

Thanks!

annervisser added a commit to annervisser/patch-apk that referenced this pull request Jan 2, 2022
- This was added to objection specifically for split apks:
sensepost/objection#375
- Required to install patched apk on android 11+
https://developer.android.com/about/versions/11/behavior-changes-11#minimum-signature-scheme
kmifka pushed a commit to kmifka/patch-apk that referenced this pull request Jan 7, 2025
- This was added to objection specifically for split apks:
sensepost/objection#375
- Required to install patched apk on android 11+
https://developer.android.com/about/versions/11/behavior-changes-11#minimum-signature-scheme
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

Successfully merging this pull request may close these issues.

4 participants