Safe to Re-Lock Bootloader? - Google Pixel 2 XL Questions & Answers

I was given a Pixel 2 XL by a friend, and it had an unlocked bootloader, but I couldn't tell whether or not he tried to root it. And I couldn't use some GPay features, which I'd like to. So to be safe, I went through the process of flashing a stock image using Google's instructions: boot bootloader via ADB, didn't have to unlock my bootloader as it was already unlocked, and then used flash-all with the stock Android 11 image I had downloaded from Google. Didn't re-lock because I still wasn't sure that it was because of the unlocked bootloader that I couldn't use those features, but upon trying to use them I found it that it is. So now I'd like to lock the bootloader, which Google also has instructions for, but I'm concerned because everything I read makes re-locking sound like a toss-up that might end in a bricked phone.
Do I have need to be worried? Some things I read say to do a factory reset before flashing, some say to flash it more than once, before re-locking the bootloader; is that necessary? Should I factory reset before using ADB/Fastboot to re-lock it? Should I re-flash the stock image, just to be paranoid about it? Or was it sufficient the first time, with no need to reset beforehand because locking the bootloader will erase all my user data anyway?
I just really don't want to brick my phone trying to get it back to a normal, stock state.

Download the latest update and install that. Doing that will wipe the phone and remove root. It'll be like taking it off of the box brand new.
BEFORE you relock it, reboot it and make sure it works. Once you're satisfied that it works, then relock it.

Larzzzz82 said:
Download the latest update and install that. Doing that will wipe the phone and remove root. It'll be like taking it off of the box brand new.
BEFORE you relock it, reboot it and make sure it works. Once you're satisfied that it works, then relock it.
Click to expand...
Click to collapse
Awesome, thank you, that worked well for me.

Did you re-lock the bootloader yet? The old problem of no USB ADB/file access is showing up again for me on build RP1A.201005.004, Oct 2020 with Oct 5th security update.
There's a new factory image, RP1A.201005.004.A1, Dec 2020 that I hope is the fix, but I can't install it because my bootloader isn't unlocked and I can't get ADB to connect other than through wireless.
Double check your USB ADB/file transfer before you re-lock and turn off automatic updates.

Related

Backup before root?

I want to try some custom ROMs on my M8. Before I do this I want to do a full back up. From everything I've read Titanium is by a long shot the most popular so I see no reason not to go that route. However, from what I've read rooting the M8 will wipe my phone, but I can't use Titanium until I'm rooted. So it seems I'm stuck, and wondering what the best way is to proceed.
Thanks,
Ryan
Ryan_Mc said:
I want to try some custom ROMs on my M8. Before I do this I want to do a full back up. From everything I've read Titanium is by a long shot the most popular so I see no reason not to go that route. However, from what I've read rooting the M8 will wipe my phone, but I can't use Titanium until I'm rooted. So it seems I'm stuck, and wondering what the best way is to proceed.
Thanks,
Ryan
Click to expand...
Click to collapse
Rooting by itself won't reset your phone, using the HTC unlock token to unlock the bootloader will. However, if you can S-off, you can also unlock your bootloader without tripping the factory reset. Once your bootloader is unlocked, you can install a custom recovery and backup your (unrooted) OS image - then use that recovery to install su.
Unfortunately, the prerequisite to all of that is getting S-off. If you can't, or won't, do that, then yeah - as soon as you unlock the bootloader your /data partition will get nuked. It's a safety measure to prevent someone from stealing your phone, unlocking the bootloader, and bypassing the OS protections to get the data on it. Fortunately, it only happens when you unlock. If you subsequently leave the bootloader unlocked, it won't happen again.

Zenfone 2 issues in 2017

