Monday, December 10, 2012

Run Android on your computer - A review of Android emulators


Running Android on your PC
There are now several options for running Android on your PC. While developers will be using the Android Virtual Device emulator (part of the Android SDK) to test their apps, this post is aimed more for users who just want to use their favorite apps and games on their computer. Most of these emulators require virtualization software like VirtualBox (free) or VMware Workstation, which essentially allow you to run a computer inside of your computer. If you're unfamiliar with this type of software, check out this Beginner's Guide to Using VirtualBox.

The good news is that the emulators in this list all appear to be in active development, meaning they will continue to improve. The bad news is that as of right now, many of your favorite apps may not work correctly or work at all inside these emulators. Apps that you control by tilting your device, for example, will not work correctly because you cannot tilt the emulator. I've compiled the list below based on emulators I have tried. If there are any I've missed, please post them in the comments. The apps are not listed in a particular order, but if you're looking for my recommendations, head down towards the bottom of the list. As AndroVM is my recommendation for most complete Android experience, I've included step-by-step instructions for installing it on your computer. This guide is written for Windows users, but many of these emulators can also be run inside VirtualBox on Mac and Linux.

I should clarify that these are Android emulators. They create a virtual Android device on your computer. Manufacturer-specific "On-Screen Phone" software is not included here.

As with all posts, if you find anything in this post to be incorrect, please leave a comment. I will update with corrections as I become aware of them.




Available for: All (web-based)
Price: Free
Requirements: Any modern web browser

Manymo.com is a web-based Android emulator used to help developers test apps on a variety of device sizes and Android versions. Creating a free account allows you to use Eclipse, IntelliJ/IDEA, and Android SDK tools; as well as upload and run apps. This is not the emulator you're looking for if you just want to play around with Android,  but it is an emulator nonetheless so was worth a mention here. The ability to select between screen sizes and Android versions makes it a great tool for developers, as it was designed for. But if you're looking for something to play apps or games on, this is not it.





Youwave for Android
Available for: Windows
Price: $14.99 - $19.99 (free fully-functional 10-day trial)
Requirements: That you do not have VirtualBox installed. If you do, install it inside a virtual machine.

Being the only non-free option on this list, I had high expectations for Youwave for Android. Youwave is available in two editions:
  • Basic (2.3 Gingerbread) for $14.99
  • Home (4.0.4 Ice Cream Sandwich) for $19.99
The Home edition also allows you to share data between your PC and virtual device, treating a user folder on your PC as the device's SD card. You'll also want Home edition if you plan on using the device across multiple users accounts on your PC. You can try either edition by downloading and using the fully-functional 10-day free trial.

As you'll see on the download page in bright red text, you should NOT install Youwave if you have VirtualBox installed on your PC. Instead, you'll need to run it inside a virtual machine. This is because Youwave is a VirtualBox VM (virtual machine) with a not-so-elegant wrapper.

I installed it to a Windows 7 Ultimate x64 VM running inside VirtualBox 4.2.4. I expect this may have a slight affect on performance, although many people interested in running an Android emulator will have VirtualBox installed... so I think this is a fair test setup. For those interested, I tried it on an Intel i7 940 @3.47GHz (VT-x on), 12GB DDR3 @1600MHz, BFG GTX 285, and separate hard drives for the OS and VM. The VM is setup to use 4 cores, 4GB memory, 256MB video memory. With that said, it is running a VM inside of a VM and performance is bad. Clicking the Home or Menu (or any) buttons often meant waiting for several seconds, wondering if it registered the click.

Admittedly, I didn't spend a whole lot of time with Youwave because there are other Android VMs that you can run inside VirtualBox that are just as good or better... and are free! I'd rather devote time to writing more about those. What Youwave has going for it is an easy installation, seamless mouse support, and out-of-the-box working Internet access. What hurts it is a quirky interface - sliding from one panel to another usually gets stuck halfway through, the issue with existing VirtualBox installations, and the price.

Youwave for Android didn't come with the Google Play Store app pre-installed, but there is an option to install it (Android Market app). However, while it appeared to download and load correctly, an icon for the Market app never appeared (even after following the instructions and selecting Reload icons from the menu.

While I don't recommend Youwave because there are currently better alternatives, I invite anyone who installs it outside of a VM to comment on its performance.






Available for: Windows, Mac, Linux
Price: Free
Requirements: None
Website: http://forum.xda-developers.com/showthread.php?t=1975675

Jar of Beans is a portable Android emulator, also still in beta, that supports Intel Hardware Accelerated Execution Manager (HAXM). It is currently based on rooted Jelly Bean 4.1.1 with Busybox. I've read positive reviews for it, but I experienced pretty bad performance using it even with GPU accelaration enabled. You can select from a number of display resolutions, and anything over 1280x768 will be displayed in tablet-mode. After attempting to increase the RAM from 512MB to 1GB in the program's settings, the emulator crashed every time I attempted to run it (even after lowering it back down to 512.) I did eventually get it working again by switching users in the Jar of Beans launcher. The emulator looks promising, and has one thing going for it that the others don't - portability. It also has seamless mouse integration similar to VMLite. That and the hardware acceleration improving make it one to keep an eye on.














Available for: Windows, Mac, Linux
Price: Free
Requirements: VirtualBox or VMware
Website: http://www.android-x86.org/

The most well-known is Android emulator is probably the open-source Android x86 project. I recently installed RC2 of Android x86, and while it works well, I ran into network problems that prevented apps (including the Google Play Store) from accessing the Internet. For those who have the Android x86 VM already installed in VirtualBox and are not able to connect to the Internet (even with the browser), you can try the following:
  • Use a bridged network connection between the virtual machine's virtual network adapter and the adapter that your computer uses to connect to the Internet (Settings -> Network -> Adapter 1). Then start the emulator and open the included Terminal Emulator app, and enter the following lines  (pressing Enter after each line):

     suifconfig eth0 up 192.168.2.250
    route add default gw 192.168.2.1 dev eth0
    setprop net.dns1 192.168.2.1
    Note that I'm using a Belkin router (192.168.2.1) so your router's IP (used in the third and fourth lines) may differ. You can find the IP of your VirtualBox adapter (used in the second line) by going to the command prompt in Windows and typing ipconfig /all, then press Enter. You'll also have to do this each time you run the VM. There may be better ways to do this, and do it permanently, but I have limited Linux experience so maybe someone can post a better solution in the comments.

    This should enable Internet access through the browser, however it still will not work for apps like the Play Store.
     
While I was able to access the Play Store web site through the browser, I was not able to install apps from it because I had not accessed the Play Store through its app from the Android device I was using (the virtual one.) This is a requirement Google has put in place before installing apps from the Play Store website. I could, however, mount a USB drive to the virtual device and browse to it using a file explorer app and sideload apps that way.

If you're interested in trying out the Android x86 project, I recommend to keep reading and check out the AndroVM emulator further down the list. As it is a better working and easier-to-get-started VM based on the Android x86 project, you'll probably have a better experience using it at this point.





Available for: Windows, Mac, Linux
Price: Free
Requirements: VirtualBox

