Virtualbox Android Mac

Android

Join the DZone community and get the full member experience.

Join For Free


The slowness of the Android emulator has been the butt of many a joke since it was first unveiled. While Google has done a commendable job of making each iteration of the emulator faster, it is still painfully slow. Most Android developers simply debug to a device and avoid the headache. But that is still far from an ideal solution. I for one, don't want my phone tied to my dev box. Also when I give talks, it is nice to be able to easily project my work, holding my phone in the air for the audience is not an ideal solution.

  • Portable-VirtualBox is a free and open source software tool that lets you run any operating system from a usb stick without separate installation. Installation instructions Download and run Portable-VirtualBoxv5.1.22-Starterv6.4.10-Winall.exe. Choose a folder to extract to.
  • Installing Android on a Mac. Installing Virtualbox on the Mac. To start, download Virtualbox for OS X, free of charge, and open the downloaded image. Run the Virtualbox.pkg package and follow the on-screen prompts to install the app on the Mac. Download Android for x86, a modified version of Android that's developed to run on Intel-based.

I ran across a blog post by Chris Muir of Oracle, which offered a way out of emulator hell. The solution is to use a VirtualBox VM with Android on it instead of the Android emulator. Before you go all out and start putting together your own VM, be forewarned that entails a lot of work. You have to setup an x86 VM, deploy Android O/S to it, install software, etc. A lot of work. Luckily, the good folks at AndroVM have already done this work. The difference is amazing. I have tried it on both Mac and Windows.

Assumptions

You’ll need a couple of things to get started: VirtualBox: Download and install VirtualBox if you don’t already have it—it’s available for Windows, macOS, and Linux. The Android x86 ISO: You’ll need to grab the Android x86 ISO for whichever version of Android you’d like to try.

This post is not to help you with setting up your Android development environment. I am assuming that your have already done that. The Android Device Bridge, which is included in the Android Developer Tools (ADT), should be installed and available on the command line (Windows) or terminal (Mac/Linux).

To begin, we need to download VirtualBox from VirtualBox.org. This is Oracle's excellent and free virtual machine app, and yeah I know a company named Innotek originally created it, then Sun bought them and Oracle bought Sun. Once you have VirtualBox installed proceed to AndroVM and download the VMs. My recommendation is to grab the following:

Virtualbox Android Mac
  • androVM_vbox86tp_4.1.1_r6.1-20130222-gapps-houdini-flash.ova
  • androVM_vbox86p_4.1.1_r6.1-20130222-gapps-houdini-flash.ova

These are the tablet (tp) and phone (p) versions of Android 4.1.1 with Google apps and other stuff. You will also be able to download, assuming you have a Google account, stuff from the Play Store. Once you have the VMs downloaded as OVA files you will need to import them.

With both VMs imported into VirtualBox I would recommend that you clone each and only use the cloned version. This is just a safety precaution against accidentally screwing up one of VMs.

To clone a VM simply right click it. Choose clone. Give the new machine a name. Mine's is x86Phone and x86Tablet, for the phone and tablet respectively. Choose the Full clone.

Then click the Clone button. It shouldn't take too long for the new VM to be available. Then right click one of the new VMs and click Settings... Click the Network tab. I have only been able to get the Bridged Adapter working. Change the connection so it matches the one below. A network connection is critical, without it you won't be able to deploy and debug your apps to the VM.

Click the Start arrow. In just a few seconds, yes seconds, your VM should spin all the way up. Unlock it and find the AndroVM Configuration program. It is usually on the home page in the lower left hand corner. Click it. It should display your emulator's IP address in the upper left corner. If it doesn't, STOP. You may need to go back to the network settings and jiggle them.

In order to deploy to the VM, the ADB needs to know that it exists. Simply open a command or terminal window and type the following command:

adb connect <ip address>

Note that the ip address is the same one shown by the AndroVM Configuration app. Now that the ADB knows it is there. Let's deploy something to it. First, we need to change our configuration to point to a USB device and not the emulator.

And we have a fast emulator. And it works like any other emulator except it is really fast.

