I was flashing the factory image of my YU Yuphoria through the flash-all script, everything completed successfully, but when it came to flashing system partition, the command line got stuck at "writing system" in the last sparse system.
It took a hell lot of time.. In the other sparses of system, writing system took maximum 20-15 secs but this time it took more than 15 minutes and still no luck..
I panicked but couldn't find any other solution.. So I closed the command prompt.. Opened a new command prompt, typed in
fastboot -i 0x2A96 devices
The ??? made me panic more.. I tried booting into my recovery through fastboot..
E:\Mobile\adb>fastboot -i 0x2A96 boot twrp.img downloading 'boot.img'... FAILED (command write failed (Unknown error)) finished. total time: 5.009s
I almost came to the conclusion that my phone is hard-bricked.. I removed the battery, re-inserted it, tried to boot into recovery through the hardware key combination.. But god was kind enough to me, my phone booted into TWRP which was already flashed.. Now I'm still in the recovery but confused what to do.. Shall I flash some custom ROM through the recovery and reboot? Shall I format the system partition? Please suggest something..