Fix ADB permission issue on Ubuntu (Linux)

So this is apparently a pretty simple problem, but it was one that perplexed me for quite a while. Being an OSX native that recently converted to Ubuntu full-time, I was spoiled by the fact that a lot of the Android development tools just worked. However on Ubuntu, there was this strange issue that had to do with UDEV permissions.

no permission (verify udev rules)

The Google docs for this definitely explain the issue, but the fix was something that I couldn’t get to work right. After some diging I found a much more concise solution:

1

Start off by creating a file at /tmp/android.rules with the following contents:

3

If your phone is connected via USB, disconnect it and reconnect. Then run adb devices and see if you have permission.

** If you still don’t have permission, doblecheck your idVendor code by connecting your phone via USB and type lsusb and look for the 2, 4 digit codes separated by a colon. The one you are interested in is the first 4. Add that to the 51-android.rules file by adding a new line.