docs: update internal aapt/aapt2 build instructions

This commit is contained in:
Connor Tumbleson 2019-11-17 14:16:59 -05:00
parent 17ad91da61
commit fdbc604209
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -229,10 +229,10 @@ to get the source downloaded. This is no small download, expect to use 40-60GB.
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. Currently we use
We check out a certain tag or branch. Currently we use
* aapt2 - `android-9.0.0_r22`.
* aapt1 - `android-9.0.0_r22`.
* aapt2 - `master`.
* aapt1 - `master`.
### Including our modified `frameworks/base` package.
@ -247,22 +247,25 @@ we lose the ability to quickly build just the aapt binary. So the Windows proced
#### Unix
1. `source build/envsetup.sh`
2. `lunch sdk-eng`
3. `make OUT_DIR=out-x64 LOCAL_MULTILIB=64 USE_NINJA=false aapt`
4. `strip out-x64/host/linux-x86/bin/aapt`
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt`
4. `strip out/host/linux-x86/bin/aapt`
5. `strip out/host/linux-x86/bin/aapt_64`
#### Windows
1. `source build/envsetup.sh`
2. `lunch sdk-eng`
3. `make PRODUCT-sdk-win_sdk USE_NINJA=false`
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt`
4. `strip out/host/windows-x86/bin/aapt.exe`
5. `strip out/host/windows-x86/bin/aapt_64.exe`
#### Mac
1. `source build/envsetup.sh`
2. `lunch sdk-eng`
3. `make OUT_DIR=out-x64 LOCAL_MULTILIB=64 USE_NINJA=false aapt`
4. `strip out-x64/host/darwin-x86/bin/aapt_64`
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt`
4. `strip out/host/darwin-x86/bin/aapt`
5. `strip out/host/darwin-x86/bin/aapt_64`
As of Android Oreo (API 26) all aapt binaries are 64 bit (With exception of Windows).
32/64 bit binaries will be built for all platforms.
### Building the aapt2 binary.
@ -270,18 +273,21 @@ The steps below are different per flavor and operating system. For cross compili
we lose the ability to quickly build just the aapt2 binary. So the Windows procedure builds the entire Sdk.
#### Unix
1. `make OUT_DIR=out-x64 LOCAL_MULTILIB=64 USE_NINJA=false aapt2`
2. `strip out-x64/host/linux-x86/bin/aapt2`
1. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt2`
2. `strip out/host/linux-x86/bin/aapt2`
3. `strip out/host/linux-x86/bin/aapt2_64`
#### Windows
1. `make PRODUCT-sdk-win_sdk USE_NINJA=false`
2. `strip out/host/windows-x86/bin/aapt2.exe`
3. `strip out/host/windows-x86/bin/aapt2_64.exe`
#### Mac
1. `export ANDROID_JAVA_HOME=/Path/To/Jdk`
2. `source build/envsetup.sh`
3. `make OUT_DIR=out-x64 LOCAL_MULTILIB=64 USE_NINJA=false aapt2`
4. `strip out-x64/host/darwin-x86/bin/aapt2_64`
3. `make LOCAL_MULTILIB=64 USE_NINJA=false aapt2`
4. `strip out/host/darwin-x86/bin/aapt2`
5. `strip out/host/darwin-x86/bin/aapt2_64`
#### Confirming aapt/aapt2 builds are static