[2009-11-26 Update: My permissions problems talking to my real HTC Magic phone inexplicably returned after a couple of reboots. I had not changed a thing. Annoyed, I search again for possible solutions. I found these excellent docs, which included the section below. I already have the rules file, but these statements were different to those suggested elsewhere for Ubuntu and different to the single line I had been using. This part fixed my problem with not being able to talk to my phones, allowing me to access them via adb and / or fastboot provided I run the adb server and fastboot using sudo. DDMS is fine, provided adb server was started using sudo.
10d) In Ubuntu, create a new rules file for these vendor:device IDs.
Type this command to create the file.
$ sudo gedit /etc/udev/rules.d/51-android.rules
Add the following blue lines (rules) to it and save the file. If your lsusb command reports other, newer product IDs for vendor 0bb4, add them also to the file.
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c01", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c02", MODE="0666"If this helps anyone, please let me know in the comments.]
[2009-11-22 Update: I upgraded to Ubuntu 9.10 (Karmic Koala) again today. This time I did NOT remove the packages the upgrade notified as no longer supported. Last time, I had said OK to their removal. This time, everything works fine: adb and ddms can see my phone. Fastboot (run using sudo) is able to load and boot a temporary image. The key - for me - seems to have been to avoid letting the upgrade / update process remove the pre-existing policykit package.]
[2009-11-15 Update: I wiped the drive and reloaded Ubuntu 9.04. I installed the Java SDK, the Android SDK 2.0, ADT 0.94 and Eclipse 3.5. I followed all of my own advice, and that I had gleened from others....and ONLY after I had adjusted the permissions settings using polkit-gnome-authorizations was I finally able to access my phone again via ddms and adb. Given they (Ubuntu) appear to have removed this security configuration app (polkit-gnome-authorizations) from Ubuntu 9.10, I don't recommend upgrading to that unless you are handy with the back end of the permissions policy side of Gnome / polkit and can write your own API-compliant, policy files in XML from scratch. I'm not...and don't want to be. I'm trying to fry other fish.
But I got it going again....
(Original post resumes below) ]
Last night I had a bright idea and upgraded my Android SDK 2.0 system from Ubuntu 9.04 (Jaunty Jackelope) to 9.10 (Karmic Koala).
Everything went (almost) perfectly. The Eclipse 3.5 dev environment runs fine. I can create and run Android 2.0 emulators with no issues. But ddms (the Dalvik VM tool in Android SDK Tools) is no longer able to identify my real android cell phone. It sees the device, but doesn't pick up any information from it. Instead, I get a string of "???????" where the device ID should be.
I'm assuming it is a security / permissions issue post-Ubuntu upgrade....and hope to sort it out later. I'll update this post if I work it out.....or not.
Be warned that any such upgrade as the one above isn't likely to be seamless.
2009-11-04 - Update: This is definitely a permissions problem. Trying to list the device with adb gives:
List of devices attached ???????????? no permissions
Now...How to set the permissions? I've set up the policy files. They don't appear to be working. I've seem some bugs listed on Launchpad for Policykit. Not sure how to interpret what I'm reading.
This bug on Launchpad seems to explain things. They appear to have made some changes without regard to usabililty.
https://bugs.launchpad.net/ubuntu/+source/checkbox/+bug/435714
Trying to access the phone with ddms give me more permissions errors:
55:16 W/ddms: Unable to get frame buffer: device (????????????) request rejected: insufficient permissions for device
55:18 W/ddms: Unable to get frame buffer: device (????????????) request rejected: insufficient permissions for device
I have also tried running it as sudo:
steve@media:~/android-sdk-linux_x86-1.6_r1/tools$ sudo ./adb devices
List of devices attached
???????????? no permissions
No good.
Hi,
ReplyDeletehave you tried to start the adb server deamon as root ? This solves the permission problem for me.
Just use sudo to start the adb for the first time, right after you can work with adb and normal user rights.
Ziggo: I tried "sudo adb devices" and it told me the command wasn't found. I also tried using the complete path to the file and it still said it couldn't find it. It may be that the command is on the PATH for my user, but not for the whole system, so sudo can't see it. Thanks for the idea! I'll try it later. It would be good to have it working again without having to reload / re-install anything.
ReplyDeleteAs Ziggo said starting adb as root solves the problem:
ReplyDeleteadb kill-server
sudo adb start-server
adb devices
Thanks Ziggo!
Thanks. Problem solved here too.
ReplyDeleteI'm feeling lonely. This solution didn't work for me. I wiped the drive and went back to Ubuntu 9.04. I'll upgrade again later when the polkit-1 stuff is sorted out.
ReplyDeleteI am using Mint Linux 7, based on Ubuntu 9.04.
ReplyDelete$ cd /usr/lib/android/tools
$ sudo ./adb devices
Now lists my device correctly, where previously it was a string of question marks.
Wayne K, worked perfectly for me thanks when I started it up that way. Can run ddms or see in eclipse now. Thanks!
ReplyDeleteRemember to close eclipse if you're running it.
ReplyDeleteRunning as root can't possibly be the real solution to this problem!
ReplyDeleteSIM: You're right. It isn't necessary to run these as root. I've since learned how it should work and have added an update to this post at the top pointing to the solution.
ReplyDeleteYou need to be administrator and start the adb server.
ReplyDeleteTry following commands
$>sudo adb kill-server
$>service udev restart
$>suo adb devices
This should do the trick. Atleast this worked for me.
Here's what solved the permissions issue for me with Ubuntu 10.04 Lucid Lynx, a Motorola Droid
ReplyDelete1) Ensure USB debugging is enabled on the phone: Settings->Applications->Development->USB Debugging
2) Add the following line to /etc/udev/rules.d/ (I put it into a file I called "android.rules" in that directory): SUBSYSTEMS=="usb", ATTRS{idVendor}=="22b8", ATTRS{idProduct}=="41db", MODE="0666"
It looks like Motorola uses separate product ids for the USB debugging interface from the file system interface (or something like that.) The other Droid idProduct value is 41d9 but this solution worked for me when I used 41db.
GUYS I THINK U ARE MISSING ONE POINT U SHOULD SEE FIRST THAT ALL: WHAT VENDOR ID AND PRODUCT ID UR MOTOROLA CLIQ IT HAS, FOLLOW THE LINK ABOVE WHERE IT SAYS "HERE" THE LINK IS http://www.futuredesktop.org/developing_android_apps_on_ubuntu.html, AND LOOK FOR #10c IN LINUX U HAVE TO LOOK FOR THE PRODUCT & VENDOR IDS, I USE lsusb AND THE IDS WERE DIFFERENT THAN THE ONES IN THE POST IT WORKS FOR ME I HAVE UBUNTU 10.4 MOTOROLA CLIQ HOPE UNDERSTAND AND THIS HELPS
ReplyDelete