{"id":33,"date":"2012-02-17T04:26:45","date_gmt":"2012-02-17T04:26:45","guid":{"rendered":"http:\/\/droidtutorials.net\/?p=33"},"modified":"2012-02-17T04:26:45","modified_gmt":"2012-02-17T04:26:45","slug":"fixing-adb-no-permissions-usb-error-in-ubuntu","status":"publish","type":"post","link":"http:\/\/www.zacherickson.com\/blog\/fixing-adb-no-permissions-usb-error-in-ubuntu\/","title":{"rendered":"Fixing adb &#8220;no permissions&#8221; usb error in Ubuntu"},"content":{"rendered":"<p>I am running a minimal Ubuntu 11.10 install&#8211;as you can see from other posts&#8211;inside a virtual box, strictly for development purposes.<\/p>\n<p>I am trying to use my old Droid 1 for dev because my virtual pc has almost no ram. I got adb to detect my Droid 1 but now I&#8217;m getting this error:<\/p>\n<pre>dev@DevVbox:~\/android-sdk-linux\/platform-tools$ .\/adb devices\nList of devices attached\n????????????   no permissions<\/pre>\n<p>Ok it looks like the problem is solved by creating a file in the <em>\/etc\/udev\/rules.d\/<\/em> folder. \u00a0developer.android.com recommends <em>51-android.rules<\/em> thus I will use that name.<\/p>\n<p>In a terminal type:<\/p>\n<pre><em>sudo gedit \/etc\/udev\/rules.d\/51-android.rules<\/em><\/pre>\n<p>Now you need to add your device definition to this file. \u00a0My file is looking like:<\/p>\n<pre>SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0bb4\", MODE=\"0666\", GROUP=\"plugdev\"\nSUBSYSTEM==\"usb\", ATTR{idVendor}==\"22b8\", MODE=\"0666\", GROUP=\"plugdev\"<\/pre>\n<p>For your own device change the ATTR{idVendor}==&#8221;Your Device Number&#8221; to the device you want to use. \u00a0Find your vendor id <a title=\"here\" href=\"http:\/\/developer.android.com\/guide\/developing\/device.html#VendorIds\" target=\"_blank\">here<\/a>.<\/p>\n<p>Now I make my file readable:<\/p>\n<pre>sudo chmod a+r \/etc\/udev\/rules.d\/51-android.rules<\/pre>\n<p>Next I restarted <em>udev<\/em>:<\/p>\n<pre><em>sudo service udev restart<\/em><\/pre>\n<p>Then I restarted adb:<\/p>\n<pre><em>dev@DevVBox:~\/android-sdk-linux\/platform-tools$ .\/adb kill-server\ndev@DevVBox:~\/android-sdk-linux\/platform-tools$ .\/adb start-server<\/em><\/pre>\n<p>Then I unplugged my phone and plugged it back in.  (On virtual box I had to tell it that I wanted my virtual pc to attach that device)<\/p>\n<p>presto now I get:<\/p>\n<pre>dev@DevVBox:~\/android-sdk-linux\/platform-tools$ .\/adb devices\nList of devices attached \n0403683B0A023017\tdevice\n<\/pre>\n<p>Other links:<\/p>\n<p><a href=\"http:\/\/developer.android.com\/guide\/developing\/device.html#VendorIds\">http:\/\/developer.android.com\/guide\/developing\/device.html#VendorIds<\/a>\u00a0 (start here)<\/p>\n<p><a href=\"http:\/\/www.reactivated.net\/writing_udev_rules.html\">http:\/\/www.reactivated.net\/writing_udev_rules.html<\/a><\/p>\n<p><a href=\"http:\/\/ubuntuforums.org\/showthread.php?t=168221\">http:\/\/ubuntuforums.org\/showthread.php?t=168221<\/a><\/p>\n<p><a href=\"http:\/\/ptspts.blogspot.com\/2011\/10\/how-to-fix-adb-no-permissions-error-on.html\">http:\/\/ptspts.blogspot.com\/2011\/10\/how-to-fix-adb-no-permissions-error-on.html<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am running a minimal Ubuntu 11.10 install&#8211;as you can see from other posts&#8211;inside a virtual box, strictly for development purposes. I am trying to use my old Droid 1 for dev because my virtual pc has almost no ram. &hellip; <a href=\"http:\/\/www.zacherickson.com\/blog\/fixing-adb-no-permissions-usb-error-in-ubuntu\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,5],"tags":[6,7,12,24,29,30],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-android-development","category-ubuntu-2","tag-adb","tag-android","tag-development","tag-minimal-install","tag-ubuntu","tag-usb"],"_links":{"self":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":0,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}