Additional information, as a reply to my first post. I hope this will be allowed by Discourse.
My target platform is a Moto X4 (payton), XT1900-7, and the problem I encounter is very similar to the one in this post about a Moto G7, which was only successfully worked around by switching to macOS.
Android version: 9 (PPWS29.69-37-5)
Developer mode, USB debugging and OEM unlocking enabled
fastboot version 31.0.3-7562133
Debian Bookworm, Linux 5.14.0-1-amd64.
No Motorola drivers, obviously.
I get stuck at step 4 of Unlocking the Bootloader from the payton instructions linked above. I.e. when running
fastboot --verbose oem get_unlock_data, no output at all is given. Instead fastboot hangs (for hours, presumably forever) until the USB cable is unplugged.
All prior steps work. Rebooting into bootloader is successful, and listing devices using fastboot shows:
# fastboot devices
I would expect the failing step to have successfully returned the codes needed to obtain the keys using Motorola’s support web, as described in step 4.
Am I reading the instructions correctly? One thing I find unclear is when TWRP should be installed. That could be better explained. My understanding is that the unlocking likely needs to have happened prior to installing anything, including TWRP. Is safe to assume that how it works?
If running strace on fastboot, I learn that it is stuck on
ioctl(4, USBDEVFS_BULK where fd 4 is
/dev/bus/usb/001/023 (Bus 001 Device 023: ID 22b8:2e80 Motorola PCS Fastboot payton S). Neither SIGTERM or SIGKILL manages to end the fastboot process, which I guess means that the ioctl() in question is stuck within kernel-code rather than in userland.
Figuring out which kernel module is actually used is beyond what I’ve done. Much because I don’t know if it would help much to know that.
Unfortunately I have not been able to get closer than this. I’m completely new to this world of de-infecting filthy phones, having been lucky enough to have had a working SailfishOS device not starting to break apart until now. Any helpful comments are welcome!
While I did read quite a few other forum posts, I believe the linked one about Moto G7 is the most relevant one.