[BUG]Preserve original signature scheme v2, v3, v4 in modded APK #3779
Description
Is it possible the original signature scheme (APK Sig Block 42PK) hidden in the APK can be extracted for later use and put it back in APK again? just to make a modded APK with original signature (Modders usually call it an unsigned APK), in order to be able to login with Google for rooted devices with CorePatch module?
This is how it looks like in hex editor, it's at near the bottom, but I don't understand much how it works in hex
For example with preserving original signature:
- Extract APK Sig Block 42PK as a file using Apktool
- Modify files in APK without decompiling. Some tools require APK modification, so just decompiling apk wouldn't work
- Put back APK Sig Block 42PK block in APK using Apktool
The problem with unsigned APK:
When making changes in an APK using ordinary zip utility like Winrar, it removes the (APK Sig Block 42PK) completely, breaking Google login on Android 9 and above because Android 9 expect signature scheme v2, v3, v4 (APK Sig Block 42PK). Android 8 and below ignores it and read signature scheme v1 (RSA, SF and MF files in META-INF). Also signature scheme v1 is getting deprecated, some APK doesn't come with v1 anymore
To install unsigned APK:
Install Xposed and CorePatch https://github.com/LSPosed/CorePatch