红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Ubuntu

解决error: insufficient permissions for device问题

发布时间:2014-05-26 15:51:18来源:红联作者:velcbo
ubuntu下使用adb devices,结果no permissions,adb无法识别到,出现error: insufficient permissions for device,下面是解决方法:

su到root

su
cd Android-tools-dir
./adb kill-server
./adb start-server
./adb devices

也有人采用更改udev权限,增加/etc/udev/rules.d/50-android.rules

锟斤拷锟斤拷:
1.Plug-in your device then exec command ‘lsusb’ then you will see the list of current usb devices

Bus 003 Device 023: ID 18d1:d00d

We will see a device is appeared when it plug-in and disappeared when it plug-out. That device is we wanted and take my environment as an example it is located at line 1, “Bus 003 Device 023: ID 18d1:d00d”, without device provider.

2. Login as root and create this file: /etc/udev/rules.d/50-Android.rules

For Gusty/Hardy, edit the file to read:

SUBSYSTEM==”usb”, SYSFS(idVendor)==”18d1“, MODE=”0666″

For Dapper, edit the file to read:

SUBSYSTEM==”usb_device”, SYSFS(idVendor)==”18d1“, MODE=”0666″

P.S. the “18d1” is hard coded in android/kernel/drivers/usb/gadget/android_adb.c
#define DRIVER_VENDOR_ID

2. Nwx execute:

chmod a+rx /etc/udev/rules.d/50-android.rules

3. Restart udev to make the rule active.

sudo /etc/init.d/udev restart


SUBSYSTEM==”usb”, SYSFS(idVendor)==”18d1“, MODE=”0666″

更改执行权限:chmod a+rx /etc/udev/rules.d/50-android.rules

重启udev:sudo restart udev
文章评论

共有 0 条评论