In my previous article, I explained how you can use android emulators to run your android apps or games on PC. Now here I am going to explain, how you can install the entire Android OS on your PC, in a virtual environment that is accessible within your Windows or Linux system i.e. Android on VirtualBox.
For our purpose, we are going to install a virtual machine monitor, better known as an ‘hypervisor’. A hypervisor or virtual machine monitor (VMM) is computer software, firmware or hardware that creates and runs virtual machines. In this case, we are going to use VirtualBox, which is a free and open source virtualization product from Oracle.
If you know nothing about virtual machines, then don’t worry ! You just need to follow the steps below. If you want to know more about how Virtual Machines or Hypervisors can be used to install other operating systems like Linux on your computer, you can read my article here.
We are also going to need an androidx86 port of the Android OS. Android-x86 is an unofficial initiative to port Google’s Android mobile operating system to run on devices powered by AMD and Intel x86 processors (Basically to PCs). If you need an Android port which is specialized for desktop use, then refer to my next article.
Steps to install Android on VirtualBox
Before or after installing VirtualBox, make sure you enable the ‘Virtualization’ feature from the BIOS. It will be marked as Intel VT-x or AMD-V depending on your processor (This will increase the performance of your Android OS, once you get it running).
1) First, download and install VirtualBox from here. Select the appropriate setup file.
2) Download an Androidx86 port here, and grab an iso marked as “…….. live and installation iso”.
3) Now to prepare VirtualBox, you can refer my article here and follow the steps to prepare a VM for your Android OS. Basically you need to click on ‘New’ to create a VM and proceed with the instructions.
4) After preparing and opening VirtualBox, you will see the box below. Now start the VM.
5) Once started, select your iso file to load. Then you should see the screen as below. Then click on the last option as below.
6) Select ‘No’ as below (Important).
7) Now select ‘New’ as below. Next create a Primary partition and select the default size.
8) Next make the virtual partition bootable (Important).
9) Now write the changes to disk. If there is a prompt, type ‘yes’ and proceed and select quit when your changes are complete.
10) Select the newly created partition and in the next dialog box, select ‘ext4’ and click on OK.
11) Select Yes as below. Don’t worry, it wont affect any of your files, since its a ‘virtual’ machine. 😉
12) Install the GRUB Boot loader as below (Important).
13) Select No.
14) Now your Android OS will be installed within a VM.
15) Congratulations ! Android has been successfully installed. You can now reboot.
Booting your Android on VirtualBox
1) Make sure to remove the iso as below.
2) Select the first entry
3) To improve your performance, you can change the settings of your VM as shown below.