m0rf30 / android-udev-rules Goto Github PK
View Code? Open in Web Editor NEWAndroid udev rules list aimed to be the most comprehensive on the net
License: GNU General Public License v3.0
Android udev rules list aimed to be the most comprehensive on the net
License: GNU General Public License v3.0
As titled. The rules are too broad and catch my
0b05:17cb ASUSTek Computer, Inc. Broadcom BCM20702A0 Bluetooth
dongle:
ls -l /dev/bus/usb/006/
total 0
crw-rw-r-- 1 root root 189, 640 Jan 20 19:19 001
crw-rw----+ 1 root adbusers 189, 641 Jan 20 19:19 002
crw-rw-r-- 1 root root 189, 643 Jan 20 19:19 004
No harm being done as far as I can tell, but I thought you'd like to know.
My Neo V with CM11 is running in MTP-mode, but detected as HID device with Kernel 3.18.2 and android-udev r124-1.
[ 373.598520] usb 2-5: new high-speed USB device number 2 using ehci-pci
[ 373.726593] input: Sony Ericsson MT11i as /devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.1/0003:0FCE:0156.0008/input/input16
[ 373.727011] hid-generic 0003:0FCE:0156.0008: input,hidraw0: USB HID v1.01 Keyboard [Sony Ericsson MT11i] on usb-0000:00:13.2-5/input1
[ 373.729265] input: Sony Ericsson MT11i as /devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5:1.2/0003:0FCE:0156.0009/input/input17
[ 373.729492] hid-generic 0003:0FCE:0156.0009: input,hidraw1: USB HID v1.01 Mouse [Sony Ericsson MT11i] on usb-0000:00:13.2-5/input2
Commit: 65421ca (and also some previous)
After every boot of Ubuntu 17.04 I have to run sudo service udev reload
, otherwise my Nexus 5X is not recognized. Other phones are ok.
adb devices
List of devices attached
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
00f563b073ba1176 no permissions (verify udev rules); see [http://developer.android.com/tools/device.html]
sudo service udev reload
//also reconnects phone
adb devices
00f563b073ba1176 device
Hi, I'm trying to connect to an nvidia tv shield via fastboot but each time I change to the boot loader mode, I lose my usb connection to the device. I've included the log from lsusb for my device in fastboot below:
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0955 NVidia Corp.
idProduct 0xb442
bcdDevice 1.00
iManufacturer 1 NVIDIA Corp.
iProduct 2 Fastboot
iSerial 3 0321618049675
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xc0
Self Powered
MaxPower 32mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 66
bInterfaceProtocol 3
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
I have a one-line change I'd like to add to 51-android.rules
, but for such a small change I don't know if it is necessary to fork the entire project and submit a pull request.
For ATTR{idVendor}!="0bb4"
(HTC) the device id 0f87
belongs to the HTC Sensation. I would like to add this comment before line 158 in 51-android.rules
:
# Sensation
ATTR{idProduct}=="0f87", SYMLINK+="android_adb"
M0Rf30, could you do this for me, or should I just fork and submit a pull request?
Thanks,
Jun
It looks like this new device is not recognized by the current udev rules.
I grabbed some lsusb
info for you, in normal mode & then in download mode:
Bus 001 Device 009: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
Bus 001 Device 008: ID 04e8:685d Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II] (Download mode)
Is this the information you need? If not, let me know how I can help :)
Bus 001 Device 071: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)
I noticed there are some rules for it, but it doesn't work.
Using siplified version from ubuntu
directory works.
new device : Device 067: ID 18d1:4ee7 Google Inc. rob adbusers
so i used git to merge upstream
followed README directions
on restart of adb server , it shows no devices attached
ENV :
android-udev-rules$ which adb
/usr/bin/adb
android-udev-rules$ adb version
Android Debug Bridge version 1.0.32
android-udev-rules$ ls -l /etc/udev/rules.d
total 0
lrwxrwxrwx 1 root root 49 Apr 12 2017 51-android.rules -> /home/rob/src/android-udev-rules/51-android.rules
user=rob
groups
rob adm cdrom sudo dip plugdev lpadmin sambashare adbusers
ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0cab"
After upgrading my OnePlus 3 to Oreo, the lsusb
command returns 2a70:4ee7
, so I don't have permission to use it. I manually created /etc/udev/rules.d/51-android.rules
:
SUBSYSTEM=="usb",ATTR{idVendor}=="2a70", MODE="0660", GROUP="adbusers"
SUBSYSTEM=="usb",ATTR{idVendor}=="2a70",ATTR{idProduct}=="4ee7",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="2a70",ATTR{idProduct}=="4ee7",SYMLINK+="android_fastboot"
Then I ran sudo udevadm control --reload-rules
as mentioned in the Wiki.
This solved the problem, but I believe it needs more action, though I'm not sure yet what. This Oreo update is pulled back by OnePlus, this is not accessible anymore. I also started a thread about it on their forums, so we can find out if it is intentional, or my device is in a broken state regarding these IDs.
Version 20181026 introduced the 'plugdev' error.
journalctl -p 3 -xb
Oct 29 19:31:42 Jammin1 systemd-udevd[329]: Specified group 'plugdev' unknown
grep -r plugdev /{etc,lib}/udev/rules.d
/lib/udev/rules.d/51-android.rules:ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":ff420?:", MODE="0666", GROUP="plugdev", SYMLINK+="android/$env{ID_SERIAL_SHORT}"
"plugdev" is not an existing group in Arch or Manjaro
I want to add the tablet above but I don't know how. Here I have the output of "lsusb -v". :-)
Bus 002 Device 010: ID 0502:3604 Acer, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0502 Acer, Inc.
idProduct 0x3604
bcdDevice 2.24
iManufacturer 2 Android
iProduct 3 Android
iSerial 4 CLV60FF700A
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 67
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 0
iInterface 5 MTP
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x001c 1x 28 bytes
bInterval 6
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 66
bInterfaceProtocol 1
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Zenfone 5 adb is OK, but with fastboot, udev will get it by identify: "ASUSTek Computer, Inc. Transformer Pad Infinity TF700 (Fastboot)". I can't fastboot it.
(Same problem of DynamoTN)
It's result of lsusb -v:
Bus 002 Device 046: ID 0b05:4daf ASUSTek Computer, Inc. Transformer Pad Infinity TF700 (Fastboot)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0b05 ASUSTek Computer, Inc.
idProduct 0x4daf Transformer Pad Infinity TF700 (Fastboot)
bcdDevice ff.ff
iManufacturer 2 Android
iProduct 3 Android-Phone
iSerial 4 0123456789ABCDEF
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 37
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 66
bInterfaceProtocol 3
iInterface 5 FASTBOOT Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Just asking, https://developer.android.com/studio/run/device#setting-up describes a more simple answer.
hi;
I just noticed something rather contradictory.
If you want to use an adbusers group for all devices then the mode for the device must be 0660 and not 0666, which means world-readable and writable.
Because any user that is not part of adbusers could still read and write the android_adb device. so the group is useless
So:
Either use 0666 as mode but remove the adbusers group that serve here no purpose as device is read-write for every one
Either use 0660 and keep using the adbusers group
Not Canadian, just sorry for the useless issue.
This is fantastic. Worked a treat. I've bookmarked this repo for future use.
Thank you for taking the time to put this together.
I have a HTC One X (endeavoru), and until now adb always worked fine. But after commit 704f83d I just get:
adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: no devices/emulators found
When commenting out the lines https://github.com/M0Rf30/android-udev-rules/blob/master/51-android.rules#L8-L11 I get * daemon started successfully
.
I have a Dell XPS 13 9350, which has built-in Broadcom Wi-Fi on the USB bus:
Bus 001 Device 002: ID 0a5c:6412 Broadcom Corp. BCM2045A0
This is incorrectly matched by the following line in the rules:
# ADVANCE
ATTR{idVendor}=="0a5c", ENV{adb_user}="yes"
Giving unprivileged users direct access to a network device could be a significant security issue, were the real driver to be unbound somehow. I suggest you remove this line unless you can make it sufficiently specific so as not to match any Broadcom Wi-Fi cards.
Hi,
I installed your repository hours ago. My problem is that the system freeze for 15~20 secs while i connect phone to laptop for debugging an app.
I'm using Fedora 25 on my laptop and my phone is Huawei P9 Lite running EMUI 5.0.
Any kind of help will be appreciated.
sorry for my bad English
Regards
Zenfone 5 adb is OK, but with fastboot, udev will get it by identify: "ASUSTek Computer, Inc. Transformer Pad Infinity TF700 (Fastboot)". I can't fastboot it.
Instead of trying to match all those different devices by different vendors do what adb does itself: look for the interface IDs (class/subclass/protocol), which in case of adb always will be 0xFF4201, and in case of fastboot will be 0xFF4203.
So all those rules can be replaced by a single line:
http://ktnr74.blogspot.com/2014/09/the-most-comprehensive-write-up-on-how.html
Also Google has removed the vendor ID whitelist a few years back, so adb_usb.ini is no longer used - you can remove the README footnote.
I had to uninstall the udev rules because they hid my usb printer from CUPS.
Printer's USB ID is "0482:0015 Kyocera Corp. FS-1030D printer", other printers made by Kyocera are probably affected too.
While trying to unlock device:
~$ fastboot devices
Device appears ok (restarted previsouly in fastboot in cli)
BH90_____ fastboot
if i then send unlock code:
fastboot oem unlock 0x<C73DA0________>
I get this scripting error: -perdon my french-
bash: erreur de syntaxe près du symbole inattendu « newline »
Edit: I'm running Linux Mint 20 Ulyana (base: Ubuntu 20.04 focal) on a MacBookPro9,2 laptop...
This is on Fedora 27 with systemd-234-9.fc27.x86_64 / systemd-udev-234-9.fc27.x86_64. It was previously working with Fedora 26 / systemd-233.
It looks like it doesn't like the trailing % at the end of line 389, but I'm not sure what the plugdev complaint is all about.
Nov 12 14:49:39 f27s.localdomain sudo[8071]: chris : TTY=pts/0 ; PWD=/home/chris ; USER=root ; COMMAND=/bin/systemctl restart systemd-udevd
Nov 12 14:49:39 f27s.localdomain audit[8071]: USER_CMD pid=8071 uid=1000 auid=1000 ses=162 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/chris" cmd=73797374656D63746C20726573746172742073797374656D642D7564657664 terminal=pts/0 res=success'
Nov 12 14:49:39 f27s.localdomain audit[8071]: CRED_REFR pid=8071 uid=0 auid=1000 ses=162 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Nov 12 14:49:39 f27s.localdomain sudo[8071]: pam_systemd(sudo:session): Cannot create session: Already running in a session
Nov 12 14:49:39 f27s.localdomain audit[8071]: USER_START pid=8071 uid=0 auid=1000 ses=162 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Nov 12 14:49:39 f27s.localdomain sudo[8071]: pam_unix(sudo:session): session opened for user root by chris(uid=0)
Nov 12 14:49:39 f27s.localdomain systemd[1]: Stopping udev Kernel Device Manager...
Nov 12 14:49:39 f27s.localdomain systemd[1]: Stopped udev Kernel Device Manager.
Nov 12 14:49:39 f27s.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-udevd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 12 14:49:39 f27s.localdomain systemd[1]: Starting udev Kernel Device Manager...
Nov 12 14:49:39 f27s.localdomain audit[727]: USER_AVC pid=727 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc: denied { send_msg } for msgtype=error error_name=org.freedesktop.systemd1.NoSuchDynamicUser dest=:1.398 spid=1 tpid=8074 scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:udev_t:s0-s0:c0.c1023 tclass=dbus permissive=0
exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
Nov 12 14:50:00 f27s.localdomain systemd[1]: Starting system activity accounting tool...
Nov 12 14:50:00 f27s.localdomain systemd[1]: Started system activity accounting tool.
Nov 12 14:50:00 f27s.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=sysstat-collect comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 12 14:50:00 f27s.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=sysstat-collect comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Nov 12 14:50:04 f27s.localdomain systemd-udevd[8074]: Error resolving group 'plugdev': Connection timed out
Nov 12 14:50:04 f27s.localdomain systemd-udevd[8074]: invalid key/value pair in file /etc/udev/rules.d/51-android.rules on line 389, starting at character 118 ('%')
Nov 12 14:50:04 f27s.localdomain systemd[1]: Started udev Kernel Device Manager.
This all started because I could not get my LG G2(rogers) android phone to appear in thunar when I plugged it in. The phone was in MTP mode. Kernel is x86_64 Linux 4.1.5-1-ARCH, running XFCE 4.12.
libmtp, gvfs-mtp, and android-udev were installed. I later tried installing android-udev-git from the AUR and still had no joy. At that point I went to terminal and typed mtp-detect, then mtp-connect and found out my phone had these identifiers (VID=1004 and PID=631c).
I went to /usr/lib/udev/rules.d/51-android.rules and saw that although my phone was listed, the info didn't match up, likely due to different variants of a phone being released in different locations.
Under the LG header, I found this
ATTR{idProduct}=="618e", SYMLINK+="android_adb"
# G2 D803
So I added a line underneath with the edited PID found above, and changed the product identifier below so I'd know it apart from the original.
ATTR{idProduct}=="618c", SYMLINK+="android_adb"
# G2 D803 rogers
I saved the file, disconnected my phone, rebooted, reconnected the phone and it all worked!
android-udev is the community based file. I had not edited any file with this. This fix was only done with android-udev-git from the AUR and is working. I will be testing this on a NOTE2 when my spouse gets home.
Bus 002 Device 007: ID 0fce:6195 Sony Ericsson Mobile Communications AB
The device ID 04e8:3252 Samsung Electronics Co., Ltd
is a printer. The udev rules identify it as an android dev, though.
20190315
Reading rules file: /usr/lib/udev/rules.d/51-android.rules
/usr/lib/udev/rules.d/51-android.rules:73 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:210 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:221 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:303 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:351 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:353 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:355 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:514 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:517 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:520 The line takes no effect, ignoring.
/usr/lib/udev/rules.d/51-android.rules:523 The line takes no effect, ignoring.
ATTR{idProduct}=="7030"
ATTR{idProduct}=="0c93"
ATTR{idProduct}=="0c01"
ATTR{idProduct}=="618f"
ATTR{idProduct}=="2d66"
ATTR{idProduct}=="428c"
ATTR{idProduct}=="41db"
ATTR{idProduct}=="3137"
ATTR{idProduct}=="3138"
ATTR{idProduct}=="3149"
ATTR{idProduct}=="e14f"
are the lines in question, my guess is a , missing above
I have a bacon phone and a Fedora 25 laptop. I think I did what was required but I still need sudo
to list devices:
10:21:44 [:~] $
> head /etc/udev/rules.d/51-android.rules
# These rules refer: https://developer.android.com/studio/run/device.html
# and include many suggestions from Arch Linux, GitHub and other Communities.
# Latest version can be found at: https://github.com/M0Rf30/android-udev-rules
# Skip this section below if this device is not connected by USB
SUBSYSTEM!="usb", GOTO="android_usb_rules_end"
LABEL="android_usb_rules_begin"
# Devices listed here in android_usb_rules_{begin...end} are connected by USB
# Acer
10:24:06 [:~] $
> ls -l /etc/udev/rules.d/51-android.rules
lrwxrwxrwx. 1 root root 67 21 mars 10:16 /etc/udev/rules.d/51-android.rules -> /home/cassou/Documents/projects/android-udev-rules/51-android.rules
10:23:08 [:~] $
> id
uid=1000(cassou) gid=1000(cassou) groups=1000(cassou),10(wheel),978(wireshark),979(vboxusers),1001(docker),1002(adbusers) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
I rebooted my laptop but still:
10:21:44 [:~] $
> fastboot devices
no permissions; see [http://developer.android.com/tools/device.html] fastboot
10:19:48 [:~] $
> sudo fastboot devices
5d5015ff fastboot
Does this project include PIDs for devices in recovery mode (when they differ)?
I ask because adb does not recognize my Nexus 5 in recovery mode. 18D1:D001
Hi M0Rf30~
I recently submitted a pull request adding a comment line for ATTR{idProduct}=="6860"
(Samsung Galaxy S3 SHW-M440S 3G for Korea). Just below this line, however, are another
two lines with the same ATTR. I think it is an old placeholder. Also, i9300 S3 is already listed
under ATTR 6601
a few lines above. Are the two lines below OK to delete?
# Galaxy Core, Tab 10.1, i9100 S2, i9300 S3, N5100 Note (8.0)
ATTR{idProduct}=="6860"
Thanks,
-Jun
Not a huge issue, but rather odd and I'm not sure why this is happening.
I followed the instructions in the README on Lubuntu 18.04 minimal install.
After reboot it seems my phone is added to the 'audio' group.
> lsusb
Bus 001 Device 006: ID 1bbb:0167 T & A Mobile Phones
> ls /dev/bus/usb/001/006 -la
crw-rw----+ 1 root audio 189, 5 Aug 5 18:40 /dev/bus/usb/001/006
If anyone else has this same issue, adding your user to the 'audio' group allows adb to see the phone:
> adb devices
List of devices attached
> sudo usermod -a -G audio (username)
Make sure you put your own username in, $(whoami) may not work due to sudo.
Now exit from session, log out and in, new session:
> adb devices
List of devices attached
0123456789ABCDEF device
I'm not sure how my phone ended up in the audio group, it could be a bug with Ubuntu, but it works now.
With the rules "as is" I can not use my HTC One S.
The idProduct 0ff9 is the said mobile, as you can see here (from lsusb):
ID 0bb4:0ff9 HTC (High Tech Computer Corp.) Desire / Desire HD / Hero / Thunderbolt (Charge Mode)
After making these changes, I can use adb on the phone again (as it now properly gets recognized).
dvzrv@f23cead
new device missing: Xiaomi Redmi 7
$ lsusb
[...]
Bus 002 Device 008: ID 2717:ff40 Xiaomi Inc. Mi/Redmi series (MTP)
[...]
$ lsusb.py
[...]
2-2.2 2717:ff40 00 2.00 480MBit/s 500mA 1IF (Xiaomi SDM632-MTP _SN:485F4EC7 2f9c9b4e)
[...]
This is a great little project? What is the license that this file is under? Something like CC0 or BSD would be best, IMHO.
These devices are not android devices
$ lsusb
...
Bus 001 Device 005: ID 8087:07dc Intel Corp.
Bus 001 Device 008: ID 413c:2107 Dell Computer Corp.
...
Similar to #72.
I think it would be better to have more specific rules for known product ids than to include all of these Dell and Intel non-android products.
sudo ln -s pwd
/51-android.rules /etc/udev/rules.d/
works. If you do the relative path, the softlink is dangling.
zte blade s is also known as zte crescent or zte orange san francisco 2
idVendor:19d2 idProduct:1355 (without usb debug)
idVendor:19d2 idProduct:1354 (with usb debug)
I'm using Archlinux, here is the udev debug log:
usb 1-4.1: new high-speed USB device number 18 using xhci_hcd
1-4.1: Device (SEQNUM=3193, ACTION=add) is queued
usb 1-4.1: New USB device found, idVendor=2a70, idProduct=4ee7, bcdDevice= 4.09
usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-4.1: Product: OnePlus
usb 1-4.1: Manufacturer: OnePlus
usb 1-4.1: SerialNumber: 4e51be36
Validate module index
Check if link configuration needs reloading.
Successfully forked off 'n/a' as PID 15411.
1-4.1: Worker [15411] is forked for processing SEQNUM=3193.
1-4.1: Processing device (SEQNUM=3193, ACTION=add)
1-4.1: IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/40-gphoto.rules:9
1-4.1:1.0: Device (SEQNUM=3194, ACTION=add) is queued
1-4.1: Device (SEQNUM=3195, ACTION=bind) is queued
1-4.1: IMPORT builtin skip 'usb_id' /usr/lib/udev/rules.d/50-udev-default.rules:13
1-4.1: IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:13
1-4.1: No entry found from hwdb.
1-4.1: IMPORT builtin 'hwdb' fails: No data available
1-4.1: MODE 0664 /usr/lib/udev/rules.d/50-udev-default.rules:45
1-4.1: ATTR '/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1/power/control' writing 'on' /etc/udev/rules.d/50-usb_power_save.rules:2
1-4.1: GROUP 993 /usr/lib/udev/rules.d/51-android.rules:10
1-4.1: MODE 0660 /usr/lib/udev/rules.d/51-android.rules:10
1-4.1: LINK 'android/4e51be36' /usr/lib/udev/rules.d/51-android.rules:10
1-4.1: LINK 'android_adb' /usr/lib/udev/rules.d/51-android.rules:407
1-4.1: GROUP 993 /usr/lib/udev/rules.d/51-android.rules:662
1-4.1: MODE 0660 /usr/lib/udev/rules.d/51-android.rules:662
1-4.1: LINK 'android' /usr/lib/udev/rules.d/51-android.rules:662
1-4.1: RUN '/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers' /usr/lib/udev/rules.d/60-vboxdrv.rules:6
1-4.1: PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18' /usr/lib/udev/rules.d/69-libmtp.rules:2537
Starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18'
Successfully forked off '(spawn)' as PID 15412.
checking bus 1, device 18: "/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1"
bus: 1, device: 18 was not an MTP device
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18'(out) '0'
Process '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18' succeeded.
1-4.1: IMPORT builtin 'path_id' /usr/lib/udev/rules.d/71-seat.rules:58
1-4.1: RUN 'uaccess' /usr/lib/udev/rules.d/73-seat-late.rules:17
1-4.1: Handling device node '/dev/bus/usb/001/018', devnum=c189:17, mode=0660, uid=0, gid=993
1-4.1: Setting permissions /dev/bus/usb/001/018, 020660, uid=0, gid=993
1-4.1: Creating symlink '/dev/char/189:17' to '../bus/usb/001/018'
1-4.1: Creating symlink '/dev/android/4e51be36' to '../bus/usb/001/018'
1-4.1: Creating symlink '/dev/android_adb' to 'bus/usb/001/018'
1-4.1: Atomically replace '/dev/android'
1-4.1: Failed to rename '/dev/android.tmp-c189:17' to '/dev/android' failed: Is a directory
1-4.1: sd-device: Created db file '/run/udev/data/c189:17' for '/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1'
Starting '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 17 00 vboxusers'
Successfully forked off '(spawn)' as PID 15413.
Process '/usr/share/virtualbox/VBoxCreateUSBNode.sh 189 17 00 vboxusers' succeeded.
1-4.1: Device (SEQNUM=3193, ACTION=add) processed
1-4.1: sd-device-monitor: Passed 746 byte to netlink monitor
1-4.1:1.0: sd-device-monitor: Passed 317 byte to netlink monitor
1-4.1:1.0: Processing device (SEQNUM=3194, ACTION=add)
1-4.1:1.0: IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/40-gphoto.rules:9
1-4.1:1.0: Failed to access usb_interface: No such file or directory
1-4.1:1.0: IMPORT builtin 'usb_id' fails: No such file or directory
1-4.1:1.0: IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:14
1-4.1:1.0: No entry found from hwdb.
1-4.1:1.0: IMPORT builtin 'hwdb' fails: No data available
1-4.1:1.0: RUN 'kmod load $env{MODALIAS}' /usr/lib/udev/rules.d/80-drivers.rules:5
1-4.1:1.0: sd-device: Created db file '/run/udev/data/+usb:1-4.1:1.0' for '/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1/1-4.1:1.0'
Loading module: usb:v2A70p4EE7d0409dc00dsc00dp00icFFisc42ip01in00
Failed to find module 'usb:v2A70p4EE7d0409dc00dsc00dp00icFFisc42ip01in00'
1-4.1:1.0: Device (SEQNUM=3194, ACTION=add) processed
1-4.1:1.0: sd-device-monitor: Passed 330 byte to netlink monitor
1-4.1: sd-device-monitor: Passed 308 byte to netlink monitor
1-4.1: Processing device (SEQNUM=3195, ACTION=bind)
1-4.1: IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/40-gphoto.rules:9
1-4.1: IMPORT builtin skip 'usb_id' /usr/lib/udev/rules.d/50-udev-default.rules:13
1-4.1: IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:13
1-4.1: No entry found from hwdb.
1-4.1: IMPORT builtin 'hwdb' fails: No data available
1-4.1: LINK 'android_adb' /usr/lib/udev/rules.d/51-android.rules:407
1-4.1: GROUP 993 /usr/lib/udev/rules.d/51-android.rules:662
1-4.1: MODE 0660 /usr/lib/udev/rules.d/51-android.rules:662
1-4.1: LINK 'android' /usr/lib/udev/rules.d/51-android.rules:662
1-4.1: PROGRAM '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18' /usr/lib/udev/rules.d/69-libmtp.rules:2537
Starting '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18'
Successfully forked off '(spawn)' as PID 15426.
checking bus 1, device 18: "/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1"
bus: 1, device: 18 was not an MTP device
'/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18'(out) '0'
Process '/usr/lib/udev/mtp-probe /sys/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1 1 18' succeeded.
1-4.1: IMPORT builtin 'path_id' /usr/lib/udev/rules.d/71-seat.rules:58
1-4.1: RUN 'uaccess' /usr/lib/udev/rules.d/73-seat-late.rules:17
1-4.1: Updating old name, '/dev/android/4e51be36' no longer belonging to '/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1'
1-4.1: No reference left, removing '/dev/android/4e51be36'
1-4.1: Handling device node '/dev/bus/usb/001/018', devnum=c189:17, mode=0660, uid=0, gid=993
1-4.1: Preserve permissions of /dev/bus/usb/001/018, 020660, uid=0, gid=993
1-4.1: Preserve already existing symlink '/dev/char/189:17' to '../bus/usb/001/018'
1-4.1: Found 'c189:17' claiming '/run/udev/links/\x2fandroid_adb'
1-4.1: Preserve already existing symlink '/dev/android_adb' to 'bus/usb/001/018'
1-4.1: Found 'c189:17' claiming '/run/udev/links/\x2fandroid'
1-4.1: Creating symlink '/dev/android' to 'bus/usb/001/018'
1-4.1: sd-device: Created db file '/run/udev/data/c189:17' for '/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1'
1-4.1: Device (SEQNUM=3195, ACTION=bind) processed
1-4.1: sd-device-monitor: Passed 725 byte to netlink monitor
1-4.1:1.0: Device (SEQNUM=3196, ACTION=bind) is queued
1-4.1:1.0: sd-device-monitor: Passed 331 byte to netlink monitor
1-4.1:1.0: Processing device (SEQNUM=3196, ACTION=bind)
1-4.1:1.0: IMPORT builtin 'usb_id' /usr/lib/udev/rules.d/40-gphoto.rules:9
1-4.1:1.0: Failed to access usb_interface: No such file or directory
1-4.1:1.0: IMPORT builtin 'usb_id' fails: No such file or directory
1-4.1:1.0: IMPORT builtin 'hwdb' /usr/lib/udev/rules.d/50-udev-default.rules:14
1-4.1:1.0: No entry found from hwdb.
1-4.1:1.0: IMPORT builtin 'hwdb' fails: No data available
1-4.1:1.0: sd-device: Created db file '/run/udev/data/+usb:1-4.1:1.0' for '/devices/pci0000:00/0000:00:01.3/0000:01:00.0/usb1/1-4/1-4.1/1-4.1:1.0'
1-4.1:1.0: Device (SEQNUM=3196, ACTION=bind) processed
1-4.1:1.0: sd-device-monitor: Passed 344 byte to netlink monitor
ID 0924:42dc Xerox
is a multifunctional printer scanner
and https://github.com/M0Rf30/android-udev-rules/blob/eeb5e904d426c97ee9e3ae3acd52a16cfb0556d3/51-android.rules
prevents it to be detected as printer.
On OpenSuse LEAP 15.0, installed via
https://build.opensuse.org/package/show/home:ecsos/android-tools
idVendor 0x0924 Xerox
idProduct 0x42dc
iManufacturer 1 Xerox
iProduct 2 WorkCentre 3225
rpm -qi android-tools
Name : android-tools
Version : 9.0.0_r30
Release : lp150.4.1
Architecture: x86_64
Install Date: Sat May 11 15:15:54 2019
Group : Hardware/Mobile
Size : 2825756
License : Apache-2.0 and BSD-3-Clause
Signature : DSA/SHA1, Mon May 6 09:35:25 2019, Key ID 9df60496523f2a20
Source RPM : android-tools-9.0.0_r30-lp150.4.1.src.rpm
Build Date : Mon May 6 09:35:16 2019
Build Host : morla3
Relocations : (not relocatable)
Vendor : obs://build.opensuse.org/home:ecsos
URL : https://developer.android.com/studio/releases/platform-tools.html
Summary : Android platform tools (adb, fastboot)
Description :
Android SDK Platform-Tools is a component for the Android SDK. It includes tools
that interface with the Android platform.
Distribution: home:ecsos / openSUSE_Leap_15.0
If you think your android rules are sufficiently mature to be watched by the linux distros, you may want to think of adding a release tag. Pick a date (you like) a week or a month away, and announce in one or more android related mailing lists that you are releasing version 0.1 of your rules, or choose a short date like 20160229.
How to make a tag:
http://stackoverflow.com/questions/18216991/create-a-tag-in-github-repository
Example of a release announcement:
http://sourceforge.net/p/fontforge/mailman/message/34258185/
systemd-sysusers appears to not being here on ubuntu 16
maybe raplace command with a simple
sudo groupadd adbusers
Hi,
After adding udev rules for Pocophone f1, fastboot is raising an error:
dpawlik in ~ ➜ fastboot flash recovery /home/dpawlik/Downloads/twrp-3.3.0-0-beryllium.img
Sending 'recovery' (31068 KB) FAILED (Write to device failed (No such device))
fastboot: error: Command failed
...
dpawlik in ~ ➜ fastboot reboot
Rebooting FAILED (Write to device failed (Cannot send after transport endpoint shutdown))
fastboot: error: Command failed
And on the phone there is a message "press any button to shutdown".
On normal running system, dmesg informations:
[55635.782552] usb 1-4: new high-speed USB device number 37 using xhci_hcd
[55635.912477] usb 1-4: New USB device found, idVendor=18d1, idProduct=4ee7, bcdDevice= 4.09
[55635.912483] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[55635.912487] usb 1-4: Product: POCOPHONE F1
[55635.912489] usb 1-4: Manufacturer: Xiaomi
[55635.912492] usb 1-4: SerialNumber: 53d04131
In fastboot mode:
[56105.396212] usb 1-4: New USB device found, idVendor=18d1, idProduct=d00d, bcdDevice= 1.00
[56105.396218] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[56105.396222] usb 1-4: Product: Android
[56105.396225] usb 1-4: Manufacturer: Google
[56105.396227] usb 1-4: SerialNumber: 53d04131
I see that in the 51-android.rules there are some entries related to this vendor/product id.
Additional info:
fastboot --version
fastboot version 30.0.4-6686687
Installed as /usr/bin/fastboot
adb --version
Android Debug Bridge version 1.0.41
Version 30.0.4-6686687
Installed as /usr/bin/adb
About system:
lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 32 (Thirty Two)
Release: 32
Codename: ThirtyTwo
uname -a
Linux dpawlik-x1 5.9.0-0.rc2.1.fc34.x86_64 #1 SMP Tue Aug 25 17:55:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
System was rebooted, tested also as a root and as a user which is in adbusers group.
Where I make a mistake?
Thanks a lot!
# RedMi 8 Pro
ATTR{idProduct}=="ff48", SYMLINK+="android_adb"
Using this file as provided by the android-udev r179-1 package does not change either /dev/android_adb or /dev/libmtp-%k symlink's group ownership to adbusers
this line did not work on my machine running Ubuntu 16.04.
can I just add adbusers using groupadd ?
Instead of asking users to create adbusers
group manually we should use standard facility provided by systemd
. There is sysusers
https://www.freedesktop.org/software/systemd/man/sysusers.d.html please add a config file for it.
In the README.md the symbolic link suggestion does not work properly. Could be because of the relative path.
It seems this GOTO force the script to skip everything after it.
Did I understand something wrong ?
# D70e
ATTR{idProduct}=="0ba3", SYMLINK+="android_adb"
GOTO="android_usb_rule_match"
Tags make it easier to denote a certain state of the repo.
This can then used by packagers to download the correct version.
Example for your package on archlinux aur:
source=("51-android.rules-$pkgver::https://raw.github.com/M0Rf30/android-udev-rules/$pkgver/51-android.rules")
(The foo::<url>
syntax is used to specify the local filename of the source for makepkg. This means, that people won't get mismatched checksums on upgrade, if they are caching sources.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.