[BUG] Recompiling system jars produces strange jars
taylor00541 opened this issue · comments
taylor00541 commented
Information
- Apktool Version (
apktool -version
) -2.9.3
- Operating System (Mac, Linux, Windows) - Windows 11
- APK From? (Playstore, ROM, Other) - ROM
- Java Version (
java --version
) -java 20.0.1 2023-04-18
Steps to Reproduce
- Download
lineage-20.0-20240126-nightly-lynx-signed.zip
from here. - Extract system.img from the OTA, and then get
/system/framework/framework.jar
(framework.jar.zip) apktool d -o framework framework.jar
apktool b -api 29 -c -f -o framework2.jar ./framework
- Note that
framework.jar
is 32.6 MB andframework2.jar
is 17.6 MB - Run
unzip -lv framework.jar
,unzip -lv framework2.jar
Note thatframework.jar
contains 57 files, andframework2.jar
contains 54 files (missingres/vendor.mime.types
,res/android.mime.types
,res/debian.mime.types
). - Note that the checksums of all the .dex files have changed.
- Replacing the produced file on a running ROM causes a boot loop.
- The same holds for other system
.jar
s.
Questions to ask before submission
- Have you tried
apktool d
,apktool b
without changing anything? Yes - If you are trying to install a modified apk, did you resign it? Irrelevant
- Are you using the latest apktool version? Yes
Possibly related issues
Connor Tumbleson commented
hmm thats odd. Thanks for details.
I'm watching some updates to upstream smail for newer dex types. Though you are targeting API 29, so probably that. Either way you might have some luck running some tests directly w/ smali to rule out specific Apktool beahvior.
Connor Tumbleson commented
Going to mark as 3rd-party and await a new release from google/smali. I believe whatever is happening here is over my knowledge.