Hey guys! So as the title suggests, I recently flashed a Custom ROM (CrDroid) after unlocking my bootloader, but I ended up in a boot loop with no solution in sight! Here's what I did that resulted in the bootloop:
1) Unlock bootloader
2) Flash TWRP
3) Try flashing ROM via TWRP, but it failed because the ROM is a Fastboot flashable ROM, not recovery ROM.
4) Followed the instructions and ran the flashing script
On Boot, I ended up with a bootloop, with the phone booting up to CrDroid logo for a few seconds and then rebooting. I didn't think much about it, and decided to go back to stock and try again. However, the issue is that the TWRP alpha that we currently have (It will mostly change in future with updates and hopefully official support) doesn't support flashing ROMs yet. Worse yet, ADB sideload didnt work either, I tried flashing MIUI Recovery zip without success.
I was stuck with a formatted phone without an OS, a recovery that can't help at all, and no way to read internal storage via PC to paste any file (not that it would matter, TWRP can't flash it anyway). I finally decided to go with the fastboot route, downloaded the latest fastboot MIUI recovery file, extracted it, ran the flash all script, but since a simple solution would be too easy to end a story, the script did absolutely nothing, it flashed a few lines of text on cmd (most probably some error code) for a microsecond and exited. I was really desperate at this point, so I tried going through the script and seeing what it actually does.
Since I'm desperate enough at this point, I ignored the checks that the script first run to verify the device (because I downloaded my device specific file so I had no worries), and proceeded to execute the fastboot flash commands one by one as seen below:
(I have a feeling the issue might have been the first line of the product name, as my device is Mi 11x AKA aliothin not alioth, but I couldn't care less about these checks, because I downloaded the Indian version only so mostly its an issue from Xiaomi)
So I went to the images folder in cmd, and ran fastboot commands one by one to flash the relevant images, carefully following the order above (FileName: flash_all.bat if anyone wants to know). Since I'm in the images folder, I can just write "fastboot flash crclist crclist.txt" instead of adding directory path and other variables. After 15 mins of painstaking typing and waiting, my device finally booted to the setup page of MIUI 12!
I hope this long rant/pseudo-guide can help anyone else in the future in case they screw up while flashing Custom ROMs. Mostly, once TWRP supports flashing, then this won't be an issue as people can directly flash MIUI ROM, but this is still a helpful guide in case that isn't an option.
1) Unlock bootloader
2) Flash TWRP
3) Try flashing ROM via TWRP, but it failed because the ROM is a Fastboot flashable ROM, not recovery ROM.
4) Followed the instructions and ran the flashing script
On Boot, I ended up with a bootloop, with the phone booting up to CrDroid logo for a few seconds and then rebooting. I didn't think much about it, and decided to go back to stock and try again. However, the issue is that the TWRP alpha that we currently have (It will mostly change in future with updates and hopefully official support) doesn't support flashing ROMs yet. Worse yet, ADB sideload didnt work either, I tried flashing MIUI Recovery zip without success.
I was stuck with a formatted phone without an OS, a recovery that can't help at all, and no way to read internal storage via PC to paste any file (not that it would matter, TWRP can't flash it anyway). I finally decided to go with the fastboot route, downloaded the latest fastboot MIUI recovery file, extracted it, ran the flash all script, but since a simple solution would be too easy to end a story, the script did absolutely nothing, it flashed a few lines of text on cmd (most probably some error code) for a microsecond and exited. I was really desperate at this point, so I tried going through the script and seeing what it actually does.
Since I'm desperate enough at this point, I ignored the checks that the script first run to verify the device (because I downloaded my device specific file so I had no worries), and proceeded to execute the fastboot flash commands one by one as seen below:
(I have a feeling the issue might have been the first line of the product name, as my device is Mi 11x AKA aliothin not alioth, but I couldn't care less about these checks, because I downloaded the Indian version only so mostly its an issue from Xiaomi)
So I went to the images folder in cmd, and ran fastboot commands one by one to flash the relevant images, carefully following the order above (FileName: flash_all.bat if anyone wants to know). Since I'm in the images folder, I can just write "fastboot flash crclist crclist.txt" instead of adding directory path and other variables. After 15 mins of painstaking typing and waiting, my device finally booted to the setup page of MIUI 12!
I hope this long rant/pseudo-guide can help anyone else in the future in case they screw up while flashing Custom ROMs. Mostly, once TWRP supports flashing, then this won't be an issue as people can directly flash MIUI ROM, but this is still a helpful guide in case that isn't an option.