REAndroid / APKEditor

Powerful android apk editor - aapt/aapt2 independent
Apache License 2.0
645 stars 95 forks source link

Preserve multiplexed APK #67

Open Yehh22 opened 10 months ago

Yehh22 commented 10 months ago

Describe the bug Since we bypass security with original APK inside modified APK, we needed to multiplex APK in order to reduce the size of APK. APKEditor does not support multiplexed APK, so any modifications will lose multiplex and revert size to original. For example, multiplexed APK is 189 MB. After modification using APKEditor, the size reverts back to 369 MB

image

See the details how multiplex technique works. The source is written in Java too, makes it easier to adopt to your project! https://github.com/L-JINBIN/ApkDataMultiplexing

To Reproduce Steps to reproduce the behavior: I don't want to give details about bypassing but you can easly replicate it

  1. Put original APK inside an APK you want to be modified (e.g. /assets/sample.apk)
  2. Multiplex the APK file from /assets/sample.apk using ApkDataMultiplexing. You need your own jks file to sign and multiplex it
  3. Make any modifications using APKEditor

Used apk file https://mega.nz/file/PRRRBBQJ#8EYVX3gI1ejL1cSZmfTQtWkyo5Ay69CMhIKGKqI7siw

REAndroid commented 10 months ago

My first time hearing about "multiplexed APK", i might be wrong but this methods is not popular (one-person-technique). Since APKEditor is on early stage, it does not worth to consider such features. Moreover we don't have good signing lib that don't affect APKEditor's performance.

Maybe it's good idea to make plugin interface to satisfy everyone's interest.

Yehh22 commented 10 months ago

Hmm ok. Well, this method is quite popular in Asian and it's only widespread among Telegram and QQ groups at the moment. It's a matter of time it will get widespread on Western-side

I mostly used APKEditor to restore original signature for unsigned APK because it fixes Google login. The only disadvange is lack of multiplex, so I either have to choose one of them