Installation of Lineage 14.1 by HnT without unlocking bootloader

qtotter

Senior Member
Mar 13, 2006
698
66
48
Tokyo
after updating the system to official dev nougat rom relocked my bootloader again, it took me one day to figure out how to install Lineage 14.1 by HnT without unlocking bootloader.
(why does xiaomi do this?? once your bootloader is relocked, you need to apply for a new unlock code AGAIN!!!!)

what you need;
lineage by HnT (hikari no tenshi)
miflash (i used 20151028)
official fastboot rom of 6.1.7

libra-aqua_firmware_7.2.9.zip by AndropaX (i used 7.3.30 img files, though)
twrp-3.1.0-0-libra.img for installing rom
recovery-TWRP-3030.img by dla5244

0) lineage by HnT checks bootloader while installing. so you need to remove the check in updater-script in the zip. you cannot use the zip as it is.
* in updater-script, remove lines starting with "if is_mounted("/data") then" through "endif;"

1) downgrade system to official 6.1.7 using miflash in EDL mode, and reboot into system when it's done (here for details by wolkenjaeger)
* you need to boot into miui at least once to make internal storage available.

2) reboot into bootloader
3) execute "fastboot boot twrp-3.1.0-0-libra.img" to go into twrp on the fly, and wipe EVRYTHING meaning dalvik/art cache, system, data, internal storage and chache.
4) in twrp, copy libra-aqua_firmware_7.2.9.zip, lineage zip (the one you modified above), gapps, recovery-TWRP-3030.img (and supersu zip if you want) into internal storage
5) install all the zips at once in twrp. then, install recovery-TWRP-3030.img. (YOU SHOULD NOT REBOOT DURING THIS PROCESS!!)

that's all.
*you can only reboot into recovery from android, not by holding power+vol up keys.

bootloader stays locked until you unlock it, but you can boot into twrp, install roms, change /system or do whatever you want except unlocking bootloader which is not really an issue anymore because you can use full twrp functions. i have no idea about negative effect by removing bootloader check when installing lineage by HnT although i think it's safe because new firmware is installed.

i am not recommending this method to anyone, and it's all your responsibility to follow it. i simply showed possibility to install new nougat (7.1.1 or above) roms (official or unofficial), which requires new firmware, without unlocking new bootloader.

at last, i thank you all, Hikari no Tenshi, wolkenjaeger, AndropaX, twrp, dla5244 and many more, for your development, analysis and information. finally, i shall NEVER buy any xiaomi phones in the future.
 
Last edited:

PeterMarkoff

Senior Member
Jun 9, 2014
337
163
0
thanks for interesting how to, just to let you know, you can return back to lollipop bootloader and install LOS14.1 from Cozzmy13 without relocking bootloader or editing script

I just wish there will be some method to unofficially unlock Nougat bootloader, I don't want to have anything to do with Xiaomi software/services.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone