Install LineageOS on himaul
Back to the overviewBasic requirements
- Make sure your computer has
adb
andfastboot
. Setup instructions can be found here. - Enable USB debugging on your device.
Unlocking the bootloader
-
Enable OEM unlock in the Developer options under device Settings, if present.
- 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. Use the volume buttons to scroll to “FASTBOOT” and press Power to select.
- 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 obtain your bootloader unlock token:
fastboot oem get_identifier_token
-
Visit the HTCDev Bootloader Unlock website and follow the instructions there to obtain your unlock key and unlock your bootloader. If your device does not appear in the drop-down list, select All Other Supported Models.
Note: If your device is not supported by the HTCDev Bootloader Unlock website, you may be able to use an alternative bootloader unlock method like SunShine, though they only support some devices/firmwares. - 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 TWRP. Simply download the latest recovery file, named something like
twrp-x.x.x-x-himaul.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. Use the volume buttons to scroll to “FASTBOOT” and press Power to select.
- 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 Down + Power until the bootloader appears, then release the buttons. Use the volume buttons to scroll to “RECOVERY” and press Power to select.
Installing LineageOS from recovery
- Build a LineageOS installation package.
- Optionally, download an application package add-on such as Google Apps (use the
arm64
architecture).
- Optionally, download an application package add-on 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 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 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
.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 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 LineageOS for the first time! - (Optionally): Root your device by installing LineageOS’ AddonSU, (use the
arm64
package) or by using any other method you prefer. - 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.