[BUG] Incorrect default setting of minSdkVersion
ProgerXP opened this issue · comments
Information
- Apktool Version (
apktool -version
) - 2.9.3, also tried on v2.9.2-27-5422bd70-SNAPSHOT - Operating System (Mac, Linux, Windows) - Linux
- APK From? (Playstore, ROM, Other) - apktool.org
- Java Version (
java --version
) - 17.0.10
Problem
apktool decode
sets minSdkVersion
to 28 while it must be 29. apktool build
will fail if run on decode
's output:
smali/android/R$interpolator.smali[54,27] Hidden API restrictions are only supported on api 29 and above.
smali/android/R$interpolator.smali[55,12] mismatched tree node: I_ORDERED_METHOD_ITEMS expecting I_FIELDS
Passing -api 29
to build
or bumping minSdkVersion
in apktool.yml
is enough to successfully build.
framework.zip (official Samsung firmware for Android 14)
I don't see this as possible. The api level of every dex file is reported as 28 in your sample. So Apktool did exactly what it should.
Closing.
The api level of every dex file is reported as 28 in your sample.
But why recompiling them fails if it's level 28? Without changing -api
to 29, you can't build it.