[Q] Unroot and re-lock bootloader - Nexus 4 Q&A, Help & Troubleshooting

I've searched and couldnt find info on this. I need to RMA my phone due to dead pixels and I want to ensure there's no issue with warranty.
How can I unroot and re-lock the bootloader?
Thanks in advance.

Flash the stock image. Check efrants sticky.
After its flashed type the command: fastboot oem lock
Sent from my Nexus 4

El Daddy said:
Flash the stock image. Check efrants sticky.
After its flashed type the command: fastboot oem lock
Sent from my Nexus 4
Click to expand...
Click to collapse
I'll try it tonight, thanks for the response.

The toolkits available in development have options in them to reverse everything. I used mskips toolkit to unlock mine and root it, takes all the guess work out of it.
http://forum.xda-developers.com/showthread.php?t=1995688

i am about to buy a used nexus 4 which is unlocked. I would like to ask if when locking it back (in case of rma) it says locked in the bootloader or it follows HTC policy showing "relocked". Thanx in advance.

leo_s_smith said:
i am about to buy a used nexus 4 which is unlocked. I would like to ask if when locking it back (in case of rma) it says locked in the bootloader or it follows HTC policy showing "relocked". Thanx in advance.
Click to expand...
Click to collapse
It says "LOCKED". I checked it just now.

Related

bootloader relocking

I was wondering,
what does the bootloader display when you relock it using the fast boot lock command.
Does it say relocked or locked?
Thanks,
swiftfraser said:
I was wondering,
what does the bootloader display when you relock it using the fast boot lock command.
Does it say relocked or locked?
Thanks,
Click to expand...
Click to collapse
It just says locked, just done it with mine
So does that mean that you can restore to complete factory settings and get warranty back?
Sent from my Nexus 7
Yeah, returned mine a few days ago to Tesco UK.
I used Wug's rooting toolkit, but it's your choice what you use. It downloads and flashes the stock image for you, so there is no evidence of root.
Then you use to Lock OEM feature, to re lock the boot loader. They will never know that you unlocked it

Bootloader Lock Question

I am new to the Nexus 7 and have a small question on the boot loader unlock.
If i unlock and re-lock the bootloader on the N7, does the N7 go to a 'Re-locked' state or just goes back to 'Locked' ?
I come from a HTC one x which goes to Re-Locked
pradeepvizz said:
I am new to the Nexus 7 and have a small question on the boot loader unlock.
If i unlock and re-lock the bootloader on the N7, does the N7 go to a 'Re-locked' state or just goes back to 'Locked' ?
I come from a HTC one x which goes to Re-Locked
Click to expand...
Click to collapse
Nah, it will say Locked state again.
Leonhan said:
Nah, it will say Locked state again.
Click to expand...
Click to collapse
Ah thanks for the clarification

[Q] Nexus 7 bricked

my nexus 7 with jwr66y has struck on the screen boot failed
I tried to relock using nexus tool kit and then tried to flash stock rom and relock but unfortunately nexus root kit dint woed boot locker locked rk well and it displayed bootloader locked and failoed to flash stock rom and now all i got was a bootloader screen with locked state..help me
Hey, try to do the same procedure again.
Sent from my LG-D802 using Tapatalk
federer123 said:
but unfortunately nexus root kit dint woed boot locker locked rk well
Click to expand...
Click to collapse
Easy for you to say.
I don't know what the point of locking your bootloader would be - especially if you don't have a working ROM on the tablet (stock or otherwise).
If you are trying to go back to stock and never root again, well then: unlock your bootloader, get stock running on your tablet FIRST and only then lock the bootloader after everything else is working.
So, for the moment, unlock the bootloader and get a ROM installed. You can use a toolkit if you want, but using fastboot manually will avoid the "hiding" of any error messages. There are a TON of threads in here on how to do that.
And if you want any kind of decent help, don't use the phrase "it didn't work". That's totally ambiguous - it sort of implies that there is only one possible reason why something went wrong on your tablet, and we all know exactly what that one thing is. Not even close; there are hundreds of things that could have gone wrong.
A far better approach is to detail exactly what you were attempting, and then cut and paste any error messages you observed into your post here on XDA.

[WARNING] Do NOT lock your bootloader when on Android 5.1

The new Device Protection features of Android 5.1 on the Nexus 9 and Nexus 6 can, in certain cases, cause you to have a bootloader which can not be unlocked.
Please have a read of the following links:
https://support.google.com/nexus/answer/6172890?hl=en
http://forum.xda-developers.com/nexus-6/help/update-to-5-1-lock-bootloader-t3058480
http://forum.xda-developers.com/nexus-6/general/relock-bootloader-time-updating-to-5-1-t3053497
What a pita
Sent from my Nexus 5 using XDA Free mobile app
i would never relock my bootloader
people unlock there bootloader for a reason
but to relock it after thats just wrong...
thats one of the things i hate about CM
they recommend you to relock your bootloader...
Agreed, why would you lock your bootloader unless sending in for repairs maybe?
But Google is really messing up the flow. The nexus 6 5.1 OTA is a mess right now but I will leave that for another thread.
Android 5.1 for Nexus 9? You must be joking.
So, I just purchased a Nexus 9 via the 4-hour online-only sale at Best Buy. It was $100 off, couldn't pass it up. My question is: is this likely going to be shipped in such a condition as to prevent me from permanently unlocking the bootloader? Or is a permanent lock something one must deliberately do?
disturbd1 said:
So, I just purchased a Nexus 9 via the 4-hour online-only sale at Best Buy. It was $100 off, couldn't pass it up. My question is: is this likely going to be shipped in such a condition as to prevent me from permanently unlocking the bootloader? Or is a permanent lock something one must deliberately do?
Click to expand...
Click to collapse
No no you can still unlock it
But if you relock it that's the problem
disturbd1 said:
So, I just purchased a Nexus 9 via the 4-hour online-only sale at Best Buy. It was $100 off, couldn't pass it up. My question is: is this likely going to be shipped in such a condition as to prevent me from permanently unlocking the bootloader? Or is a permanent lock something one must deliberately do?
Click to expand...
Click to collapse
As USBhost said, you'll be able to unlock it. However, when you are first setting it up and are running through the set-up wizard, there will be an option to "Protect Device" or something like that. If you enable it, and re-lock the bootloader, it will put you in a situation where you can only unlock the booloader in certain situations -- and if you happen to have a bootloop with a locked bootloader, that's when you are in trouble.
EDIT: On Nexus devices, I personally unlock the bootloader as soon as I take it out of the box, without first booting into Android, and then leave it unlocked. But of course, you give up some security by doing that.
efrant said:
As USBhost said, you'll be able to unlock it. However, when you are first setting it up and are running through the set-up wizard, there will be an option to "Protect Device" or something like that. If you enable it, and re-lock the bootloader, it will put you in a situation where you can only unlock the booloader in certain situations -- and if you happen to have a bootloop with a locked bootloader, that's when you are in trouble.
EDIT: On Nexus devices, I personally unlock the bootloader as soon as I take it out of the box, without first booting into Android, and then leave it unlocked. But of course, you give up some security by doing that.
Click to expand...
Click to collapse
Considering this is a tablet, hopefully I won't lose or misplace it
Thanks, guys! Glad I stumbled across this thread before the thing arrived.
Locking the bootloader doesn't protect you from anything. If the device leaves your physical control in a potentially hostile environment, whatever is on the system or boot partition becomes suspect, regardless of whether the bootloader is locked or unlocked.
doitright said:
Locking the bootloader doesn't protect you from anything. If the device leaves your physical control in a potentially hostile environment, whatever is on the system or boot partition becomes suspect, regardless of whether the bootloader is locked or unlocked.
Click to expand...
Click to collapse
Example: I have a device running a stock ROM with no encryption, the stock recovery and a lock screen password. I happen to lose my phone. What happens to the photos of me dancing to Old Time Rock & Roll in my underwear that are stored on the device? If the bootloader is unlocked, someone just plugs it into a PC, boots TWRP and pulls them off. If the bootloader is locked, there is no easy way to see or get the photos off the device.
That is all I was saying about security. Nothing to do with you leaving your device somewhere or losing it, and then finding it again. Strictly about the personal content on the device.
efrant said:
EDIT: On Nexus devices, I personally unlock the bootloader as soon as I take it out of the box, without first booting into Android, and then leave it unlocked. But of course, you give up some security by doing that.
Click to expand...
Click to collapse
I thought Lollipop always requires you to go in and check the Enable OEM Unlock box? Or is that not true if you never booted into Android even once?
bailyc said:
I thought Lollipop always requires you to go in and check the Enable OEM Unlock box? Or is that not true if you never booted into Android even once?
Click to expand...
Click to collapse
If you have never booted into Android, then you don't need to check that setting. As I said, that's the way I did it on my N6: take out of box -> charge -> boot directly into bootloader -> "fastboot oem unlock". No other steps required if you don't boot into Android first.
can i use this guide for safely relock my Bl on Nexus 9 ..... Relocking coz of RMA and warranty purpose as bought from amazon India instead of Play Store
http://forum.xda-developers.com/nexus-6/general/guide-safely-lock-bootloader-android-5-1-t3067302
lilliput222 said:
can i use this guide for safely relock my Bl on Nexus 9 ..... Relocking coz of RMA and warranty purpose as bought from amazon India instead of Play Store
http://forum.xda-developers.com/nexus-6/general/guide-safely-lock-bootloader-android-5-1-t3067302
Click to expand...
Click to collapse
Yes, that should work for the N9 as well.
The bootloader on my Nexus 9 Android 5.1.1 is locked forever due to my mistake
Short backstory:
- I wanted to install the Android M developer Preview for the Nexus 9 but I forgot to check "Enable OEM unlock" in developer options (worst mistake).
- I used adb command to flash the new image but failed somehow
- I carelessly type # fastboot oem lock
- I tried to factory reset from bootloader to bring it back to Stock. Now it couldn't factory reset and my Nexus 9 hangs in a nice boot loop.
- I try # fastboot oem unlock but failed with permission denied error
I tried some ways to save my device but no hopes
- I used Nexus Root Tookit to unlock bootloader or restore image with force mode but failed,
- I follow instruction in HTC dev forum to get identifier token in order to receive your unlock code binary file but failed
- Unluckily, I don't installed any custom recovery.
Please help if you know a way unlock the bootloader or flash the factory ROM to save the nexus 9
quekl84 said:
Please help if you know a way unlock the bootloader or flash the factory ROM to save the nexus 9
Click to expand...
Click to collapse
Not possible. You will have to return it to HTC for repair or replacement.
quekl84 said:
Short backstory:
- I wanted to install the Android M developer Preview for the Nexus 9 but I forgot to uncheck "Enable OEM unlock" in developer options (worst mistake).
- I used adb command to flash the new image but failed somehow
- I carelessly type # fastboot oem lock
- I tried to factory reset from bootloader to bring it back to Stock. Now it couldn't factory reset and my Nexus 9 hangs in a nice boot loop.
- I try # fastboot oem unlock but failed with permission denied error
I tried some ways to save my device but no hopes
- I used Nexus Root Tookit to unlock bootloader or restore image with force mode but failed,
- I follow instruction in HTC dev forum to get identifier token in order to receive your unlock code binary file but failed
- Unluckily, I don't installed any custom recovery.
Please help if you know a way unlock the bootloader or flash the factory ROM to save the nexus 9
Click to expand...
Click to collapse
u mean u forgot to CHECK to box to allow oem UNLOCK? im confused lol
cobyman7035 said:
u mean u forgot to CHECK to box to allow oem UNLOCK? im confused lol
Click to expand...
Click to collapse
Yes, I forgot to check the box to allow oem UNLOCK. And now my device is locked forever.
A quick question: A lot of N9 ROMs require flashing an updated bootloader from the factory image. Aren't these bootloaders locked by default? Can we flash a factory bootloader over a custom ROM?
It seems that we might bork our Nexus 9s if we flash a locked bootloader in.

Stuck on Google Logo, Can't Unlock Bootloader

Hey there.
So I tried to use the Nexus Root Toolkit to sideload the OTA, but now when I try to boot my phone it just shows the white google screen and doesn't do anything. I can use ADB and fastboot and get into the bootloader but I can't flash the factory image because I never checked the "Allow OEM Unlock" tick since I didn't plan on unlocking the bootloader. Can anyone help me out here?
Durvid said:
Hey there.
So I tried to use the Nexus Root Toolkit to sideload the OTA, but now when I try to boot my phone it just shows the white google screen and doesn't do anything. I can use ADB and fastboot and get into the bootloader but I can't flash the factory image because I never checked the "Allow OEM Unlock" tick since I didn't plan on unlocking the bootloader. Can anyone help me out here?
Click to expand...
Click to collapse
This is exactly why you should never mess with updates or flashing anything with a locked bootloader. If a factory reset doesn't fix it you're likely out of luck.
if your bootloader is locked still I can't see how flashing an OTA would effect this.
Have you tried to flash just the original bootloader from the android version on your device ( not the version you wish to update to )
Fastboot flash bootloader bootloader.img
DON'T USE A TOOL KIT ! UNLESS YOU KNOW WHAT YOU ARE DOING ! There where clear instructions on how to flash OTA's on this site and likely in the toolkit.
Unfortunately this is a case of NOT reading before doing things, I have yet to see anyone recover from this.
Best of luck tho, but it might be a lesson learned the hardway a.k.a RMA
hutzdani said:
if your bootloader is locked still I can't see how flashing an OTA would effect this.
Have you tried to flash just the original bootloader from the android version on your device ( not the version you wish to update to )
Fastboot flash bootloader bootloader.img
DON'T USE A TOOL KIT ! UNLESS YOU KNOW WHAT YOU ARE DOING ! There where clear instructions on how to flash OTA's on this site and likely in the toolkit.
Unfortunately this is a case of NOT reading before doing things, I have yet to see anyone recover from this.
Best of luck tho, but it might be a lesson learned the hardway a.k.a RMA
Click to expand...
Click to collapse
I'll attempt this. Weirdly enough when I look at device info in adb it shows it as being on the newest version. But Yeah I'll attempt to flash what I was on before.
Yeah, I mean I've done this before with no issues on my Nexus 6 and there were no issues but that was unlocked when I got it. I just thought you didn't have to unlock the bootloader to sideload OTA's? I may be wrong.
hutzdani said:
if your bootloader is locked still I can't see how flashing an OTA would effect this.
Have you tried to flash just the original bootloader from the android version on your device ( not the version you wish to update to )
Fastboot flash bootloader bootloader.img
Click to expand...
Click to collapse
Yeah like I thought, "Device is locked. Cannot Flash Images"
I wish I had known they added that "Allow OEM Unlock" Switch in Lollipop. Would have solved my problem if I had that toggled.
Durvid said:
Yeah like I thought, "Device is locked. Cannot Flash Images"
I wish I had known they added that "Allow OEM Unlock" Switch in Lollipop. Would have solved my problem if I had that toggled.
Click to expand...
Click to collapse
You just said you had a nexus 6 unlocked, how did you not know the switch existed?
hutzdani said:
if your bootloader is locked still I can't see how flashing an OTA would effect this.
Have you tried to flash just the original bootloader from the android version on your device ( not the version you wish to update to )
Fastboot flash bootloader bootloader.img
DON'T USE A TOOL KIT ! UNLESS YOU KNOW WHAT YOU ARE DOING ! There where clear instructions on how to flash OTA's on this site and likely in the toolkit.
Unfortunately this is a case of NOT reading before doing things, I have yet to see anyone recover from this.
Best of luck tho, but it might be a lesson learned the hardway a.k.a RMA
Click to expand...
Click to collapse
akellar said:
You just said you had a nexus 6 unlocked, how did you not know the switch existed?
Click to expand...
Click to collapse
I bought it used on /r/hardwareswap and whoever I got it from had already unlocked it.
I know someone advised you to try to flash a bootloader, but it isn't going to work of your bootloader is locked. What build were you on and which OTA zip did you try to flash?
Heisenberg said:
I know someone advised you to try to flash a bootloader, but it isn't going to work of your bootloader is locked. What build were you on and which OTA zip did you try to flash?
Click to expand...
Click to collapse
I started on 6.0 MDB08L and was trying to flash 6.1 MMB29M
Durvid said:
I started on 6.0 MDB08L and was trying to flash 6.1 MMB29M
Click to expand...
Click to collapse
OK, but I need the name of the zip please.
Heisenberg said:
OK, but I need the name of the zip please.
Click to expand...
Click to collapse
Sorry, it's
533df5ddfa4297997634a8553f0122be5cca4c09.signed-angler-MMB29M-from-MDB08L.zip.
Grabbed it from here: https://www.reddit.com/r/Nexus6P/comments/3w6qzd/easy_how_to_sideload_ota_601/
Durvid said:
Sorry, it's
533df5ddfa4297997634a8553f0122be5cca4c09.signed-angler-MMB29M-from-MDB08L.zip.
Grabbed it from here: https://www.reddit.com/r/Nexus6P/comments/3w6qzd/easy_how_to_sideload_ota_601/
Click to expand...
Click to collapse
OK, just needed to make sure you had the right one. What have you done to troubleshoot so far?
Heisenberg said:
OK, just needed to make sure you had the right one. What have you done to troubleshoot so far?
Click to expand...
Click to collapse
I've tied to flash stock, but can't do that due to the bootloader being locked, tried to just hard reset but it just does the same thing where it gets stuck on the Google logo. I checked the manufacture info in the toolkit and everything is clean. Tried to flash the old bootloader but like you said I can't flash since I'm locked. Not really sure what else to do :/
Durvid said:
I've tied to flash stock, but can't do that due to the bootloader being locked, tried to just hard reset but it just does the same thing where it gets stuck on the Google logo. I checked the manufacture info in the toolkit and everything is clean. Tried to flash the old bootloader but like you said I can't flash since I'm locked. Not really sure what else to do :/
Click to expand...
Click to collapse
Honestly, I think you're pretty much screwed unfortunately. You could talk to Google support and see if they'll RMA the phone.
Heisenberg said:
Honestly, I think you're pretty much screwed unfortunately. You could talk to Google support and see if they'll RMA the phone.
Click to expand...
Click to collapse
Yeah I think they would do it since I technically didn't void any warrantys or anything. I appreciate the help. What do I need to make sure to do if I do this again in the future? Definitely "Allow OEM Unlock", and do I have to unlock the bootloader? I was under the impression that you didn't have to to flash an OTA.
Durvid said:
Yeah I think they would do it since I technically didn't void any warrantys or anything. I appreciate the help. What do I need to make sure to do if I do this again in the future? Definitely "Allow OEM Unlock", and do I have to unlock the bootloader? I was under the impression that you didn't have to to flash an OTA.
Click to expand...
Click to collapse
Definitely unlock the bootloader, it isn't needed to flash an update via the stock recovery, but it is needed to get out of sticky situations like this. If your bootloader was unlocked now you'd be up and running in ten minutes.
Durvid said:
Sorry, it's
533df5ddfa4297997634a8553f0122be5cca4c09.signed-angler-MMB29M-from-MDB08L.zip.
Grabbed it from here: https://www.reddit.com/r/Nexus6P/comments/3w6qzd/easy_how_to_sideload_ota_601/
Click to expand...
Click to collapse
Hilarious that the top comment is mine telling you why doing this is a bad idea
Heisenberg said:
Definitely unlock the bootloader, it isn't needed to flash an update via the stock recovery, but it is needed to get out of sticky situations like this. If your bootloader was unlocked now you'd be up and running in ten minutes.
Click to expand...
Click to collapse
Yeah, I'll probably wait for the update over the air for a while and maybe if I feel reallly eager I'll just make sure I unlock and such. Annoying that you can't unlock via fastboot anymore without that toggle. I get that Google is trying to make Android super secure but It's not too useful for folks like us. Sure it's bricked a lot of devices.
akellar said:
Hilarious that the top comment is mine telling you why doing this is a bad idea
Click to expand...
Click to collapse
I've done it before with other devices. I wouldn't say it's inherently bad. It's just that there was one toggle that I wasn't aware of that caused the issue. You live and you learn.
THIS IS NOT MY IDEA !
I found this in a N9 thread and it worked according to the user with the issue, apply this with the correct t factory image ( do it with the version you have on your device not the one you tried to update to ! )
This might not work but its worth a try ! Before doing this read about ADB and Fastboot !!!!!!!!!!!!!!!! Try and understand the basics and know what the commands are doing to help backtrack e.C.t
If it does work - go to settings and allow OEM Unlock and USB debug !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Then go read from reputable sources how to flash images manually via adb !!!!!!!!!!!!!!!!!!!!!!!
I'd follow vomers guides.
Had this problem with another device cool thing to remeber is that on locked devices the only thing that is different is that there is a signature before the MAGIC header so the solution is to pull the android stock images from https://developers.google.com/android/nexus/images. Once done extract the images in both the zip and the tar that is inside the zip. You will see recovery.img inside the tar. One thing about the boot process of TWRP is that it enables adb in preboot meaning while in the boot loop you should have access to adb. With access to adb all you need to do is dd the images over the corresponding partitions: i.e.
PLEASE NOTE NOT FOR THE FEINT OF HEART. I AM NOT RESPONSIBLE FOR YOU BRICKING YOUR DEVICE.
Quote:
adb push recovery.img recovery.img
adb shell dd if=recovery.img of=/dev/block/<recoverymmcblock>
I dont know if the default recovery has adb push update so id probably recommend doing this on every partition thats inside the tar, i.e. system, boot.

Categories

Resources