NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home / News / Linux / Ubuntu Tips and Tricks

Ubuntu Tips and Tricks


How to Run Android Applications on Ubuntu

Step-by-step tutorial with screenshots

By Marius Nestor, Linux Editor

25th of June 2009, 18:04 GMT

Adjust text size:


Android 1.5 Emulator on Ubuntu 9.10 Alpha 2
Enlarge picture
When Google announced and released Android, back in October 2008, everyone knew that it would become the best operating system for mobile devices. Not only is Android open source, but it also comes with a Software Development Kit, which offers the necessary APIs and utilities for developers to easily build powerful applications for Android-powered mobile devices. The following tutorial was created especially for those of you who want to test the Android platform and install various applications, on the popular Ubuntu operating system. OK, so let's get started... shall we?

Grab the Android SDK 1.5 from Softpedia and save the file on your home folder. It has around 160 MB, so it will take a while if you have a slow network connection.

Step 1 - Installing the requirements

Until the download is over, make sure that you have Java installed and the 32-bit libraries (for the x86_64 users only). If you don't have Java and/or the 32-bit libs, go to System -> Administration -> Synaptic Package Manager...

Review image

...search for openjdk and double-click on the openjdk-6-jre entry...

Review image

...then, search for ia32-libs (ONLY if you are on a x86_64 machine), and double-click on the ia32-libs entry...

Review image

Now, click the "Apply" button to install the requirements. Wait for the packages to be installed and close Synaptic when the process is finished.

Step 2 - Android Setup

When the Android SDK download is over, right-click on the file and choose the "Extract Here..." option...

Review image

Open a terminal (Applications -> Accessories -> Terminal) and type or paste the following commands, one by one (hit Enter after each one):

cd ~/android-sdk-linux_x86-1.5_r2/tools

...let's create a 2GB SD Card (I think 2GB is more than enough, but if you need more just change the size)...

./mksdcard 2048M SDCard1

...wait a couple of minutes for the card-creation process to finish.

And now, let's create the Android Virtual Device...

./android create avd -n softpedia -t 2

Hit Enter when asked if you wish to create a custom hardware profile, and you'll be immediately notified that the virtual device was created, for Android 1.5.

Note: You can replace "softpedia" in the above command with whatever name you want to give to your Android device. If you want a virtual device for the Android 1.1 platform, replace 2 with 1, in the above command.

The final step is to create a desktop shortcut, so you won't have to open the terminal every time and type some command, in order to start the Android emulator. Therefore, right-click on your desktop and choose the "Create Launcher..." option...

Review image

In the Create Launcher window, type "Android Emulator" (without quotes) in the Name field, and paste the following line in the Command field. Optionally, you can also put a nice icon if you click the button on the left...

/home/YOURUSERNAME/android-sdk-linux_x86-1.5_r2/tools/emulator @softpedia -sdcard /home/YOURUSERNAME/android-sdk-linux_x86-1.5_r2/tools/SDCard1

Review image

Note: Please replace YOURUSERNAME and the name of the Android Virtual Device (softpedia in our case) with yours. DO NOT REMOVE the @ sign.

Step 3 - Run applications in Android

All you have to do now is double-click that desktop shortcut you've just created. The Android emulator will start. Wait for the operating system to load...

Review image

When the Android operating system has loaded, you can install and test applications. If you are used with the Android platform, you already know how to do that, but if this is your first time... follow the next instructions.

Review image
Android 1.1

Review image
Android 1.5

Click the Browser icon, wait for the browser to load and click Menu -> Go to URL. Enter the address from where you can download an Android application with the apk extension. For example, we've easily installed Android's Fortune from Launchpad...

Review image

Review image

Review image

Review image

Review image

Review image

Review image

...all you have to do is follow the on-screen instructions!

Have fun, and do not hesitate to comment if you want to know more about Android, or if you're stuck somewhere in the tutorial.

TAGS:

Android | Ubuntu | Emulator | Google | Linux
Read by 30,492 user(s) | Add comment | Link to this article TWEET THIS


Article rating:
Excellent (4.7/5) 20 vote(s)    

Subscribe to news | Print article | Send to friend

© Copyright 2001-2009 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


First Look: Ultimate Edition 2.2

Linux Mint 7 x64 Released

Elive 1.9.31 Offers Support for Acer Aspire One

R.I.P. Linux 9.2 Has Linux Kernel 2.6.29.5

Available Now: g:Mini 3.0

Softpedia Linux Weekly, Issue 50

First Alpha of Mandriva Linux 2010 Is Out

GeeXboX 1.2.2 Is Capable of Multi-Threaded Video Decoding

User opinions:


Comment #1 by: dirtprof on 26 Jun 2009, 23:07 GMT reply to this comment

