Relock Bootloader and return stock

Xshooter726

Senior Member
Mar 4, 2014
386
266
0
For those of you that are rooted and would like to return back to stock with a relocked bootloader follow the steps.
This could also be useful for those of you stuck with a non bootable device. It will make your device eligible for warranty replacement again.

1. Flash stock boot.img (link) with the following command:
Code:
Fastboot Flash boot Stock_Boot.img
2.Re-lock bootloader with
Code:
Fastboot flashing lock
3. Enter recovery with Vol+ and USB plugged in. Then go down to wipe and Factory restore. Reboot and DONE

Hope this tip is useful to some.
See yah :cool:

Stock Boot.img Link
https://drive.google.com/open?id=1SqjkwVzNC3nAqDkNDMdEpqQH7viXDmb4
 
Last edited:
  • Like
Reactions: Kalveitt

Aburel18

Senior Member
Jun 20, 2009
162
26
0
London
Confirmed , you just made my day sir . i resurrect my device i flashed how you said with that command but i need to add -i 0x1532 , i got a message that is gonna flash it on b partition ,he said is done , after i restart it i got a message on phone (erasing) after i done the steps to factory reset it , i managed to get in the stock recovery, after 10 minutes i booted in the software all fine but not the wifi and flashlight ,
thank you once again for your hard work.
we keep in touch maybe i can do the wifi and flashlight
my device
Razer three uk
 

hector689

Member
Oct 20, 2015
30
10
0
So I relocked the bootloader before this file was released, by mistake my phone has twrp on both partitions, so when ever I boot it just says device corrupt and reboot I can however access qualcom diagnostics by pressing volume up + volume down at the same time, just wondering if phone can be restored through that interface
 

mikeandjaimie

Senior Member
Aug 5, 2010
914
157
0
Kingston
Btw as I'm finding out.. This doesn't reset to stock! It does relock your phone and you loose root, but any changes made to the system files while you were rooted sticks.. Ie hosts file changes. I'm back to "stock" and the adaway hosts file changes are still present.. I expect other changes are still there too and that's why I can't flash the update. :( guess I'm waiting for factory images for a full stock as well)
 

kirschdog1

Senior Member
May 12, 2010
1,377
173
93
Saint Paul
Btw as I'm finding out.. This doesn't reset to stock! It does relock your phone and you loose root, but any changes made to the system files while you were rooted sticks.. Ie hosts file changes. I'm back to "stock" and the adaway hosts file changes are still present.. I expect other changes are still there too and that's why I can't flash the update. :( guess I'm waiting for factory images for a full stock as well)
Hopefully they get released at all at this point...sure looking less and less likely at this juncture with incremental push updates coming from Razer.
 

Kalveitt

Member
May 29, 2007
14
1
3
Boston Metro Area
Btw as I'm finding out.. This doesn't reset to stock! It does relock your phone and you loose root, but any changes made to the system files while you were rooted sticks.. Ie hosts file changes. I'm back to "stock" and the adaway hosts file changes are still present.. I expect other changes are still there too and that's why I can't flash the update. :( guess I'm waiting for factory images for a full stock as well)
Or if someone with a US/NA Razer Phone was nice enough to upload and post there TWRP backups before the the partitions were modified. We have a backup for the 3UK people, but one from US/NA Razer Phone, and one from the EU/Non Carrier Razer would help alot of people. I know people have them, just no one willing to share I guess :( Will probably be months if Razer ever actually posts the Factory Images.
 

mikeandjaimie

Senior Member
Aug 5, 2010
914
157
0
Kingston
There have been files for both uploaded and it was determined you couldn't use them for 3 phones already.. That's how alot of people got non working phones that just say corrupted now..

Gotta wait till factory images are released if you are on 3.
 

Xshooter726

Senior Member
Mar 4, 2014
386
266
0
Btw as I'm finding out.. This doesn't reset to stock! It does relock your phone and you loose root, but any changes made to the system files while you were rooted sticks.. Ie hosts file changes. I'm back to "stock" and the adaway hosts file changes are still present.. I expect other changes are still there too and that's why I can't flash the update. :( guess I'm waiting for factory images for a full stock as well)
I manage to find the location of the ota Update.zip and tried flashing it in the stock recovery but it also fails on stage 2.

As you pointed it out. The update is failing because it's still recognizing the system as modified.

I'll leave my link up to help those who are stuck on a boot loop with an unlocked bootloader this will at least make them eligible for warranty replacement so it's something... Follow the steps and then send it off to Razer for warranty replacement. It's a shame really to send out a phone that could easily be fixed with system images. Razer has really dropped the ball. Not having system images from day one really hurt the enthusiast development for this device. If your not able to send it out for warranty replacement then all you can really do is wait for Razer to release the images and I think they may not release them until they release Oreo.
 
  • Like
Reactions: kirschdog1

Mike02z

Senior Member
Feb 3, 2012
1,952
794
0
Greenville, SC
I followed the step-by-step for putting twrp on mine. All seems to go well but it just keeps booting back into bootloader. If I turn it off and hold the vol+ while plugging in the USB I just get the Razer logo and nothing. When I finally gave up I flashed the stock boot in the OP. I'm up and running now but no BT and the latest update just fails. Relocked the BL and no system changes were made since TWRP never seems to have installed, if though I got a successful when complete. I hate to send this back, anyone know if they can reflash it remotely? I'll pay the fee, just need the phone working on WiFi again.
 

