[Sony Xperia XZ1  ROMs, Kernels, Recoveries, & Othe] fumbles22:
My instructions for install:

0). (Preliminary) - Unlock the bootloader.

The LineageOS website explains it better that I can:

Install LineageOS on akari | LineageOS Wiki

wiki.lineageos.org

1). (Preliminary) - Make sure your phone has the latest firmware.

There is an updater in the "settings" part of your phone that can scan for updates. If you install any firmware, make sure you reboot the phone completely before you even think about flashing the rom.

2). (Preliminary) - Install adb and fastboot on your computer.

I use linux, so I just typed these into the terminal and installed the packages that they wanted. There are other tutorials on youtube that show how to do it for windows.

Here is a link to the LineageOS website where they explain how to do it on various platforms:

Using ADB and fastboot | LineageOS Wiki

wiki.lineageos.org

You want to have a command line since we will be typing (or copying and pasting) instructions soon.

3). (Getting ready for flashing) - Make a folder on your desktop called "android 13 XZ1 flash". We will put all of the files that we download into here.

4). (Getting ready for flashing) - Download the rom (from the first post in this thread).

Put it in "android 13 XZ1 flash".

5). (Getting ready for flashing) - Download the TWRP file from this post.

Put it in "android 13 XZ1 flash".

6). (Getting ready for flashing) - Download the latest version of NikGapps:

NikGapps - Browse /Releases/NikGapps-T/27-Jan-2024 at SourceForge.net

A Custom Google Apps Package that Suits Everyone Needs!

sourceforge.net

The differences between each package can be found here:

Downloads - NikGapps

NikGapps Website

nikgapps.com

Your "android 13 XZ1 flash" folder should look like this:

View attachment 6064034

7). (Getting ready for flashing) - Right click in "android 13 XZ1 flash". Choose "open in terminal".

This is what I did on linux. Your aim is to open a terminal inside "android 13 XZ1 flash" where all of your files are stored.

8). (Flashing the bootloader) - With the device powered off, hold volume up" and connect the usb cable. The notification light should turn blue. The phone is now in fastboot mode.

9). (Flashing the bootloader) - Verify that your phone is in fastboot mode by typing:

fastboot devices

It should spit out a code (see my screenshot further down).

10). (Flashing the bootloader) - Flashing time! Type:

fastboot flash recovery twrp-3.7.0_9-0-poplar.img

Your terminal should look something like this (note that my files are a little different, but hopefully you get the gist):

View attachment 6064042

Now unplug your phone and turn it off.

11). (Preparing the SD card) -

Take the SD card out of your phone.

Connect it to your computer (you might need a USB to SD converter).

Copy "android 13 XZ1 flash" (the entire folder) onto your SD card.

Put the SD card back into your phone.

12). (TWRP setup) - Hold down the power button and volume down. Keep it held down until TWRP appears. You are now in the bootloader of your phone.

13). (TWRP setup) -

Swipe through all of the swipey screens until you reach the main menu.

Click "wipe".

Then "format data".

Then "restart in recovery" (you can hold volume down and power as the phone turns on to make super sure you are back at TWRP).

14). (TWRP setup) -

Format dalvic, system, cache, data, internal storage and then restart in recovery (NOT VENDOR FORMAT).

Your phone now has no OS on it. If you tried starting it,the phone would stop at the white Sony screen. Scary, right?

Not to worry. We saved the ROM and NikGapps earlier on the SD card. They're still there since we didn't wipe that.

15). (Flashing the ROM) -

You should be back at the TWRP main menu.

Click "install" and navigate to your SD card.

Click on the ROM, and swipe to confirm.

Your phone should now spit out a ton of text. It will look a little like something from The Matrix. Wait for it to finish.

Here's a clip of where my install failed:

View attachment 6064069

If this happens to you (which it probably won't), try redownloading the ROM or use a different SD card.

If you don't get any red text, then the ROM installed correctly. Don't touch anything yet though, it's now time for NikGapps.

16). (Flashing NikGapps) -

Install NikGapps in the same way.

You will see more text that makes you feel like a hacker.

17). (Tidying up) - Format Dalvic, Cache

18). Reboot! You're done!

Here's my phone all up and running:

View attachment 6064072

Thanks Tux111 for making this ROM, the LineageOS developers for making such a good alternative to the stock ROM, and Gordon 1979 for his installation instructions on the XZ Premium page. I'm glad to see that both the XZ1 and the XZ Premium (I have an XZ Premium and my Mum has an XZ1) have such a good community behind them.