Can you boot into TWRP? If you can I would try these steps:
- Boot into TWRP
- Once TWRP is booted you first need to wipe your /data partition or go into Wipe > Advanced Wipe and make sure Data is ticked then swipe to wipe.If this is your first boot into TWRP: swipe Wipe > Format Data from left to right and follow the instructions displayed onscreen.
- Once ...
After much try and waiting I couldn't get any satisfactory result out of it. So ultimately I had to flash the stock firmware. The name of the firmware could be deduced from the command fastboot getvar all
This is the link anyone who's facing the same ...
Have you confirmed the integrity of the file you're flashing? I have had some that wouldn't flash and after trying every variable, I re-downloaded the file and it flashed no problem. Also consider: after successfully flashing the ROM, boot back into recovery or to the bootloader before booting the system.