Saturday, June 16, 2012

How to change the android rules in ubuntu through terminal in ubuntu?


The first thing to do is download android sdk from http://developer.android.com/sdk/index.html and extract it to wherever you want then log in as root and create a new plain text document in

/etc/udev/rules.d

and name it

51-android.rules

In the text document type:

SUBSYSTEM=="usb",SYSFS{idVendor}=="22b8",MODE="0666"

and save it to that directory.Then open Terminal and execute

chmod a+r /etc/udev/rules.d/51-android.rules

Restart the computer and go to the adb directory and execute

./adb devices

If the device ID shows instead of the question marks you should be ready to execute any adb commands.ENJOY!
(Dont forget to enable USB debugging on you're phone!)

I followed following step so that i can get writing permission in rules file,so first step login through root....


shailesh@shailesh-desktop:~$ sudo -i
root@shailesh-desktop:~# cd /
root@shailesh-desktop:/# cd etc/
root@shailesh-desktop:/etc# cd udev/
root@shailesh-desktop:/etc/udev# 
root@shailesh-desktop:/etc/udev# cd rules.d/
root@shailesh-desktop:/etc/udev/rules.d# chmod 777 51-android.rules

//No we can write and save after saving type the below command....

root@shailesh-desktop:/etc/udev/rules.d# chmod a+r 51-android.rules

No comments:

Post a Comment