Bug 2356537
| Summary: | Need udev rules for fastboot/adb to work as unpriv users. | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Maciej Żenczykowski <zenczykowski> |
| Component: | android-tools | Assignee: | Ivan Afonichev <ivan.afonichev> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 41 | CC: | 7d28c752, 8ru2u4gz, admiller, epel-packagers-sig, fedoraaccounts, go-sig, ivan.afonichev, jeroen, priv.luk |
| Target Milestone: | --- | Keywords: | Desktop |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | https://gitlab.com/CalyxOS/calyxos/-/issues/3055 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-05-10 07:52:19 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Maciej Żenczykowski
2025-04-01 11:05:26 UTC
Simplest fix might be to just add /usr/lib/udev/rules.d/60_adb.rules:
# Google Nexus/Pixel Device (fastboot or adb, Android Debug Bridge)
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee0", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee2", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee4", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee6", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee7", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee9", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4eec", TAG+="uaccess"
ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4eee", TAG+="uaccess"
to the package, but that's Google Pixel centric.
See also https://raw.githubusercontent.com/M0Rf30/android-udev-rules/refs/heads/main/51-android.rules
@van would it be ok to ship https://github.com/M0Rf30/android-udev-rules just like Debian and the like? I uploaded changes for that to https://src.fedoraproject.org/fork/luk1337/rpms/android-tools, additionally maybe it'd make sense to get rid of GROUP="adbusers" in 51-android.rules. A few comments: (a) I'm not a huge fan of the 'code style' of android-udev-rules, furthermore: - the 'adbusers' group is perhaps unneeded? or maybe useful for something? not sure - the symlinks it creates - is there a use for them? not aware of any, but not sure I don't think 'adb' or 'webusb' actually need either of those features... (b) it's not clear whether this should live in android-tools rpm package or elsewhere, it *is* a dependency of both adb/fastboot (which is in the package) but also and any WebUsb capable browsers (incl. Chrome from G, but also presumably Chromium & maybe others) when you visit a website like https://flash.android.com/ or https://install.calyxos.org/ because of this, possibly the udev rules should like in some more 'central' 'core' udev rule package, so that you wouldn't need to install android-tools to make things work in the browser... (c) I think webusb browser support on fedora likely suffers the same issue for webserial and webusb serial dongles... [though probably outside the scope of this bug??] (In reply to Maciej Żenczykowski from comment #3) > A few comments: > > (a) I'm not a huge fan of the 'code style' of android-udev-rules, > furthermore: > - the 'adbusers' group is perhaps unneeded? or maybe useful for something? > not sure > - the symlinks it creates - is there a use for them? not aware of any, but > not sure > I don't think 'adb' or 'webusb' actually need either of those features... > > (b) it's not clear whether this should live in android-tools rpm package or > elsewhere, it *is* a dependency of both adb/fastboot (which is in the > package) but also and any WebUsb capable browsers (incl. Chrome from G, but > also presumably Chromium & maybe others) when you visit a website like > https://flash.android.com/ or https://install.calyxos.org/ because of this, > possibly the udev rules should like in some more 'central' 'core' udev rule > package, so that you wouldn't need to install android-tools to make things > work in the browser... > > (c) I think webusb browser support on fedora likely suffers the same issue > for webserial and webusb serial dongles... [though probably outside the > scope of this bug??] In case we aren't supposed to deliver udev rules here, it'd likely make sense to do it here https://github.com/systemd/systemd/blob/main/rules.d/70-uaccess.rules.in and wait for next systemd release. (In reply to Łukasz Patron from comment #4) > (In reply to Maciej Żenczykowski from comment #3) > > A few comments: > > > > (a) I'm not a huge fan of the 'code style' of android-udev-rules, > > furthermore: > > - the 'adbusers' group is perhaps unneeded? or maybe useful for something? > > not sure > > - the symlinks it creates - is there a use for them? not aware of any, but > > not sure > > I don't think 'adb' or 'webusb' actually need either of those features... > > > > (b) it's not clear whether this should live in android-tools rpm package or > > elsewhere, it *is* a dependency of both adb/fastboot (which is in the > > package) but also and any WebUsb capable browsers (incl. Chrome from G, but > > also presumably Chromium & maybe others) when you visit a website like > > https://flash.android.com/ or https://install.calyxos.org/ because of this, > > possibly the udev rules should like in some more 'central' 'core' udev rule > > package, so that you wouldn't need to install android-tools to make things > > work in the browser... > > > > (c) I think webusb browser support on fedora likely suffers the same issue > > for webserial and webusb serial dongles... [though probably outside the > > scope of this bug??] > > In case we aren't supposed to deliver udev rules here, it'd likely make > sense to do it here > https://github.com/systemd/systemd/blob/main/rules.d/70-uaccess.rules.in and > wait for next systemd release. Also, it seems like there's an open issue for that https://github.com/systemd/systemd/issues/23468 (In reply to Łukasz Patron from comment #5) > (In reply to Łukasz Patron from comment #4) > > (In reply to Maciej Żenczykowski from comment #3) > > > A few comments: > > > > > > (a) I'm not a huge fan of the 'code style' of android-udev-rules, > > > furthermore: > > > - the 'adbusers' group is perhaps unneeded? or maybe useful for something? > > > not sure > > > - the symlinks it creates - is there a use for them? not aware of any, but > > > not sure > > > I don't think 'adb' or 'webusb' actually need either of those features... > > > > > > (b) it's not clear whether this should live in android-tools rpm package or > > > elsewhere, it *is* a dependency of both adb/fastboot (which is in the > > > package) but also and any WebUsb capable browsers (incl. Chrome from G, but > > > also presumably Chromium & maybe others) when you visit a website like > > > https://flash.android.com/ or https://install.calyxos.org/ because of this, > > > possibly the udev rules should like in some more 'central' 'core' udev rule > > > package, so that you wouldn't need to install android-tools to make things > > > work in the browser... > > > > > > (c) I think webusb browser support on fedora likely suffers the same issue > > > for webserial and webusb serial dongles... [though probably outside the > > > scope of this bug??] > > > > In case we aren't supposed to deliver udev rules here, it'd likely make > > sense to do it here > > https://github.com/systemd/systemd/blob/main/rules.d/70-uaccess.rules.in and > > wait for next systemd release. > > Also, it seems like there's an open issue for that > https://github.com/systemd/systemd/issues/23468 https://github.com/systemd/systemd/pull/36939 With https://src.fedoraproject.org/rpms/systemd/pull-request/205 merged, the fix will eventually reach rawhide and others. Could/should we cherrypick the fix into fedora? Oh, that is what you did. Cool! FEDORA-2025-47eaba5cb6 (systemd-257.5-6.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-47eaba5cb6 FEDORA-2025-47eaba5cb6 has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-47eaba5cb6` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-47eaba5cb6 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. *** Bug 1560662 has been marked as a duplicate of this bug. *** *** Bug 2298299 has been marked as a duplicate of this bug. *** FEDORA-2025-47eaba5cb6 (systemd-257.5-6.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report. |