Skip to content

Commit

Permalink
Refresh aapt2 binaries. (#3651)
Browse files Browse the repository at this point in the history
* docs: align internal docs for modern aapt2 build

* build: update aapt2 with win/linux binaries

* build: update aapt2 with mac binaries
  • Loading branch information
iBotPeaches committed Aug 1, 2024
1 parent b14f5ee commit 7ad1c9f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions INTERNAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,12 @@ where the release post was and send that link to Twitter, Google and whatever el

Relax and watch the bug tracker.

# Building aapt binaries.
# Building aapt2 binaries.

The steps taken for building our modified aapt binaries for apktool.
> [!WARNING]
> aapt (aapt1) is deprecated and no longer receives updates.
The steps taken for building our modified aapt2 binaries for apktool.

### Getting the modified `frameworks/base` repo.
First step is using the [platform_frameworks_base](https://github.com/iBotPeaches/platform_frameworks_base) repo.
Expand Down Expand Up @@ -249,10 +252,10 @@ Some optimization techniques for a smaller clone:
After that, you need to build AOSP via this [documentation](https://source.android.com/source/building.html) guide. Now
we aren't building the entire AOSP package, the initial build is to just see if you are capable of building it.

We check out a certain tag or branch. Currently we use
We check out a certain tag or branch. Currently, we use

* aapt2 - `android-14.0.0_r2`.
* aapt1 - `android-14.0.0_r2`.
* aapt2 - `android-14.0.0_r54`
* aapt1 - `android-14.0.0_r2` (deprecated)

### Including our modified `frameworks/base` package.

Expand All @@ -277,7 +280,7 @@ The steps below are different per flavor and operating system.

#### Linux / Windows
1. `source build/envsetup.sh`
2. `lunch sdk-eng`
2. `lunch aosp_arm64-trunk_staging-eng`
3. `m aapt`
4. `strip out/host/linux-x86/bin/aapt`
5. `strip out/host/linux-x86/bin/aapt_64`
Expand All @@ -296,17 +299,20 @@ The steps below are different per flavor and operating system.
The steps below are different per flavor and operating system.

#### Linux / Windows
1. `source build/envsetup.sh`
1. `lunch aosp_arm64-trunk_staging-eng`
1. `m aapt2`
2. `strip out/host/linux-x86/bin/aapt2`
3. `strip out/host/linux-x86/bin/aapt2_64`
4. `strip out/host/windows-x86/bin/aapt2.exe`
5. `strip out/host/windows-x86/bin/aapt2_64.exe`
1. `strip out/host/linux-x86/bin/aapt2`
1. `strip out/host/linux-x86/bin/aapt2_64`
1. `strip out/host/windows-x86/bin/aapt2.exe`
1. `strip out/host/windows-x86/bin/aapt2_64.exe`

#### Mac
1. `export ANDROID_JAVA_HOME=/Path/To/Jdk`
2. `source build/envsetup.sh`
3. `m aapt2`
4. `strip out/host/darwin-x86/bin/aapt2_64`
1. `source build/envsetup.sh`
1. `lunch aosp_arm64-trunk_staging-eng`
1. `m aapt2`
1. `strip out/host/darwin-x86/bin/aapt2_64`

#### Confirming aapt/aapt2 builds are static

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 7ad1c9f

Please sign in to comment.