With every Android Software Development Kit installation, there are several key steps. The following steps will describe my recommendations regarding installation of Android SDK under Linux, and they assume that you will be integrating Android into Eclipse. The last, and most unique step is to add the Android tools to your PATH. This will enable you to run adb and other android tools more easily from the command line. It also makes it easier to use those tools with privilege escalation, such as sudo.
Recommended Android SDK Steps
- Download the SDK from developer.android.com. Unarchive the tar.gz into /opt/ as /opt/android-sdk/.
- Install the Eclipse Tool (ADT) - Under Help in Eclipse, click on Install New Software. Add the following as a new site, and give it whatever name you wish: https://dl-ssl.google.com/android/eclipse/.
- Configure Eclipse with SDK - Under Window->Preferences->Android, enter the SDK location, or /opt/android-sdk/ and hit OK.
- Add Android Tools to your PATH - Under Ubuntu, one of the best ways to add something to your PATH is to edit your ~/.bash_profile file. The line in my profile looks as follows:
This file is applied any time a terminal is loaded. This will take the users existing PATH established by other system settings, and add the Android platform tools to it, and then export the variable to apply the change.
After the Android SDK is in your PATH
Because of the Linux permission system, adb often needs to be killed and restarted using root permissions so that your computer can access the USB device. I often pop open a terminal and kill and start the ADB service.
permalink