[Essential Phone Questions & Answers] dilyn:
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 (basically ensuring that my computer can use MTP, has adb and fastboot, and has the proper rules to recognize my phone). 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 the Arch forums 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:eek:PENUS
(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