Install LineageOS on flox
Back to the overviewBasic requirements
Important: Please read through the instructions at least once before actually following them, so as to avoid any problems due to any missed steps!
- Make sure your computer has
adb
andfastboot
. Setup instructions can be found here. - Enable USB debugging on your device.
Unlocking the bootloader
Note: The steps below only need to be run once per device.
Warning: Unlocking the bootloader will erase all data on your device!
Before proceeding, ensure the data you would like to retain is backed up to your PC and/or your Google account, or equivalent. Please note that OEM backup solutions like Samsung and Motorola backup may not be accessible from LineageOS once installed.
- Connect the device to your PC via USB.
- 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 Down + Power until the bootloader appears, then release the buttons.
- Once the device is in fastboot mode, verify your PC finds it by typing:
fastboot devices
Tip: If you seeno permissions fastboot
while on Linux or macOS, try runningfastboot
as root. -
Now type the following command to unlock the bootloader:
fastboot oem unlock
- If the device doesn’t automatically reboot, reboot it. It should now be unlocked.
- Since the device resets completely, you will need to re-enable USB debugging to continue.
Installing a custom recovery using fastboot
-
Download a custom recovery - you can download Lineage Recovery. Simply download the latest recovery file, named something like
lineage-17.1-20210122-recovery-flox.img
. - Connect your device to your PC via USB.
- 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 Down + Power until the bootloader appears, then release the buttons.
- Once the device is in fastboot mode, verify your PC finds it by typing:
fastboot devices
Tip: If you seeno permissions fastboot
while on Linux or macOS, try runningfastboot
as root. - Temorarily boot recovery on your device:
fastboot boot <recovery_filename>.img
Tip: The file may not be named identically to what stands in this command, so adjust accordingly.Tip: Some devices have buggy USB support while in bootloader mode, if you seefastboot
hanging with no output when using commands such asfastboot getvar ..
,fastboot boot ...
,fastboot flash ...
you may want to try a different USB port (preferably a USB Type-A 2.0 one) or a USB hub.
EFS/Persist Backup
Warning: Before processing repartition further we highly recommend you backup persist and EFS using adb or you might lose your IMEI/WIFI + BT mac addresses
- If you are not in recovery, reboot into recovery:
- With the device powered off, hold Volume Down + Power until the bootloader appears, then release the buttons. Use the volume buttons to scroll to “RECOVERY” and press Power to select.
- Now, use the volume buttons to select “Advanced”, and then “Enable ADB”.
- Now open Terminal (Linux/macOS), or PowerShell (Windows), run
adb shell
, and then run the following commands within it:dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
exit
- Now from that same Terminal/PowerShell, run:
adb pull /sdcard/modemst1.img
adb pull /sdcard/modemst2.img
adb pull /sdcard/persist.img
Note: Make sure to store these somewhere safe in case later steps fail.
Repartition
Warning: This step is not optional, the device will not boot LineageOS without repartitioning first!
Warning: This process will wipe all data on the device, including your internal storage!
- Download the flashable repartition script from here.
- On your device’s screen, choose “Apply Update”, then “From ADB”.
- From your Terminal/PowerShell, run
adb sideload /path/to/flo-deb_clamor_repartition.zip
, filling/path/to/
in with the path you downloaded the repartition zip to.Warning: This step may take up to 5 minutes, please ensure your USB connection/power source isn’t interrupted during this time. - Now run
adb shell
from your Terminal/PowerShell, and run the following commands within it:modify
- The device will reboot whatever your previous recovery was, please select “Reboot to bootloader” if it’s the stock recovery or “Reboot”, then “Bootloader” if it was TWRP.
- Flash recovery onto your device:
fastboot flash recovery <recovery_filename>.img
Tip: The file may not be named identically to what stands in this command, so adjust accordingly.Tip: Some devices have buggy USB support while in bootloader mode, if you seefastboot
hanging with no output when using commands such asfastboot getvar ..
,fastboot boot ...
,fastboot flash ...
you may want to try a different USB port (preferably a USB Type-A 2.0 one) or a USB hub. - Now reboot into recovery to verify the installation:
- With the device powered off, hold Volume Down + Power until the bootloader appears, then release the buttons. Use the volume buttons to scroll to “RECOVERY” and press Power to select.
- Click,”Factory Reset”, then “Format system partition”, then when prompted, select “Yes”.
Installing LineageOS from recovery
- 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).
- Optionally, download additional application packages such as Google Apps (use the
- If you are not in recovery, reboot into recovery:
- With the device powered off, hold Volume Down + Power until the bootloader appears, then release the buttons. Use the volume buttons to scroll to “RECOVERY” and press Power to select.
- Now tap Factory Reset, then Format data / factory reset and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one).
- Return to the main menu.
- Sideload the LineageOS
.zip
package:- On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.
- On the host machine, sideload the package using:
adb sideload filename.zip
.Tip: If the process succeeds the output will stop at 47% and reportadb: failed to read command: Success
.
-
(Optionally): If you want to install any additional add-ons, repeat the sideload steps above for those packages in sequence.
Note: Additional add-ons aren’t signed with LineageOS’s official key, and therefore when they are sideloaded, Lineage Recovery will present a screen that saysSignature verification failed
, this is expected, please clickContinue
.Note: If you want Google Apps on your device, you must follow this step before booting into LineageOS for the first time! - Once you have installed everything successfully, click the back arrow in the top left of the screen, then “Reboot system now”.
Warning: Depending on which recovery you use, you may be prompted to install additional apps and services.
We strongly advise you to opt out of installing these, as they may cause your device to bootloop,
as well as attempt to access or corrupt your data.
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.