mikedeboefis

New member
Oct 3, 2016
3
0
0
Solved Flash Razer Phone To Stock and gain OTA capable!!

This is for the Razer Phone!!!! Fixed Warranty and OTA Update!! As if freshly purchased!!!!

I figured out that unless you use the Razer provided images from their support site your phone will not function properly as any other procedure will be extremely time consuming on a command prompt!!! Imagine individually flashing all components in their respective orders and flashing to both partitions is a requirement so use the provide images and the flashall.sh command included in the downloaded file.

The instructions for gaining the ability to flash the update via windows cmd.

follow the original instructions from the razer support site and the do this for the connection or what it's actually called (Environment variables) you will need to navigate on your pc to the system properties window the click on environment variables, two panes in the window at the lower pane look for the PATH line which is the pathe for the variable to point cmd to file system where your stock razer update is located. If you followed all steps : usb drivers, androis sdk 28.xx or higher extracted to C:/adb folder, navigated to system window then update driver connect phone in bootloader mode then open update driver browse computer let me pick from a list of drivers on my computer and install the android bootloader interface continue even though it says not recomended it works.
now open your razer downloaded factory file and double click flashall.sh and wait till finished then stop the reboot and boot to booloader and open windows cmd and type fastboot devices then type fastboot flashing lock and lock it up, Done sorry for the unorganized text but I'm sure nobody cares as long as it works right? !#fi enjoy!!!
 
Last edited:

mikedeboefis

New member
Oct 3, 2016
3
0
0
Solved!!!!!!!!!!!!!

:):):):):):):):):):):):)

---------- Post added at 06:41 AM ---------- Previous post was at 06:20 AM ----------

I followed the step-by-step for putting twrp on mine. All seems to go well but it just keeps booting back into bootloader. If I turn it off and hold the vol+ while plugging in the USB I just get the Razer logo and nothing. When I finally gave up I flashed the stock boot in the OP. I'm up and running now but no BT and the latest update just fails. Relocked the BL and no system changes were made since TWRP never seems to have installed, if though I got a successful when complete. I hate to send this back, anyone know if they can reflash it remotely? I'll pay the fee, just need the phone working on WiFi again.
I solved this and if you need detailed instructions or help anyone can ask and I will help and yes it does return it to brand new fresh ota and warranty is returned, everything works as it should no bugs wifi works and data on sim.

As for twrp you should flash it to one slot not both as you may know system is on both slots you could have two slots with twrp and no system lol I did that before!
Your phone can be stock but not ota with twrp fyi.
 
Last edited:

Mike02z

Senior Member
Feb 3, 2012
1,952
794
0
Greenville, SC
Solved!!!!!!!!!!!!!

:):):):):):):):):):):):)

---------- Post added at 06:41 AM ---------- Previous post was at 06:20 AM ----------



I solved this and if you need detailed instructions or help anyone can ask and I will help and yes it does return it to brand new fresh ota and warranty is returned, everything works as it should no bugs wifi works and data on sim.

As for twrp you should flash it to one slot not both as you may know system is on both slots you could have two slots with twrp and no system lol I did that before!
Your phone can be stock but not ota with twrp fyi.
Thanks, but I returned my Razer within the first 30 days. Just not for me.
 

matt0323

Senior Member
Jan 27, 2010
89
4
0
Markham, Ontario
This is for the Razer Phone!!!! Fixed Warranty and OTA Update!! As if freshly purchased!!!!

I figured out that unless you use the Razer provided images from their support site your phone will not function properly as any other procedure will be extremely time consuming on a command prompt!!! Imagine individually flashing all components in their respective orders and flashing to both partitions is a requirement so use the provide images and the flashall.sh command included in the downloaded file.

The instructions for gaining the ability to flash the update via windows cmd.

follow the original instructions from the razer support site and the do this for the connection or what it's actually called (Environment variables) you will need to navigate on your pc to the system properties window the click on environment variables, two panes in the window at the lower pane look for the PATH line which is the pathe for the variable to point cmd to file system where your stock razer update is located. If you followed all steps : usb drivers, androis sdk 28.xx or higher extracted to C:/adb folder, navigated to system window then update driver connect phone in bootloader mode then open update driver browse computer let me pick from a list of drivers on my computer and install the android bootloader interface continue even though it says not recomended it works.
now open your razer downloaded factory file and double click flashall.sh and wait till finished then stop the reboot and boot to booloader and open windows cmd and type fastboot devices then type fastboot flashing lock and lock it up, Done sorry for the unorganized text but I'm sure nobody cares as long as it works right? !#fi enjoy!!!
Yeah.. I need help on this one. I tried it and fastboot doesn't allow me to flash_all script.

How do you even double click flashall.sh?
 

LadyHaywood

Member
Jul 19, 2015
20
0
31
I know this is kind of old but I'm currently having the same problem as a person above. I've tried using the flash_all command but it will only stay at "waiting for device" and doing flash_all.sh doesn't work.