[NOOB GUIDE] Unroot/Relock Bootloader - VZW Developer Edition Moto X - Moto X General

It took me about two days to figure out how to unroot and relock my Moto X. Figured I'd create a total noob guide for those who are also looking to do the same. This is for the Verizon Wireless Developer Edition Moto X ONLY! I have no clue if this will work for other variants like Sprint, AT&T, T-Mobile, etc. So just play it safe and don't...
I've unrooted and relocked my VZW Dev Edition Moto X twice using this method, so as long as you follow the steps below you should be fine. Also please note that I'm not at all responsible for anything that happens to your beloved phone.
Btw, this process wipes your phone completely clean, so back your sh** up.
So here goes.
1. You need a Windows PC.
2. Download and install the Motorola Device Manager (USB Drivers) to your PC. This will allow your Moto X to be recognized by your computer.
3. Plug your Moto X into your PC and let the drivers install automatically.
4. Download and unzip the VZW Developer Edition Factory Image for the Moto X to your desktop.
5. Download both the fastboot.exe and AdbWinApi.dll files and place them in the folder you just unzipped in step step 4.
6. Now grab your Moto X, unplug it from your PC and power it off. Once powered off, press and hold both the Power and Volume Down buttons for about 10 seconds or so to access Fastboot mode.
7. Now, back on your PC, open the folder you extracted on Step 4. Hold down the Shift key on your keyboard and Right Click on an empty space within that folder. From the menu that pops up, click on Open command window here. A command prompt window should open. Plug your phone back into your PC.
8. In the command prompt type fastboot devices to make sure your X is being detected. You should see something similar T0620059GA. If you don't see it, then you may have to reinstall the USB Drivers from Step 2.
9. Once your X has been detected by your computer, and while still in Fastboot mode, type the following commands (in the order shown) into the command prompt on your PC:
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase cache
fastboot oem lock
fastboot reboot
...
That's it! You should now be locked and unrooted; back to the out of the box factory state. Don't forget to hit thanks and share!

Did re-locking ur bootloader get rid of the Bootloader Unlocked Warning Message?

tonyf7 said:
7. Now, back on your PC, open the folder you extracted on Step 4. Hold down the Shift key on your keyboard and Left Click on an empty space within that folder. From the menu that pops up, click on Open command window here. A command prompt window should open. Plug your phone back into your PC.
Click to expand...
Click to collapse
Right click sir.

mschumacher69 said:
Did re-locking ur bootloader get rid of the Bootloader Unlocked Warning Message?
Click to expand...
Click to collapse
Yes.

tonyf7 said:
Yes.
Click to expand...
Click to collapse
Just to make sure we're on the same page here, after re-locking ur bootloader, when u boot the phone, u get the Moto logo instead of the message that says Warning Bootloader Unlocked?
Because many other users said that u would still get this message even if u re-lock ur bootloader.

When I relocked the bootloader and rebooted the phone I didn't get the warning message. Went straight to the Moto logo. But then I immediately rooted and unlocked again. Only reason I unrooted and relocked in the first place was because I flashed a zip file that corrupted and broke Google Voice Search on my phone.
The second time I did this process I stopped right before locking the bootloader since I was going to root again anyways.
So maybe those other people are right. I've only rebooted my phone once since relocking the bootloader.
Sent from my XT1060 using xda app-developers app

If you want to get rid of the warning on startup, just flash the logo.bin. You can do this and remain unlocked. The instructions provided should have your phone looking and acting the same as it did out of the box. However, fastboot may note that it's been unlocked, to the OP, do you recall what status fastboot was reporting?

you need to reflash to stock in order to lock your bootloader? If not, I would appreciate if you separate the steps to just lock your boot loader.
I have my boot loader unlocked and the only reason I am considering to lock it again is so that if the phone is stolen, someone can't reimage it easily. I'm not sure that gives me any sort of protection though. But its just a thought.
In other words, I see unlocking and locking as a switch that stops you from flashing firmware. The OP makes it sound like the switch is tied to the firmware, ie only stock can have bootloader locked. I am not sure which is right.

esidnD Selim
I did it and keep receiving the warning unlock bootloader screen.

lopescesar304 said:
I did it and keep receiving the warning unlock bootloader screen.
Click to expand...
Click to collapse
Did u re-lock on your phone's ROM or after flashing another carrier's ROM?

mschumacher69 said:
Did u re-lock on your phone's ROM or after flashing another carrier's ROM?
Click to expand...
Click to collapse
My phone is Retail, I used the retail ROM to flash.

My device won't lock. I've run your commands listed, as well as the fastboot oem lock on it's own, and I can't seem to lock the device. Any help?

flavinator said:
My device won't lock. I've run your commands listed, as well as the fastboot oem lock on it's own, and I can't seem to lock the device. Any help?
Click to expand...
Click to collapse
Welcome to the "Relock" party..
The OP does not mention (that I can see) what OS version..are you on KK 4.4 and is there a "Factory Image" for KK 4.4 available for your device.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G

NWKENT said:
Welcome to the "Relock" party..
The OP does not mention (that I can see) what OS version..are you on KK 4.4 and is there a "Factory Image" for KK 4.4 available for your device.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
Click to expand...
Click to collapse
Yes, there is, flashed it, ran commands, and the relock command, multiple times and get:
(bootloader) FAIL: Please run fastboot oem lock begin first!
OKAY [ 0.120s]
finished. total time: 0.122s
Not sure what I am doing wrong.

flavinator said:
Yes, there is, flashed it, ran commands, and the relock command, multiple times and get:
(bootloader) FAIL: Please run fastboot oem lock begin first!
OKAY [ 0.120s]
finished. total time: 0.122s
Not sure what I am doing wrong.
Click to expand...
Click to collapse
I'd think you ran this as the first flash >> fastboot oem lock begin first!
Then all the OS files and then this for the last command >> fastboot oem lock > as the last command.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G

http://forum.xda-developers.com/showthread.php?t=2575586

NWKENT said:
I'd think you ran this as the first flash >> fastboot oem lock begin first!
Then all the OS files and then this for the last command >> fastboot oem lock > as the last command.?
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G
Click to expand...
Click to collapse
I have no clue. At first I just flashed back using RSD Lite. Then I ran the lock command and got that error. Afterwards, I searched online, trying a bunch of different fastboots. That's when I stumbled on this list of commands, figured I'd run it from scratch, see if it makes a difference. Once it got to the relock command though, I got the same issue. And now I'm just frustrated...
---------- Post added at 06:41 PM ---------- Previous post was at 06:36 PM ----------
shane1 said:
http://forum.xda-developers.com/showthread.php?t=2575586
Click to expand...
Click to collapse
I think this might work, thanks shane1

@NWKENT have u managed to re-lock your bootloader yet?

mschumacher69 said:
@NWKENT have u managed to re-lock your bootloader yet?
Click to expand...
Click to collapse
Yes Sir..with Kit Kat 4.4..I have successfully"Unlocked", "Relocked" and "Unlocked" again..my XT1080MDEV (Droid Maxx)..No one could tell me exactly how to do it..Motorola Tech Line was absolutely NO HELP either..SO..after hours upon hours..I did figure it out..Now I'm working on "Relock" on JB 4.2.2
Sounds easy..and many have probably "Unlocked and "Relocked" on JB 4.2.2..BUT..The difficult part is once the XT1080 has been on KK 4.4..is when alot more firey hoops must be jumped thru..
ANYONE can chime in with help on this..NOT ADVICE..but proven procedures..
sent by my 4.3_14.14.14
XT1028 (aka) Moto-G

Yes, thanks guys.

Related

[OFFICIAL STOCK.IMG] WIFI ONLY MZ604_HWI69 - Official Motorola software

The files were posted today. Remember to grab the MZ604 files if you have the Wifi only version of the Xoom.
http://developer.motorola.com/products/software/ <------ Grab the files here. The files are for the US version of the Wifi Xoom only.
Instructions to return it to stock
1) First you need the Moto Drivers - Read this thread to START you - http://forum.xda-developers.com/showthread.php?t=981578
Should have these drivers installed if you have rooted your Xoom before.
2) Make sure you have the latest SDK - adb and fastboot should be in /platform-tools - http://developer.android.com/sdk/index.html
Should have the android SDK if you have rooted your Xoom before.
3) Place all the downloaded stock image files into the SDK Tools folder.
4) If you are booting up from scratch, you can get the Xoom in fastboot mode by doing the following. Use command prompt to perform the rest of the steps
Hold VolDown and Power button will boot unit for fastboot mode
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash userdata userdata.img
fastboot erase cache
fastboot oem lock
If you Xoom is booted up already follow the commands below using command prompt to perform the steps
adb reboot bootloader <---- reboots the Xoom into fastboot mode.
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash userdata userdata.img
fastboot erase cache
fastboot oem lock
You noticed this too I see. Glad you posted this as a new thread. I was just randomly posting that link in threads where stock images may have helped.
I'm not home to try it yet but I'm guessing that's a US image?
Ahhhhh finally.
i just followed this process, everything worked on the xoom wifi (US), im back to stock and everything is ok so far.
but im an idiot and pressed vol up instead of down on the last step (oem lock) which aborted the oem lock step. before i did this i was rooted, so i think technically im still rooted.
can i simply go back into fastboot oem lock and try again and press the rightbutton this time to re lock the xoom or would that brick it?
ok thanks guys!
vista64 said:
i just followed this process, everything worked on the xoom wifi (US), im back to stock and everything is ok so far.
but im an idiot and pressed vol up instead of down on the last step (oem lock) which aborted the oem lock step. before i did this i was rooted, so i think technically im still rooted.
can i simply go back into fastboot oem lock and try again and press the rightbutton this time to re lock the xoom or would that brick it?
ok thanks guys!
Click to expand...
Click to collapse
If you want to be extra safe, start over from the beginning. You're probably still unlocked (but not rooted) if you managed to flash boot and system.
i have error failed to boot lnx 0x0004 - starting rsd mode 2
can i use this file ??
DinarQ8 said:
i have error failed to boot lnx 0x0004 - starting rsd mode 2
can i use this file ??
Click to expand...
Click to collapse
Only if you can get into fastboot mode AND your computer can see it. But if I recall, neither ADB, Fastboot nor RSD Lite will see your Xoom?
maybe solution i wait SBF file
Hi Scourge1024,
Are you going to try and flash the images to your Canadian Xoom AND then see if you can OEM re-lock it again??
I haven't been able to find out if all the WiFi images ie US, Canadian or European are all interchangeable on a Wifi only xoom??
I guess what I'd like to know is, if I ever wanted to re-lock my UK xoom, could I simply flash the Motorola MZ604_HWI69 files, then oem re-lock OR would have to wait for European Motorola backup files?
Cheers
Ody
what he said ^
Just tried downloading the Wi-fi files... On both my Mac and PC, it's saying it can't extract the ZIP. Crap crap crap crap crap...
If i remember correctly, scourge said that both devices are exactly the same hardware. Therefore flashing either version's set of images is irrelevant as long as you do WIFI for that model and 3G for that one.
odyseus said:
Hi Scourge1024,
Are you going to try and flash the images to your Canadian Xoom AND then see if you can OEM re-lock it again??
I haven't been able to find out if all the WiFi images ie US, Canadian or European are all interchangeable on a Wifi only xoom??
I guess what I'd like to know is, if I ever wanted to re-lock my UK xoom, could I simply flash the Motorola MZ604_HWI69 files, then oem re-lock OR would have to wait for European Motorola backup files?
Cheers
Ody
Click to expand...
Click to collapse
Nope. I'm done being the guinea pig (with the OEM locking). I bricked my first Xoom trying to OEM lock it. I managed to lock it a few times. Then I tried a different boot.img and bricked...
Personally, I have no issues flashing the US image on. It's just the re-locking. There's really no point to relock it. The Americans with the 3G/4G Verizon ones had to be able to relock for a hardware upgrade. I have managed to flash US images onto my Xoom but they were extracted by BeagleBoy here. I posted a comparison here: http://forum.xda-developers.com/showthread.php?p=13070124
The software is interchangable between the MZ604 Xoom models (Wi-fi only). There are a bunch of other Brits using the Canadian images I extracted from me and my friend's XOOMs. I've used the US ones. You just need to do a "fastboot -w" after flashing both the system and boot images because going between versions sometimes requires userdata to be wiped.
Scourge1024 said:
Just tried downloading the Wi-fi files... On both my Mac and PC, it's saying it can't extract the ZIP. Crap crap crap crap crap...
Click to expand...
Click to collapse
FYI,
$ md5sum MZ604_HWI69.zip
ae9b9f5693c4b49c745cb017afe1a4b5 MZ604_HWI69.zip
$ unzip -t MZ604_HWI69.zip
Archive: MZ604_HWI69.zip
warning [MZ604_HWI69.zip]: 36325409 extra bytes at beginning or within zipfile
(attempting to process anyway)
testing: MZ604_HWI69/boot.img OK
testing: MZ604_HWI69/recovery.img OK
testing: MZ604_HWI69/system.img OK
testing: MZ604_HWI69/userdata.img OK
No errors detected in compressed data of MZ604_HWI69.zip
You might be OK if you can get something that'll handle errors better.
In Windows, WinRar worked. On my Mac, I did what you posted and well, it seemed to work. I also did a compare against BeagleBoy's ripped images and boot was perfect. System was 1 byte off. Maybe a counter for the file system being mounted?
Code:
mac-mini:mz604_img Howard$ md5 MZ604_HWI69.zip
MD5 (MZ604_HWI69.zip) = ae9b9f5693c4b49c745cb017afe1a4b5
mac-mini:mz604_img Howard$ unzip -t MZ604_HWI69.zip
Archive: MZ604_HWI69.zip
warning [MZ604_HWI69.zip]: 36325409 extra bytes at beginning or within zipfile
(attempting to process anyway)
testing: MZ604_HWI69/boot.img OK
testing: MZ604_HWI69/recovery.img OK
testing: MZ604_HWI69/system.img OK
testing: MZ604_HWI69/userdata.img OK
No errors detected in compressed data of MZ604_HWI69.zip.
mac-mini:mz604_img Howard$
Scourge1024 said:
In Windows, WinRar worked. On my Mac, I did what you posted and well, it seemed to work. I also did a compare against BeagleBoy's ripped images and boot was perfect. System was 1 byte off. Maybe a counter for the file system being mounted?
Click to expand...
Click to collapse
Yep, IIRC, ext maintains a mount count. One'd need some file system tools to properly verify.
Can someone post a walk through on how to do this?
pricej636 said:
Can someone post a walk through on how to do this?
Click to expand...
Click to collapse
from the op:
Instructions to return it to stock
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot flash userdata userdata.img
fastboot erase cache
fastboot oem lock
Scourge1024 said:
Nope. I'm done being the guinea pig (with the OEM locking). I bricked my first Xoom trying to OEM lock it. I managed to lock it a few times. Then I tried a different boot.img and bricked...
Personally, I have no issues flashing the US image on. It's just the re-locking. There's really no point to relock it. The Americans with the 3G/4G Verizon ones had to be able to relock for a hardware upgrade. I have managed to flash US images onto my Xoom but they were extracted by BeagleBoy here. I posted a comparison here: http://forum.xda-developers.com/showthread.php?p=13070124
The software is interchangable between the MZ604 Xoom models (Wi-fi only). There are a bunch of other Brits using the Canadian images I extracted from me and my friend's XOOMs. I've used the US ones. You just need to do a "fastboot -w" after flashing both the system and boot images because going between versions sometimes requires userdata to be wiped.
Click to expand...
Click to collapse
Fair do's - I don't blame you! You've done enough As you say why re-lock on WiFi?
What I would really like to do is flash all the images to my UK WiFi Xoom and then try to install Bignadad's BigDX Xoom|Zoom Theme..
Previously flashing this theme soft-bricked my UK xoom - got loads of Force Closures. Installing the extracted images from you, still caused the same problem. Maybe it only works on the US WiFi Xoom, but I might re-flash with 'stock' ROM to see if that makes any difference? (I do have CWM nandroid backups in case of another soft brick!)
Cheers
Ody
Is there a risk with using these cause of zip extra bytes warning?

Help relocking RAZR M bootloader

First, let me say this because i've used xda for a while and i know im going to get these responses:
I know this wont reinstate my warranty...
Why? Because I want to. I understand you think it's useless but it's not your phone...
I have tried "fastboot oem lock" and it doesnt work...
I've searched Motorola's site, got on a chat with them which was useless, and searched xda...
So I booted into AP fastboot and connected to my computer. Opened CMD and typed "fastboot oem lock begin"
That seemed to start the process so then ran RSD lite (as admin) and flashed a signed xml of 4.1.2
Yes, I edited the XML first and removed the 2 lines with "getvar" in them
RSD finished and the phone rebooted (which was great because before it was hung up on the unlocked bootloader warning)
Unfortunately after turning the phone off and then back on, the unlocked bootloader warning screen still came up.
And after booting back into AP fastboot it still said UNLOCKED.
did i miss a step?
I need to relock the phone. if anyone has useful information it would be extremely helpful. in the event it just cant be done thats fine. but i feel like it can, because after fastboot oem lock begin the command prompted told me that now i can flashed the signed images.
well crap. i may have just answered my own question. do i have to flash manually through CMD (ie fastboot flash system system.img) AND THEN run fastboot oem lock at the bottom? i'll try it tomorrow.
before i started this the phone was stuck on the bootloader warning screen so if anyone is stuck at that point this will allow you to boot up your phone. and if my results are typical, it did not relock the bootloader (obviously). hope I helped someone. hope someone can help me. thanks.
most likely not feasible
unlocking razr m involves phisically blowing a q-fuse, so you can't go back to locked
even if you could, it would be traced forever that you've unlocked the BL
You can relock the boot loader on the Dev edition, but once unlocked you can never go back to original status 0 of the boot loader and the boot logo will always display the warning even if you relock the boot loader. You have to flash that partition with another logo image to avoid that.
You also need to wipe the user data partition in fastboot first for the fastboot oem lock begin command to complete successfully.
Once that is done, when it reboots you will see that in fastboot it will display status 2 locked instead of status 3 unlocked.
This is a physical change that happens to the hardware when you unlock the boot loader an efuse on the board is blown and that memory location is permanently programmed. Its not even a question of them knowing, even though they do of course, the device itself is altered.
From my goodies
http://forum.xda-developers.com/attachment.php?attachmentid=2201206&d=1376991889
Flash from cwm or twrp.
Trade a locked one for your unlocked one? Lol I'm stuck locked on the newest ota
Sent from my XT907 using Tapatalk

Re-lock bootloader (H850)

I just wanted to report that I successfully re-locked my bootloader (did not find that here).
I have an H850 with GPS problems. To return it I wanted it to be as stock as possible.
I used TWRP to flash LG-H85010E-Flashable.COMPLETE.zip from Codefire. Back to unrooted.
I also tried to flash recovery.img from the same source. This seemed to work (no more TWRP), but did not allow for OTAs (update error 0x1125000).
Then I put the phone in download mode, started LG bridge and did the "Updatefehler korrigieren" thing (German, roughly translates to "correct update errors").
To re-lock the bootloader, I put the phone in USB Debugging mode and entered the following commands:
Code:
adb reboot bootlaoder
fastboot oem lock
fastboot reboot
The phone gets wiped by this, but you need to do the initial dialog again: enable developer mode, then go there an disable OEM unlock. After that do a factory data reset one last time.
You should contact @autoprime and have him add this to his all in one thread.
Thanks for the info!
@bornheim2
It's good to see that we have option to turn back to stock, and maybe send phone for warrianty repair. But I have one question... If you had tried to unlock phone once again, would You had to enter LG Unlock Code again?
Hazard17 said:
If you had tried to unlock phone once again, would You had to enter LG Unlock Code again?
Click to expand...
Click to collapse
Obviously. The command to unlock is
Code:
fastboot flash unlock unlock.bin
which means you need to have the unlock.bin file available. You did archive the mail, didn't you?
bornheim2 said:
Obviously. The command to unlock is
Code:
fastboot flash unlock unlock.bin
which means you need to have the unlock.bin file available. You did archive the mail, didn't you?
Click to expand...
Click to collapse
I haven't unlocked my phone yet, but it is important message for me.
bornheim2 said:
Obviously. The command to unlock is
Code:
fastboot flash unlock unlock.bin
which means you need to have the unlock.bin file available. You did archive the mail, didn't you?
Click to expand...
Click to collapse
No I didn't archive the mail
I've got the same problem - seller deceived me and sold phone after water damage. My microphone stopped work and I should send it back. How to lock the bootloader on RS988 model?

Is it possible to relock the bootloader?

I'm holding off twrp + bootloader unlock because I want to be able to undo in case I need to use my warranty. Is twrp/bootloader unlock reversible? Many thanks
Yes. Flash complete stock everything, boot into bootloader, connect to PC, and "fastboot oem lock".
Is it sure that it works??I have a A2017G and i have open BL and a B29 Custom Rom and i want back to Lock Bootloader
Kevinkuensken said:
Is it sure that it works??I have a A2017G and i have open BL and a B29 Custom Rom and i want back to Lock Bootloader
Click to expand...
Click to collapse
Yup! I've done it plenty of times. You do need to format the data partition though. This could mean that it'll wipe out even your internal storage, so back that up as well!
Im on stock and then i go to edl and then i type fastboot oem lock but nothing happend
Kevinkuensken said:
Im on stock and then i go to edl and then i type fastboot oem lock but nothing happend
Click to expand...
Click to collapse
Boot into bootloader, not EDL.
Erahgon said:
Yup! I've done it plenty of times. You do need to format the data partition though. This could mean that it'll wipe out even your internal storage, so back that up as well!
Click to expand...
Click to collapse
and you can unlock it again afterwards?
Never heard of anyone wanting to lock the bootloader so I'd a newb in this kind of thing.
BlazingBullets said:
and you can unlock it again afterwards?
Never heard of anyone wanting to lock the bootloader so I'd a newb in this kind of thing.
Click to expand...
Click to collapse
Locking it again is good for when you want to sell the device or send it in for warranty repair.
BlazingBullets said:
and you can unlock it again afterwards?
Never heard of anyone wanting to lock the bootloader so I'd a newb in this kind of thing.
Click to expand...
Click to collapse
Yeah, the unlock procedure is the same as before. If you didn't restore the original boot image before the relock, then it's just a matter of booting into fastboot and unlocking the device. Note that this will cause your data to be wiped as well!
If you restore your boot.bin backup file from when your device was locked, does this lock the bootloader? "fastboot oem lock", "fastboot flashing lock" nor "fastboot oem device-info" does nothing for me. Is there any other way to check if your bootloader has been relocked?
Thanks
H0lmEd said:
I'm holding off twrp + bootloader unlock because I want to be able to undo in case I need to use my warranty. Is twrp/bootloader unlock reversible? Many thanks
Click to expand...
Click to collapse
Hi there,
Were you ever able to re-lock your bootloader on your A2017G?
I just want root for now but understand that I'll need to unlock the bootloader first. Before doing that, I want to make sure I can re-lock the bootloader if needed.
Thanks for letting us know!
joaste said:
Hi there,
Were you ever able to re-lock your bootloader on your A2017G?
I just want root for now but understand that I'll need to unlock the bootloader first. Before doing that, I want to make sure I can re-lock the bootloader if needed.
Thanks for letting us know!
Click to expand...
Click to collapse
Guys/Gals, it is seriously as simple as using the fastboot command in reverse. I've done it a few times already with mine.
If you used the following to unlock....
fastboot devices
fastboot oem unlock
.....then you can use the following commands to relock
fastboot devices
fastboot oem lock
fastboot devices is not necessary, but I do it to make sure the devices is being recognized by ADB/FASTBOOT
sauerkraut17 said:
Guys/Gals, it is seriously as simple as using the fastboot command in reverse. I've done it a few times already with mine.
If you used the following to unlock....
fastboot devices
fastboot oem unlock
.....then you can use the following commands to relock
fastboot devices
fastboot oem lock
fastboot devices is not necessary, but I do it to make sure the devices is being recognized by ADB/FASTBOOT
Click to expand...
Click to collapse
Thanks for the answer.
But there are a few files to flash before using that command according to this thread.
Doesn't anything need to be flashed again (e. g. stock files or anything)?
Correct, but you would have already flashed those in order to use the unlock command in the first place.
Are you trying to relock on marshmallow or nougat?
sauerkraut17 said:
Correct, but you would have already flashed those in order to use the unlock command in the first place.
Are you trying to relock on marshmallow or nougat?
Click to expand...
Click to collapse
My phone is only a few days old. I'm debating whether to keep it or not (considering the Mate 9, but the price is not the same - love the form factor and bigger screen though - sound won't be the same and I think I'll miss the MiPop button on the Axon (never thought that would happen )).
I'm on the latest MM (B10 - the A2017G model).
Following the mentioned thread, I got to the point of installing TWRP (the signed version), only to realize that besides making backups, there is not much else I can do with that without unlocking the bootloader. I really just wanted to flash supersu and install adaway fro the time being until development matured for this phone (maybe also play around with viper - had great results on my LG G4).
HI, I get the error "FAILED (remote: unknown command)" in ADB when I enter "fastboot oem lock". Any way to fix this?
Guys, can anyone help me? I really need to lock the bootloader!
How can I fix the error "FAILED (remote: unknown command)" in ADB when I enter "fastboot oem lock"?
I'm on MM B11 Stock.
https://i.imgur.com/fdkgYs6.jpg
Hi Guys,
The Axon 7 Model A2017U I just purchased has the bootloader locked and it is running LineageOS 14.1 - 2018032-Nightly-axon7. I need to relock the bootloader and get back to the stock MiFavor rom so that I can send the phone to ZTE for repair. Can you please explain to a newb in some detail how to achieve that.
Thank you.

