First you need to have Virtualbox or VMware workstation installed. Download the Android version 9.0 (R2 32 or 64 Bit) from the internet or from this link.
- Then create the virtual machine (as Other Linux 4.x) and give it enough RAM (+1gb) and CPU for android to speed things up.
- Mount the ISO as CD/DVD drive
- Enable Accelerate 3D graphics
- Start the Virtual Machine.
- Choose for Installation.
- Choose Partition and Create/Modify Partitions.
- Choose No when asked for using GPT.
- Select New to create a new partition.
- Select Primary to create a primary partition.
- After creating the partition, make it bootable by selecting this option
- Then choose Write to make the changes.
- Select Yes for proceed and Quit.
- Select the partition and choose for the Ext4 filesystem.
- Choose Yes for format
- Choose Yes for installing the Grub boot loader
Now Android is installed and we have to make some changes.
Set the following options, so the virtual machine boots correctly:
- press e
- press e
- replace quiet for nomodeset xforcevesa
- press enter
- press b
- After the android logo and completing the first setup, press Alt+F1
- type in:
mkdir /mnt/sda
mount /dev/block/sda1 /mnt/sda
vi /mnt/sda/grub/menu.lst
- press i to edit and again, replace quiet to nomodeset xforcevesa (this for a permanent boot fix, while Grub loads Android)
- press Esc to return read-mode
- press :w then press Enter
- press :q then press Enter
- type reboot then press Enter
Android is now loading and working as a virtual machine.