Multi-boot Windows 10, Ubuntu 18.04 and Android on Surface Pro 6

Windows 10 is shipped with Surface Pro 6.
I don't use it normally.
I just plan to restore everything to factory setting when I sell the Surface in the future.

Install Ubuntu following this guide.

This guide applies on Android x86, and also Bliss OS.

At the time of writing this article, even the installation completes, there are some features NOT working, such as touch screen.

Install GParted.
Prepare an empty partition for Android.
Prepare an empty partition for Android user-data, if you prefer, so your accounts, settings, installed applications, would be kept when you update Android in the future.

Download the image iso file from:
http://www.android-x86.org/download

Flash the iso onto a USB thumb drive. I recommend Etcher.
https://github.com/balena-io/etcher

Power-off Surface Pro. Hold volume-up and press power button.
You will see the UEFI setup screen.
Disable security boot stuff.
Move USB drive to top most in boot order menu.

Plug-in the USB thumb drive, power on Surface.

Select "install" on the menu.
Choose the partition prepared, choose "ext4" as its format.
Do not install grub. We will handle it manually later.
Install Android as R/W.
Afterall, reboot.

In the Grub boot menu, press C.
To confirm the Android root direct name:

grub> ls

List the files in the root directory of the partition.
For example, Android is installed on harddisk 0, partition 1:

grub> ls (hd0,gpt1)/

You should see a directory of your Android installation, like "Android-x86-r1".
Reboot your system to Ubuntu.

Open terminal.
Find out the partition UUID of Android and user-data.

sudo blkid

Add Android to Grub boot menu:

sudo nano /etc/grub.d/40_custom

Change ANDROID_UUID, USERDATA_UUID, android-8.1-r1, to something meaningful.

menuentry 'Android' —class android {
    search —file —no-floppy —fs-uuid —set=root ANDROID_UUID
    linux /android-8.1-r1/kernel root=/dev/ram0 SRC=/android-8.1-r1 androidboot.selinux=permissive androidboot.hardware=android_x86_64 video=2736x1824 DATA=UUID=USERDATA_UUID
    initrd /android-8.1-r1/initrd.img
}

Save the file. And update grub.

sudo update-grub

Reboot the PC. You can see Android working now.