Files
android_local_manifest/README.md
2025-09-03 09:30:15 -07:00

81 lines
2.5 KiB
Markdown

### Device specific configuration to build AOSP Android 16 for Raspberry Pi 4 and Raspberry Pi 5.
Based on [RaspberryVanilla](https://github.com/raspberry-vanilla).
***
### How to build (Ubuntu 22.04 LTS):
1. Establish [Android build environment](https://source.android.com/docs/setup/start/requirements).
2. Install additional packages:
```
sudo apt-get install dosfstools e2fsprogs fdisk kpartx mtools rsync
```
3. Initialize repo:
```
repo init -u https://android.googlesource.com/platform/manifest -b android-16.0.0_r1
curl -o .repo/local_manifests/manifest_brcm_rpi.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/brcm_rpi.xml --create-dirs
curl -o .repo/local_manifests/manifest_lineageos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/lineageos.xml --create-dirs
curl -o .repo/local_manifests/manifest_pawletos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/pawletos.xml --create-dirs
```
Or optionally, you can reduce download size by creating a shallow clone and removing unneeded projects:
```
repo init -u https://android.googlesource.com/platform/manifest -b android-16.0.0_r1 --depth=1
curl -o .repo/local_manifests/manifest_brcm_rpi.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/brcm_rpi.xml --create-dirs
curl -o .repo/local_manifests/manifest_lineageos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/vendors/lineageos.xml --create-dirs
curl -o .repo/local_manifests/manifest_pawletos.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/pawletos.xml --create-dirs
curl -o .repo/local_manifests/remove_projects.xml -L https://git.oxmc.me/PawletOS/android_local_manifest/raw/branch/android-16.0/remove_projects.xml
```
4. Sync source code:
```
repo sync
```
5. Setup Android build environment:
```
. build/envsetup.sh
```
6. Select the device (`rpi4` or `rpi5`) and build target (tablet UI, `tv` for Android TV, or `car` for Android Automotive):
```
lunch pawlet_rpi4-bp2a-userdebug
```
```
lunch pawlet_rpi4_tv-bp2a-userdebug
```
```
lunch pawlet_rpi4_car-bp2a-userdebug
```
```
lunch pawlet_rpi5-bp2a-userdebug
```
```
lunch pawlet_rpi5_tv-bp2a-userdebug
```
```
lunch pawlet_rpi5_car-bp2a-userdebug
```
7. Compile:
```
make bootimage systemimage vendorimage -j$(nproc)
```
8. Make flashable image for the device (`rpi4` or `rpi5`):
```
./rpi4-mkimg.sh
```
```
./rpi5-mkimg.sh
```