I’ve got tired of seeing:
$ adb devicesList of devices attached ???????????? no permissions
So I had to dig a bit. Combining StackOverflow article and official docs I arrived at somewhat simple solution that avoids overly enthusiastic suggestion of making device “anybody-writable” and made things “just right” for myself (fixing old-school Udev rules sytax along the way):
- plug-in your device and using
lsusblocate attributes like iVendor and iProduct (I just went with iVendor…)
- add /etc/udev/rules.d/51-android.rules :
- restart udev:
udevadm control --reload-rules
End result: my any of my Nexus7 devices whenever attached will be owned by users group (which includes me and my family) with adb now properly responding:
$ adb devices List of devices attached 07bdc25b unauthorized
which only means I have tap OK on N7 upon connect to allow adb debugging from this PC.
Neat trick I’ve spotted is that you can poke some of the rules without re-plug via:
udevadm trigger --attr-match=vendor='Yoyodyne' --attr-match=model='Frobnicator 300'
Didn’t have to use it this time – but may come handy next time.