Install LineageOS on juice
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.
Tip: It is highly recommended to have the latest official MIUI dev package installed on the device, before proceeding with unlock.
Note: The following instructions require a machine running Windows 7 or newer.
- Create a Mi account on Xiaomi’s website.
Tip: A Mi account is required to unlock the bootloader. Beware that one account is only allowed to unlock one unique device every 30 days.
- Add a phone number to your Mi account.
- Insert a SIM into your phone.
- Enable developer options in
Settings
>About Phone
by repeatedly tappingMIUI Version
. - Link the device to your Mi account in
Settings
>Additional settings
>Developer options
>Mi Unlock status
. - Download the Mi Unlock app (Windows is required to run the app).
- Run the Mi Unlock app and follow the instructions provided by the app.
Note: The app may tell you that you have to wait up to 30 days. If it does so, please wait the quoted amount of time before continuing to the next step.
- After device and Mi account are successfully verified, the bootloader should 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 TWRP. Simply download the latest recovery file, named something like
twrp-x.x.x-x-juice.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. Keep holding both buttons until the word “FASTBOOT” appears on the screen, then release.
- 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. - 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 Up + Power. Keep holding both buttons until the “Poco” logo appears on the screen, then release.
Alternatively, on some devices and recoveries you can use fastboot to boot directly into the freshly flashed or any other desired recovery:
fastboot boot <recovery_filename>.img
Tip: The file may not be named identically to what stands in this command, so adjust accordingly.
Installing Android OS from recovery
-
Download the Custom Android Rom that you would like to install.
- Optionally, download additional application packages such as Google Apps (use the
arm64
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 Up + Power. Keep holding both buttons until the “Poco” logo appears on the screen, then release.
- Now tap Wipe.
- Now tap Format Data and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage.
- Return to the previous menu and tap Advanced Wipe, then select the Cache and System partitions and then Swipe to Wipe.
- Sideload the Android OS
.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
.Tip: Normally, adb will reportTotal xfer: 1.00x
, but in some cases, even if the process succeeds the output will stop at 47% and reportadb: failed to read command: Success
. In some cases it will reportadb: failed to read command: No error
which is also fine.
-
(Optionally): If you want to install any add-ons, repeat the sideload steps above for those packages in sequence.
Note: If you want the Google Apps add-on on your device, you must follow this step before booting into Android OS for the first time! - Once you have installed everything successfully, run ‘adb reboot’.
- (Optional): Root your device by installing Magisk.
Installing Kernel from recovery
-
Download the Custom Kernel that you would like to install.
- If you are not in recovery, reboot into recovery:
- With the device powered off, hold Volume Up + Power. Keep holding both buttons until the “Poco” logo appears on the screen, then release.
- Now tap Install and select Kernel package
.zip
-
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.