VMLite is a virtual machine for VirtualBox based on Android 4.0.4 ICS. One thing VMLite has over the similar emulators like Android-x86 and AndroVM is seamless mouse support, meaning the mouse seamlessly transitions from your desktop to the virtual machine without getting trapped inside (you have to press a specific key to un-trap it.) While VMLite is easy to install (simply unzip the archive and open the VMLite-Android-v4.0.4.vbox file (in VirtualBox) and has a working Internet connection, I was disappointed that it did not come with the Google Play Store app, nor a file explorer app to browse a mounted USB drive. This means that you won't be installing apps right off the bat. Here is how I was able to install apps to it:
  1. Go to Settings -> Security and allow apps to be installed from Unknown Sources.
  2. Setup a web server on your computer, hosting your .apk files.
  3. Use the browser in VMLite to access your web server. Navigate to the folders that contain your .apk files.
  4. Click on an .apk file to download it to the virtual device. When the download completes, click on the .apk and select Install. When installation is complete, select Open.

As with Android-x86, keep reading down and you'll see that AndroVM provides a better experience (minus seamless mouse support.)





Available for: Windows (beta), Mac (Alpha)
Price: Free
Requirements: None

Another option is BlueStacks, a Windows-based app player. The software comes with several apps pre-installed, a large and growing app store, and using the BlueStacks CloudConnect app on your Android device allows you to send apps from your real Android device to the app player on your PC. I had trouble getting the CloudConnect to actually work... it immediately said "Please check network connection and try again" when trying to register and sync my phone. I created firewall rules for every BlueStacks executable I found and checked that nothing else was preventing it from working, but it still may just be a problem on my end. As of writing this, BlueStacks is still in Beta and can be downloaded for free from their website.

The benefit of using BlueStacks is that all of the apps in the BlueStacks app store should be working correctly. Although still in beta, it is a somewhat controlled environment... so if you're not one to tinker with and tear apart your Android and just want to play your favorite Android apps on your computer, it may provide the best experience for you.













Available for: Windows, Mac, Linux
Price: Free
Requirements: VirtualBox or VMware

While these options are all still in active development and will continue to improve, if you're looking for something that works right now and provides the full feel of an Android device, you'll want to check out AndroVM. Formerly called Buildroid, AndroVM is also now open-source and based on the Android x86 project. Currently it uses Android Jelly Bean 4.1.1. It comes in three different flavors: Phone, Tablet, and Tablet with phone capabilities. For each flavor, you can download the standard version, or download the standard + Google apps + Houdini (ARM compatibility app.) If that's confusing, the download options break down like this:

Files
  • Android Phone (vbox86p)
  • Android Phone + Google Apps + Houdini (vbox86p with gapps + houdini)
  • Android Tablet (vbox86t)
  • Android Tablet + Google Apps + Houdini (vbox86t with gapps + houdini)
  • Android Tablet with phone capabilities (vbox86tp)
  • Android Tablet with phone capabilities + Google Apps + Houdini (vbox86tp with gapps + houdini)
Note that you cannot actually make phone calls with any of these. Phone capabilities were added to the Tablet version because some apps refused to install on a non-phone device.

These downloads come as .ova files (Open Virtualization Format Archive) so you can use them in VirtualBox or VMware. I tested AndroVM in VirtualBox 4.2.4 and in VMware Workstation 9. I did get an error importing the .ova file in VMware, but clicking the Retry button on the error message led to it trying again and loading successfully. For the purposes of this review, I'll be using it in VirtualBox.

While you're on the AndroVM download page, you'll also see downloads for AndroVMplayer, a separate program that you can run with your virtual machine to enable hardware OpenGL. There are 32-bit and 64-bit versions of AndroVMplayer for Windows and Linux, and a version for 64-bit Mac OSX. If you don't plan on using any OpenGL apps, you won't need this... but keep in mind that many games require OpenGL (although not all of them will necessarily work in AndroVM at the moment.) Installation instructions are below the screenshot.


   

Installation

Download the AndroVM version of your choice and if you want hardware OpenGL, also download the version of AndroVMplayer that matches your computer's operating system. If you're just wanting to play around with Android, I would recommend the Tablet with phone capabilities version to get the best of both worlds. Next, you'll need to open your virtualization software. If you don't have one installed, you can download and install VirtualBox for free.

Inside VirtualBox, click File -> Import Appliance... and in the Import Virtual Appliance window, click Open appliance... Navigate to where you saved your downloaded .ova file and select it to open. Click Next.

On the Appliance Settings screen, you can change the name of the virtual machine to something a little simpler, like AndroVM, by double-clicking on the name field. This isn't necessary, but the default name (the .ova filename) is pretty long. Next click the Import button. It may take a minute or two to import.

When it's done importing, select the newly-created virtual machine from the list on the left. Right-click on it, then select Settings... in the popup menu. In the Settings window (it may take several seconds to load), click on Display in the list on the left. Move the Video Memory slider all the way to the right. It will probably max out at 128 MB.

Next click on System in the list on the left. On the right, you'll then see a setting for Base Memory. The default is 1GB (1024MB), but if your computer has 4GB of RAM or more, you may want to increase this to something like 2GB (2048MB.) This may be more than necessary, but if you got it you may as well use it. Keep in mind that you can go back and change these at any time in the future as long as your virtual machine is powered off.

Next, click on Network in the list on the left. Click on the Adapter 1 tab, and change the Attached to: setting to Host-only Adapter. Click on the Adapter 2 tab, and change the Attached to: setting from NAT to Bridged Adapter. (You can use NAT, but I prefer to bridge adapters.) Next, change the Name: setting to the adapter your computer uses to connect to the Internet. For example, if your computer connects to your router wirelessly, you'll find your wireless adapter in the list. If your computer plugs into your router via a network cable, you'll see your ethernet adapter listed. The names of these vary, so I can't tell you exactly what your adapter will be called.

Bridging your adapter will do exactly what it sounds like - create a bridge between your real network adapter (the one you use to connect to the Internet) and the virtual network adapter your Android virtual machine will be using. The reason we are doing this with Adapter 2 and not Adapter 1 is that AndroVM uses Adapter 1 to communicate with the AndroVMplayer program when you enable hardware OpenGL.

Click OK at the bottom of the Settings window to apply the changes. We're now ready to start our virtual machine. Make sure the AndroVM virtual machine is selected, and click the Start button in the toolbar.

If you've never used VirtualBox before, you'll notice that if you click inside the virtual machine screen, the mouse becomes trapped inside it. If you want to get the mouse back outside of it, the default key to press is the right Ctrl key.

The Android virtual machine will startup, and just like a new Android device, take you through the setup process where you select your language and link it to a Gmail account. You may want to create a new Gmaill account to use with your virtual device, rather than using an account tied to a real Android phone or tablet. After you select your language, you should see a Got Google? screen where it asks you if you have a Google account. It may take a few seconds to appear on your first startup. If you don't see this screen, you might have bridged to the wrong network adapter. Power-off the machine, go back to Settings -> Network -> Adapter 2, and select the correct adapter in the Name: list.

Once you complete the setup process and log into a new or existing Gmail account, you're finished. You can access the Google Play Store to download apps. Similarly to Android x86, you can mount a USB drive to the virtual Android device by clicking Devices in the virtual machine's menu. Then select USB Devices in the drop-down menu, and select the USB drive you want to mount in the sub-menu. You can then access the drive using a file explorer app (there are free ones that will do this available from the Play Store.) You can also use an app like Airdroid to access the virtual Android app from your computer's web browser, and install apps using its interface.

To enable Hardware OpenGL:

As I mentioned, you can download AndroVMplayer to enable hardware OpenGL on your virtual Android device. To enable it:

  • Inside your Android virtual machine, click the apps icon (6 small squares in the top-right corner of the home screen) and start the androVM Configuration app. Check the Hardware OpenGL checkbox. You'll need to reboot the device for the change to take effect.

    When you do reboot your Android virtual machine, it will now get stuck. It will display something along the lines of "IP Management: 192.168.56.101" and other text on the screen. This is because the AndroVMplayer is not running. To resolve this, open the command prompt (Start -> cmd) and navigate to the folder where you unzipped the downloaded AndroVMplayer to. As an example, we'll say that I unzipped the program to C:\AndroVM. So with my command prompt pointed at C:\AndroVM, I type AndroVMplayer 1280 800 160 and press Enter. (1280 is width, 800 is height, and 160 is ppi. You can set these to the resolution of your choice.) After pressing Enter, you may get a message from your firewall software asking if you want to create an exception - if you do, click Allow. You should then see the Android virtual machine displayed inside the AndroVMplayer window instead of inside the VirtualBox window. Now OpenGL is enabled.

    While OpenGL is required to run some apps (mostly games), the AndroVMplayer window does not accept scroll wheel input, which can be a little annoying at times. I suggest enabling it when you want to run apps that require it, but to disable it if you're not going to be using it.
To disable Hardware OpenGL:
  • If you're running your Android virtual machine inside the AndroVMplayer window, then you can navigate back to the androVM Configration app and disable it.

    However, there is an easier way to disable it that will work even if you can't get into the Android virtual machine. This way is great to have in case you have problems getting the hardware OpenGL to work, you can always revert back to having it disabled. To do this:

    Create a batch file and paste the following text into it:

            "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" guestproperty set "AndroidVM" hardware_opengl
      

    Running the batch file (while the Android virtual machine is powered off) will then disable OpenGL. Next time you open it, it will open normally and will not require the AndroVMplayer program to be running.

    The line used above is written assuming that you named your virtual machine AndroidVM so you may need to change that to match the name you set after importing the .ova file into VirtualBox. It also assumes that you installed VirtualBox into the default installation directory. If you installed it elsewhere, you'll need to change the VBoxManager.exe file location.

    You can also navigate to the VirtualBox installation folder in a command window and type

            vboxmanage.exe guestproperty set "AndroidVM" hardware_opengl

    Don't forget to change "AndroidVM" to the name of your virtual machine.





Those looking for a Windows Phone emulator should check out Windows 8's Modern UI and Windows Store. If you don't want to upgrade, you can run a Windows 8 virtual machine using VirtualBox or VMware. There is also a Windows Phone emulator, part of the Windows Phone SDK.

If you're looking for a similar experience with iOS devices like iPhones and iPads, there are some projects you may want to check out:
  • iPadian - A free portable application that reproduces the iPad experience on a Windows desktop.
     
  • iEmu - An ambitious project by one of iOS's earliest jailbreakers, Chris Wade, to get iOS up and running in an emulated state on Linux, Windows, Mac, and Android. No public release yet, but you can download and compile the source from here: https://github.com/cmwdotme/QEMU-s5l89xx-port
     
  • And of course there is the iOS simulator, part of the iOS SDK. (Available on Mac OSX only.)








UPDATE: (Feb 2013)


Available for: Windows
Price: Free (as of early release)
Requirements: None


WindowsAndroid, claims to run Android natively inside Windows. This means no virtualization software like VirtualBox or VMware is needed. This could allow apps to run better and faster than the other emulators, assuming they can work the bugs out. The software is still in development, so expect crashes. I tried it on both Windows 7 x64 and Windows 8 x64, and was unable to get past the Android loading screen, so I am unable to review it. However, some seem to have had more success.

WindowsAndroid does not come with Google Apps (including the Google Play Store) built-in. To get those, you can download them manually and follow this guide. This might not get you access to the Play Store though, as many have reported that accessing it results in an "Incompatible device" message.

Although I was unable to review WindowsAndroid, I feel it is something to keep an eye on and felt it should be added to the list.









13 comments:

  1. Excellent review. Thank you.
    Please continue to update it.

    ReplyDelete
  2. Wow, thank you for a detailed review of all these. It's refreshing to get someone's honest opinion, rather than just an overview.

    One question: could you add a bit to the AndroVM piece? You talk mostly about installation, and I'm curious as to why you think it's the best, as opposed to all the rest.

    ReplyDelete
  3. Hi I have 512mb ram and win7 so which is work perfectly in my pc.

    ReplyDelete
  4. i've downloaded bluestacks, it needs 2 gb ram bt i have only 1 gb.... tell me wht 2 do.... (rather than buying a ram)

    ReplyDelete
    Replies
    1. If you're set on using Bluestacks then this is a question for Bluestacks support. Although I wrote this a while ago, my preference at the time was using AndroVM and I have been busy with other things since. You may have performance problems running a virtual machine with 1GB ram total, but Android is small and able to run on devices with small amounts of ram (comparatively) so it may work fine. Just set the virtual machine to assign something like 256MB of memory to the VM.

      Delete
    2. Android Firewall is the perfect solution for controlling data usage on limited data plans. Adding a layer of android firewall safety to this operating system is be beneficial. see more
      Visit droidologist!

      Delete
  5. What can i dwnld for my 1gb ram win7?

    ReplyDelete
  6. Its really informative, the points highlighted are quite updated and to the point and it would be a good idea to look for some kind of more ones.

    Field Service Management Software

    ReplyDelete
  7. Thanks for review, it was excellent and very informative.
    thank you :)

    ReplyDelete
  8. Moving Simplified We found out this morning that we may be headed to
    Fort Bragg this summer(surprising as we weren't due to PCS for another year)
    fort bragg pcs

    ReplyDelete
  9. I currently use bluestacks to play some of the android games that my tablet can't handle. It gets a little annoying if your monitor is in portrait mode.

    The emulators are pretty cool when you want to game on the go with your laptop. I have it installed on my S510p laptop and game on it after taking a break from studying.

    ReplyDelete