Reference: Reddit
Reference: XDA
- Create new VM (Linux Ubuntu 64-bit)
- Configure 4096MB RAM, 20GB disk
-
Click "Settings">"Storage">"Controller:IDE" and add an optical drive (icon looks like an optical disk with a plus symbol). Choose the OS's ISO. This should appear above any existing optical drives and below the hard drive.
-
Select the drive you just added and check the "Live CD/DVD" toggle. Then click "OK".
-
We are now ready to start the machine. When you do, there should be a splash screen - press the tab key before it tries to perform a default installation. If you missed it, just power down the machine (don't save its state or send the shutdown signal, just power it off) and try again. It only gives you about 3s to press tab. Type a space then "INSTALL=1 DEBUG=" and press enter/return. Don't forget the spaces.
... androidboot.selinux=permissive quiet INSTALL=1 DEBUG=
-
Press down to select "Create/Modify Partitions" and press return/enter.
-
Say "No" when it asks if you want to use GPT.
-
Press the right arrow key to select "New" and press return/enter.
-
Select "Primary" and press return/enter.
-
Press return/enter to use the default size.
-
Select "Bootable" and press return/enter.
-
Select "Type" and press return/enter until you're back at the main cfdisk screen.
-
Select "Write" and press return/enter.
-
Type "yes" and press return/enter.
-
Select "Quit" and press return/enter.
-
Select "sda1" (the partition you just created) and press return/enter.
-
Select "ext3" as the filesystem format (AFAIK, ext4 is also fine, but I didn't test with it).
-
Select "Yes" and press return/enter to format the virtual disk.
-
Select "Yes" and press return/enter to install GRUB.
-
Select "Skip" and press return/enter to skip installing the EFI GRUB2 loader.
-
Select "Yes" and press return/enter to enable the /system directory as a read/write.
-
Select "Run Android-x86" and press return/enter.
-
Several minutes later, you'll be taken to the language selection screen. Follow the OS install as you would any other. Once you're on the desktop, shut down the OS (properly).
-
Open the VM settings and remove the OS ISO from the list of devices - we don't need it any more.