在Ubuntu下做android開發時運行adb devices命令,經常會出現如下結果。
List of devices attached
???????????? no permissions
網上很多人給出的辦法是用sudo提高adb的運行權限。即
sudo adb kill-server
adb devices
這也可以解決問題。但終歸不時一勞永逸的方法。其實可以修改adb程序的所有者和權限做到以后直接運行adb devices.
切換到adb程序的目錄,運行如下命令:
chown root:root ./adb
chmod 4777 ./adb
以后運行adb devices你就會發現,可以正確看到android設備了。
List of devices attached
02f9b7cf device
查找當前adb的路徑:which adb
轉自 https://blog.csdn.net/zxglive2006/article/details/8043166
親測有效