This repository contains a workflow to build the aapt2 binaries for Android.
Currently, the submodules are pinned to platform-tools 35.0.2 of AOSP source code. src/base example:
https://android.googlesource.com/platform/frameworks/base/+/refs/tags/platform-tools-35.0.2
git clone --recurse-submodules --shallow-submodules --depth 1 https://github.com/ReVanced/aapt2protoc needs to be installed, the current required version is 21.12. Install it with:
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
sudo unzip -p protoc-*.zip bin/protoc -d /usr/local/bin/The required version can be identified with :
grep PROTOC_VERSION submodules/protobuf/protobuf_version.bzl./patch.shSupported arch are 'x86_64', 'x86', 'arm64-v8a' & 'armeabi-v7a'
ANDROID_NDK="$HOME/Android/Sdk/ndk/27.3.13750724/" ./build.sh arm64-v8a # Build output in build/bin/aapt-*This repository is made with the help of: