[Sony Xperia XZ1 Compact Questions & Answers] apexofservice:
[MENTION=4418980]j4nn[/MENTION]: thanks so much for picking up the conversation. I realized what you said about green vs blue led and fastboot vs Sony Service mode sometime after my last post. But I didn't want to keep updating and just talking to myself so I held off. Still it's interesting that sony service mode is clearly based at least partially on the fastboot protocol.

In terms of which fastboot binary, I started by using the one I had installed from previous work with my z3c, that one is:

fastboot version 28.0.1-4986621

It was new enough not to have the -i $vendor_id option which is quoted in a bunch of guides for xperia stuff, and that's one of the things which lead me to try upgrading fastboot. Nowadays, it turns out, you can get the platform-tools without downloading the Sdk. So that download was quite convenient and I downloaded this version:

$ ./platform-tools/fastboot --version
fastboot version 29.0.4-5871666

I believe that's the latest fastboot, but let me know if it's not and if I should try to find something more recent. Actually, regarding fastboot, I ended up turning up the source code repo and found the README quite fascinating. I actually started using pyUSB to make a python version of fastboot, but that's a bit of an aside. In any case, I guess I could just compile fastboot from source. However, I suspect that the fastboot version isn't actually my issue.

Regarding booting from twrp using fastboot: Alas, that fails too. And, interestingly (perhaps), it fails in a similar way to the flash command. The phone seems to restart during or after the data send part:

./fastboot boot twrp-3.3.1-0-lilac-pie-5.img
Sending 'boot.img' (34548 KB) FAILED (Write to device failed (Cannot send after transport endpoint shutdown))
fastboot: error: Command failed

So then, given that the Green LED is Sony Mode, I thought maybe I should try to use FlashTool to try to reflash a working ROM/boot/kernel. So, I downloaded a stock ROM (same major version, Android 9 in my case), and then used the bundle command to prepare an FTF package.

Unfortunately, the version of FlashTool that I have doesnt' seem to be able to recognize the "flash mode" (green LED) that this phone provides. After preparing the firmware for flashing, it just says "phone connected with usb debugging disabled" when I connect it with Green LED. So, I figured that I needed to upgrade FlashTool. I found the lastest FlashTool and then tried to run it. But the jvm that comes with it seems to have been linked dynamically against a newer GLIBC than the one I have on this distro, so I started compiling a newer GLIBC into /opt but haven't gotten any farther before it was time to go work and set this aside for a while.

In terms of why I went straight to bootloader unlock instead of doing the firmware exploit to backup the TA keys, the main reason is as follows. The first is that I went through that exercise twice with my Z3C (I had two Z3Cs over the last 4 years), and it never ended up being useful. I never wanted to go back to stock, I never ended up caring about the DRM keys on the TA partition. So, I didn't really want to go through a bunch of hoops just to backup some keys that at this point it's clear that I'm not going to be using---I just wanted to get to the business of getting lineage up.

Please do post any further ideas or suggestions. I'd love any advice. Thanks in advance!