Re-lock Bootloader Post-Nougat

aowald

Active member
Dec 14, 2013
27
0
0
I have a question for the knowledgeable masses. When I purchased my Moto X PE a few years back, specifically model XT1575, I gained it from a previous owner who had unlocked the bootloader. Since then, my Moto X has upgraded to Nougat. What I'd like to do is lock the bootloader now in order to take advantage of Android Pay features. Well, going the route of the Motorola suggested method would put my phone back on Android 6. I don't want to flash my Moto X back to 6 now that I'm on 7. So I was thinking that I could just lock the bootloader without having to flash my phone back to 6. Any idea if this would be possible?

I'm thinking I would only need to do the following:

- With the phone powered off, press the Power and Vol Down buttons and get into Recovery Mode.
- In Android Recovery, choose the option Apply Update from ADB.
- Having ADB, fastboot and drivers installed to my Windows box, from a command prompt I could run the command

$ fastboot oem lock

(provided my Windows box was able to see my phone connected).

Would that be all I need to do to lock the bootloader? I don't care if the phone says relocked; I obviously didn't care that it was unlocked. But for functionality sake, I'm wondering if this would be all I need to do.

Having never unlocked or locked a bootloader on any phone, I figured I'd reach out to those more experienced to help me out.

Thanks in advance,
 
Unfortunately, the answer is simple... You can't. Not even the "Moto method" will work.

In order relock the bootloader, you must flash a signed factory firmware image that is the same version or newer than what is installed on your phone, the problem is we don't have (and likely never will have) anything newer than 18-8 firmware (note that the firmware on Moto's site is listed as 18_18, this is NOT newer, it is incorrectly named and dates and is in reality the very first Marshmallow firmware release for the MXPE).

Downgrading is not an option either, although you can downgrade the "firmware", you cannot downgrade the booloader (bootloader.img) or partition table (gpt.bin), they will fail with a "Preflash Validation error", however the phone will likely boot and work, but due to a mismatch of the bootloader (now on Nougat) and any update (expecting it to be Marshmallow), the update will fail, leaving you stuck at Marshmallow forever. And the worst part is if you do manage to downgrade and get it working, then take the Nougat update, it is instant hard brick and the only recovery method is to have Moto fix it, which they won't do because the bootloader is unlocked. And in all of this, your bootloader and partition table never downgraded, so you can't flash a complete factory image and you cannot relock the bootloader. Vicious circle, right?

Basically, if you have an unlocked bootloader, and are on any software version after MPHS24.49-18-8, there is no option for bootloader relock.

The option you DO have through, is rooting with Magisk and using Magisk Hide and hiding root from Google Play Store and Google Play Services, and (going from memory here, don't have a MXPE anymore) there is a Magisk Module to bypass SafetyNet checks, which is your core problem.

I have a guide on XDA discussing some of this some depth, you can review it here:
https://forum.xda-developers.com/moto-x-style/general/guide-return-to-stock-relock-bootloader-t3489110
 
All I can say to that is "Well, ... dang." Things just never seem to be easy, heh. My sincere thanks for your reply. I'll read up on the link you provided on xda.

Thanks again,
 

Forum statistics

Threads
952,145
Messages
6,955,481
Members
3,162,574
Latest member
AnonymousVPN