Apktool icon indicating copy to clipboard operation
Apktool copied to clipboard

[BUG] No support for DEX Containers

Open ExtremeXT opened this issue 6 months ago • 6 comments

Information

  1. Apktool Version (apktool -version) - 2.12.0
  2. Operating System (Mac, Linux, Windows) - All
  3. APK From? (Playstore, ROM, Other) - ROM
  4. Java Version (java --version) - openjdk 11.0.27 2025-04-15

Stacktrace/Logcat

Irrelevant

Steps to Reproduce

  1. java -jar apktool_2.12.0.jar d -api 36 -b services.jar

Frameworks

If this APK is from an OEM ROM (Samsung, HTC, LG). Please attach framework files (.apks that live in /system/framework or /system/priv-app)

APK

If this APK can be freely shared, please upload/attach a link to it.

services.zip

Questions to ask before submission

  1. Have you tried apktool d, apktool b without changing anything? Yes
  2. If you are trying to install a modified apk, did you resign it? -
  3. Are you using the latest apktool version? Yes

Extra Info

Relevant to the smali issue I created here: https://github.com/google/smali/issues/97 Thought I'd create one here as well.

ExtremeXT avatar Jul 10 '25 14:07 ExtremeXT

@iBotPeaches FYI: We do support dex upto 041 (both smali/baksmali).

Hope i am not disturbing this tread

REAndroid avatar Jul 17 '25 19:07 REAndroid

@REAndroid

Begin dex protection

:o

iBotPeaches avatar Jul 17 '25 19:07 iBotPeaches

I am having the same issue, apktool is unable to extract my framework.jar the output of most of the smali files are missing a few thousand lines missing a lot of methods. my framework.jar comes from an android 11, api version 31 phone, found some interesting debug lines within the framework code and seeked to change that.

Hope i am not disturbing this tread

I was successful in decompile, edit and recompiling with your tool, you just saved me an excessive amount of headache as a patch was far to early to work

Myrkie avatar Jul 18 '25 12:07 Myrkie

@iBotPeaches FYI: We do support dex upto 041 (both smali/baksmali).

Hope i am not disturbing this tread

Yes, but not fully. DEX Container support is missing.

ExtremeXT avatar Jul 20 '25 22:07 ExtremeXT

I am having the same issue, apktool is unable to extract my framework.jar the output of most of the smali files are missing a few thousand lines missing a lot of methods. my framework.jar comes from an android 11, api version 31 phone, found some interesting debug lines within the framework code and seeked to change that.

Hope i am not disturbing this tread

I was successful in decompile, edit and recompiling with your tool, you just saved me an excessive amount of headache as a patch was far to early to work

Unrelated issue.

ExtremeXT avatar Jul 20 '25 22:07 ExtremeXT

@iBotPeaches FYI: We do support dex upto 041 (both smali/baksmali).

Hope i am not disturbing this tread

How do you support dex 041 for smali if smali doesn't write the 041 dex header properly?

IgorEisberg avatar Jul 21 '25 04:07 IgorEisberg