Bug 1509705

Summary: missing udev rules means out of the box adb and fastboot don't work
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: android-toolsAssignee: Ivan Afonichev <ivan.afonichev>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: 7d28c752, admiller, agk, ivan.afonichev, jeroen, xocowocuz
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 11:41:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Chris Murphy 2017-11-05 20:10:33 UTC
Description of problem:

Android tools works find on macOS but won't connect to the same phone on Fedora, without error message.



Version-Release number of selected component (if applicable):
android-tools-20170311gite7195be7725a-2.fc26.x86_64



How reproducible:
Always


Steps to Reproduce:
1. adb devices
2.
3.

Actual results:
Nothing listed.


Expected results:
Should list device.


Additional info:

So as it turns out we need udev rules and then udev needs to be restarted and then it'll work. This should be part of this package. I used this unmodified:

https://github.com/M0Rf30/android-udev-rules/blob/master/51-android.rules

Comment 2 rugk 2018-03-26 16:54:59 UTC
BTW this package already delivers some rules, but only in the docs at /usr/share/doc/android-tools/51-android.rules

Comment 3 Fedora End Of Life 2018-05-03 08:15:54 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. 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 '26'.

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 26 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 4 Elia Geretto 2018-05-06 08:57:57 UTC
This problem is still present in Fedora 27, I do not have the possibility to check on 28 for now.

The file 51-android.rules is still installed in "/usr/share/doc/android-tools/" while it should probably be installed in "/usr/lib/udev/rules.d/" instead. If there is a particular reason for not doing so, it should be made known here so that this report can be closed I think.

Comment 5 Fedora End Of Life 2018-05-29 11:41:53 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Ivan Afonichev 2018-08-28 22:58:28 UTC
Initially we were installing 51-android.rules to rules.d
But in #903074 it was stated to be insecure.
As in our 51-android.rules we match whole vendors


android-udev-rules seems to be separate project and I believe it should be separate fedora packet. Review requests are welcomed.

Comment 7 Elia Geretto 2018-08-31 17:06:17 UTC
I have read bug 903074, which was referenced in your previous comment. From what I understand, the method based on udev rules is not the intended way of using the package despite the fact that they are provided as an attachment to it. Please, correct me if I am wrong.

What remains not clear to me is how the package is supposed to be used since all the documentation I found online references udev rules. Through the systemd service? Can you please provide that information here, for those that stumble on the same issue?

Comment 8 Ivan Afonichev 2018-08-31 19:59:01 UTC
Actually most of devices works out of the box as they are MTP devices and should be RW for user to allow media transfer. So adb also works well with them.

I usually run fastboot with sudo.


If you don't have RW access to your device out of the box feel free to use udev rules. Or run adb server as root(you can use adb.service for it)

Comment 9 rugk 2018-08-31 20:07:00 UTC
Yeah, I also guess my original issue was only temporarily. At least it works without that file, right now.