Bug 1560662 - Cannot connect to phone anymore: LIBUSB_ERROR_ACCESS
Summary: Cannot connect to phone anymore: LIBUSB_ERROR_ACCESS
Keywords:
Status: CLOSED DUPLICATE of bug 2356537
Alias: None
Product: Fedora
Classification: Fedora
Component: android-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ivan Afonichev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-26 16:50 UTC by rugk
Modified: 2025-05-09 06:10 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-09 06:10:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description rugk 2018-03-26 16:50:39 UTC
Description of problem: It cannot connect to my phone anymore due to missing access permissions as it seems. 


Version-Release number of selected component (if applicable):
$ adb --version
Android Debug Bridge version 1.0.39
Revision e7195be7725a


How reproducible: Always, I think. (only tested in one situation)


Steps to Reproduce:
1. Run "adb devices".

Actual results:
$ adb devices    
List of devices attached
* daemon not running. starting it now at tcp:5037 *
adb W 03-26 18:45:03 11224 11227 usb_libusb.cpp:286] failed to open usb device at usb:3:10: LIBUSB_ERROR_ACCESS
* daemon started successfully *


Expected results:
list devices


Additional info:
Maybe Bug 1509705 could help? Needs udev rules?

Comment 1 fednuc 2018-04-05 12:25:16 UTC
Try:

adb kill-server
sudo adb start-server
adb devices


The adb server has to be running as root. If it's not running when you run 'adb devices', it will be started as a normal user. Then, even if you run 'sudo adb devices', adb will connect to the existing server running as a normal user, so will fail.

You could also just run your first adb command as root, as long as the adb server isn't already running, since that would auto-start the server as root:

sudo adb devices # assuming the adb server is not running already
adb someother command

Yes, this is all really dumb. When the server starts, it should check it has necessary permissions somehow, or otherwise exit.

Comment 2 Christian Stadelmann 2018-08-30 09:17:10 UTC
How about starting the adb server as a systemd/dbus service as root on demand?

Comment 3 Ivan Afonichev 2018-08-30 13:34:25 UTC
Yes in shipped in docs as example 51-android.rules it do exactly this.
On device connect adb.service it started.

Comment 4 Christian Stadelmann 2018-08-30 15:12:11 UTC
(In reply to Ivan Afonichev from comment #3)
> Yes in shipped in docs as example 51-android.rules it do exactly this.
> On device connect adb.service it started.

How about installing that files to /etc/udev/rules.d/ by default in the %post section of RPM? Creating a symlink would be enough.

Comment 5 Ben Cotton 2018-11-27 14:43:47 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Ben Cotton 2019-02-19 17:12:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 30 development cycle.
Changing version to '30.

Comment 7 Łukasz Patron 2025-05-09 06:10:53 UTC
This has been addressed in a different bug report - https://bugzilla.redhat.com/show_bug.cgi?id=2356537

*** This bug has been marked as a duplicate of bug 2356537 ***


Note You need to log in before you can comment on or make changes to this bug.