[GUIDE] How to restore stock firmware

Warning: some people have said following these instructions on Nougat bricks your phone. I have done them to restore stock after upgrading to Nougat and have had no issues but you may want to conduct further research before attempting.
I had trouble finding the correct instructions for restoring the stock firmware when I needed it a few months ago so I decided to make a simple guide to help people that may be having the same issues I was.
Firstly, ensure your bootloader is unlocked and USB debugging is enabled in developer options. I'd assume this is already the case if you're needing to restore to stock.
Download the stock firmware for your update channel from https://mirrors.lolinet.com/firmware/moto/addison/official/
Extract the zip file into a directory of your choice
Right click and "Open command window here"
Execute, line by line:
Code:
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0 (repeat up to 10)
fastboot flash oem oem.img
fastboot erase carrier
fastboot erase cache
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear
Reboot device
Thank you! This is very helpful restoring the device. Is there also command to re-lock the bootloader to enable OTA? The info is so fragmented... Many thanks
Yes same question. Is it possible to relock the bootloader after that? If so how to do this?
slainer68 said:
Yes same question. Is it possible to relock the bootloader after that? If so how to do this?
Click to expand...
Click to collapse
I dont remember who tell this "once you unlock your device, you can never ever lock it again."
Sent from my XT1635-02 using XDA Labs
There's a lot of devices that you can relock...
fastboot oem lock
should relock the bootloader...
Relock usually does make no sense. Unlock does not prevent OTA update. Relocked is "locked again", but won't help you in any way.
Under which circumstances do you fear that someone gets access to your device and flashes something? This is what gets prevented by relock.
Relock works only if we have a signed firmware. Without that there is no way to relock the bootloader.
tag68 said:
Relock usually does make no sense. Unlock does not prevent OTA update. Relocked is "locked again", but won't help you in any way.
Under which circumstances do you fear that someone gets access to your device and flashes something? This is what gets prevented by relock.
Click to expand...
Click to collapse
Relock to use Android Pay
In NOUGAT your script flash MM brick phone
Remove
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
Donwgrade Bootloader Brick Phone
You really should add a warning. This breaks your phone if you already upgraded to Android N (specifically, the bootloader).
This other thread helped me downgrade the right way
https://forum.xda-developers.com/mo...irmware-downgrade-t3558118/page2#post71404455
Specifically the version of the script in the comments by -=MoRpH=-
graphitenexus said:
I had trouble finding the correct instructions for restoring the stock firmware when I needed it a few months ago so I decided to make a simple guide to help people that may be having the same issues I was.
Should this be unzipped in the ADB folder?
Click to expand...
Click to collapse
marsisabar said:
You really should add a warning. This breaks your phone if you already upgraded to Android N (specifically, the bootloader).
This other thread helped me downgrade the right way
https://forum.xda-developers.com/mo...irmware-downgrade-t3558118/page2#post71404455
Specifically the version of the script in the comments by -=MoRpH=-
Click to expand...
Click to collapse
I've restored to it from N without issue
Jimi Mack said:
I had trouble finding the correct instructions for restoring the stock firmware when I needed it a few months ago so I decided to make a simple guide to help people that may be having the same issues I was.
Firstly, ensure your bootloader is unlocked and USB debugging is enabled in developer options. I'd assume this is already the case if you're needing to restore to stock.
Download the stock firmware for your update channel from https://mirrors.lolinet.com/firmware/moto/addison/official/
Extract the zip file into a directory of your choice
Right click and "Open command window here"
Execute, line by line:
Should this be unzipped in the ADB folder?
Click to expand...
Click to collapse
Not necessary if you have ADB added to your path
graphitenexus said:
Not necessary if you have ADB added to your path
Click to expand...
Click to collapse
Thank you, but sorry I do not understand., an old guy here and the whole thing with command lines confuse me.
---------- Post added at 11:28 AM ---------- Previous post was at 11:06 AM ----------
I have all the files in the ADB folder, I keep getting "Slot Counts not found" on the 2nd entry on the list. All want to do is flash my screw up back to stock.... LOL.
I do not even have an "oem fb_mode_set" in the folder, I have an "oem.img"
Jimi Mack said:
Thank you, but sorry I do not understand., an old guy here and the whole thing with command lines confuse me.
Click to expand...
Click to collapse
Don't worry about path then. Unzip to platform-tools in the ADB folder then shift+right click and select open command window here. Then run the commands in the OP
graphitenexus said:
Don't worry about path then. Unzip to platform-tools in the ADB folder then shift+right click and select open command window here. Then run the commands in the OP
Click to expand...
Click to collapse
I am running the commands one by one but the 2nd one get me stuck as I noted above. The no slot think has be confused, what should I see after entering each command?
---------- Post added at 12:10 PM ---------- Previous post was at 11:44 AM ----------
Got It
graphitenexus said:
I've restored to it from N without issue
Click to expand...
Click to collapse
In the future... when you receive a "new" OTA you may brick your phone... (ghost user experience)
CsR0501 said:
In the future... when you receive a "new" OTA you may brick your phone... (ghost user experience)
Click to expand...
Click to collapse
Original Moto X, had one and loved it and yes lots of bricks.
graphitenexus said:
Relock to use Android Pay
Click to expand...
Click to collapse
I've never had that problem? My bootloader was unlocked on my Moto X Pure and the only time Android pay didn't work was when I rooted. I reverted back to complete stock and it worked fine.
SixShots said:
I've never had that problem? My bootloader was unlocked on my Moto X Pure and the only time Android pay didn't work was when I rooted. I reverted back to complete stock and it worked fine.
Click to expand...
Click to collapse
Unlocked bootloader now breaks safetynet

Categories

Resources