Why, in the 2nd screenshot under "step 3", do the two clocks differ by ~11-12 minutes?

Comment #1.1 by: Marius Nestor on 29 Jun 2009, 09:20 GMT

Hmmm... you're right... probably because the one on the desktop was not correctly setup, to be in sync with the system clock :)


Comment #2 by: Miles on 30 Jun 2009, 19:08 GMT reply to this comment

Can we use the Android Market from this?

Comment #2.1 by: Marius Nestor on 01 Jul 2009, 09:39 GMT

No, but you can install Android applications from our website, here http://handheld.softpedia.com/deviceSoftware/8


Comment #3 by: phonixor on 30 Jun 2009, 20:58 GMT reply to this comment

....
mmmh there will be other support for it in the future i believe...
it was at UDS... but dont know any details...
cause this emulator takes a long while to startup...
and doesnt have market, or contact sync... (least mine didn't work :P)


Comment #4 by: patrick on 01 Jul 2009, 01:40 GMT reply to this comment

This is how to run the android EMULATOR, not run android application natively, which canonical has recently demo'd.

Misleading title!


Comment #5 by: Marius Nestor on 01 Jul 2009, 09:05 GMT reply to this comment

For now it is the best solution to TEST any Android application... without messing up your Android-powered phone!


Comment #6 by: Michael on 01 Jul 2009, 13:55 GMT reply to this comment

I am using this behind a proxy, where can I enter the proxy settings? Thanks


Comment #7 by: pjv on 01 Jul 2009, 21:29 GMT reply to this comment

This howto makes it clear to many people how to make good use of Android, without even owning a real phone.

It's nice to see Android's Fortune being featured. Many thanks Vadim!

If anybody is interested in contributing ideas or work to Android's Fortune, please visit the Launchpad webpage of this open source app, as shown above, and jump right in or contact me.


Comment #8 by: Joel on 04 Jul 2009, 14:45 GMT reply to this comment

I really like the style in which this was written, most tutorials rarely ever go in depth into installing the program and just say use "apt-get ..." Thanks, this article was informative and helpful.


Comment #9 by: shabi on 21 Jul 2009, 06:49 GMT reply to this comment

may i know how one can attach his own plugin to andriod.
i mean some tools chain required to build our plugin? if is it so then can you tell me what are the steps..


Comment #10 by: Sofia on 22 Jul 2009, 23:25 GMT reply to this comment

Hi,

I wanted to know if I can open a local HTML file in android ? I believe that the browser cannot open local HTML files for security reasons. But the HTMLViewer can. But I can't see a HTMLViewer in the android menu.

Any information will be very helpful.

Thanks,
Sofia Tahseen

Comment #10.1 by: Marius Nestor on 23 Jul 2009, 07:47 GMT

Hello Sofia,

The emulator is just like the real thing... you can't access local files.


Comment #11 by: Chris on 17 Aug 2009, 19:08 GMT reply to this comment

Hello, I got to the very last step, the launcher, but then for some reason I cannot open the emulator. I double click the launcher and nothing happens. The comment is correct, I changed the softpedia variable and the dir. Any suggestions?

Comment #11.1 by: Chris on 18 Aug 2009, 18:22 GMT

Nevermind I found out what I was doing wrong there but then I still get something saying that it cannot open because permission is denied.


Comment #12 by: Joseph Schwenker on 10 Sep 2009, 22:59 GMT reply to this comment

When I make the shortcut, it tells me that the directory does not exist when I try to launch the emulator. "Details: Failed to execute child process "/home/joseph/android-sdk-linux_x86-1.5_r2/tools/emulator" (No such file or directory)"


Comment #13 by: joseph on 30 Sep 2009, 18:42 GMT reply to this comment

this article's tile is highly misleading, as the article doesnot describe how to install apk's on the andorid as you can't insatall android market in a legal way. hence all you can do is just run the emulator and nothing else, YOU can not install any apps,,,,...and You can run the apps on window/macs etc...no big deal about running andorid emulator on ubutnut...dont' make a fuss about it ! Oh Jesus, it sucks !


Comment #14 by: Shajahan Shaharia on 31 Oct 2009, 22:36 GMT reply to this comment

hi i was wondering how would i remove this if i wanted to?!


Comment #15 by: Marius Nestor on 02 Nov 2009, 10:49 GMT reply to this comment

Hi... Just delete the android-sdk-linux_x86... folder and the desktop shortcut.


Comment #16 by: Durolipons on 15 Nov 2009, 17:33 GMT reply to this comment

Im gettin the same problem " (No such file or directory). I'm guessing this is because I have a 32 bit system. The file Ive downloaded is android-sdk_r3-linux.tgz. Unziped it is android sdk linux.

Please help.

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 




Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM