Which partition holds the bootloader locked / unlocked status? - Xiaomi Redmi Note 3 Questions & Answers

My device came with unlocked bootloader. Before anything I made a complete backup with TWRP (alka). Then my bootloader got relocked and I intended to restore to unlock it officialy. But surprisingly after restore the bootloader was unlocked again. Which partition (of the around 40) which are also shown here holds the locked / unlocked status?

paul_damian said:
My device came with unlocked bootloader. Before anything I made a complete backup with TWRP (alka). Then my bootloader got relocked and I intended to restore to unlock it officialy. But surprisingly after restore the bootloader was unlocked again. Which partition (of the around 40) which are also shown here holds the locked / unlocked status?
Click to expand...
Click to collapse
"Firmware" I think so because while installing the official CM13 we have flash a separate firmware zip. I extracted the zip and there was file named emmc_appsboot.mbn which is the bootloader.

adwait.bhandari said:
"Firmware" I think
Click to expand...
Click to collapse
No, it's not. When I'm restoring the nandroid backup to restore the original state of my device, so that the bootloader is unlocked again, "Firmware" is the only partition I am not restoring (it gives an error, and other users say that it should be skipped).

I took a look at the updater script and the Bootloader file is written to the aboot partition.
http://imgur.com/HqtIlsp

Aha! Next time I will relock the bootloader I will try to restore, for testing, just this partition and then check it's status. Thanks.
Later edit: Did restored only the aboot partition and got a brick

Related

From CM10 to Stock??

Passing my P3 on to my wife and need to get it back to stock.
Got as far as loading the 3.2 firmware from sammobile using fastboot as Odin won't flash.
It recognises an OTA update but fails to download the update. I actually think that it fails to install but in any event it get stuck.
The kernel is still at 2.6.36.3 and baseband is the P7500 one.
I think that the kernel is located in the boot.img but it doesn't look like I am able to overwrite it with fastboot.
The bootloader seems to be replaced but I still have a unlocked bootloader.
Any ideas?
Thanks
GaryWS said:
Passing my P3 on to my wife and need to get it back to stock.
Got as far as loading the 3.2 firmware from sammobile using fastboot as Odin won't flash.
It recognises an OTA update but fails to download the update. I actually think that it fails to install but in any event it get stuck.
The kernel is still at 2.6.36.3 and baseband is the P7500 one.
I think that the kernel is located in the boot.img but it doesn't look like I am able to overwrite it with fastboot.
The bootloader seems to be replaced but I still have a unlocked bootloader.
Any ideas?
Thanks
Click to expand...
Click to collapse
You need to restore the stock recovery as well, ClockworkMod Recovery wont handle OTA updates.
Do fastboot flash recovery [recovery img] to reflash the stock recovery.
To re-lock the bootloader, try fastboot oem lock (not tried).
Note that it appears that even if relocking the bootloader, manufacturers have ways of knowing if the bootloader has been unlocked. However, since the purpose is to give it to someone else with possibly less technical skills (that does not require the feature), a locked bootloader is an added security.
pruano said:
You need to restore the stock recovery as well, ClockworkMod Recovery wont handle OTA updates.
Do fastboot flash recovery [recovery img] to reflash the stock recovery.
To re-lock the bootloader, try fastboot oem lock (not tried).
Note that it appears that even if relocking the bootloader, manufacturers have ways of knowing if the bootloader has been unlocked. However, since the purpose is to give it to someone else with possibly less technical skills (that does not require the feature), a locked bootloader is an added security.
Click to expand...
Click to collapse
thx pruano, the stock firmware contains a recovery image. This writes ok ... I also tried locking the bootloader - it locks ok but with the same results
It looks like the kernel might be the problem ...
GaryWS said:
thx pruano, the stock firmware contains a recovery image. This writes ok ... I also tried locking the bootloader - it locks ok but with the same results
It looks like the kernel might be the problem ...
Click to expand...
Click to collapse
Did you flashed ALL the imgs (boot.img, recovery.img and system.img) from the PDA archive?
You can always erase/format the partitions with fastboot erase/format [boot|recovery|system] before re-flashing the images... (important note: if you erase/format the boot partition, do not leave recovery without flashing a new boot img).
I would also restore the stock modem (you need the one from P7100BUKE2, as P7100BULB4 does not have it) - for this you will need Odin.
pruano said:
Did you flashed ALL the imgs (boot.img, recovery.img and system.img) from the PDA archive?
You can always erase/format the partitions with fastboot erase/format [boot|recovery|system] before re-flashing the images... (important note: if you erase/format the boot partition, do not leave recovery without flashing a new boot img).
I would also restore the stock modem (you need the one from P7100BUKE2, as P7100BULB4 does not have it) - for this you will need Odin.
Click to expand...
Click to collapse
Pruano, using fastboot, the erase command seems to work but format does not. Why do you say that I need Odin to flash the modem? I have done this with fastboot previously using "fastboot flash radio modem.img" ...
Edit: Pruano, you put me onto the right track. The modem was the problem. Once I got the original modem from P7100BUKE2 installed it all worked fine - even with unlocked bootloader.
and just for interest i had to use: "fastboot flash modem modem.img"
GaryWS said:
Why do you say that I need Odin to flash the modem? I have done this with fastboot previously using "fastboot flash radio modem.img" ...
Edit:and just for interest i had to use: "fastboot flash modem modem.img"
Click to expand...
Click to collapse
Did not know fastboot would recognize that partition, not on the docs.
Always learning.
GaryWS said:
Edit: Pruano, you put me onto the right track. The modem was the problem. Once I got the original modem from P7100BUKE2 installed it all worked fine - even with unlocked bootloader.
Click to expand...
Click to collapse
Yes, unlocked bootloaders do not interfere with OTAs
Regarding the modem, in truth it was a long shot, just a step to restore to pristine state.
The knowledge that the P7500 modem works best with custom ROMs and flashing it as a common procedure is relatively new, no wonder one had to guess that it would interfere with OTAs (as its not obvious, probably the OTA install does some kind of background safety check using the modem firmware as base); good to know for the future.

[Q] locked/unlocked bootloader?

If I restored a twrp backup made prior to unlocking my bootloader will it become relocked? I ask because that is what I have done and now flashtool fails to flash a kernel with this error "INFO - FAILED (remote: Command not allowed)".
Second question, would a backup made after unlocking be unlocked when restored?
adfurgerson said:
If I restored a twrp backup made prior to unlocking my bootloader will it become relocked? I ask because that is what I have done and now flashtool fails to flash a kernel with this error "INFO - FAILED (remote: Command not allowed)".
Second question, would a backup made after unlocking be unlocked when restored?
Click to expand...
Click to collapse
I don't have, and haven't used TWRP much but I seem to remember something about including or not the TA partition Not sure though...
I now recommend backing up the TA while locked and unlocked.
blueether said:
I don't have, and haven't used TWRP much but I seem to remember something about including or not the TA partition Not sure though...
I now recommend backing up the TA while locked and unlocked.
Click to expand...
Click to collapse
Will restoring an unlocked TA backup restore me to an unlocked status?
It will, without the data wipe
I am updating this to pass along my experience.
1. I used dual recovery installer to gain root.
2. Backed up TA then used TWRP to make a Nandroid.
3. Unlocked bootloader which wiped data, then installed custom ROM.
4. Had trouble with custom ROM so restored backup which Relocked bootloader.
5. Unlocked bootloader second time, only this time it didn't wipe anything.
So in my case I was able to backup with TWRP, unlock bootloader, restore backup, unlock again and have phone as it was before unlocking. I only bring this up because I haven't seen anyone else mention it, if anyone wants to verify and add it to any of the guides feel free to do so.

bricked after updating to 5.1 and problems with unencrypted boot.img

