Question Best way to relock bootloader - Xiaomi Mix Fold 2

Hi, I have my fold 2 rooted with magisk and modules. What's the best way to unroot and relock bootloader ready for selling?
I'm thinking factory reset first then adb relock command?

All done. For anyone else looking to return to factory default.
I uninstalled magisk..picked restore images
Uninstalled magisk again...this time picked complete uninstall.
Then booted to fastboot.
Adb. fastboot oem lock
The phone rebooted by itself relocked and factory reset

Related

[Q] gapps errors when boot and cycl reboot

Hi!
Nexus 5 16Gb, lot of acore and gapps errors when boot, then cyclical reboot. When i try unlock bootloader with fastboot mode, it shows UNLOCKED, but has status LOCKED again when reboot.
Any ideas, please
TIA
backup your apps/data, do a factory reset, flash your favorite ROM.
most likely you are having issues because of dirty flashed several incompatible ROMs
igchy said:
backup your apps/data, do a factory reset, flash your favorite ROM.
most likely you are having issues because of dirty flashed several incompatible ROMs
Click to expand...
Click to collapse
Factory reset was done, can't flash ROM because bootloader won't stay unlocked when i unlock it thru fastboot!
If the bootloader can't be unlocked, you can't do anything other than factory reset. The fact that the bootloader is locked even after unlocking points to a hardware issue.
BTW, After doing fastboot oem unlock did you select "YES" on the onscreen window which pops up?
vin4yak said:
BTW, After doing fastboot oem unlock did you select "YES" on the onscreen window which pops up?
Click to expand...
Click to collapse
Sure i did this
and then "fastboot reboot"
I'm not 100% sure it's possible, but can you re-flash/update bootloader?
because i think all cyanogen nightly builds after 03/17 require the latest bootloader.
Have you tried formatting? If you're not comfortable with it, don't try it, but it's certainly a step up from a factory reset. I'd bet it's just artifacts, as mentioned earlier.
I did factory reset many times (from recovery), but i can't unlock bootloader : when phone reboot after "fastboot oem unlock" command - bootloader is locked again
Not being able to unlock your bootloader is a good indication of emmc falling. You're most likely going to have to rma your device.
Sent from my Nexus 5

Bootloader Unlock + Factory Reset?

Hey guys...I'm having an issue.
I did the first step for rooting without the Recovery.img or Root.zip in the Folder.
Now I tried to do the reboot to go on the fastboot for 2nd step (recovery.img) and I get this error on my Windows:
QHSUSB_BULK
I believe it was because I had the phone plugged in. Anyway it was not going to fastboot.
So anyway I tried to do a factory reset too, and now fastboot is working, but I have no idea if it was because the phone was plugged in or because of the factory reset.
So, how do I know if the phone is bootloader unlocked or not after my factory reset?
What should I do?
Repeat Step one to unlock it again or do step 2? Thanks!
Is there any harm in doing fastboot oem unlock again just in case?
ok i believe its all done.
I have the phone rooted, should I keep debugging USB on?
Should I check the "Disable CM Recovery Protection" ?
Whats the best to do the OTA's without bricks or issues?

OnePlus 3 relocking bootloader

I was installed with Twrp and had rooted my oneplus 3.
I unticked root access in supersu.
Booted to bootloader and typed on my pc in command prompt ,"Fastboot oem lock"
This gave a confirmation on my device,I confirmed locking.
And after that my device did not booted up.I managed to get in bootloader again as I was not even able to open the recovery and unlocked the bootloader once again by this my device booted up.
I flashed stock recovery and repeated the relocking process,this time I was able to open recovery also but no able to boot up.
I again unlocked the bootloader and installed twrp back turned my device up.
Then I unchecked oem unlocking under developer options.
Relocked the bootloader once again.
And now I am stuck at bootloader,not able to unlock it even this time as I turned off oem unlocking.
Now I can only open bootloader.
Please help!
hchawla98 said:
I was installed with Twrp and had rooted my oneplus 3.
I unticked root access in supersu.
Booted to bootloader and typed on my pc in command prompt ,"Fastboot oem lock"
This gave a confirmation on my device,I confirmed locking.
And after that my device did not booted up.I managed to get in bootloader again as I was not even able to open the recovery and unlocked the bootloader once again by this my device booted up.
I flashed stock recovery and repeated the relocking process,this time I was able to open recovery also but no able to boot up.
I again unlocked the bootloader and installed twrp back turned my device up.
Then I unchecked oem unlocking under developer options.
Relocked the bootloader once again.
And now I am stuck at bootloader,not able to unlock it even this time as I turned off oem unlocking.
Now I can only open bootloader.
Please help!
Click to expand...
Click to collapse
OEM locking a bootloader on a phone that was rooted is a big mistake.
You'll need to flash stock recovery, then flash the stock ROM via adb sideload.
Can be done with this tool http://forum.xda-developers.com/oneplus-3/development/toolkit-oneplus-3-toolkit-unlock-t3398799
Thanks for reply
Newyork! said:
OEM locking a bootloader on a phone that was rooted is a big mistake.
You'll need to flash stock recovery, then flash the stock ROM via adb sideload.
Can be done with this tool http://forum.xda-developers.com/oneplus-3/development/toolkit-oneplus-3-toolkit-unlock-t3398799
Click to expand...
Click to collapse
with that tool I was only able to wipe cache.
Nothing else is working
It says failed
hchawla98 said:
with that tool I was only able to wipe cache.
Nothing else is working
It says failed
Click to expand...
Click to collapse
Can you access stock recovery?
NO
Newyork! said:
Can you access stock recovery?
Click to expand...
Click to collapse
I can't access it as I am installed with TWRP Recovery as it is also not starting.

locking Bootloader again?

I unlock the bootloader to install twrp and magisk, it's possible to lock the bootloader again without problems or the phone don't boot?
Toni Moon said:
I unlock the bootloader to install twrp and magisk, it's possible to lock the bootloader again without problems or the phone don't boot?
Click to expand...
Click to collapse
Locking you bootloader while TWRP and Magisk are installed will give you a guaranteed brick. Use a Fastboot Rom to return to stock, then you can lock it
If you want to keep TWRP and root, do not lock the bootloader. As the user mentioned above, you'll brick your device.
if i flash stock rom, than is that ok to lock the bootloader ? and how to lock it ?
majidshahab091 said:
if i flash stock rom, than is that ok to lock the bootloader ? and how to lock it ?
Click to expand...
Click to collapse
If you flash a full stock rom then yes. All you do is use the fastboot rom we talked about earlier, let the phone boot up (don't bother completing the setup process, just let the phone boot up), restart to bootloader, and use the following command from the command prompt on your pc:
Fastboot oem lock
It will give you a menu on your pone asking if you want to lock the bootloader. Tell it yes. It will then lock the bootloader, factory reset the phone, and then boot up normally with the bootloader locked. It's that easy.
ok thanks.one question. is that important to flash the stock rom using fastboot only ? or can i flash it using twrp ?
majidshahab091 said:
ok thanks.one question. is that important to flash the stock rom using fastboot only ? or can i flash it using twrp ?
Click to expand...
Click to collapse
I did it through twrp, worked just fine. Make sure to wipe beforehand though, don't want to risk bricking your phone
majidshahab091 said:
ok thanks.one question. is that important to flash the stock rom using fastboot only ? or can i flash it using twrp ?
Click to expand...
Click to collapse
Doing it with a Fastboot Rom will guarantee that things needing wiped will get wiped. When returning to full stock I will always recommend the Fastboot Rom just because of how it completely handles everything it does flawlessly. I imagine flashing a full rom in TWRP will work but I have never tried to return to stock this way
i did try stock using twrp and it was perfect
I have unlocked bootloader but in the end NOT installed TWRP or root (just wanted to test if i can live without it and still be able to install without wiping everything)
Now I just want to lock bootloader again for selling device.
Can I do so with simple fastboot command "fastboot oem lock" without bricking phone?
TaranQ said:
I have unlocked bootloader but in the end NOT installed TWRP or root (just wanted to test if i can live without it and still be able to install without wiping everything)
Now I just want to lock bootloader again for selling device.
Can I do so with simple fastboot command "fastboot oem lock" without bricking phone?
Click to expand...
Click to collapse
Use msm download tool to be sure. It will however wipe all.
TaranQ said:
I have unlocked bootloader but in the end NOT installed TWRP or root (just wanted to test if i can live without it and still be able to install without wiping everything)
Now I just want to lock bootloader again for selling device.
Can I do so with simple fastboot command "fastboot oem lock" without bricking phone?
Click to expand...
Click to collapse
You can, but if you are selling the phone I would still use a fastboot rom just to be sure everything is wiped and no data sensitive to you is being sold along with the phone.
Thanks a lot for the shared info here. This is just what I need and had been asking myself for quite some time now.??
So never lock bootloader with twrp and magisk installed.

Best way to factory reset other than MSM tool?

Hey what's up.
Having issues and want to start from scratch but the MSM download tool isn't working for me due to driver issues I can't seem to resolve.
I'm unlocked and rooted with a custom kernel but otherwise totally stock.
Would I be able to just fastboot flash the stock boot.img and relock the bootloader for a total data wipe? Would that be enough to start fresh?
Go into magisk. Click uninstall. Click restore images. Your images should have been backup by the app. Reboot and reset from reset option in phone. No need to relock.
Thanks. Is that as good as the MSM tool as data wipes go? Want to get as fresh as I possibly can without MSM...
shadowofdeth said:
Thanks. Is that as good as the MSM tool as data wipes go? Want to get as fresh as I possibly can without MSM...
Click to expand...
Click to collapse
Boot to fastboot,
Code:
fastboot -w
what is the best way to relock the bootloader from Rooted( Magisk) and unlocked bootloader ? I did fastboot lock last time, I guess it locked successfully but refused to boot. Had to use msm to unbrick. Could you suggest best practice for Locking the bootloader again from rooted stock ?
rohanhole said:
what is the best way to relock the bootloader from Rooted( Magisk) and unlocked bootloader ? I did fastboot lock last time, I guess it locked successfully but refused to boot. Had to use msm to unbrick. Could you suggest best practice for Locking the bootloader again from rooted stock ?
Click to expand...
Click to collapse
Don't lock bootloader after rooting
Keinta15 said:
Don't lock bootloader after rooting
Click to expand...
Click to collapse
Then ? Should I unroot and then lock ?
Don't try to lock the bootloader
rohanhole said:
Then ? Should I unroot and then lock ?
Click to expand...
Click to collapse
You can't lock the bootloader while rooted. Your patched boot fails startup checks. The only phone i remember that you could root and relock was the oneplus one. There was a software hack to do a soft bootloader lock/unlock without wiping the data.
To expand on that, if you modified any locked partitions and try to relock the bootloader, you'll essentially soft brick. The only thing you can modify is I believe is userdata. If you are unsure, why take the chance, especially since your MSM isn't working.
Just do a factory reset from recovery lol or use fastboot

Categories

Resources