Ubuntu下安装adb和fastboot方法如下:
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
在命令终端输入:
lsusb
可查看当前手机的ID信息,示例如下:
Bus 003 Device 005: ID 18d1:d00d Google Inc.
sudo gedit /etc/udev/rules.d/70-persistent-net.rules
添加如下内容:
# adb and fastboot protocol
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0666", OWNER="<tom>"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0666", OWNER="<tom>"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0666", OWNER="<tom>"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d00d", MODE="0666", OWNER="<tom>"
cd /etc/udev/rules.d
sudo chmod a+x 70-persistent-net.rules
sudo udevadm control --reload-rules
或,
sudo service udev restart
参考资料:
http://blog.csdn.net/cokewei/article/details/8616003