Apktool v2.6.0 Released
Apktool v2.6.0 has been released! This is a long overdue release that fixes many issues and packs a few new features/behavior in.
The last release was way back in December of 2020 so the promise of making quicker releases didn't really hold up. Building aapt/aapt2 binaries has gotten increasingly complex over each and every release. Building a pure AOSP build of build tools got a bit more difficult.
So lets talk about this release.
We've started publishing to Maven now on each release build. This has opened up some glaring issues in the Apktool code base:
- Declared exceptions never thrown
- Missing docblocks
- Code smell issues leading to warnings
- A not very sane API to use in library form
The good news is most of these are resolvable and a good chunk of them were slipped into 2.6.0.
Goooler stepped in and upgraded the entire ecosystem of Apktool. Whether from direct dependencies to the CI/CD process to the build process itself. The project should be a bit easier to work in now for those wanting to contribute.
Binaries were updated again for aapt1/aapt2 and enhancements were made to our CI process to ensure that static unbroken binaries will also be produced. This should result in less cryptic errors when an aapt build was invalid.
The war on obfuscation never ends and this release is no exception. Much work was put into string handling learning from the bundletool project that had to a similar and much better approach of parsing strings.
The release as always fixes a good deal of issues between disassembling and building and should lead to a more stable experience.
The change log is below, but before is a snippet of news about the next releases. Apktool is an interesting pickle with the announcement of APKs effectively not being produced during the application development stage. Bundles will be built and Google will produce the APK for the specific language and resource set per phone. This puts Apktool in an interesting position on many topics.
I've started a public discussion about Apktool 3 and while nothing is set in stone yet - this is my goal.
- Apktool 2.6.1 - A few months away - fixes and non-breaking changes
- Apktool 3.0.0 - 6-10 months away - Removes aapt1 entirely, replaces internal system for configurations for disassembling, breaks API for a more sane library usages
All opinions are welcome, but with that - Apktool 2.6.0.
This release had 195 commits by 11 people
- Connor Tumbleson (iBotPeaches) - 149
- Goooler - 22
- Igor Eisberg (IgorEisberg) - 10
- Comnir (Nir) - 5
- pashamcr - 2
- wangyilei - 2
- MrIkso - 1
- Andrea Pappacoda - 1
- Cody Lund (codylund) - 1
- Matteo Baccan (matteobaccan) - 1
- itaybia - 1
One thing to note is this release of development was the first release to heavily use rebase/squash merging. This has the side affect of affecting commit counts, but either way - thank you to the contributors for this release.
Changes since 2.5.0
- [#2580] Android 12 Support
- [#2529] Published to Maven Central
- [7691c] Update internal aapt/aapt2 binaries.
- Upgrade baksmali/smali to v2.5.2
- Upgrade to
gradle 7.2
(Thanks Goooler) - Upgrade to
snakeyaml 1.29
(Thanks Goooler) - Upgrade to
guava 30.1.1-jre
(Thanks Goooler) - Upgrade to
junit 4.13.2
(Thanks Goooler) - Upgrade to
commons-lang 3.12.0
(Thanks Goooler) - Upgrade to
commons-io 2.11.0
(Thanks Goooler) - Upgrade to
proguard 7.1.1
(Thanks Goooler) - Upgrade to
license.hierynomus 0.16.1
(Thanks Goooler) - Upgrade to
jengelman.shadow 7.0.0
(Thanks Goooler) - Upgrade to
actions/setup-java@v2
(Thanks Goooler) - Added
.gitattributes
(Thanks Goooler) - Added support for SDK in Development (Tiramisu, API 32?)
- Added automatic execution of aapt/aapt2 binaries during CI process to find broken builds.
- Added automatic
ldd/otool -L
execution during CI process to identify non-static “fat” aapt/aapt2 builds. - Added test execution on Java 15/16 (Now 8-16) during CI process.
- Upgrade aapt2 with patches for
attr-private
and remove reserved pkgIds. (Thanks MrIkso) - Upgrade aapt1 with patches for a static binary on Mac arch.
- [#2604] Add lazy init for ResTable for optimizations. (Thanks IgorEisberg)
- [#2605] Add automatic disassemble/assemble JAR files without specifying api level. (Thanks IgorEisberg)
- [#2201] Changed zipslip exceptions to skip file instead of exit on failure.
- [#2229] Changed dummy resource names to
APKTOOL_DUPLICATE_{Type}_{RESID}
to prevent starting with numeric - [#2635] Changed all Apache License links to
https
. (Thanks Goooler) - [#2632] Changed
getHTML()
processor to leverage BundleTool code for handling complex string values. (Thanks itaybia) - [#2099] Fix decoding issue requiring specific order of chunks (library/table). (Thanks LoyieKing)
- [#2299] Fix decoding issues with code points over > 0x10000. (Thanks Comnir)
- [#2546] Fix decoding issues with surrogate pair emojis. (Thanks Comnir)
- [#2455] Fix NPE when decoding to a custom non-empty root directory.
- [#2499] Fix Android 11 dex NPE due to hidden api restriction flags. (Thanks JesusFreke)
- [#2603] Fix dummy resources being built as type resources vs item resources.
- [#2611] Fix numeric string meta-data losing context of data type. (Thanks codylund)
- [#2554] Reduce code smell failures. (Thanks matteobaccan)
- [#2604] Reduce code smells & correct improper opcode use for baksmali. (Thanks IgorEisberg)
- [#2636] Reduce code smells for unused logic, unneeded casting and newer Java language features. (Thanks Goooler)
- [#2604] Remove unused
targetSdkVersion
for source disassemble as value was not populated yet. (Thanks IgorEisberg) - [#2633] Remove duplicate workflows for 1 unified GitHub Action workflow. (Thanks Goooler)
Notes
- Applications are becoming more and more difficult to build with aapt1, using the
--use-aapt2
flag during rebuild is a good test.
Download
- Apktool 2.6.0
- md5
4161cdad59718f81740d0727c9683819
- sha256
f750a3cd2c1f942f27f5f7fd5d17eada3bdaff0a6643f49db847e842579fdda5
- Rename to
apktool.jar
and follow the Instruction Guide if you need help.
- md5