Android ADB driver needs root

Bug #1051938 reported by seanyseansean
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
android-tools (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Standard Ubuntu 12.10 build, latest patches.

I try to list the connected adb devices:

"adb devices"

... this is the result:

"???????????? no permissions in adb devices"

Killing the adb server and running as root lets it burst into life:

"adb kill-server
sudo adb start-server"

"List of devices attached
SH18TV8003XX device"

Does this package need udev rules to run the adb server as root?

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1051938/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
seanyseansean (seany)
affects: ubuntu → android-tools (Ubuntu)
Revision history for this message
seanyseansean (seany) wrote :

Apologies for the edits, I forgot that markup isn't allowed in the bug reports.

description: updated
Robert Roth (evfool)
Changed in android-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

I do not think that it is possible to create udev rules which would work for every Android device. That's why there was none of such in package.

Most common way is listing of VendorId:ProductId but with zillions of devices it would require weekly updates just to keep rules a bit more up to date.

Revision history for this message
seanyseansean (seany) wrote :

Thank you Marcin, that makes sense.

Isn't it still possible for the adb service to run privileged?

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

I do not want to give too much power to adb command. One option could be some simple udev rule for one/two devices which would work as kind of template for users to adapt it for their devices.

Revision history for this message
Rohan "HEXcube" Villoth (hexcube) wrote :

This bug is related to https://bugs.launchpad.net/ubuntu/+source/android-tools/+bug/1132523 filed under the same project. Both bugs are the result of a single problem and a solution would solve both of them. The problem is that the udev rule created by android-tools in /lib/udev/rules.d/51-android-rules.rules assigns GROUP="adbusers".This is a nonexistant group. I solved the bug by changing the GROUP="adbusers" entries to GROUP="plugdev". I'm attaching the fixed /lib/udev/rules.d/51-android-rules.rules file.

According to https://bugs.launchpad.net/ubuntu/+source/android-tools/+bug/1132523, an alternative would be to create a 'postinst' script in 'android-rules' package to run the command
groupadd -r adbusers
This is the ideal method,but i haven't tested it.

The latest rules 70-android-rules-adb.rules in Ubuntu 14.04 Trusty Tahr's development version of android-tools-adb contain entirely different rules. They seem to contain fixes for mtp,mass-storage mode when used with usb-debugging.

Revision history for this message
Rohan "HEXcube" Villoth (hexcube) wrote :

This bug's been fixed on newer Ubuntu releases. From ๐”๐›๐ฎ๐ง๐ญ๐ฎ ๐Ÿ๐Ÿ’.๐ŸŽ๐Ÿ’๐‹๐“๐’ "Trusty" and up adb works 'out of the box' on most devices. adb is made part of android-tools source package and is available from Ubuntu repos: https://launchpad.net/ubuntu/+source/android-tools . adb can be installed by the following command:

sudo apt-get install android-tools-adb

This package installs /lib/udev/rules.d/70-android-tools-adb.rules for udeb to recognise android devices in adb mode. So, there's no need to use root for devices to get recognised in adb anymore. Please consider closing this bug report as it's already been solved.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.