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

If 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:

Add the following line to the end of the file:

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:

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.

28 comments

  1. 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!!!

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

  3. 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?

    • 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.

  4. 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?

    • 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…

  5. 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.

    • 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.

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

    • 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.

  7. 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.

  8. 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!

Comments are closed.

Sponsored Stories