Apktool
                                
                                
                                
                                    Apktool copied to clipboard
                            
                            
                            
                        [BUG] Framework.jar cannot be recompiled normally. The latest apktool
Information
- Apktool Version (
apktool -version) - 2.6.0 - Operating System (Mac, Linux, Windows) - Windows10
 - APK From? (Playstore, ROM, Other) - framework.jar
 
Stacktrace/Logcat
java -jar apktool_2.6.0.jar d framework-test.jar
I: Using Apktool 2.6.0 on framework-test.jar
I: Baksmaling classes.dex...
I: Baksmaling classes2.dex...
I: Baksmaling classes3.dex...
I: Baksmaling classes4.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
java -jar apktool_2.6.0.jar b framework-test.jar.out
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
framework-test.jar.out\smali\android\Manifest$permission.smali[1750,27] Hidden API restrictions are only supported on api 29 and above.
framework-test.jar.out\smali\android\Manifest$permission.smali[1751,12] mismatched tree node: I_ORDERED_METHOD_ITEMS expecting I_FIELDS
Could not smali file: android/Manifest$permission.smali
java -jar apktool_2.6.0.jar b -api 29 framework-test.jar.out
I: Using Apktool 2.6.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes3 folder into classes3.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes4 folder into classes4.dex...
W: Could not find resources
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
Steps to Reproduce
apktool
Frameworks
MIUI12.5 /system/framework/framework.jar framework-test.zip
Questions to ask before submission
- After compiling, you can't turn on the first screen of the card, including after cracking the signature. After adding - API 29, it can be compiled normally.
 - adb logcat :09-19 12:25:43.787 7256 7256 W zygote64: Failed to open .dex from file '/system/framework/framework.jar': Failure to verify dex file '/system/framework/framework.jar': Non-zero padding e6 before section of type 61440 at offset 0x94634d 09-19 12:25:43.799 7257 7257 W zygote : Failed to open .dex from file '/system/framework/framework.jar': Failure to verify dex file '/system/framework/framework.jar': Non-zero padding e6 before section of type 61440 at offset 0x94634d
 
Going to mark as 3rd party. We need this fix - https://github.com/JesusFreke/smali/pull/816
Seem like JesusFreke has discontinued Smali project, this issue won't fix any more :(
Seem like JesusFreke has discontinued Smali project, this issue won't fix any more :(
Without a source, thats not the nicest thing to say.
I believe resolved with this: https://github.com/iBotPeaches/Apktool/pull/2941