LogoLogo
  • Waydroid
  • Usage
    • Install Instructions
    • Install and Run Android Applications
    • Waydroid command line options
    • Waydroid Prop Options
  • FAQ
    • Google Play Certification
    • Disable On-Screen Keyboard
    • Community Projects We Like
    • Get Waydroid to work through a VM
    • Using ADB with Waydroid
    • Setting up Waydroid only Sessions
    • Setting up a shared folder
    • Color correction in Mutter
    • Backup/Restore apps and data
    • Using custom Waydroid images
  • Development
    • Compile Waydroid - Lineage OS based images
    • Manual Patch Resolution
    • Compile Waydroid - Using Android-Generic Project
  • Debugging
    • Getting Essential Information
    • Networking Issues
    • Known Issues
    • General Troubleshooting
Powered by GitBook
On this page
  • Getting started
  • Initializing
  • Syncing
  • Configuring

Was this helpful?

  1. Development

Compile Waydroid - Using Android-Generic Project

PreviousManual Patch ResolutionNextGetting Essential Information

Last updated 2 years ago

Was this helpful?

For those not aware, , which is best known for bringing PC targets to AOSP based ROMs, also supports Waydroid targets too.

This documentation will go over how to use AG for compiling Waydroid.

Getting started

To get started with Android/Lineage OS, you'll need to get familiar with , and

Initializing

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

Syncing

Then we can sync up:

repo sync

And setup the local build environment:

. build/envsetup.sh

Configuring

Legacy Method:

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

Syntax: 
	waydroid_build [-a|--arch arm|arm64|x86|x86_64] [-c|--clean] [-p|--package] [-r|--rom_name Name]
options:
	-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

GUI Method:

We now want to use AG for the following portions. So in the terminal, type:

ag-menu waydroid

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

03-apply-base-patches

Click on it and hit OK.

10-build-options

The build options are mostly the same as native PC builds, so we can explore them a little.

Select Product Type:

This will let you select the target device for compiling

Select Variant Type:

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)

Select Desktop Mode Integration:

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)

Run Make Clean:

Just runs 'make clean', nothing fancy

Start the Build:

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.

This will start to apply all the waydroid patches on top of Lineage OS. If there are any conflicts, please refer to the doc. Otherwise, you can continue to the next step.

From here, things are pretty much 1:1 for AG's PC build instructions, so you can refer to the for further instructions

Android-Generic Project
Repo
Version Control with Git
Android-Generic Project documentation
Manual Patch Resolution
Android-Generic Project Documentation