Moderator please move this to Android section of forum. I reported this yesterday since I don't have privileges to shift topics.
To flash a different firmware you must have to unlock the bootloader first using fastboot [android platform tools] disadvantage of unlocking the bootloader : a warning msg on every boot that your phone warranty is viod & attackers will achieve or gain access to your files easily from now onwards. there is a workaround to relock your bootloader again : switch off phone then press both volume swicth + & - & connect to your pc it will show relock bootloader & press hold volume up then again volume up . here phone will reboot with warning gone & bootloader is locked again. Edit : in both scenarios either unlock or relock bootloader your data will be erased & phone will be set to factory defaults.