Re-locking the bootloader - Nexus 5X Q&A, Help & Troubleshooting

Friend bought a used 5x from Swappa and it come with an unlocked bootloader, nbd. We flashed stock firmware and left it as is. He's happy.
Now that Android Pay/Safetynet is detecting his bootloader, he's not having any of it. Wants to lock the bootloader back up to restore AP functionality. I just want to confirm, 1.) this will wipe EVERYTHING on it, correct (I told him to get everything backed up)? And 2.), do I need to flash stock images before locking even though it's a bone stock 7.0 setup?

tallgrasshawk said:
Friend bought a used 5x from Swappa and it come with an unlocked bootloader, nbd. We flashed stock firmware and left it as is. He's happy.
Now that Android Pay/Safetynet is detecting his bootloader, he's not having any of it. Wants to lock the bootloader back up to restore AP functionality. I just want to confirm, 1.) this will wipe EVERYTHING on it, correct (I told him to get everything backed up)? And 2.), do I need to flash stock images before locking even though it's a bone stock 7.0 setup?
Click to expand...
Click to collapse
Never done it but to be safe I'd use a tool like this one.
http://forum.xda-developers.com/nex...olkit-skipsoft-android-toolkit-nexus-t3230444

tallgrasshawk said:
Friend bought a used 5x from Swappa and it come with an unlocked bootloader, nbd. We flashed stock firmware and left it as is. He's happy.
Now that Android Pay/Safetynet is detecting his bootloader, he's not having any of it. Wants to lock the bootloader back up to restore AP functionality. I just want to confirm, 1.) this will wipe EVERYTHING on it, correct (I told him to get everything backed up)? And 2.), do I need to flash stock images before locking even though it's a bone stock 7.0 setup?
Click to expand...
Click to collapse
There is a Heisenberg thread that will walk you thru it all. Download the image you want, factory reset while booted, auto reboot, bootloader, flash every file according to the thread, then fastboot OEM lock. Reboot and done. Don't lock until you flash every file.
Sent from my Nexus 5X using XDA-Developers mobile app

Related

[Q] When to activate

I just purchased a Verizon Galaxy Nexus on eBay (since they were banned in the US...) and It's in the mail on the way now. It's a new phone, although the guy opened it and upgraded it to 4.0.4 and rooted it. I was planning on doing this, but he did it anyway.
Anyway, I want to install Jelly Bean. I'm no noob when it comes to flashing things, but I was just wondering if there would be any problem having it activated if I flash a ROM beforehand?
The phone has a clean ESN and everything, I just want to confirm that I won't have any problems trying to activate after I have installed JB.
For what it's worth, I was going to flash this with Faux's kernel.
Thanks!
KCP100 said:
I just purchased a Verizon Galaxy Nexus on eBay (since they were banned in the US...) and It's in the mail on the way now. It's a new phone, although the guy opened it and upgraded it to 4.0.4 and rooted it. I was planning on doing this, but he did it anyway.
Anyway, I want to install Jelly Bean. I'm no noob when it comes to flashing things, but I was just wondering if there would be any problem having it activated if I flash a ROM beforehand?
The phone has a clean ESN and everything, I just want to confirm that I won't have any problems trying to activate after I have installed JB.
For what it's worth, I was going to flash this with Faux's kernel.
Thanks!
Click to expand...
Click to collapse
No, you shouldn't have any problem. If it were me, I would, flash Nexus factory images, wipe everything (lock bootloader), and then unlock bootloader, flash custom recovery, gain root, then start my own flashing (since it is a used phone, and you can't be too careful with that kind of stuff.)
anton2009 said:
No, you shouldn't have any problem. If it were me, I would, flash Nexus factory images, wipe everything (lock bootloader), and then unlock bootloader, flash custom recovery, gain root, then start my own flashing (since it is a used phone, and you can't be too careful with that kind of stuff.)
Click to expand...
Click to collapse
+1'd :good:
anton2009 said:
No, you shouldn't have any problem. If it were me, I would, flash Nexus factory images, wipe everything (lock bootloader), and then unlock bootloader, flash custom recovery, gain root, then start my own flashing (since it is a used phone, and you can't be too careful with that kind of stuff.)
Click to expand...
Click to collapse
That's what I thought, thank you.
It's a "new" phone that was used for less than a day, but it's still not brand new, so you're right about that.

HELP!! Potentially bricked my m9

Hi Guys,
Not sure if much can be done, so before I flashed a rom for 5.1.1, I decided to flash the required, firmware 2.9.710.x, but before flashing that, I re-locked my bootloader, as I have s-on. Before that, I was trying to get the OTA to work but it didn't as I had mounted system as r/w. So I had stock recovery, s-on and relocked bootloader. After I flashed the firmware, I could not unlock the bootloader as there is some new developer setting that I am required to enable. BUT the I am still on old 5.0 ROM that will not boot anymore and is stuck on the splash screen - I've tried wipe cache and factory reset. I have an RUU for 1.32 which I cannot use because now I have 2.9.710.x firmware. I've also tried to sideload the OTA but that will not work because system was mounted r/w
Is there anything I can do to get it to work? I feel like I've tried all avenues, but if there is something you guys think I can do to make it work again, I'd be over the moon!
anshuashmeet said:
Hi Guys,
Not sure if much can be done, so before I flashed a rom for 5.1.1, I decided to flash the required, firmware 2.9.710.x, but before flashing that, I re-locked my bootloader, as I have s-on. Before that, I was trying to get the OTA to work but it didn't as I had mounted system as r/w. So I had stock recovery, s-on and relocked bootloader. After I flashed the firmware, I could not unlock the bootloader as there is some new developer setting that I am required to enable. BUT the I am still on old 5.0 ROM that will not boot anymore and is stuck on the splash screen - I've tried wipe cache and factory reset. I have an RUU for 1.32 which I cannot use because now I have 2.9.710.x firmware. I've also tried to sideload the OTA but that will not work because system was mounted r/w
Is there anything I can do to get it to work? I feel like I've tried all avenues, but if there is something you guys think I can do to make it work again, I'd be over the moon!
Click to expand...
Click to collapse
Never relock if your phone is not 100 % stock. Otherwise it won't boot. Besides there are already numerous post written by people that made the same mistake as you did. Even if your phone could boot you wouldn't be able to enable the OEM Unlock option since it's not implemented in the 1.XX roms and by flashing the firmware you do not update your rom.
I guess the only possibility to recover your phone is using this RUU service.
Just because I'm curious: Why didn't you use one of the backups that are provided here?
Flippy498 said:
Never relock if your phone is not 100 % stock. Otherwise it won't boot. Besides there are already numerous post written by people that made the same mistake as you did. Even if your phone could boot you wouldn't be able to enable the OEM Unlock option since it's not implemented in the 1.XX roms and by flashing the firmware you do not update your rom.
I guess the only possibility to recover your phone is using this RUU service.
Just because I'm curious: Why didn't you use one of the backups that are provided here?
Click to expand...
Click to collapse
Thanks for your reply!
I've submitted an enquiry form to them. Didn't know that service existed. Hopefully they have the RUU file that I need.
I did download the stock backup file from that link but I thought before I give it a go, I'll try and get an OTA and get an official update. That failed so I decided to flash the firmware before going to the latest rom. Forgetting I just locked my bootloader with stock recovery, completely unaware of this 5.1 developer option issue. My fault for not doing research, but I didn't know such issue could exist as for the last few years, I haven't had an issue like this. Normally issues occur if I flash a newer ROM without firmware so was trying to avoid that.

Sideloaded NDE63X, can I relock bootloader for my Verizon Pixel XL?

As the title states, I successfully sideloaded the most recent ota since I couldn't find a proper guide to flash the factory image (nor the proper image for that matter). Checking the kernel and what not everything appears to be stock, and I know I don't have root anymore or any of the apps that go with that.
This being said, will I be able to relock the bootloader? I need to return my phone to Verizon and want to make sure the phone is as factory as I can get so they don't get all up in my face about it.
or.....
Will the fact that my bootloader is unlocked but nothing else has been changed be acceptable to return the phone? Anyone know from experience?
Anthony825 said:
As the title states, I successfully sideloaded the most recent ota since I couldn't find a proper guide to flash the factory image (nor the proper image for that matter). Checking the kernel and what not everything appears to be stock, and I know I don't have root anymore or any of the apps that go with that.
This being said, will I be able to relock the bootloader? I need to return my phone to Verizon and want to make sure the phone is as factory as I can get so they don't get all up in my face about it.
or.....
Will the fact that my bootloader is unlocked but nothing else has been changed be acceptable to return the phone? Anyone know from experience?
Click to expand...
Click to collapse
I doubt they'd care but the warning when turning the device one might. Anyways, I believe after a flash of the full factory image, you should be able to relock the bootloader.
Don't hold me liable for anything, but I'm almost certain that you just need to be running stock everything.
Sent from my Pixel XL
I couldn't do the factory image flash. Couldn't find exactly everything I needed and didn't want to chance guesswork. So I side loaded the most recent ota and it appears I'm stock everything....
Anthony825 said:
I couldn't do the factory image flash. Couldn't find exactly everything I needed and didn't want to chance guesswork. So I side loaded the most recent ota and it appears I'm stock everything....
Click to expand...
Click to collapse
Hey man, you ever managed to relock your bootloader? I'm thinking of doing it too since I may need to RMA mine as well.

