安卓调试桥(ADB)的设备 - 无权限 [英] Android Debug Bridge (adb) device - no permissions

查看:191
本文介绍了安卓调试桥(ADB)的设备 - 无权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的Fedora Linux系统17.亚行连接的HTC野火A3333在调试模式下的一个问题说:

  ./ ADB设备
设备名单附后
????????????没有权限
 

我的udev规则(三星第一规则,对于HTC的作品就好二是没有):

<$p$p><$c$c>SUBSYSTEM==usb,SYSFS{idVendor}==04e8″,SYMLINK+=android_adb,MODE=0666″,GROUP="plugdev" SUBSYSTEM==usb,SYSFS{idVendor}==0bb4″,SYMLINK+=android_adb,MODE=0666″,GROUP="plugdev"

有关三星设备一切都还好:

  ./adb设备
设备名单附后
00198a9422618e设备
 

我一直在尝试所有的simmilar线程特定wthout任何侥幸的答案:使用HTC野火的Andr​​oid开发

解决方案

这是问题的原因,是因为有系统权限(感谢@ IsaacCisneros这一建议)。不知怎的,HTC野火(也许其他人)需要更多的东西,从该系统中除三星设备。简单的解决方案是运行Eclipse作为一个根本,但这不是很舒服的非sudo的Linux系统如Fedora。

我发现实现同一个目标,这似乎是更加用户友好的和较小的安全漏洞,然后运行整个IDE,具有超级用户权限的另一种方式。记住,这是仍然只是问题的一个解决办法。系统根目录的使用应minimalized只管理任务,而亚行的设计采用了普通的用户帐户工作,没有SUID。尽管这样的事实SUID的正确的设置是相当安全的,每一个的权限的增加是一个潜在的系统的安全漏洞。

亚行二进制的所有权1.设置(所有者 - 根,所有者组 - USER_GROUP):

CHOWN根:USER_GROUP亚行

与SUID 2.设置权限:

搭配chmod 4550亚行

这应该产生类似这样的东西(LS -llh):

-R-SR-X ---。 1根用户名1.2M 1月8日11:42亚行

之后,你就可以,虽然你会使用你的普通用户帐户来运行,亚行作为一个根,事件。您可以运行Eclipse作为一个普通用户,你的HTC应妥善发现。

  ./ ADB设备
设备名单附后
HT0BPPY15230设备
 

I have a problem connecting HTC Wildfire A3333 in debugging mode with my Fedora Linux 17. Adb says:

./adb devices
List of devices attached 
????????????    no permissions

my udev rules (first rule for Samsung which works just fine and second for HTC which is not):

SUBSYSTEM=="usb",SYSFS{idVendor}=="04e8″,SYMLINK+="android_adb",MODE="0666″,GROUP="plugdev" 
SUBSYSTEM=="usb",SYSFS{idVendor}=="0bb4″,SYMLINK+="android_adb",MODE="0666″,GROUP="plugdev"

For Samsung devices everything's okay:

 ./adb devices
List of devices attached 
00198a9422618e  device

I have been trying all of the answers given in a simmilar thread wthout any luck: Using HTC wildfire for android development

解决方案

The cause of that problem has to do with system permissions (thanks @ IsaacCisneros for this suggestion). Somehow HTC Wildfire (and maybe the others) need something more from the system than Samsung devices. Simple solution is to run Eclipse as a root, but this is not very comfortable with non-sudo Linux systems like Fedora.

I've found another way of achieving the same goal, which seems to be more user friendly and is lesser security hole then running entire IDE with super user privileges. Mind this is still only a workaround of the problem. System root usage should be minimalized only to administrative tasks, and "adb" was designed to work with normal user account without SUID. Despite of the fact that the proper setting of SUID is quite secure, every single permission increase is a potential system security hole.

1.Setting ownership of the adb binary (owner – root, owner group - user_group):

chown root:user_group adb

2.Setting permissions with SUID:

chmod 4550 adb

This should result something similar to this (ls -llh):

-r-sr-x---. 1 root user_name 1.2M Jan 8 11:42 adb

After that you will be able to run adb as a root, event though you'll be using your normal user account. You can run Eclipse as a normal user and your HTC should be discovered properly.

./adb devices 
List of devices attached 
HT0BPPY15230    device 

这篇关于安卓调试桥(ADB)的设备 - 无权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