Hello,
I bought a Zenfone 2 in 2015 and have loved it ever since. Back then it was simple to root, unlock the bootloader, and neither required the other.
To root, just enable ADB and run this.
To unlock the bootloader, just download this from azus.
Now, buying a phone fresh, to remove all the bloat is becoming a challenge.
To root, you need an unlock the bootloader. To unlock the bootloader, you need to downgrade to an early 5.0 image.
So I downgrade, unlock the bootloader, and root. To get back on 6, I need to upgrade to a newer version of 5.0, so I do. Root gone, bootloader still unlocked, splash screen is normal. Fine, I root again.
Finally, after upgrading to 6.0 (using adb sideload) both root and the bootloader unlock are gone. So I have to start again, and either live with unbloated 5.0, or unrooted, bloated 6.0.
As far as I can tell the only way around this is downgrade to 5.0, unlock my bootloader, then flash a pre rooted unsigned system.img.
Sadly I cannot find a recent pre rooted unsigned system.img, and have no way of knowing how to create one. If someone could help me make one I would greatly appreciate it.
Am I doing this all wrong? Is there a better way?
Because now I have a phone that I'm either stuck with a buggy 5.0 or a bloated 6.0; and the original, two year old zenfone is stuck in the bootloader because I was experimenting with various tools from around here.
I am well aware that I could just nuke the old phone with xFSTK to get out, but I refuse to. I have no such problems nuking the new one though.
Any and all help would be greatly appreciated, the Zenfone 2 is still a great device and is fantastic value for money, so if I can sort out all this I will happily make a full, comprehensive guide with my new knowledge to replace the errors in the outdated one here, and to add far more comprehensive knowledge about unbricking:
https://forum.xda-developers.com/zenfone2/general/asus-zenfone-2-flashing-recovery-mode-t3096596
Thank you all for your time
assuming you are already on MM version ww4.21.10.233... if no update to this version and download the following tool..
https://drive.google.com/open?id=0B72QQTXqZSRwTDNtU1N6OEdMdmM
reboot phone in fastboot mode. now extract the downloaded zip and double click unlock.bat phone will reboot 2 times. then you will get white screen and stuck there. when you see white screen. simply turn off mobile. reboot in fastboot mode with volume plus and power button. and run restore.bat from extracted zip.
now download twrp from official twrp website version 3.1.1.0. and flash it in fastboot mode. hope you know how to ( place twrp image in adb fastboot tool and open command windows in same folder reboot phone in fastboot mode and connect to pc. run the following command
fastboot flash recovery twrp-3.1.1-0-Z00A.img
then use volume button to find recovery mode and click power button to boot into twrp.
now download super su from following link use this version only as i have just tested it few minutes ago.
https://download.chainfire.eu/1114/SuperSU/SR1-SuperSU-v2.82-SR1-20170608224931.zip
place superuser zip on internal memory or sd card and click install in twrp and install super userzip. alternatively you can sideload supersu zip as well. then wipe cache and dalvik cache and reboot system. note phone may bootloop or restart 2,3 times. don't interrupt it. it will boot itself into system.
this is 100 percent safe way.
---------- Post added at 11:12 PM ---------- Previous post was at 11:05 PM ----------
x86fanboy said:
Hello,
I bought a Zenfone 2 in 2015 and have loved it ever since. Back then it was simple to root, unlock the bootloader, and neither required the other.
To root, just enable ADB and run this.
To unlock the bootloader, just download this from azus.
Now, buying a phone fresh, to remove all the bloat is becoming a challenge.
To root, you need an unlock the bootloader. To unlock the bootloader, you need to downgrade to an early 5.0 image.
So I downgrade, unlock the bootloader, and root. To get back on 6, I need to upgrade to a newer version of 5.0, so I do. Root gone, bootloader still unlocked, splash screen is normal. Fine, I root again.
Finally, after upgrading to 6.0 (using adb sideload) both root and the bootloader unlock are gone. So I have to start again, and either live with unbloated 5.0, or unrooted, bloated 6.0.
As far as I can tell the only way around this is downgrade to 5.0, unlock my bootloader, then flash a pre rooted unsigned system.img.
Sadly I cannot find a recent pre rooted unsigned system.img, and have no way of knowing how to create one. If someone could help me make one I would greatly appreciate it.
Am I doing this all wrong? Is there a better way?
Because now I have a phone that I'm either stuck with a buggy 5.0 or a bloated 6.0; and the original, two year old zenfone is stuck in the bootloader because I was experimenting with various tools from around here.
I am well aware that I could just nuke the old phone with xFSTK to get out, but I refuse to. I have no such problems nuking the new one though.
Any and all help would be greatly appreciated, the Zenfone 2 is still a great device and is fantastic value for money, so if I can sort out all this I will happily make a full, comprehensive guide with my new knowledge to replace the errors in the outdated one here, and to add far more comprehensive knowledge about unbricking:
https://forum.xda-developers.com/zenfone2/general/asus-zenfone-2-flashing-recovery-mode-t3096596
Thank you all for your time
Click to expand...
Click to collapse
do you state that you have an old device which you are unable to revive with xFSTK. what error do you get? put device on charge for 5,6 hours with original charger and use the following guide. use correct gp flag value use 4 zeros not 5
https://forum.xda-developers.com/zenfone2/help/thead-bricked-phone-updating-to-mm-tips-t3452785
wow, no need to do all this... just use one of the available tool, my prefered one is this one:
https://forum.xda-developers.com/zenfone2/general/bl-unlock-ze551ml-toolkit-t3546293
very easy to use, to unlock, it will temporaly downgrade your boot to 5.0, unlock bootloader, then reflash boot 6.0.
Once there, just flash TWRP recovery and Magisk, from the tools.
I also had a locked ZF2 in MM 6.0 and using this tool it took less than 5 minutes to have an unlocked rooted phone, and I haven't wiped or lost anything.

Relock the bootloader or not?

I've successfully flashed my first ROM. My purpose in doing so was to get the monthly Android security updates, and more broadly have my phone as secure as practical. In that vein, can I safely relock the bootloader? Should I? I am aware that many (most?) people here choose to keep the bootloader unlocked, and I respect that choice, but I'm seeking maximum security.
Searching here at XDA I see conflicting guidance. Some folks say that re-locking the bootloader with a custom ROM installed is begging to be bricked, while others say they have re-locked with no trouble. So what is your advice, why is that your opinion, and do you speak from experience?
I have not rooted the phone, nor do I plan to. I'm running AICP 8.1 on Nextbit Robin and don't plan to make any changes other than receive OTA updates. Should I make future changes beyond that I would not be bothered by the very minor inconvenience of having to unlock then relock it.
I too want to simply flash the stock recovery and lock my bootloader, but from what I've read to update the ROMs we need an unlocked bootloader. So that needs to be unlocked again does that mean everytime I lock-unlock I will be wiping my data all over? Thats would be a pain.
So this is an experiment I want to run from quite long and might do it sometime next month maybe. I will be wiping-unlocking-flashing-locking and see again if I can unlock without wiping my data and lock again, this way I can know for sure if this is doable because most online answers are weirdly confusing.
javelinanddart found that locking the bootloader on the Robin results in similar behavior as on the Nexus devices. The phone will check and make sure that the key used to sign the recovery partition remains the same as it was when your device got relocked, so as a result, TWRP should still work, and updating to a new version of TWRP would work too since it's (presumably) signed with the same key. System partition checking is handled by the kernel itself (dm-verity), but all the custom roms for the Robin have that disabled, so that wouldn't be a problem.
I've also been running custom roms with my bootloader locked and haven't run into any issues with flashing roms with TWRP.
I will be honest though, since TWRP lets you do so much to your phone, relocking your bootloader wouldn't really help security wise. You can pull up a damn root shell right in TWRP, for crying out loud.
@jabashque
Wait so are you saying despite locking the bootloader I can still go in custom recovery? Whats the point then?
I mean for me why I a considering locking the bootloader is so that if I lose my phone no one can access my data. As of now with custom ROM anyone has free access to my data via TWRP/custom recovery.
/root said:
@jabashque
Wait so are you saying despite locking the bootloader I can still go in custom recovery? Whats the point then?
I mean for me why I a considering locking the bootloader is so that if I lose my phone no one can access my data. As of now with custom ROM anyone has free access to my data via TWRP/custom recovery.
Click to expand...
Click to collapse
I suppose you could flash Lineage recovery instead, which was designed to be an OEM-grade recovery and doesn't include the ability to pull up a root shell or use adb.
Grab that here: http://downloads.codefi.re/jdcteam/javelinanddart/ether/ether-lineage-recovery-20180310_170949.img
Personally, I locked my bootloader so that I could actually see my custom splash screen without having to press the power button to dismiss the warning message.
EDIT: the build of Lineage recovery I linked still has adb shell access enabled it seems; I was wrong on that. Also, I haven't tried flashing another rom's system partition that's been signed with different keys.
jabashque said:
I suppose you could flash Lineage recovery instead, which was designed to be an OEM-grade recovery and doesn't include the ability to pull up a root shell or use adb.
Grab that here: http://downloads.codefi.re/jdcteam/javelinanddart/ether/ether-lineage-recovery-20180310_170949.img
Personally, I locked my bootloader so that I could actually see my custom splash screen without having to press the power button to dismiss the warning message.
Click to expand...
Click to collapse
So for an OTA update do I have to wipe all data to unlock again? I am on Omni btw.
I only unlock my bootloader to flash a cool splash screen then relock it. Even if the bootloader is locked I can still flash custom ROMs using ADB sideload. Works like a charm every time. I'm running the AEX custom ROM with Android 8.1.0
akeemk said:
I only unlock my bootloader to flash a cool splash screen then relock it. Even if the bootloader is locked I can still flash custom ROMs using ADB sideload. Works like a charm every time. I'm running the AEX custom ROM with Android 8.1.0
Click to expand...
Click to collapse
But you still locking it while on TWRP isn't it? Which means anyone has access to shell via TWRP defeats the purpose of security provided by a locked bootloader, isn't it?
/root said:
But you still locking it while on TWRP isn't it? Which means anyone has access to shell via TWRP defeats the purpose of security provided by a locked bootloader, isn't it?
Click to expand...
Click to collapse
I guess that's why Nextbit never had a problem with us unlocking the phone's bootloader.

Root access for the Moto Z Play without bootloader unlock

Hello,
Is it possible to get root access on the Moto Z Play without needing TWRP? I tried to use this guide but my phone doesn't want to flash TWRP. It may require a unlocked bootloader. My question is that is it possible to get root on this phone without TWRP or unlocked bootloader?
PS. I only want root access to get Viper4Android/ Dolby. If there are any other alternatives, please let me know below.
Thanks,
mPreet
mPreet said:
Hello,
Is it possible to get root access on the Moto Z Play without needing TWRP? I tried to use this guide but my phone doesn't want to flash TWRP. It may require a unlocked bootloader. My question is that is it possible to get root on this phone without TWRP or unlocked bootloader?
PS. I only want root access to get Viper4Android/ Dolby. If there are any other alternatives, please let me know below.
Thanks,
mPreet
Click to expand...
Click to collapse
Your title says without unlock bootloader - no
Your text says without twrp - you can fastboot boot twrp.img - that will boot to it but not flash it permanently. But, again, not if the bl is not unlocked - gotta have that.
KrisM22 said:
Your title says without unlock bootloader - no
Your text says without twrp - you can fastboot boot twrp.img - that will boot to it but not flash it permanently. But, again, not if the bl is not unlocked - gotta have that.
Click to expand...
Click to collapse
So just to make sure that I understand, I have to get the unlock key from Motorola in order to unlock the bootloader. There is no other way around it, right.
mPreet said:
So just to make sure that I understand, I have to get the unlock key from Motorola in order to unlock the bootloader. There is no other way around it, right.
Click to expand...
Click to collapse
Pretty much - the process of obtaining your key will void your remaining Motorola warranty (though you may still have some protection depending on your local consumer laws), and the process of actually using the unlock key on your device will wipe your device in a factory reset. Ensure you back up your device (and adopted SD card as well) beforehand.
After that, you should be able to flash or boot TWRP, then root and flash Viper4Android (or ARISE Soundsystems) or Dolby. If you get OTA updates, you will not be able to flash them unless you can revert back to full stock, so ensure you have a TWRP backup without modifications or access to a stock ROM of the same build that you have now.
mPreet said:
So just to make sure that I understand, I have to get the unlock key from Motorola in order to unlock the bootloader. There is no other way around it, right.
Click to expand...
Click to collapse
correct. afaik.
echo92 said:
Pretty much - the process of obtaining your key will void your remaining Motorola warranty (though you may still have some protection depending on your local consumer laws), and the process of actually using the unlock key on your device will wipe your device in a factory reset. Ensure you back up your device (and adopted SD card as well) beforehand.
After that, you should be able to flash or boot TWRP, then root and flash Viper4Android (or ARISE Soundsystems) or Dolby. If you get OTA updates, you will not be able to flash them unless you can revert back to full stock, so ensure you have a TWRP backup without modifications or access to a stock ROM of the same build that you have now.
Click to expand...
Click to collapse
If I just boot off the TWRP instead of flashing, would that backup constitute as stock? So boot the TWRP instead of flashing then make a backup before rooting.
Thanks,
mPreet
mPreet said:
If I just boot off the TWRP instead of flashing, would that backup constitute as stock? So boot the TWRP instead of flashing then make a backup before rooting.
Thanks,
mPreet
Click to expand...
Click to collapse
be aware you will be walking on shaky ground. Be sure you have a spare phone that works in case you brick this one.

Question Images to Re-Lock Bootloader

I unloaded and rooted. Like a bonehead, I forgot to restore images in Magisk prior to doing a factory reset... so now I want to unroot so I can relock the bootloader.
Anyone have the images needed for that? I assume it's init_boot.img and/or boot.img. It would be from the latest May update (CPH2451_13.1.0.501). Seems like Oneplus no longer provides any of these files online like the days of old.
I was able to use this to get it done: https://www.getdroidtips.com/downgrade-oneplus-11/#GlobalNA-Variant-of-OnePlus-11
Thanks.

Categories

Resources