soulreaver soulreaver - 16 days ago 6
Android Question

Android Debug Bridge (adb) device - no permissions

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

Answer

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 
Comments