Beware. This is not a Google sponsored project, so don't expect any kind of support. Also AndroVM has recently been acquired and it will be re-released in a few months as a commercial product. So if you are at all interested in a fast emulator, go and download it now!

mobile,android,testing,virtualbox,emulator,androvm

Published at DZone with permission of Troy Miles, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

To install and experience the Android x86 on PC you nee two things VirtualBox or Vmware software and Android x86 ISO image or Android x86 VM image.

Android, the most popular operating system, now not only just limited to your smartphones. If you have the curiosity to use it on your personal computer (PC) then you can do it. Now, the users those have a spare machine to test the Android operating system on PC can use the Android ISO image. You just need to make a bootable USB drive using the downloaded ISO images of Android 7.0, 8.0, 9.0 or whatever the version you want. However, if you don’t have the extra system to test the Android then another option which available is Virtualization. The most popular Virtualization software are VirtualBox and Vmware. The VirtualBox is an open source tool and available for Linux, Windows, and Mac. While the other one Vmware is also available for the OS mentioned but it is proprietary software.

You can either use the Android ISO image to install the Android OS on VirtualBox / VMware or simply download the pre-configured Android x86 Virtual machine image (VM). The benefit of using Virtual Image is, you don’t need to configure storage, Ram, other hardware configuration for the OS on Virtualization software. Just download the Android VM image and it simply boots as a preinstalled machine. It saves a lot of time.

Prerequisites to install Android x86

To install and experience the Android on PC you nee two things VirtualBox or Vmware software and Android x86 ISO image or Android x86 VM image. Here in this tutorial, we are going to use the VirtualBox and to save time and make it easy to install the Android on PC, the Android x86 VM image.

Virtualbox android adb

Here are the Links to download the above-mentioned prerequisites software.

Virtualbox Android Mac

VirtualBox: Link

Android X86 VM image: Link( VM image available while writing the article are: Android-x86 8.1-RC2 Oreo, Nougat, Marshmallow (R3), 5.1 (RC1), Android x86 4.4 r1 and more)

Android x86 ISO image: Link(For those don’t want to use the Andriod VM image)

Install Android OS on VirtualBox and VMware

Note: It doesn’t matter which operating system you are using it could be Linux, Windows or Mac because the process of working with Virtual or Vmware is the same for all of them. While writing article Android OReo was the latest build.

Step 1: Download VirtualBox or VMware player

First of all, download and install the VirtualBox on your PC machine ( Linux, Windows or Mac).

Step 2: Get Android Oreo OS VM image

Virtualbox Android Mac Download

After the installation of the Virtualbox, you need to download the VM image from the link given above given in this article. On the website, you will find two images one is for VirtualBox and other is meant for Vmware. According to your software select that. As we are using the VirtualBox, so we downloaded the VirtualBox image. While writing this the article the latest Android VM image available on the website was Android-x86 8.1-RC1 Oreo.

Step 3: Extract Android X86 VM image file

The downloaded the Android X86 VM image file will be in a 7z archive format. After downloading you need to extract the Android VM image from using the normal Winrar or 7zip or any other archive/ compression software.

Step 4: Run the VirtualBox.

  1. Click on the NEW button from the VirtualBox menu.
  2. Give some name to your Android virtual machine, like we have given Android test H2s.
  3. From Type’s drop-down select the Other and Version = other/unknown.
  4. Select the size of memory you want to provide your operating system. We have assigned 2GB for fluid functions.
  5. From the Hard disk section, select the option- Use an existing virtual hard disk file.
  6. Click on the Folder icon.

Step 5: Select the extracted Android X86 VDI image which you downloaded above.

Step 6: Click on the Create button.

Step 7: Select the created Android x86 Virtual machine from the left panel of VirtualBox.

Step 8: Now Click on the START button given on the VirtualBox menu.


Step 9: The Android Virtual Machine will start.

Step 10: Select the normal mode- Android X86 8.1-rc1

Step 11: Android x86 is installed

The OS has been installed and it will boot to provide you with a familiar screen like your smartphone.

We tried to install the PUBG on the Android x86 Virtual Machine on Linux PC and it worked…

Virtualbox Mac Download

Other Useful Resources: