In an old article we saw the procedure for installing Android 4.3 on Ubuntu thanks to VirtualBox, today we are going to see how install Android 5.1 Lollipop on VirtualBox on any Operating System. The procedure is almost identical, but a small error during installation could cause the following error:
FATAL: no bootable medium found! System halted
Apparently there is no solution to this error, so after the first session not only will the system stop running, but you will lose all data; a new installation will therefore be necessary. Following this guide, you will have at 100% a functioning Android system that can be booted directly from your computer, be it Windows or Linux, so let's quickly see how to install VirtualBox and how to create a virtual machine based on Android Lollipop 5.1.
For a more recent version, read how to install Android 6 Marshmallow on VirtualBox
As for VirtualBox, download the latest version available for your OS, then run it to install it; as for Android, instead, among the various versions available you have to choose Android-x86-5.1-rc1.iso, which is currently the latest PC version. Pressing the button View the Download will start directly; I advise you to download it to the Desktop to have it immediately at hand.
Set up VirtualBox
Now we have all the files needed to install Android 5.1 on VirtualBox, so we can start with the actual guide. Below I will list all the steps:
- starts VirtualBox
- Select New top right
- In the new window, enter a name (very useful if there were more virtual machines); such as type select Linux and how version select Other Linux (64-bit)
- Select the amount of RAM to dedicate to the virtual machine. The more RAM you dedicate, the more smooth Android will run. Obviously you will have to rely on the RAM available on your PC.
- Leave the rest unchanged and awards Crea
- In the next window, leave everything unchanged and press Crea
- We will immediately notice our new virtual machine on which we will soon be installing Android Lollipop
Before installing, let's set up our machine. We can configure the machine at any time, as long as this is extinguished.
- Awards Settings
- Move to the tab Archiving
- Select the item Empty (with a CD icon). Top right, below Attribruti, press the CD icon, then select the item Choose a virtual optical disc file and select the previously downloaded Android image
- The voice Empty now it will have the name of the Android image .iso as in the figure
- Move on now System and check the item Hardware clock in UTC time and as "Pointing Device" select Mouse PS / 2
- [Optional] Now went to the tab Screen, then enable the3D acceleration and - if possible - increases the video memory for better performance
- Awards Ok to save the new settings
Now everything is really ready and we can finally install Android 5.1 on Virtuabox
How to install Android 5.1 on VirtualBox
- From the main VirtualBox screen, press starts
- The Android image will be immediately loaded and it will show us various entries: the first 3 allow to launch Live versions of Android, that is without installation; the fourth one will allow us to install Android. Move the arrow to the last item and press Enter
- In the new window, move to the item Create / Modify partitions and press Enter
- A message will ask you whether to use it or not GPT, select No and press Enter
- On the next screen you will find the partition table; move with the right / left arrows and select Enter with the following items
- Select New and press Enter
- Select Primary and press Enter
- You will be asked for it size to be allocated to the partition; press Enter without changing
- Select Write and press Enter
- A message will ask if you are sure to write the new partition: type yes, then press Enter
- Wait a few seconds and select Quit
- Select New and press Enter
- Now you will find yourself in the previous screen again; this time select the first item Sda1
- Choose as formatting ext4
- You will be asked whether to format; select Yes
- Select again Yes to install GRUB
- On the next screen select Skip to is not install EFI
- Finally select Yes again and wait for the installation
- At the end select Reboot and Ok
Well! Android has been installed. After the reboot the screen will be shown again asking us whether to install Android or to start a Live. This is because the image is still mounted, so it will be sufficient to remove it and use the newly created virtual disk as boot:
- In the top menu click on devices
- Move to the first item: Optical readers
- Select Host reader 'E:'
- Turn off the machine by Fillet -> Close
Great. We can finally start Android 5.1 which will show as in the next figure (it is the GRUB), then just select the first item and press Enter and wait a few minutes. The first boot will take longer and configuration will be required; then enter the Google account, set the time, language, etc. If Android doesn't detect any WiFi connection, skip the setup and it will still work when done!
After the first start, all subsequent ones will be much faster. To turn off the machine, simply use the VirtualBox top menu, choose File -> Close and select Turn off the machine o Save the status of the machine; with the latter, the next start will resume the session exactly as it was left.
Mouse and keyboard
The mouse will act as a touchscreen and to make it work just click anywhere on the screen. To use it outside of VirtualBox, however, you will need to press Ctrl right. The keyboard will work automatically, but all the symbols will be out of place.
Starting Android on VirtualBox it is possible to notice how low the resolution is, in fact we are talking about a small screen. Now I will briefly explain how to modify it, but this procedure will not be permanent and will have to be repeated at every start. If you are interested I will explain in another article how to fix the resolution of Android on VirtualBox.
- Start Android and, in the GRUB, immediately press "e" from the keyboard
- Two entries will appear, press "e" again
- Add the string "vga = XXX" (without quotes) where XXX is the number that equals the resolution. "Vga = 791", for example, will set a resolution to 1024 × 768 pixels with a color depth to 65k. Who some values with corresponding resolutions and colors.
- Press Enter, then press "b" to start
If something should go wrong or if you have any doubts, use comments as well! 😉
Discover also the best Android emulators to use Android on a PC in just a few clicks