Official guide:

some unlisted apt install and pip install:

sudo apt-get install libyaml-dev gettext mtools genisoimage syslinux-utils syslinux libelf-dev lunzip
sudo apt-get install python-pip
sudo pip install prettytable Mako pyaml dateutils --upgrade

lunch android_x86_64-user might not boot, build with userdebug.

91 bytes ought to be enough for anybody.

and you also need to modify this file:


init script is:

repo init -u git:// -b oreo-x86

x86 ELF work-around:

IJar issue:
replace prebuilts/build-tools/linux-x86/bin/ijar with patched ijar with this patch,

dex2oat hangs:

You will need to add -j1 to and

GPD Win2 patches:

Screen orientation:
Thanks Black-Seraph! android_patches_gpdwin

Touchscreen driver (already included in recent kernel):

Xpad driver:

You need to add ‘nomodeset’ to grub boot parameters to boot with hardware acceleration:

Getting Gapps integrated:
Edit local manifest:
then apply gapps part from patch:

If you’ve finished builds without gapps before applying these patch, remember to clear out/*/system/* before rebuild, redundence packages won’t be cleared and you might not able to boot.