Compile Waydroid - Lineage OS based images

Getting started

To get started with Android/LineageOS, you'll need to get familiar with Repo and its Git workflow.

Initializing

To initialize your local repository using the LineageOS trees, use a command like this:

repo init -u https://github.com/LineageOS/android.git -b lineage-20.0 --git-lfs
repo sync build/make

Then we grab the Waydroid local_manifests

wget -O - https://raw.githubusercontent.com/waydroid/android_vendor_waydroid/lineage-20/manifest_scripts/generate-manifest.sh | bash

Syncing

Then to sync up:

repo sync

Then we setup the local build environment:

. build/envsetup.sh

Patching

After that is complete, we apply the Waydroid patches:

How to build

Please see the LineageOS Wiki for building environment setup.

Waydroid AOSP Lunch Options:

Waydroid Build Commands:

Image Generation From Sparse Image:

The output of the AOSP build system is an "Android Sparse Image"; we need raw fileystems instead. Starting from the lineage-20.0 branch, the output is already a raw image.

On earlier branches, from the same terminal where you just built a system and a vendor image, run:

to obtain your target raw images at ~/system.img and ~/vendor.img

HALIUM images

The official Waydroid OTA channels provide special vendor images for HALIUM systems. These are regular vendor images that are stripped of the Mesa GPU drivers in order to save space. To build a HALIUM image the same way as the official images, simply disable the TARGET_USE_MESA option before compiling:

Troubleshooting

Local Manifest:

To manually regenerate the local_manifests, we also have added a function to do so

After doing that you will want to resync (this will wipe out any local changes, so make sure you save your work to a different branch)

Patch Conflicts:

See Manual Patch Resolution

Last updated

Was this helpful?