M0Rf30 / android-udev-rules

Android udev rules list aimed to be the most comprehensive on the net
GNU General Public License v3.0
1.18k stars 437 forks source link

OnePlus 6T - No sideload and fastboot permissions #298

Closed Daviteusz closed 11 months ago

Daviteusz commented 11 months ago
❯ adb devices
List of devices attached
1fXXXX9        no permissions; see [http://developer.android.com/tools/device.html]

❯ fastboot devices
no permissions; see [http://developer.android.com/tools/device.html]     fastboot

❯ kate /etc/udev/rules.d/51-android.rules
[ Adding udev rules for: 2a70:d001 and 18d1:d00d]

❯ cat /etc/udev/rules.d/51-android.rules
# adb sideload
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0660", GROUP="adbusers", TAG+="uaccess"
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", ATTR{idProduct}=="d001", SYMLINK+="android_adb"
# fastboot
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0660", GROUP="adbusers", TAG+="uaccess"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d00d", SYMLINK+="android_fastboot"

❯ sudo udevadm control --reload

❯ adb devices
List of devices attached
1fXXXX9        sideload

❯ fastboot devices
1fXXXX9         fastboot
❯ lsusb # sideload mode
Bus 002 Device 030: ID 2a70:d001 OnePlus Technology (Shenzhen) Co., Ltd. OnePlus A6013

❯ lsusb # fastboot mode
Bus 002 Device 038: ID 18d1:d00d Google Inc. Xiaomi Mi/Redmi 2 (fastboot)
M0Rf30 commented 11 months ago

Can you test the referenced commit? 18d1:d00d should be covered by line 241

Daviteusz commented 11 months ago

Looks like it works if I put whole rules to /etc/udev/rules.d/51-android.rules (without android-udev installed) If this file is only in /usr/lib/udev/rules.d/51-android.rules (android-udev installed), nothing changes, even after reboot 🤔

JoesCat commented 11 months ago

Looks like it works if I put whole rules to /etc/udev/rules.d/51-android.rules (without android-udev installed) If this file is only in /usr/lib/udev/rules.d/51-android.rules (android-udev installed), nothing changes, even after reboot 🤔

That is an interesting observation. There are a few distros that avoid systemd. Are you running systemd? Which distro are you using?

JoesCat commented 11 months ago

@Daviteusz - would you mind going through the various modes on your OnePlus to identify other values of interest? You could use this as an example: Issue #264 It would be great if we document some of the other modes, plus pass some values forwards to other projects like libmtp, etc.

Daviteusz commented 11 months ago

Looks like it works if I put whole rules to /etc/udev/rules.d/51-android.rules (without android-udev installed) If this file is only in /usr/lib/udev/rules.d/51-android.rules (android-udev installed), nothing changes, even after reboot 🤔

That is an interesting observation. There are a few distros that avoid systemd. Are you running systemd? Which distro are you using?

Sorry I should specify this in first message. I'm using systemd btw. that runs on Arch with KDE 🫠

@Daviteusz - would you mind going through the various modes on your OnePlus to identify other values of interest? You could use this as an example: Issue #264 It would be great if we document some of the other modes, plus pass some values forwards to other projects like libmtp, etc.

I tested your updated rules and they works with ADB, sideload, fastboot and fastbootd.

But I still not figured out why rules in lib does not work, but they work when are copied to etc. On Arch Wiki it's only specified that all I had to do was install the damn 😉 android-udev using pacman. Maybe I misread something.