How to run the android application – Installed Android in VirtualBox (Ubuntu 12.04)

07 Oct

I know most software developers having this problem “What is this problem ?” : when you going to run the android application on the emulator which is bind with your IDE(Netbeans, Eclipse) it will take two three minutes to load.

Is there any solution for this? Yes it is, lets look at the solution step by step.

1. I’m using Netbeans as my IDE and I assume that you all set up the android plugin on Netbeans and point the Android SDK in the android section.
ex/ Now you can create the android application with your netbeans IDE.
2. You have to set up the VirtualBox on Ubuntu and install the Android OS on top of that.
you can easily do this step by following this blog post

2. Then you have to point the sdk/tools and sdk/platform-tools

Open bash file

sudo gedit ~/.bashrc

Insert the following lines in bottom of the file then save and close.

# Android tools
export PATH=${PATH}:Your_Android_SDK_Path/tools
export PATH=${PATH}:Your_Android_SDK_Path/platform-tools

to source your bash file follow this command.

source ~/.bashrc

3. Now try the following command on your terminal. If there is any connected devices you can see now.

adb devices

4. Now you have setup the adb command perfectly so go to Virtual box setting and see the following network settings are there in your android VM.

5. Start your android VM and Press Alt + F1 to bring up the console in the emulator (IE. VirtualBox window). (Alt + F7 To bring back the Android GUI) and type the “netcfg” command to see the IPs



Press Alt + F1
Screenshot from 2013-10-07 18:31:13

6. Now you know the emulators IP address now you need to go to terminal in your Ubuntu machine and connect the device as follows.

 adb connect


If it is unable to connect, check your virtual machine’s network settings. Make sure it’s the correct adapter. If that doesn’t fix it refer to the following link:

7. Then go to netbeans and run your android project then it will ask the select the emulator to run so now you can see your VM is there.

Now select the VM emulator and run

1 Comment

Posted by on October 7, 2013 in android, Android App


Tags: , ,

One response to “How to run the android application – Installed Android in VirtualBox (Ubuntu 12.04)

  1. Halra

    April 24, 2014 at 12:11 pm

    i use ubuntu 12, it’s good
    will install virtual box and android emulator in my laptop,
    thak you very much


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: