No fastboot permissions on Motorola phones
icyrockcom opened this issue · 5 comments
I'm on NixOS and the distro recently updated the rules:
After that, I'm unable to use fastboot:
$ fastboot devices
no permissions; see [http://developer.android.com/tools/device.html] Motorola Fastboot Interface
I haven't bisected this, but it looks related to this commit:
c647e58#diff-bef56b15d51df07626fa90f8b42fc8887070b2cbb63c5b395bcda466c9098ff8R463
which changes from "adb_user" to "fast".
Hi @icyrockcom,
The latest release is attempting to go from a blanket "accept everything" (which was in the prior release), to an accept what you know, and drop the rest (way of doing things). Unfortunately, it was expected to create a bit of breakage, but the intentions are for the better in basically trying to fix a long-standing bug with the prior code flow which would trigger on other USB devices by the same vendor, such as keyboards, mice, camera, and other devices.
Let's look at what we broke:
Can you please run at the commandline lsusb
or better yet lsusb -v
and printout the information for your Motorola phone?
Ideally, if you can run through the various modes of your phone and collect the different IDs that would be ideal - read issue#264 to see more or less what I am hoping to see.
hi there,
i installed it using the 'automatic install script' and i'm experiencing a similar issue, if not the same, as reported by OP:
fuyukihidekii@RV415:~$ fastboot devices
no permissions (missing udev rules? user is in the plugdev group); see [http://developer.android.com/tools/device.html] fastboot
i believe by installing the android-sdk-platform-tools-common
package from Debian repositories would solve my issue; instead i prefer help there as i can.
My platform-tools binaries are handled by Android Studio and are exposed on my $PATH, i don't have any other android-related SDK binaries installed or managed outside Android Studio scope.
ADB work without root privileges, either by calling it directly or from $PATH; while fastboot requires special privileges on both ways.
Information about the environment, Android SDK and smartphone models and USB IDs:
OS
fuyukihidekii@RV415:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
Android SDK
fuyukihidekii@RV415:~$ fastboot --version
fastboot version 34.0.5-10900879
Installed as /home/fuyukihidekii/.local/bin/android/sdk/platform-tools/fastboot
fuyukihidekii@RV415:~$ adb --version
Android Debug Bridge version 1.0.41
Version 34.0.5-10900879
Installed as /home/fuyukihidekii/.local/bin/android/sdk/platform-tools/adb
Running on Linux 6.1.0-13-amd64 (x86_64)
Smartphone
# Market name, platform (board) codename
GLOBAL: motorola moto g(60)
SKU: XT2135-1, XT2135-2
INDIA: motorola moto g(40) fusion
SKU: XT2147-1
Both are codenamed "hanoip" officialy, although during development, the G40F was identified by 'hanoi' while G60 was 'hanoip'.
G40F and G60 are the same device with few differences (SIM Slots, NFC, Main camera sensor); i'll ask for someone actually with G40F to report their IDs.
For regulatory entities, both are identified as HanoiPlus21.
Firmware: Android 12.0 S (Snow Cone V1)
Build ID: S2RI32.32-20-9-9-2
*** "lsusb -v" output from BOOTLOADER ***
Bus 001 Device 031: ID 22b8:2e80 Motorola PCS Fastboot hanoip S
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x22b8 Motorola PCS
idProduct 0x2e80
bcdDevice 1.00
iManufacturer 1 Motorola Mobility LLC.
iProduct 2 Fastboot hanoip S
iSerial 3 ZF523NM43G
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0020
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 66
bInterfaceProtocol 3
iInterface 4 fastboot
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 1
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)
Smartphone USB IDs
NOTICE: I didn't included "BP Tools" and "QCOM" modes as they aren't expected to be used by a 'end-user'.
- "BP Tools" enable the moto-factory-testing mode and the 'CQA Test' suite;
- I'm not aware of the use of "QCOM" mode.
AP Fastboot Flash Mode (BOOTLOADER)
[117926.461898] usb 1-5: new high-speed USB device number 31 using ehci-pci
[117926.619499] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e80, bcdDevice= 4.14
[117926.619530] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[117926.619541] usb 1-5: Product: Fastboot hanoip S
[117926.619549] usb 1-5: Manufacturer: Motorola Mobility LLC.
[117926.619558] usb 1-5: SerialNumber: ZF523NM43G
ANDROID: Recovery
[124644.457362] usb 1-5: new high-speed USB device number 68 using ehci-pci
[124644.615600] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e81, bcdDevice= 4.14
[124644.615631] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[124644.615642] usb 1-5: Product: moto g(60)
[124644.615651] usb 1-5: Manufacturer: motorola
[124644.615659] usb 1-5: SerialNumber: ZF523NM43G
ANDROID: MTP
*** USB DEBUG DISABLED ***
[121597.820649] usb 1-5: new high-speed USB device number 44 using ehci-pci
[121597.979081] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e82, bcdDevice= 4.14
[121597.979112] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[121597.979123] usb 1-5: Product: moto g(60)
[121597.979131] usb 1-5: Manufacturer: motorola
[121597.979140] usb 1-5: SerialNumber: ZF523NM43G
*** USB DEBUG ENABLED ***
[123827.558465] usb 1-5: new high-speed USB device number 62 using ehci-pci
[123827.718308] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e76, bcdDevice= 4.14
[123827.718388] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[123827.718400] usb 1-5: Product: moto g(60)
[123827.718409] usb 1-5: Manufacturer: motorola
[123827.718417] usb 1-5: SerialNumber: ZF523NM43G
ANDROID: Tethering
*** USB DEBUG DISABLED ***
[122076.131507] usb 1-5: new high-speed USB device number 47 using ehci-pci
[122076.291116] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e24, bcdDevice= 4.14
[122076.291147] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[122076.291158] usb 1-5: Product: moto g(60)
[122076.291167] usb 1-5: Manufacturer: motorola
[122076.291175] usb 1-5: SerialNumber: ZF523NM43G
[122076.301358] rndis_host 1-5:1.0 usb0: register 'rndis_host' at usb-0000:00:12.2-5, RNDIS device, ba:48:d1:80:ad:fa
[122076.427710] rndis_host 1-5:1.0 enxba48d180adfa: renamed from usb0
*** USB DEBUG ENABLED ***
[123913.135974] usb 1-5: new high-speed USB device number 63 using ehci-pci
[123913.294344] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e25, bcdDevice= 4.14
[123913.294375] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[123913.294387] usb 1-5: Product: moto g(60)
[123913.294395] usb 1-5: Manufacturer: motorola
[123913.294404] usb 1-5: SerialNumber: ZF523NM43G
[123913.304230] rndis_host 1-5:1.0 usb0: register 'rndis_host' at usb-0000:00:12.2-5, RNDIS device, 5e:7d:18:34:26:d3
[123913.452845] rndis_host 1-5:1.0 enx5e7d183426d3: renamed from usb0
ANDROID: MIDI
*** USB DEBUG DISABLED ***
[122192.644272] usb 1-5: new high-speed USB device number 48 using ehci-pci
[122192.803497] usb 1-5: New USB device found, idVendor=18d1, idProduct=4ee8, bcdDevice= 4.14
[122192.803530] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[122192.803541] usb 1-5: Product: moto g(60)
[122192.803550] usb 1-5: Manufacturer: motorola
[122192.803558] usb 1-5: SerialNumber: ZF523NM43G
[122193.242746] usbcore: registered new interface driver snd-usb-audio
*** USB DEBUG ENABLED ***
[124005.557017] usb 1-5: new high-speed USB device number 66 using ehci-pci
[124005.715548] usb 1-5: New USB device found, idVendor=18d1, idProduct=4ee9, bcdDevice= 4.14
[124005.715578] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[124005.715590] usb 1-5: Product: moto g(60)
[124005.715598] usb 1-5: Manufacturer: motorola
[124005.715607] usb 1-5: SerialNumber: ZF523NM43G
ANDROID: PTP
*** USB DEBUG DISABLED ***
[122249.730906] usb 1-5: new high-speed USB device number 49 using ehci-pci
[122249.889523] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e83, bcdDevice= 4.14
[122249.889553] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[122249.889564] usb 1-5: Product: moto g(60)
[122249.889573] usb 1-5: Manufacturer: motorola
[122249.889581] usb 1-5: SerialNumber: ZF523NM43G
*** USB DEBUG ENABLED ***
[124129.945103] usb 1-5: new high-speed USB device number 67 using ehci-pci
[124130.105247] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e84, bcdDevice= 4.14
[124130.105277] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[124130.105288] usb 1-5: Product: moto g(60)
[124130.105297] usb 1-5: Manufacturer: motorola
[124130.105306] usb 1-5: SerialNumber: ZF523NM43G
ANDROID: no-file-transfer
*** USB DEBUG DISABLED ***
[120256.167001] usb 1-5: new high-speed USB device number 38 using ehci-pci
[120256.326434] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e82, bcdDevice= 4.14
[120256.326465] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[120256.326476] usb 1-5: Product: moto g(60)
[120256.326485] usb 1-5: Manufacturer: motorola
[120256.326493] usb 1-5: SerialNumber: ZF523NM43G
*** USB DEBUG ENABLED ***
[123692.099075] usb 1-5: new high-speed USB device number 61 using ehci-pci
[123692.261823] usb 1-5: New USB device found, idVendor=22b8, idProduct=2e81, bcdDevice= 4.14
[123692.261854] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[123692.261866] usb 1-5: Product: moto g(60)
[123692.261874] usb 1-5: Manufacturer: motorola
[123692.261883] usb 1-5: SerialNumber: ZF523NM43G
If you need, I can provide the data from "BP" and "QCOM" modes and lsusb -v
for all, listed there.
Hi @fuyukihidekii,
Please start a new issue.
In the new issue, please open a commandline terminal, and run lsusb -v
and post the information seen.
Please do it in the new issue.
Hi @icyrockcom - looking at this, plus @fuyukihidekii info, I believe you are correct.
I am assuming that your motorola fastmode is also 22b8:2e80 too.
Can you test changing the code from "fast" to "adbfast" at approx line 516 in 51-android.rules?
ATTR{idProduct}=="2e33", GOTO="adbmtp"
ATTR{idProduct}=="2e51", GOTO="adbmtp"
ATTR{idProduct}=="2e76", GOTO="adbmtp"
-ATTR{idProduct}=="2e80", GOTO="fast"
+ATTR{idProduct}=="2e80", GOTO="adbfast"
ATTR{idProduct}=="2e81", GOTO="adb"
ATTR{idProduct}=="2e82", GOTO="mtp"
I am assuming that your motorola fastmode is also 22b8:2e80 too.
Correct.
Can you test changing the code from "fast" to "adbfast" at approx line 516 in 51-android.rules?
Yep that fixes it on my end.