首先需安装jdk并配置环境变量
1、下载sdk for linux
http://developer.android.com/sdk/index.html
2、解压缩,并更新
cd ~/android-sdk-linux/tools
./andirod
3、配置环境变量
sudo gedit ~/.bashrc
#set path for android sdk tools
export PATH=$PATH:~/android-sdk-linux/tools/
export PATH=$PATH:~/android-sdk-linux/platform-tools/
4、保存后,同步更新
source ~/.bashrc
5、直接运行adb的话会显示
adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
没有权限
5、关闭adb服务,切换到root,重启adb服务,离开root
adb kill-server
sudo su
/home/m/android-sdk-linux/platform-tools/adb start-server
exit
现在即可使用adb了