Build ubuntu11.10 Android Environment
1. Install Android SDK
Download the android SDK and select Linux (i386) (applicable to both 32-bit and 64-bit platforms)
Wget http://dl.google.com/android/android-sdk_r16-linux.tgz
Tar xvfz android-sdk_r16-linux.tgz
2. Add Environment Variables
Add the/opt/Android-SDK-Linux/tools directory and the/opt/Android-SDK-Linux/platform-tools directory to the PATH variable.
Gedit/etc/profile or VI ~ /. Bashrc or gedit ~ /. Bashrc
Export android_home =/opt/Android-SDK-Linux (replace with your SDK path)
Export Path = $ android_home/tools: $ android_home/platform-tools: $ path
$ Source ~ /. Bashrc
Execute the following command in the command line:
~ $ ADB kill-server (killing the ADB process)
$ Sudo ADB devices (restart ADB)
If the following error occurs: sudo: ADB: Command not found.
Solution:
~ $ Sudo-s # Switch to root through Sudo-S
~ $ Type ADB # Use Type ADB to check which command ADB uses
$ CD/usr/bin # enter the/usr/bin directory
~ $ Rm-rf adb (delete the original ADB)
~ $ Sudo ln-S/home/XXX/Android-SDK-Linux/platform-tools/ADB # sudo ln-s your ADB solution path
$ Type ADB # In this case, the command line displays ADB as/usr/bin/ADB