Ubuntu下使用adb

1、配置环境变量
sudo vi ~/.bashrc

1 #set path for android sdk tools
2 export PATH=$PATH:~/android-sdk-linux/tools/
3 export PATH=$PATH:~/android-sdk-linux/platform/

2、保存后,同步更新
source ~/.bashrc
3、直接运行adb的话会显示

adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
???????????? no permissions

没有权限
4、关闭adb服务,切换到root,重启adb服务,离开root
adb kill-server
sudo /home/m/android-sdk-linux/platform/adb start-server
现在即可使用adb了(adb server需要以root的权限启动)

你可能感兴趣的:(android)