Ive bricked my nokia lumia 520 while trying to unlock the bootloader:
the way i did it was
Going into C:/Program Files/Microsoft Care Suite/Windows Phone Recovery Tool
and generating GPT0.bin (this file is very important)
You can generate your GPT0.bin file by inserting
Thor2 -mode ffureader C:/example directory/myfile.ffu -dump_gpt C:/example directory
and getting the right .hex file corresponding to the RKH (root key hash) you can get your RKH by booting into flash mode, opening windows phone internals,going to the info tab and finding the really long string of letters and numbers because thats your RKH
Then going into the MPRG_HEX.zip (you can find it with a quick google search)
Rename the correct hex file with your RKH to hex.hex
Then going back into command prompt and inserting
thor2 -mode emergency -hexfile C:/example/hex.hex -mbnfile C:/example/GPT0.bin -orig_gpt
Then it should take a few seconds
DO NOT REMOVE PHONE UNTIL TOLD TO!!!!!!
Then remove phone, take out the battery, insert battery and turn on the phone, you should hear a vibration and it should boot into nokia flash mode and you can go ahead and flash the ffu by:
Thor2 -mode uefiflash -ffu C:/example/flashy.ffu
Replace the example directory with your real directory
Wait 20 minutes and your phone should be fully operational
You just revived your lumia from death!