How to Install Android SDK (and Take Screenshots) in Ubuntu 9.10

android-sdkIf you are an Android developer, looking to root your Android phone, or just a blogger who wants to take screenshots of your latest Nexus One phone, you will need to install Android SDK in your computer. I know that it is kind of troublesome to download/install the SDK just to take screenshots in your phone, but luckily it can be done easily. This article will show you the way to install Android SDK and take screenshots in Ubuntu 9.10 Karmic.

First, go to the Android website and download the SDK. Make sure you choose the Linux version.

android-sdk-download

Extract the downloaded file to your home folder. You should see a folder with the name “android-sdk-linux_86”.

Open your .bashrc file and add the filepath to the end of the file. In a terminal, type the following:

gedit ~/.bashrc

Add the following line to the end of the file:

export PATH=${PATH}:<your_sdk_dir>/tools

Replace <your_sdk_dir> with the actual filepath of the SDK folder. If you have extracted the file to your home folder, it should be something like /home/your_username/android_sdk_linux_86/

Next you need to install Ecplise. For Ubuntu 9.10 users, the latest version of Eclipse (Eclipse Classic 3.5.1) is already included in the repository, so you can easily install via the command:

sudo apt-get install eclipse

Once the installation is completed, open Eclipse (Application -> Programming -> Eclipse)

On the menubar, click on Help -> Install new software

android-sdk-eclipse1

At the Work with field, enter http://download.eclipse.org/releases/galileo and click Add.

android-sdk-eclipse2

You will see that there are several software now available for installation. Ignore them.

Next, erase away the entry in the Work With field and add https://dl-ssl.google.com/android/eclipse/. Click Add.

android-sdk-eclipse3

Check all the entries in the bottom pane and click Next to install.

Once the installation is done, restart Eclipse.

Go to Windows -> Preferences. On the left, select the Android entry.

Enter the Android filepath in the SDK location field. Click Apply follow by OK.

android-sdk-eclipse4

Update: The latest version of Android SDK requires you to install the SDK API before you can create a new Android project.

Go to WIndows -> Android SDK and AVD Manager.

android-sdk-eclipse-extra1

On the left pane, select the “Available Packages” entry. On the right, place a check on the version of the Android SDK that you want to install. Once done, click the Install Selected button.

android-sdk-eclipse-extra1

That’s it. You have install and set up Android SDK in your Ubuntu. To create a new Android project, simply go to File -> New -> Project and choose Android project in the Wizard window.

android-sdk-eclipse5

Taking screenshots of your Android phone

First enable the USB debug mode in Settings ->Applications->Development

android-screenshot-usb-debug

Connect your Android phone to your computer via the USB cable.

Make sure that Eclipse is closed, navigate to your Android SDK folder. Go to the Tools folder and open the ddms.bat file. When prompted, select RUN.

android-screenshot-ddms

Highlight the entry of your phone.

android-screenshot-dalvik

Go to Device -> Screen Capture.

android-screenshot selection

android-screenshot-window

That’s it.

  • Pingback: Links 13/1/2010: Linux 2.6.33 RC4, Zenwalk 6.2 Reviewed | Boycott Novell

  • Pingback: Monthly Roundup For January 2010 – Make Tech Easier

  • Sven

    i start ddms but i can't see the phone there. Any idea?

  • http://maketecheasier.com/ Damien Oh

    In most cases, it should work. Have you tried to replug the phone to the USB port?

  • ll

    When ever I type https://dl-ssl.google.com/android/eclipse/ I don't get anything. It just says Pending… and then says there is an error. Am I doing something wrong?

  • ll

    I solved my problem with that link but unfortunatly a ran into another one. While clicking finish and when it was doing the instalation prosess and when it got to the 64th percent it asked me if I wanted to continue the instalation as the software im installing has no valid name or somthing. When I click ok it showed me this error:

    An error occurred while installing the items
    session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install, operand=null –> [R]org.eclipse.ant.ui 3.4.1.v20090901_r351, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
    The artifact file for osgi.bundle,org.eclipse.ant.ui,3.4.1.v20090901_r351 was not found.

    Please help!!!

  • esotericbyte

    I have the same error! It is irritating,vexing and driving me bonkers!

  • http://maketecheasier.com/ Damien Oh

    It seems to be a problem with the Eclipse server. It works fine on my PC.

  • Pingback: links for 2010-05-24 « Where Is All This Leading To?

  • Pingback: Tekno-ertokitik » Android, pantaila argazkiak

  • Joe
  • Pingback: GUIDE: From stock 1.5 to the latest root 2.1 - Page 16 - Android Forums

  • Pingback: Weudel On» Blog Archive » Rooting the Eris in Ubuntu

  • Pingback: Testing Android on the PC | jon underwood

  • russ

    when i go to window/prefrences, there is no android pane, any tips as to what i did wrong?

    • Narayanan1988

      did yu manage to get it work ??

  • http://maketecheasier.com/ Damien Oh

    Did you download the android plugin for eclipse? The Android pane will appear only when the plugin is successfully installed.

    • Narayanan1988

      I installed the android plugin..still there is no Andriod pane in the preferences tab

      • bonjo

        The same issue (Ubuntu 10.10 x32, Eclipse 3.5.2)… I try also to install the php and xml plugins but they don’t appear in preferences menu…

        • Anonymous

          Any success? I have the same issue.

          • http://www.facebook.com/profile.php?id=36804528 Alex Kalderimis

            I have exactly the same issue with ADT, as well as with other plugins. Very frustrating.

  • Spgramann

    Great instructions. Thanks for all your help

  • Arviz

    What if I have to work in a Python environment instead of Java… pls help… will eclipse meet my needs… or i have to go for easy eclipse?

    • http://maketecheasier.com/ Damien Oh

      I think you can configure eclipse for python programming. You will have to google for the configuration instruction. I am not a python developer, so I can’t help you on this.

  • Pingback: How to Root or Unroot your Motorola Droid 1 on Ubuntu (Linux) using MDW.

  • Kiranbabu K S

    i installed android plug in but could not see android in preferences. In New->Project also the android project and java project options are not seen. but i installed jdk and android plug in. what could have gone worng. how to fix this problem?

    • http://maketecheasier.com/ Damien Oh

      Assuming that the android plugin was installed properly, on the menubar of Eclipse, go to Window -> Preferences, you should see an “Android” entry on the left pane.

      To create new android project, you have to go to File -> New -> Other…

  • Pingback: Utvecklingsmiljö Android | David Berg

  • Jwtiyar

    when i run ddms my phone is not exist , ?

  • http://twitter.com/RadScirocco Juan C. Contreras

    Great post, everything installed perfect!

  • Pingback: Android Development on Ubuntu 10.10 « Skypiea

  • http://legluondunet.over-blog.fr/ Le Gluon du Net

    Thank you for your tutorial, work very good on Ubuntu Maverick.

  • viren

    hey its realy a nice tutorial.
    works perfect.
    thank you so much.
    one more help plz, i want to learn website development for mobile devices which is the best platform and tutorial for that.
    waiting for replay.
    regards.

    • http://maketecheasier.com/ Damien Oh

      The SDK is available for all OS, so there is no such thing as “the best platform”, only your favorite platform. The OS that you are most comfortable with will be your best platform.

  • Pingback: Android screen grabs – no rooting required. | Open attitude.

  • Raviteja Tr

    same here my phone is showing as ??????? when i open ddms..
    do i have open file with root permissions??

    • http://maketecheasier.com/ Damien Oh

      No. You don’t need to run it with root permission. You will need to configure the sdk properly. Failure to do so will make the ddms unusable.

  • Keeflookeem

    Now, (at least on my Galaxy S) you can take a screenshot using the phone itself by holding down the back button, then clicking the home button. No computer or extra software are needed.

  • http://www.deviceguru.com Deviceguru

    this works like a charm on the non-rooted galaxy tab 10.1 (with android 3.1) that I’m reviewing for deviceguru.com! although, it sure would be nice to be able to take screenshots directly on the device. but for my purposes this is just great. thanks!

Use left/right keys to browse stories.