You are on page 1of 25

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Home Portfolio Project Archive Other Works

Bobby Chan
Art, coding, game development, life and all the rest.

Faster Android Emulator Alternative Using VirtualBox


Bobby Chan

The Android SDK Emulator can be quite slow on some systems, which makes Android app debugging especially painful for those who arent in possession of a physical device to test their Android apps on. Thankfully there is a solution by the guys at Android x86. The basic premise is to host the Android OS on VirtualBox. So far Android x64 only supports up to Android 2.2 Froyo, but they are currently working on porting over Android 2.3 Gingerbread. Lets skip the details and get started, as this is a fairly long tutorial.

Step 1: Install VirtualBox


_
1 de 25
RECOMMENDED FOR YOU

26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

1. Go to http://www.virtualbox.org, and click the downloads link on the side. Download the version for your system. Version 4.0.10 for Windows Version 4.0.10 for OS X 2. Install Virtualbox using recommended settings. Eh, its simple enough, as theres nothing to configure.

Step 2: Download the Android OS ISO


1. Go to http://www.android-x86.org/download, and download the generic ISO that matches your targeted Android version. (At the time this post was written, that file would be android-x86-2.2-generic.iso) Note: Click the view link under the file to download the ISO. Android 2.2 Froyo - android-x86-2.2-generic.iso Android 2.3 Gingerbread - android-x86.2.3-4th-test-110620.iso There are more Android OS ISO versions available at http://code.google.com /p/androbox/downloads/list

Step 3: Creating the Virtual Machine


1. Open up Oracle VM VirtualBox. 2. Create a new virtual host by clicking New. A dialog pops up, click next. 3. Name the virtual machine whatever you want, it doesnt really matter. The operating system is going to be Linux version 2.6. If you are running a 64-bit operating system, choose the 64-bit version of Linux.

4. In the next screen, give your virtual machine 512MB of RAM. 5. In the virtual hard disk screen, make sure Boot Hard Disk is checked and that Create new hard disk is selected. Hit next. _
2 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

6. A new dialog will pop-up. When it prompts you for the hard disk storage type choose Fixed-size storage. Hit next. 7. Location can be left as the default. Set the size of the virtual hard disk to 2 GB (that is more than sufficient for the emulator). Then finish the dialog, and a virtual hard disk will be created. 8. Click finish again, and the virtual machine will be created.

Step 4: Adjusting Settings


1. Select the virtual machine you just created and change the settings. 2. Now to load the Android ISO disk file, go to Storage, under IDE Storage click Empty. Click the disk icon beside CD/DVD drive and Choose a virtual CD/DVD disk file

_
3 de 25

3. Now browse to the location of the generic ISO file you downloaded earlier, and open that file. We just mounted the ISO file to the virtual machine. 4. Next, we have to change the sound device. With the settings dialog still open, go to
26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Audio. Set the audio controller to SoundBlaster 16. ICH AC97 will not work.

5. The next thing to set up is the network. Go to Network (obviously). Change the Attached To setting from NAT to Bridged Adapter.

6. If the name dropdown has more than one network adapter, select the one that connects to the internet, otherwise just leave it as the default. 7. Click OK to save the settings.

Step 5: Running the Emulator


1. Select your virtual device and click Start. Ignore the VirtualBox dialogs and just click OK. 2. Your mouse wont work at this point in the BIOS so just use your arrow keys. Select Live CD VESA Mode. Hit the return key.

3. The emulator will now load up. You should see the following screens. _
4 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

4. Youll notice that the your mouse still wont show as you hover over the VirtualBox or emulator window. To fix this, go to the Machine dropdown menu at the top left corner and click Disable mouse integration. 5. Click anywhere on the screen and youll get a VirtualBox dialog prompting you to capture the mouse pointer. Click Capture.

_
5 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

6. You can now move the mouse around, anywhere within the VirtualBox window. But what if I want to move it outside the window? Press the right control key and it will unlock the mouse. When you want the mouse back on the emulator, click anywhere on the screen and the repeat previous step. 7. (If you have never used an Android device, drag the lock out to unlock it.) You will then be brought to the home screen.

Step 6: Connecting Eclipse & ADB with the Emulator


1. Press Alt + F1 to bring up the console in the emulator (IE. VirtualBox window). (Alt + F7 To bring back the Android GUI) 2. Type netcfg, hit enter. Copy down the emulators IP address.

3. Assuming that you have ADB already installed and set up, open up the command prompt. Type in adb connect <emulators IP address>. 4. If everything went well, then it should say something similar to connected to <emulators IP address>:5555. If it is unable to connect, check your virtual machines network settings. Make sure its the correct adapter. If that doesnt fix it refer to the following link: http://www.android-x86.org/documents/debug-howto. If the command was not recognized, it means you havent set the path environment variable to your Android SDK folder location. Refer to http://www.cuteandroid.com /tips-for-android-developer-android-sdk-tools-path-setting to set it up, and when complete retry step 3.
26-08-2013 22:36

_
6 de 25

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

5. Close the command prompt. Now to connect Eclipse with the emulator, open up Eclipse (Im assuming the Android SDK and plugins are already installed.) 6. If you dont already have an Android project opened, create a new one that matches the version of your Android emulators version. Note: If you do have one opened, make sure the apps Android version matches the emulators version. 1. FileNewProjectAndroidAndroid Project 2. Give your test Android app a name. It could be something like AndroidTestProject 3. Leave the Contents section as-is. Under the Build Target section, check off the version of your Android emulator. 4. In the Properties section, give your app a package name. An example would be com.test.project. Package naming is really irrelevant for this tutorial, but if you care to learn more about it, feel free to look it up on Google. As for this tutorial, just make sure it starts with com. 5. Click Finish 7. Go to RunRun configurations 8. On the left-hand side, double click Android Application, and then under it, click New_configuration 9. Click on the Target tab. In the Deployment Target Selection Mode section, choose Manual.

10. Click Apply and close the window. 11. Now run and compile the project. 12. Depending on if you have any existing Android Virtual Devices, a dialog may pop-up prompting you to choose the device to install your test app to. Select your Android Emulator, and click OK.

13. It will compile and your app will be installed to your emulator. If you see your app,
then youve done it!

_
7 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

SUCCESS!

Testing Your App Again


After youve set this all up, you dont need to do all of it over again. In order to set up the emulator after restarting the computer, you have to do the following: 1. Start up the emulator normally. (Open VirtualBox, start the virtual device, then choose Live CD VESA Mode.) 2. Get the emulators IP address (Alt+F1, then type in netcfg). 3. In the host computer, open up the command prompt and type in adb connect <Your emulators IP address>. You have to do this every time the computer restarts. 4. Run & compile your project in Eclipse and choose the Android Emulator device. 5. Youve once again installed your Android app to the emulator! Well there you go. It was one long setup, but definitely worth it if you dont own an Android device.

Keys
Enter Confirm Escape Back/return Alt + F1 Show console Alt + F7 Show Android GUI Arrows Moving navigation Right + Control Toggle mouse capture _
8 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Post to Facebook 53 53
Like 53 18

Tags: alternative, android, android 2.2, android 2.2 froyo, android 2.3, android 2.3 gingerbread, android emulator, android x86, debugging, emulator, fast, virtualbox This entry was posted on Saturday, July 9th, 2011 at 11:09 PMand is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
58 COMMENTS ON FASTER ANDROID EMULATOR ALTERNATIVE USING VIRTUALBOX

bogdan on July 19, 2011 at 7:41 PM said:

Very interesting. I will try this idea!

Varunjampani on September 19, 2011 at 6:52 AM said:

Is it possible to use monkeyrunner tool with this emulator?? If yes, can you please let me know how to use it. I tried using it but monkeyrunner is not able to connect to this emulator.

Joseph Lu on September 23, 2011 at 2:21 AM said:

Great idea, I will try it. you know the emulator in SDK is toooooooooo slow. Thank You!

_
9 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Joseph Lu on September 23, 2011 at 2:21 AM said:

Great idea, I will try it. you know the emulator in SDK is toooooooooo slow. Thank You!

Peter Frazier on September 23, 2011 at 7:31 PM said:

any idea on how to add sd card?

Bobby Chan on March 23, 2012 at 2:25 PM said:

Theres a tutorial here on saving data to a virtual disk: http://code.google.com /p/android-x86/wiki/VirtualBoxHowTo

No on October 13, 2011 at 11:31 AM said:

Thanks! Great tutorial really easy to follow. Only thing is latest version of VirtualBox has some slightly different or differently named choices. Any way to change the resolution of the VM?

Bobby Chan on March 23, 2012 at 2:40 PM said:

On the live CD boot screen, where you choose VESA MODE, press TAB before it boots up. On the command, add to or change the parameter vga like so _
10 de 25

vga = 788 (800600)vga = 791 (1024768)

26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

vga = 794 (12801024) or vga=ask (show list of available resolutions)Then press enter.

Luiz R. Rodrigues on October 14, 2011 at 10:04 PM said:

Very nice and very fast. Using Android Simulator in MacOS = Impossible work! Thanks. But I have a problem.. When try browsing for jQuery Mobile web site (Documentation and Demo) the browser close. Im deploy a app in PhoneGap and using jQuery Mobile to this, so have same problem Open my app, show home page, but if try go to other page app close. Any help?

cvoronin on October 25, 2011 at 2:06 AM said:

My application uses Google API. When I try to install my application on this VM, I see an error: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY Google API seems not to be included in this ISO

tiny gipxy on October 25, 2011 at 10:44 PM said:

tks very much

_
11 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

George on October 31, 2011 at 2:37 PM said:

Hi Thanks for the help. I get everything as you have explained in the tutorial. The only problem is, i need a emulator for the samsung galaxy tab 7. The screen size for the same is 1024 * 600 . How can i give this screen resolution for my virtual Box Emulator

Petemccarthy on April 29, 2012 at 2:47 AM said:

Did you ever get this solved?

George on October 31, 2011 at 3:28 PM said:

Hi Thanks very much. This worked for me. However my problem is i wanted the emulator for samsung Galaxy Tab 7. Can you help me on how to set it

saurabh on November 7, 2011 at 8:48 AM said:

very very usefull

Deepakchougule111 on November 8, 2011 at 3:29 AM said:

Very Awesome Blog but how about Menu Button?? If some app uses menu then wht?? how to handle it _
12 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Prallin on February 8, 2012 at 8:38 AM said:

+1

Deepthi Aravind on November 8, 2011 at 7:44 AM said:

Very useful !! Thank you

manish bansal on December 25, 2011 at 1:42 PM said:

hi, actually i am not able to connect adb with emulatorit always says unable to connecti have checked my emulators network settings..its same as you have mentioned above..i have also tried changing it to host only adapterbut still error persists..plz help.

mahesh on March 23, 2012 at 10:23 AM said:

absolutely same problem.. n cudn find an answer anywhere!!

Bobby Chan on March 23, 2012 at 2:21 PM said:

You may need to set up a DHCP server. http://www.howtoforge.com /dhcp_server_linux_debian_sarge _


13 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Another option may be to use NAT and PCnet-Fast III as the network adapter, as described here: http://code.google.com/p/android-x86/wiki /VirtualBoxHowTo Let me know if that works.

Avillas on January 6, 2012 at 3:13 PM said:

Tnx so much!

Eric Pabst on January 26, 2012 at 1:45 AM said:

Very cool!

Deepikamandapalli on February 2, 2012 at 6:28 AM said:

nice.

Adithya on February 15, 2012 at 6:12 AM said:

What is emulator IP adress

Gus Trik on March 13, 2012 at 5:03 PM said:

_
14 de 25

I followed the described procedure, but on the next


26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

start-up of my laptop its network card did not work and it was inaccessible. I tried everything but in vain, so I uninstalled virtualbox and it started running again. I believe there was a conflict. Can anyone help me?

Gus Trik on March 13, 2012 at 5:03 PM said:

I followed the described procedure, but on the next start-up of my laptop its network card did not work and it was inaccessible. I tried everything but in vain, so I uninstalled virtualbox and it started running again. I believe there was a conflict. Can anyone help me?

Jhonnatan Cebidanes on March 16, 2012 at 11:05 PM said:

Very nice! Perfect! Faster test app. Tks!

guest on April 9, 2012 at 8:24 AM said:

Hi, any way to change the resolution of the emulator? or get it to run in portrait instead of landscape?

Grega Tratnik on April 10, 2012 at 6:44 AM said:

This is great thanks a lot! android sdk emulator

it is very fast instead of

_
15 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Ronaldo9 on April 25, 2012 at 8:33 AM said:

Thanks a lot this works perfectly

zameer on April 28, 2012 at 2:42 PM said:

hi bobby! i have installed everything properly but im not able to figure out how to add an sdcard to the emulator. Because when i try to download or install any app its asking for an sdcard. please tell me the solution the soonest,

Liamci on May 7, 2012 at 11:53 PM said:

works great ! much more faster than the emulator . thanks for the tutorial

Pingback: Mono for Android & Android on VirtualBox Memory extender

Nishant Bajracharya on June 6, 2012 at 11:54 AM said:

works great and works much more faster than the emulator thanx for the tutorail.. THANX

Bla on June 7, 2012 at 8:20 AM said:

_
16 de 25

I tried to use other Android OS ISO but there is no eth0 to connect to.
26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Shikshya Bhattachan on June 10, 2012 at 1:48 AM said:

any idea how to make it work with Mac OS X? It says vt-x/amd-v has been enabled but not operational..

Bobby Chan on June 18, 2012 at 3:00 AM said:

Youll need to enable hardware virtualization in your BIOS. Not exactly sure if, or how you can do that on Mac OS X.

_
17 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Lester Ingber on June 25, 2012 at 10:21 AM said:

Hi. I tried this process on my HP dv8t/Win7 x64 with the latest VB (I use Ubuntu on this VB regularly), but I get stuck at Step 5.3-top (black screen with android logo). I used android-x86-2.2-r2-tx2500.iso, since the androidx86-2.2-generic.iso version you mention is deprecated (probably was OK when you first wrote this?).

Bobby Chan on June 26, 2012 at 12:19 AM said:

Hi. I couldnt get that iso to work either. I did have success using android-x86-2.2-r2-eeepc.iso (http://androidx86.googlecode.com/files/android-x86-2.2r2-eeepc.iso) Hope that helps

Jayson Tamayo on June 28, 2012 at 10:41 PM said:

How do I emulate a 320480 device using the Virtual Box? My application should be run a 320480 device. Help me please.

Bobby Chan on June 28, 2012 at 11:27 PM said:

In Step 5, instead of selecting VESA Mode press TAB. Change or add the parameter vga=ask (without quotes) and press enter. It will boot up prompting you Press ENTER to see video available modes So press enter. Then select the video resolution that
26-08-2013 22:36

_
18 de 25

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

you want.

Jayson Tamayo on July 1, 2012 at 7:36 AM said:

I cant find a mode for a 320480 device.

Mehd Armach on July 10, 2012 at 1:55 PM said:

You have to add it yourself, the way to do that is very simple. First you have have to open the folder containing the files of the Virual Machine, then open the .vbox with notepad. Paste this line : after the ExtraDataItem stuff, usually its arround the 23rd line. After all this, just repeat the previous process and the new resolution will appear in the list. NB: In order for this to work, both the Emulator and VirtualBox itself should be shut down. _
19 de 25

Good luck

26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Dont pay intention to the line below, its just a thing that Qisqus does.

helena on October 26, 2012 at 5:28 PM said:

It does not work for m/ What to do?

SabbatoR on July 5, 2012 at 9:03 PM said:

Really great ! Thanks

Emile Jobity on September 12, 2012 at 5:17 PM said:

Thanks alot very informative:-) help me out. GOD BLESS u.

_
20 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

RishiKant on October 1, 2012 at 4:22 PM said:

I followed the step shown by you, everything remain fine until I reached step 5, after that only the screen showing Android written in the middle of the screen remain constant with no progress What should I do to go further

RishiKant on October 1, 2012 at 4:24 PM said:

I followed the step shown by you, everything remain fine until I reached step 5, after that only the screen (Android Loading Screen) showing Android written in the middle of the screen remain constant with no progress What should I do to go further

helena on October 26, 2012 at 4:33 PM said:

Excellent article/tutorial!!!! Step 5 was problematic: Try do download all available downloads until it works (This applies to the network fix too).

gregko on November 28, 2012 at 9:57 AM said:

Excellent, thank you! All worked as described. Only problem cannot login to Google account. Any attempt to setup and account results in empty screen, only offering some WiFi configuration options.

_
21 de 25 26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Shylah Barnes on January 17, 2013 at 10:37 AM said:

This worked perfectly! I am running Windows 7 Home Premium 64 and this worked for me and I have followed the instructions exactly, using the same software and tool versions that Bobby has mentioned in this article. Thanks so much! Bobby!

Tung Mai Le on January 19, 2013 at 12:42 AM said:

Hi Bobby, kudos for this article. I managed to connect to the Android Emulator in VB and install my apps on it, following instructions in step 6. However, my device cant connect to the Internet, although I use Bridged Atapter in step 4.5 above. What should I check? Tks

Ion Farima on January 29, 2013 at 9:49 AM said:

If you dont want to type each time the things in the cmd you can create a text file and write in : @Path=%path%;(the path to your adb.exe); @adb connect (the ip adress obtained from vBox (netcfg) and then save as myconnect.bat Good luck!

_
22 de 25

Guyra on January 31, 2013 at 12:58 PM said:

26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Fantastic, thanks for this tutorial!

Chris De David on March 21, 2013 at 7:01 AM said:

Thank you, Worked like a charm!

Simon on April 3, 2013 at 4:50 PM said:

Great!!!

Qaiser Mahmood on May 31, 2013 at 1:49 PM said:

AlhamduLILLAH worked perfect with android-x86-2.2r2-eeepc thanks.

search

Go

Recent Posts
Project Archive now up 584 days ago TRON Painting Finished With Custom Made Backlit LED Frame 616 days ago TRON Painting Day By Day Progression: Updated Day 4 778 days ago

_
23 de 25

Categories
26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

Android Artwork Cool Websites Gallery Game Development GEC iOS Programming SpinMe Alarm Clock Website

Blogroll
Portfolio

Coding
FighterGame Summative Subscribe RSS

Archives
Select Month

Categories
Android Artwork Cool Websites Gallery Game Development GEC iOS Programming SpinMe Alarm Clock Website

Tags
acrylic alternative android android 2.2 android 2.2 froyo android 2.3 android 2.3 gingerbread android emulator android x86 artwork

_
24 de 25

business competition Global Enterprise Challenge

computer science debugging emulator Fancy fast gallery game

GEC

java led backlit frame led frame mutlicolored led frame

26-08-2013 22:36

Faster Android Emulator Alternative - Using VirtualBox | Bo...

http://www.bobbychanblog.com/2011/07/faster-android-emul...

new

painting personal Pinterest portfolio progression summative The Fancy theme ThinkGeek TRON tron legacy tron

painting update virtualbox website

Copyright 2012 Bobby Chan WordPress Theme by Michael Tyson.

_
25 de 25 26-08-2013 22:36

You might also like