[SOLVED] Completely re-stock from 5.0.1 for Edge upgrade

Klayderpus

Member
Dec 28, 2012
33
10
0
Solved this one on my own. Went from LolliGPE 5.0.1 with Elite kernel and TWRP, S-OFF and unlocked to stock VZW 5.0.1, S-ON and locked. Here's what I did:

1) Remove developer warnings. Follow the instructions on this thread. Unsure if this is entirely necessary as the next step probably takes care of this, but better safe than sorry.

2) Flash stock everything. Follow the instructions on this thread. I used the USB all-in-one FUU method, but whatever works for you is best. I ran into a problem in which an error symbol appeared next to the progress bar and the flash failed; to fix this I held power and volume up for about 30 seconds until it rebooted and the error symbol appeared in all four corners, and then started the FUU again. This time it was successful.

3) Reboot and load up the phone. It will be completely stock and will take about 5-10 minutes to fully boot the first time around. Afterwards, head to settings > about > software information > more and hit the Build number entry until you are a developer. Then go back to Developer options and enable USB debugging.

If rebooting shows the developer information, re-flash the zip from step 1.

4) Run adb devices and ensure your phone is listed. Then run adb shell followed by su. Accept the superuser request on your phone, and then copy the following and paste it into the prompt:
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
Hit enter and then run adb reboot bootloader. You should be locked.

5) Put it back into S-ON by running
fastboot oem writesecureflag 3
...followed by
fastboot reboot-bootloader

You should be locked and S-OFF on stock 5.0.1. The only thing that's there is SuperSU. To remove root, simply install HTC Sync Manager, connect your device, and choose to repair it. The official clean Verizon software will be flashed and your phone will be as if it just came out of the box.
 
Last edited:
  • Like
Reactions: darkriff

dottat

Retired Forum Moderator
Jan 10, 2011
7,121
4,474
253
york, pa
Solved this one on my own. Went from LolliGPE 5.0.1 with Elite kernel and TWRP, S-OFF and unlocked to stock VZW 5.0.1, S-ON and locked. Here's what I did:

1) Remove developer warnings. Follow the instructions on this thread. Unsure if this is entirely necessary as the next step probably takes care of this, but better safe than sorry.

2) Flash stock everything. Follow the instructions on this thread. I used the USB all-in-one FUU method, but whatever works for you is best. I ran into a problem in which an error symbol appeared next to the progress bar and the flash failed; to fix this I held power and volume up for about 30 seconds until it rebooted and the error symbol appeared in all four corners, and then started the FUU again. This time it was successful.

3) Reboot and load up the phone. It will be completely stock and will take about 5-10 minutes to fully boot the first time around. Afterwards, head to settings > about > software information > more and hit the Build number entry until you are a developer. Then go back to Developer options and enable USB debugging.

If rebooting shows the developer information, re-flash the zip from step 1.

4) Run adb devices and ensure your phone is listed. Then run adb shell followed by su. Accept the superuser request on your phone, and then copy the following and paste it into the prompt:
echo -ne '\x00\x00\x00\x00' | dd of=/dev/block/mmcblk0p2 bs=1 seek=33796
Hit enter and then run adb reboot bootloader. You should be locked.

5) Put it back into S-ON by running
fastboot oem writesecureflag 3
...followed by
fastboot reboot-bootloader

You should be locked and S-OFF on stock 5.0.1. The only thing that's there is SuperSU. To remove root, simply install HTC Sync Manager, connect your device, and choose to repair it. The official clean Verizon software will be flashed and your phone will be as if it just came out of the box.
It's a lot quicker to just do step 4 in twrp and flash my s-on ruu and then turn s-on.