Hey guys,
I installed last time the unencrypted boot.img to speed things up and yesterday I tried to flash to factory 5.1, but I believe I flashed all images like system, cache, recovery, vendor, but I may have messed up with boot and bootloader. I think I only flashed bootloader and forgot to flash boot, after reboot the device get in a loop, and I can't unlock the bootloader to push the boot.img
Is there a way to push the boot/bootloader.img without needing to unlock the bootloader?
Mephisto_POA said:
Hey guys,
I installed last time the unencrypted boot.img to speed things up and yesterday I tried to flash to factory 5.1, but I believe I flashed all images like system, cache, recovery, vendor, but I may have messed up with boot and bootloader. I think I only flashed bootloader and forgot to flash boot, after reboot the device get in a loop, and I can't unlock the bootloader to push the boot.img
Is there a way to push the boot/bootloader.img without needing to unlock the bootloader?
Click to expand...
Click to collapse
Not if you relocked your bootloader. Time to start the warranty exchange/repair process.
cam30era said:
Not if you relocked your bootloader. Time to start the warranty exchange/repair process.
Click to expand...
Click to collapse
Looks like I'll need to contact Google RMA Monday ...

can't relock bootloader and stuck

I'm trying to go back to stock from CM12.
I tried flashtool to flash a stock image, and after I selected relock bootloader.
it says it's gone OK, but stock doesn't boot after.
If I go back to flashtool, and I select BLU, it gives me the option to relock the bootloader! I thought it was locked already.
what can i do?
thanks
xd4d3v said:
I'm trying to go back to stock from CM12.
I tried flashtool to flash a stock image, and after I selected relock bootloader.
it says it's gone OK, but stock doesn't boot after.
If I go back to flashtool, and I select BLU, it gives me the option to relock the bootloader! I thought it was locked already.
what can i do?
thanks
Click to expand...
Click to collapse
This only works if you unlocked the bootloader using the official method of unlocking the bootloader.
If you did not do that and perhaps unlocked bootloader using flashtool the only choice you have is to restore the TA partition.
That said if you made a backup of the TA partition before unlocking the bootloader.
edit: What is the status of the phone when you say "stock doesn't boot after."?
Does the kernel not boot? = vibrates three times when power button being pressed.
Does the phone boot but get stuck in a bootloop?
SÜPERUSER said:
This only works if you unlocked the bootloader using the official method of unlocking the bootloader.
If you did not do that and perhaps unlocked bootloader using flashtool the only choice you have is to restore the TA partition.
That said if you made a backup of the TA partition before unlocking the bootloader.
edit: What is the status of the phone when you say "stock doesn't boot after."?
Does the kernel not boot? = vibrates three times when power button being pressed.
Does the phone boot but get stuck in a bootloop?
Click to expand...
Click to collapse
Somehow, after a second flash of the stock ROM, and selecting to wipe data, the phone booted in stock, and works fine.
I still had an unlocked bootloader, and flashtool relock or fastboot oem lock wouldn't work.
I managed to find out what the problem with Backup TA tool was, I replaced the adb previously, but I didn't need to, once I went back to the standard adb, the TA restore worked, and with it, the bootloader locked!
this is now solved. thanks for the help.
one question now.
Is this now the same as stock stock? will i be receiving OTAs or should I do a repair with PCcompanion just to be sure?
rather not if not necessary as I already rooted

remote: 'root type is risk'

Usually, when you relock the bootloader, you type in the command to relock it, with the bl unlock code, and boom it relocks it and wipes system with no issue.
With my device, it doesn't do that. It instead, spits out an error message saying "remote: 'root type is risk'".
I have gone into eRecovery, and downloaded latest version and recovery.
I have also tried to use the dload method, with no success, with dload telling me that the update failed.
I have flashed recovery and eRecovery stock images extracted from an UPDATE.app I found somewhere.
Would anyone know what is happening??
joenuts2124 said:
Usually, when you relock the bootloader, you type in the command to relock it, with the bl unlock code, and boom it relocks it and wipes system with no issue.
Click to expand...
Click to collapse
it's not that simple bro...
The bootloader status will not be lock, but relock. For apps like Google pay, it's like an unlocked bootloader. Only the Service firmware locks BL normally and correctly .
Do not forget that you should not joke with relock procedure. Must be full stock, (your situation is clearly not the same), otherwise you may end up with a nice paperweight.

Categories

Resources