Skip to content

Instantly share code, notes, and snippets.

@chyuaner
Last active December 15, 2015 21:59
Show Gist options
  • Save chyuaner/5329565 to your computer and use it in GitHub Desktop.
Save chyuaner/5329565 to your computer and use it in GitHub Desktop.
# 參考資料:
# - http://archan.wordpress.com/2010/10/12/getting-adb-working-with-archlinuxsamsung-i5700cyanogen-cm6-froyo/
# - http://forum.xda-developers.com/showthread.php?t=1642230
sudo echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", GROUP=\"plugdev\"" > /etc/udev/rules.d/70-android.rules
sudo chmod a+rx /etc/udev/rules.d/70-android.rules
sudo echo "SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0cec\", MODE=\"0666\"\nSUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"0bb4\", ATTRS{idProduct}==\"0cec\"\nTEST==\"/var/run/ConsoleKit/database\", \\nRUN+=\"udev-acl --action=$env{ACTION} --device=$env{DEVNAME}\"" > /etc/udev/rules.d/99-android.rules
sudo chmod a+rx /etc/udev/rules.d/99-android.rules
adb kill-server
sudo udevadm control --reload-rules
echo "把手機的USB線拔掉再重新接上看看吧!!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment