Compile Waydroid - Using Android-Generic Project
This documentation will go over how to use AG for compiling Waydroid.
To initialize your local repository using the Lineage OS trees, use a command like this:
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1 --git-lfs
Then we grab the Android-Generic and Waydroid bits:
wget -O - https://raw.githubusercontent.com/waydroid/android_vendor_waydroid/lineage-18.1/manifest_scripts/generate-manifest.sh | bash
git clone https://github.com/android-generic/vendor_ag vendor/ag
Then we can sync up:
And setup the local build environment:
The legacy method is driven by a simple bash script found in vendor/ag/legacy-scripts/waydroid-build/waydroid_build.sh
bash vendor/ag/legacy-scripts/waydroid-build/waydroid_build.sh --help
Compiles and packages Waydroid for target arch
waydroid_build [-a|--arch arm|arm64|x86|x86_64] [-c|--clean] [-p|--package] [-r|--rom_name Name]
-a|--arch (option) Specify arch for build (arm, arm64, x86, x86_64)
-c|clean Run 'make clean' before build
-p|--package Package build using ROM_NAME
-r|--rom_name (ROM_NAME) Name used for package build filename (ex: Lineage-17.1)
So to compile Waydroid for x86_64, making clean, and package it in a .zip. You would use this command:
bash vendor/ag/legacy-scripts/waydroid-build/waydroid_build.sh -a x86_64 -c -p
We now want to use AG for the following portions. So in the terminal, type:
You should now see a menu like this:
We can skip the first 2 steps (01-generate-manifest-gui & 02-sync-project), and continue to the
Click on it and hit OK.
The build options are mostly the same as native PC builds, so we can explore them a little.
This will let you select the target device for compiling
This will allow you to select the variant type (user, userdebug, eng). Userdebug is the most common for testing.
Select Apps Type:
!!WARNING - NOT ALL ARCH TARGETS ARE FULLY SUPPORTED YET!! This will let you compile Waydroid with various app types included (FOSS, GMS, EMU-Gapps, OpenGapps & Vanilla)
Waydroid by default includes one type of custom Desktop Mode UI, and that is Boringdroid. This will let you select an alternative option to package along side.
Select Extra Options:
Make Clean before build - Self explanatory, it runs 'make clean' before compiling
Generate Package .zip - Generated a package .zip after compile if complete (requires 7zz & simg2img to be installed)
Just runs 'make clean', nothing fancy
This will launch the compile with all the selected portions from above. If it requires any missing information, the terminal or popup window will let you know.