Files
2026-07-04 01:56:27 -07:00

89 lines
1.8 KiB
Markdown

### Device specific configuration to build AOSP Android 16 (android-16.0.0_r4) for Raspberry Pi 4 and Raspberry Pi 5.
Based on [RaspberryVanilla](https://github.com/raspberry-vanilla).
***
### How to build (Ubuntu Server 26.04 LTS):
After setting up the [Android build environment](../README.md#setup), do:
1. Install additional packages:
```
sudo apt-get install dosfstools e2fsprogs gdisk kpartx mtools rsync
```
2. Clone [PawletOS-Build](https://git.oxmc.me/PawletOS/PawletOS-Build) and install its dependencies:
```
git clone https://git.oxmc.me/PawletOS/PawletOS-Build
cd PawletOS-Build
pip3 install -r requirements.txt
```
3. Download the `repo.yml` config for this target:
```
curl -o repo.yml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/rpi/repo.yml
```
Or optionally, to reduce download size with a shallow clone:
```
curl -o repo.yml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/rpi/repo-shallow.yml
```
4. Run the build script (clones source and syncs it based on `repo.yml`):
```
python3 ./environ.py --applyPatches
```
5. source the environment:
```
. AOSP-Source/build/envsetup.sh
```
6. Select the device (`rpi4` or `rpi5`) and build target (normal, `tablet` for tablet, `tv` for Android TV, or `car` for Android Automotive):
```
lunch pawlet_rpi4-bp4a-userdebug
```
```
lunch pawlet_rpi4_tablet-bp4a-userdebug
```
```
lunch pawlet_rpi4_tv-bp4a-userdebug
```
```
lunch pawlet_rpi4_car-bp4a-userdebug
```
```
lunch pawlet_rpi5-bp4a-userdebug
```
```
lunch pawlet_rpi5_tablet-bp4a-userdebug
```
```
lunch pawlet_rpi5_tv-bp4a-userdebug
```
```
lunch pawlet_rpi5_car-bp4a-userdebug
```
7. Compile:
```
make bootimage systemimage systemextimage vendorimage productimage -j$(nproc)
```
8. Make flashable image for the device (`rpi4` or `rpi5`):
```
./rpi4-mkimg.sh
```
```
./rpi5-mkimg.sh
```