is it possible to restore oem unlock and lock bootloader again?

is it possible to restore lock bootloader after unlocking it? My phone has been crashing consistently about once every day or every other day since unlocking it.
Well I really doubt unlocking your boot-loader would cause system crashes. The bootloader is a different partition of the phones drive, and its not active while your in system. If you flashed a custom kernel or your on a 8.1 DP build its probably one of those things. I know that a lot of people are having random reboots with 8.1 builds.
Reply back with what kernel and rom build your using; it would help a lot.
As for restoring a locked bootloader; you would need to restore everything to stock by flashing a stock factory image with fastboot drivers. And make sure you restore the original google recovery. I don't know the command on hand, but it is possible. Just many don't do it because it's easy to miss something important and now you can never unlock you bootloader again; its happened!
If I were you, I would just keep my bootloader unlocked and then just wipe and flash a stock factory image.
im_high_tech said:
is it possible to restore lock bootloader after unlocking it? My phone has been crashing consistently about once every day or every other day since unlocking it.
Click to expand...
Click to collapse
What AA said. Unlocking (regular and critical) have nothing to do with your device crashing. I agree you should just leave the bootloader unlocked and clean flash a full image, leaving the -w switch in place. To answer your original question, yes you can definitely relock the bootloader with no ill effects except it will completely wipe your phone and data along with it.
ArminasAnarion said:
Well I really doubt unlocking your boot-loader would cause system crashes. The bootloader is a different partition of the phones drive, and its not active while your in system. If you flashed a custom kernel or your on a 8.1 DP build its probably one of those things. I know that a lot of people are having random reboots with 8.1 builds.
Reply back with what kernel and rom build your using; it would help a lot.
As for restoring a locked bootloader; you would need to restore everything to stock by flashing a stock factory image with fastboot drivers. And make sure you restore the original google recovery. I don't know the command on hand, but it is possible. Just many don't do it because it's easy to miss something important and now you can never unlock you bootloader again; its happened!
If I were you, I would just keep my bootloader unlocked and then just wipe and flash a stock factory image.
Click to expand...
Click to collapse
Thank you @ArminasAnarion and @v12xke
I never ended up flashing ROMS or kernels. I stayed stock. Originally I did flash a modified boot for magisk but that was so unstable I flashed the stock one back.
fastboot flashing lock
fastboot flashing lock_critical
Data will be wiped.

Question Best way to restore rooted phone to factory settings?

Im replacing my Pixel 6 Pro due to a bad accelerometer sensor. My phone is rooted with latest Magisk, has Kiri kernel installed as well. What's the most efficient way to prep the phone for a return to Google?
Official Google Android Flash Tool
and
Official Instructions for Locking/Unlocking the Bootloader
roirraW edor ehT said:
Official Google Android Flash Tool
and
Official Instructions for Locking/Unlocking the Bootloader
Click to expand...
Click to collapse
So just running the flash tool will remove root, reset to factory default and return kernel to stock? After that just lock the bootloader and good to go?
Starzboy77 said:
So just running the flash tool will remove root, reset to factory default and return kernel to stock? After that just lock the bootloader and good to go?
Click to expand...
Click to collapse
Yes. All of that.
Starzboy77 said:
So just running the flash tool will remove root, reset to factory default and return kernel to stock? After that just lock the bootloader and good to go?
Click to expand...
Click to collapse
If you like, for further explanation, flashing the 100% official stock ROM will both remove root and overwrite whatever kernel you currently have with the stock kernel that's included in the stock ROM. If you choose any option anywhere (on that official stock flashing site of Google's, or via any other method) to *not* factory reset the phone, sure you'd have any root-oriented apps still installed on your phone, but the phone wouldn't be rooted because the stock kernel is 100% official now.
There are many ways to do the same thing, but this is the safest and 100% sure method that it's all stock. i.e. my answering this way isn't dependent on anything you've possibly done to your phone - if you or someone had gone out of the way to modify the software of the phone even more than typically, this method would still completely overwrite any changes you've done, because you're flashing the completely stock ROM.
I haven't used the Official Google Android Flash Tool but countless others in this section alone have reported their situations on their phones being saved by this method - even when flashing the stock ROM in only a slightly more manual way via the official Platform Tools had failed to solve their issues: manually downloading the stock firmware, extracting it, and running the flash-all.bat file included (if on Windows). Since I haven't used it myself, I'm just going by memory of what others have reported about using it and I'm under the impression that it gives you the choice to wipe (factory reset) or not wipe your phone when it flashes it.
I wouldn't be surprised if by default it wipes, as that's what the flash-all.bat script from the manual full factory image zip file does by default.
Also, heads up. You never want to lock the bootloader unless you are 100% certain the phone is 100% stock. Ergo, why even though there are other methods to unroot and "return to stock", there is no good reason to use them unless you just don't have access to a computer, or a cable, or it's some kind of unroot emergency or some other circumstance that calls for more manual methods - which also leave a greater chance for accidental human error and can just plain brick your phone - although that might not matter since you're returning the phone.
roirraW edor ehT said:
If you like, for further explanation, flashing the 100% official stock ROM will both remove root and overwrite whatever kernel you currently have with the stock kernel that's included in the stock ROM. If you choose any option anywhere (on that official stock flashing site of Google's, or via any other method) to *not* factory reset the phone, sure you'd have any root-oriented apps still installed on your phone, but the phone wouldn't be rooted because the stock kernel is 100% official now.
There are many ways to do the same thing, but this is the safest and 100% sure method that it's all stock. i.e. my answering this way isn't dependent on anything you've possibly done to your phone - if you or someone had gone out of the way to modify the software of the phone even more than typically, this method would still completely overwrite any changes you've done, because you're flashing the completely stock ROM.
I haven't used the Official Google Android Flash Tool but countless others in this section alone have reported their situations on their phones being saved by this method - even when flashing the stock ROM in only a slightly more manual way via the official Platform Tools had failed to solve their issues: manually downloading the stock firmware, extracting it, and running the flash-all.bat file included (if on Windows). Since I haven't used it myself, I'm just going by memory of what others have reported about using it and I'm under the impression that it gives you the choice to wipe (factory reset) or not wipe your phone when it flashes it.
I wouldn't be surprised if by default it wipes, as that's what the flash-all.bat script from the manual full factory image zip file does by default.
Also, heads up. You never want to lock the bootloader unless you are 100% certain the phone is 100% stock. Ergo, why even though there are other methods to unroot and "return to stock", there is no good reason to use them unless you just don't have access to a computer, or a cable, or it's some kind of unroot emergency or some other circumstance that calls for more manual methods - which also leave a greater chance for accidental human error and can just plain brick your phone - although that might not matter since you're returning the phone.
Click to expand...
Click to collapse
Thank you for the indepth explanation. Really appreciate it.
Just factory reset it so your data is wiped and send it back. Google has never cared about them being rooted when you return them.
TonikJDK said:
Just factory reset it so your data is wiped and send it back. Google has never cared about them being rooted when you return them.
Click to expand...
Click to collapse
Is this accurate? Can anyone else confirm? What about having a different kernel? Does the bootloader have to be locked?
Starzboy77 said:
Is this accurate? Can anyone else confirm? What about having a different kernel? Does the bootloader have to be locked?
Click to expand...
Click to collapse
As I said, you should not lock the bootloader unless the phone is 100% stock. To me, it doesn't matter what anyone else says about what Google cares about. If it were my phone, I'd restore it 100% stock too. 10 minutes of very little effort for some peace of mind. Rather than meh, they might not care, or meh you might be the unlucky exception. Why take the chance?
But it's your phone, your decision. No one else makes the decision for you.
roirraW edor ehT said:
As I said, you should not lock the bootloader unless the phone is 100% stock. To me, it doesn't matter what anyone else says about what Google cares about. If it were my phone, I'd restore it 100% stock too. 10 minutes of very little effort for some peace of mind. Rather than meh, they might not care, or meh you might be the unlucky exception. Why take the chance?
But it's your phone, your decision. No one else makes the decision for you.
Click to expand...
Click to collapse
This to the millionth degree. and it also goes for when purchasing a used device or a refurbished device. Reflash Android. they make it so simple now that it can be done using another phone. No PC necessary.
Flash Tool changed the game 3 years ago for how easy the process is. Heck I just reflash my phone monthly because it's such great technology (kidding, not kidding?)

Categories

Resources