Install LineageOS on pollux

Basic requirements

  1. Make sure your computer has adb and fastboot. Setup instructions can be found here.
  2. Enable USB debugging on your device.

Unlocking the bootloader

  1. Open the Contacts app.
  2. Click on the menu button in the top right.
  3. Click on Settings.
  4. Long press (for about 5 seconds) somewhere in the empty space just above navigation bar, then release your finger. A button named Enter service code will then appear in the same area (this may take a few attempts).
  5. Click on Enter service code. A dialer will appear.

  6. On the device, dial *#*#7378423#*#* (*#*#SERVICE#*#*) to launch the service menu.
  7. Go to service info > configuration and check rooting status - you can only continue if it says Bootloader unlock allowed: Yes.
  8. Connect the device to your PC via USB.
  9. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
    adb reboot bootloader
    

    You can also boot into fastboot mode via a key combination:

    • With the device powered off, hold Volume Up and connect the USB cable. The notification light should turn blue.
  10. Once the device is in fastboot mode, verify your PC finds it by typing:
    fastboot devices
    
  11. Follow the instructions on Sony’s official unlocking website to unlock your bootloader.
  12. Since the device resets completely, you will need to re-enable USB debugging to continue.

Installing a custom recovery using fastboot

  1. Download a custom recovery - you can download TWRP. Simply download the latest recovery file, named something like twrp-x.x.x-x-pollux.img.

  2. Connect your device to your PC via USB.
  3. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:
    adb reboot bootloader
    

    You can also boot into fastboot mode via a key combination:

    • With the device powered off, hold Volume Up and connect the USB cable. The notification light should turn blue.
  4. Once the device is in fastboot mode, verify your PC finds it by typing:
    fastboot devices
    
  5. Temporarily flash TWRP to boot:
    fastboot flash boot twrp-x.x.x-x-pollux.img
    
  6. Reboot to the TWRP recovery:
    fastboot reboot
    
  7. Push the TWRP image to your device:
    adb push twrp-x.x.x-x-pollux.img /sdcard
    
  8. Enter shell on the device:
    adb shell
    
  9. Flash TWRP to recovery permanently:
    dd if=/sdcard/twrp-x.x.x-x-pollux.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
    
  10. Exit the adb shell:
    exit
    

Installing LineageOS from recovery

  1. Download the LineageOS installation package that you would like to install or build the package yourself.

    • Optionally, download additional application packages such as Google Apps (use the arm architecture).
  2. If you are not in recovery, reboot into recovery:
    • On boot, press Volume Down when the LEDs start lighting up.
      Second Recovery: To boot the FOTA Recovery, press Volume Up instead.
  3. Now tap Wipe.
  4. Now tap Format Data and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.

  5. Return to the previous menu and tap Advanced Wipe, then select the Cache and System partitions and then Swipe to Wipe.

  6. Sideload the LineageOS .zip package:
    • On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
    • On the host machine, sideload the package using: adb sideload filename.zip
  7. (Optionally): If you want to install any additional add-ons, adb sideload filename.zip those packages in sequence.

  8. (Optional): Root your device by installing LineageOS’ AddonSU, (use the arm package) or by using any other method you prefer.
  9. Once you have installed everything successfully, run ‘adb reboot’.

Get assistance

If you have any questions or get stuck on any of the steps, feel free to ask on our subreddit or in #LineageOS on freenode.