You are not logged in.
I am having an irritating issue with my Essential PH-1 and Arch. I can issue adb commands without any issue, both booted into the system as well as in recovery (TWRP) - adb devices lists it as a device or in recovery correctly, I can reboot the device into bootloader or recovery, I can push and pull files/folders consistently in both. The issue lies with fastboot.
Fastboot commands are only recognized a handful of times. Otherwise, they return "Remote: unknown command". Sometimes fastboot doesn't say it, however; it runs the command and then hangs indefinitely. I can change slots when this happens, but fastboot never confirms that the slot switching has completed (I can see it in recovery). I cannot flash anything, seemingly.
I have libmtp, android-tools, and android-udev installed. I have also tried simply using my own udev rules, using different versions of adb and fastboot (platform tools pulled directly from Google, others), not much seems to work. I can mount the device and interact with it via Thunar just fine.
The issue seems localized to my installation as when using the same laptop (Macbook Pro 11,1) the commands all work fine in OSX (Leopard+). Additionally, they work on an Ideapad running Manjaro Cinnamon (I didn't do anything except install android-tools) and Windows 10, the newest MacBook Pro in both OSX Mojave and Windows 8. Oddly they do not work on a PC running Windows 10, but I have no explanation for that. I have had this issue with Arch off and on for the last few years, but never really properly investigated - I always just booted back into OSX when I had to. I've recently removed OSX and don't want to keep it around just for fastboot, so I'd like to sort this.
I have included some logs from both dmesg and lsusb, as well as a snippet of what I see with fastboot.
I'm cross-posting this to XDA just in case someone there can also shed light.
$ lsusb #adb
Bus 002 Device 002: ID 05ac:8406 Apple, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05ac:0259 Apple, Inc. Internal Keyboard/Trackpad
Bus 001 Device 006: ID 05ac:8289 Apple, Inc.
Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 007: ID 2e17:c032
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb #bootloader
Bus 002 Device 002: ID 05ac:8406 Apple, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05ac:0259 Apple, Inc. Internal Keyboard/Trackpad
Bus 001 Device 006: ID 05ac:8289 Apple, Inc.
Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 008: ID 2e17:c009
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb #recovery
Bus 002 Device 002: ID 05ac:8406 Apple, Inc.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 05ac:0259 Apple, Inc. Internal Keyboard/Trackpad
Bus 001 Device 006: ID 05ac:8289 Apple, Inc.
Bus 001 Device 002: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 010: ID 18d1:4ee2 Google Inc. Nexus Device (debug)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ dmesg # snipped; shows adb, fastboot, and recovery in sequence
[ 155.611958] usb 1-2: new high-speed USB device number 7 using xhci_hcd
[ 155.753376] usb 1-2: New USB device found, idVendor=2e17, idProduct=c032, bcdDevice= 2.23
[ 155.753383] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 155.753387] usb 1-2: Product: PH-1
[ 155.753391] usb 1-2: Manufacturer: Essential Products
[ 155.753393] usb 1-2: SerialNumber: PM1LHMA7B0304243
[ 194.716447] usb 1-2: USB disconnect, device number 7
[ 201.673283] usb 1-2: new high-speed USB device number 8 using xhci_hcd
[ 201.814408] usb 1-2: New USB device found, idVendor=2e17, idProduct=c009, bcdDevice= 1.00
[ 201.814411] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 201.814413] usb 1-2: Product: Mata
[ 201.814415] usb 1-2: Manufacturer: Essential Products
[ 201.814416] usb 1-2: SerialNumber: PM1LHMA7B0304243
[ 225.328643] usb 1-2: USB disconnect, device number 8
[ 241.717526] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[ 241.858738] usb 1-2: New USB device found, idVendor=18d1, idProduct=4ee7, bcdDevice= 2.23
[ 241.858744] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 241.858747] usb 1-2: Product: PH-1
[ 241.858749] usb 1-2: Manufacturer: Essential Products
[ 241.858751] usb 1-2: SerialNumber: PM1LHMA7B0304243
[ 247.209126] usb 1-2: USB disconnect, device number 9
[ 247.597186] usb 1-2: new high-speed USB device number 10 using xhci_hcd
[ 247.738482] usb 1-2: New USB device found, idVendor=18d1, idProduct=4ee2, bcdDevice= 2.23
[ 247.738487] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 247.738489] usb 1-2: Product: PH-1
[ 247.738492] usb 1-2: Manufacturer: Essential Products
[ 247.738493] usb 1-2: SerialNumber: PM1LHMA7B0304243
Various fastboot commands
PM1LHMA7B0304243 fastboot
$ fastboot getvar current-slot
getvar:current-slot FAILED (remote: unknown command)
Finished. Total time: 0.002s
$ fastboot getvar current-slot
current-slot:
Finished. Total time: 0.002s
$ fastboot getvar current-slot
getvar:current-slot FAILED (remote: unknown command)
Finished. Total time: 0.002s
$ fastboot getvar current-slot
current-slot:
Finished. Total time: 0.002s
$ fastboot getvar current-slot
current-slot: _a
Finished. Total time: 0.002s
$ fastboot getvar all
all:
Finished. Total time: 0.001s
$ fastboot getvar all
getvar:all FAILED (remote: unknown command)
Finished. Total time: 0.001s
$ fastboot getvar all
all:
Finished. Total time: 0.001s
$ fastboot getvar all
(bootloader) version:0.5
(bootloader) unlocked:yes
(bootloader) off-mode-charge:1
(bootloader) charger-screen-enabled:1
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:4222
(bootloader) version-baseband:2.0.c4-M2.0.9
(bootloader) version-bootloader:mata-b9326aa
(bootloader) variant:OPENUS
(bootloader) partition-type:userdata:ext4
(bootloader) partition-size:userdata: 0x1986B57000
(bootloader) partition-type:system_a:ext4
(bootloader) partition-size:system_a: 0x100000000
(bootloader) has-slot:nvdef:yes
(bootloader) has-slot:dsp:yes
(bootloader) has-slot:vendor:yes
(bootloader) has-slot:devcfg:yes
(bootloader) has-slot:cmnlib64:yes
(bootloader) has-slot:cmnlib:yes
(bootloader) has-slot:boot:yes
(bootloader) has-slot:keymaster:yes
(bootloader) has-slot:abl:yes
(bootloader) has-slot:mdtp:yes
(bootloader) has-slot:mdtpsecapp:yes
(bootloader) has-slot:bluetooth:yes
(bootloader) has-slot:modem:yes
(bootloader) has-slot:pmic:yes
(bootloader) has-slot:hyp:yes
(bootloader) has-slot:tz:yes
(bootloader) has-slot:rpm:yes
(bootloader) has-slot:xbl:yes
(bootloader) has-slot:system:yes
(bootloader) current-slot:_a
(bootloader) slot-retry-count:_b:6
(bootloader) slot-unbootable:_b:no
(bootloader) slot-successful:_b:yes
(bootloader) slot-retry-count:_a:6
(bootloader) slot-unbootable:_a:no
(bootloader) slot-successful:_a:yes
(bootloader) slot-count:2
(bootloader) slot-suffixes:_a,_b,
(bootloader) secure:yes
(bootloader) serialno:PM1LHMA7B0304243
(bootloader) product:Mata
(bootloader) max-download-size:0x20000000
(bootloader) kernel:uefi
all:
Finished. Total time: 0.005s
#EDIT
Possibly worth mentioning that I am running the latest Linux-Macbook kernel (5.2.0-arch2-1-macbook), and have also tried the current mainline kernel without additional kernel parameters. I did not test LTS as this issue extends well back into 2014.
Last edited by dilyn (2019-07-20 09:04:15)
Offline
I suspected that the problem was with usb 3.0.
After googling I found this command to force usb 2.0 mode and now I can use fastboot easily. I just run it whenever I need to use fastboot.
lspci -nn | grep USB | cut -d '[' -f3 | cut -d ']' -f1 | xargs -I@ setpci -H1 -d @ d0.l=0
source url
https://www.systutorials.com/241533/how … -in-linux/
Worked a couple of times and now just does not work anymore. Tearing my hair out. Damn
Gave up and installed Ubuntu and it now works as expected. Going to re-install Archlinux when I have more time and dont need fastboot to troubleshoot.
Last edited by kishd (2019-07-21 17:28:22)
---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare
Offline
The problem might be related to USB 3 - if OSX on this Macbook is recognizing that it is a problem and is forcing the use of USB2 behind the scenes it would make sense why it worked in Mojave and not here.
However, the suggestion you've provided only freezes my entire system. Strange.
Offline
It could be any of that or a USB-C issue if you're using a USB-C to USB-A adapter, either on one of the device ends, or the cable itself. I have a pixel 2 XL and an older model Macbook with only USB-A and let's just say it can be finicky. When I get random inexplicable failures in adb or fastboot, usually plugging into the other USB port or trying a different cable fixes things. (particularly bad when it flashes data only partially, or corrupt, and reports success) Could be bad cable, dirty connectors, incompliant cable, incompliant USB-C source or sink, failure to switch USB2/3 modes, who knows, lovely USB-C you can plug anything into anything but it's always a crapshoot as to whether anything will work, welcome your dystopian-futuristic robotic USB-C overlords.
Also seen a MIDI controller that the MacBook refused to recognize because it didn't support USB3, even though it was a B-to-A cable. Solution there on MacOS, not sure about Linux, was disable USB3 altogether by replacing the kext with an older one that didn't support USB3, or to plug in the device via a USB hub that didn't support USB3.
Offline
Trying other USB cables has not on this machine (I have tried three different ones), but I have not tried a hub - don't have one. Might need to get one.
Installed Ubuntu 19.04 on the machine and had zero luck getting fastboot commands to work there as well. It's probably definitely an issue with either my USB ports or (more likely, considering fastboot worked fine under OSX) the modules the kernel is loading for them. I have tried blacklisting xhci to try and force it to use ehci but have had no luck. Added
/etc/modprobe.d/usb.conf
blacklist xhci_hcd
blacklist xhci_pci
but nothing changed, and the USB ports worked exactly the same:
dilyn: lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 480M
|__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/3p, 12M
|__ Port 3: Dev 6, If 2, Class=Vendor Specific Class, Driver=btusb, 12M
|__ Port 3: Dev 6, If 0, Class=Vendor Specific Class, Driver=btusb, 12M
|__ Port 3: Dev 6, If 3, Class=Application Specific Interface, Driver=, 12M
|__ Port 3: Dev 6, If 1, Class=Wireless, Driver=btusb, 12M
|__ Port 5: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 5: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
|__ Port 5: Dev 3, If 2, Class=Human Interface Device, Driver=bcm5974, 12M
Probably did something wrong with blacklisting? Haven't really done it before; will have to read more.
Offline