Thursday, March 14, 2013

Setting up an android Device for Development




INSTALL

1、Create  the file "51-android.rules" with text editor on ubuntu,like vi ,vim ,or gedit.

2、Add lines below to file
---------------------------------------- BEGIN ---------------------------------------------------------------


#Acer
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0660", OWNER="zana"


#ASUS
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0660", OWNER="zana"


#Dell
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0660", OWNER="zana"


#Foxconn
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0660", OWNER="zana"


#Fujitsu/Fujitsu Toshiba
SUBSYSTEM=="usb", ATTRS{idVendor}=="04c5", MODE="0660", OWNER="zana"


#Garmin-Asus
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0660", OWNER="zana"


#Google
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0660", OWNER="zana"


#Hisense
SUBSYSTEM=="usb", ATTRS{idVendor}=="109b", MODE="0660", OWNER="zana"

#HTC
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0660", OWNER="zana"

#Huawei
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0660", OWNER="zana"


#K-Touch
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0660", OWNER="zana"


#KT Tech
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0660", OWNER="zana"


#Kyocera
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0660", OWNER="zana"


#Lenovo
SUBSYSTEM=="usb", ATTRS{idVendor}=="2006", MODE="0660", OWNER="zana"


#LG
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0660", OWNER="zana"


#Motorola
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0660", OWNER="zana"


#NEC
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0660", OWNER="zana"


#Nook
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0660", OWNER="zana"


#Nvidia
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0660", OWNER="zana"


#OTGV
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0660", OWNER="zana"


#Pantech
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0660", OWNER="zana"


#Pegatron
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0660", OWNER="zana"


#Philips
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0660", OWNER="zana"


#PMC-Sierra
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0660", OWNER="zana"


#Qualcomm
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0660", OWNER="zana"


#SK Telesys
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0660", OWNER="zana"


#Samsung
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0660", OWNER="zana"


#Sharp
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0660", OWNER="zana"


#Sony
SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", MODE="0660", OWNER="zana"


#Sony Ericsson
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0660", OWNER="zana"


#Teleepoch
SUBSYSTEM=="usb", ATTRS{idVendor}=="2340", MODE="0660", OWNER="zana"


#Toshiba
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0660", OWNER="zana"


#ZTE
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0660", OWNER="zana"


---------------------------------------- END--------------------------------------------------------------------

2、Replace the name of the OWNER(eg.zana) with your username,which is used for logging into the Ubuntu System.Then,save it.

3、Copy the file "51-android.rules" to "/etc/udev/rules.d/51-android.rules".To Achieve it,You should be sure that you have the root permission.

4、Now open the console,and execute:
sudo chmod a+r /etc/udev/rules.d/51-android.rules

5、Then execute:
sudo service udev restart

6、When plugged in over USB, can verify that your device is connected by executing adb devices from your SDK platform-tools/ directory. If connected, you'll see the device name listed as a "device."









No comments:

Post a Comment