wurong's Blog

Happy coding

Android Debug Bridge adb device

wurong posted @ 2015年5月03日 16:58 in 未分类 , 74 阅读

Android Debug Bridge adb device

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. wholesale nhl jerseys

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. /dev/bus/usb/001/115 (your bus number and device address will vary). This is sometimes linked and used from /dev/android_adb.

lsusb will help to find bus number and device address. one physical port ends up on one logical bus or another).

An lsusb line looks similar to this:

Bus 001 Device 115: ID 4321:fedc bla bla bla

lsusb v might help you to find the device if the "bla bla bla" is not hint enough (sometimes it does neither contain the manufacturer, nor the model of the phone). china cheap nhl jerseys

Once you know the device, check with your own eyes that ls a /dev/bus/usb/001/115 is really accessible for the user in question! Then check that it works with chmod and fix your udev setup.

PS1: /dev/android_adb can only point to one device, so make sure it does what you want. nhl jerseys china

PS2: Unrelated to this question, but less well known: adb has a fixed list of vendor ids it goes through. Not needed here, as you don't even get a "no permissions" if the vendor id is not known. cheap nhl jerseys

The device is unpermissioned until you accept the RSA encryption warning on the debugged device. At some point after connecting, the device will ask to accept the debugging connection. It's a minimal security protocol that ensures you can access the device beyond the initial swipe lock. Developer mode needs to be enabled, I believe.

The "no permissions" flag is actually a good first indicator that adb recognizes the device as a valid debugging target. Notice that it doesn't list your other USB devices. If you have devices from more than one manufacture, say like one from Samsung and one from HTC, then you need to have an entry(rule) for each vendor, not an entry for each device but for each different vendor you will use, so you need an entry for HTC and Samsung. It looks like you have your entry for Samsung now you need another. Use 'lsusb' like Robert Seimer suggests to find the idVendor and idProduct, they are usually some numbers and letters in this format XX:XX I think the first one is the idVendor and the second idProduct but your going to need to do this for each brand of phone/tablet you have.

4) maybe try adding "plugdev" group to your user with "usermod a G plugdev your_user", Try that at your own risk, though I don't thinks it anyriskier than launching a gui as root but I believe if necessary you should at least use "gksudo eclipse" instead.

I hope that helped clearify some things, the udev rules syntax is a bit of a mystery to me aswell, but from what I hear it can be different for different systems so try some things out, one ate a time, and note what change works.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter