[Xperia Z3 Compact General] cpurick:
Thanks to the OP and all the devs who made this possible.

I was a bit confused trying to figure out what we're doing here, so I want to add some explanation for others who might share my concerns. I just hate doing "step-by-step" procedures without a clear understanding of what we're doing. Besides, it's easier to work your way out of problems if instead of just following some recipe you're actually aware of what you're doing.

1. This apparently relies on a root exploit that was closed in 23.0.1.A.5.77. So the procedure begins with flashing an older build onto the phone, using Flashtool. The OP provides links to 23.0.1.A.2.93.

2. As a couple of other posters have observed, this is perfectly viable without doing a wipe. Of course, you'd be crazy not to back up your data anyway, but as long as you uncheck "DATA" in the Wipe checkboxes each time you go into Flashtool you can do this without losing all your personalizations. In the intermediate steps though, your phone will bug you with error messages about various processes that are constantly crashing due to the version mismatches. The Contacts app is hit particularly hard by this, and it may be best to just save your contact data off and blow it away before beginning, and then resync/restore it onto the device after everything is done. I didn't go that far myself, but it might have been simpler to clean up.

3. There are separate steps to download Sony's PC Companion app (necessary for its ADB drivers), the script to root the phone, and a script to backup your TA partition. Then starting around step 26 the process moves on to installing a rooted 23.0.1.A.5.77 build which requires a few more downloads, depending on how you do it.

The idea is to flash your phone back to 23.0.1.A.2.93. Then you expose the vulnerability by putting the phone in airplane mode and allowing mock locations. You run a script that roots the older ROM and then reboots the phone. At this point you have a rooted 23.0.1.A.2.93 build. Then you can optionally (recommended; it's not hard) backup your TA. The script puts the backup on your hard drive -- nice touch.

3. Now comes the trickiest part to understand -- I'll explain why in a moment. The authors can root 23.0.1.A.2.93, but they know you want to be on 23.0.1.A.5.77. You can't just flash the stock 23.0.1.A.5.77 FTF or you'd lose root, so in one step they apply a TWRP custom recovery by using a script (very neat trick, considering the bootloader is still locked!), followed by rebooting the phone into recovery where you have to flash an image of the 23.0.1.A.5.77 system partition with SuperSU already applied. This gives you a 23.0.1.A.5.77 system partition, with everything else from 23.0.1.A.2.93. So afterwards you use Flashtool to flash the rest of stock 23.0.1.A.5.77 FTF onto the phone, with the stock system partition excluded by use of a setting in Flashtool.

There are a few things that make this part tricky. First, the instructions are a little redundant. You can either download the image file in step 26 (this is a prebuilt image with the 23.0.1.A.5.77 system partition and SuperSU and TWRP) and then you can skip directly to step 33 (very simple), or you can skip step 26 and build your own image by doing everything in steps 27 through 32. The way I read it, you want to do step 26 unless either the zip is not available for some reason, or perhaps if your phone is not a D5803 (since the prebuilt image is apparently a D5803 version).

The second thing that makes this part tricky is that due to a bug in the script you have to manually enter a mount command. I don't know if the command works as typed, but it's definitely got a typo in it. As another poster observed, the correct syntax is:

mount -o remount,rw /system

The third thing that makes it tricky is that you have to cd down into a subfolder to run the mount command, and then cd back up into the parent directory to get the install.bat used in the next step.

And the fourth thing that makes this part tricky is that after installing the custom zip you have to shut off the phone without rebooting. As the OP admits, this is not intuitive. I went to the home screen of TWRP, and in the Reboot section there's an option for powering off the device. Obviously you don't want to randomly tap on everything you see that says "Reboot" since what you're looking for is to shut off the phone without rebooting it. If you do reboot the phone here you'll be bringing up a 23.0.1.A.5.77 system partition with everything else from 23.0.1.A.2.93. Not sure how much damage that does to the overall effort, but it's not gonna work real well. At best, all the error messages would make it harder to turn the phone back off to get back to the Flashtool step.

4. After you shut off the phone you just go back into Flashtool and set it up to flash the stock 23.0.1.A.5.77 FTF. It's critical that you use the Exclude option to skip the system partition, or it will reinstall an unrooted stock image. Also, if you've been trying to keep your data, then remember to uncheck Data in the Wipe checkboxes again. This step goes very quickly, since the big system partition is excluded.

Again, this is not a critique in any way; the devs behind this are all gods as far as I'm concerned. I just want to make it easier for others to do this, and I hope this reply helps. I know I wish I'd had it explained to me like this before I began it.

Okay, one minor critique. The OP says to hold the up volume to get into recovery. On my device, anyway, you have to use the down volume. Timing seems a little tricky too.