Moto G4 plus relock bootloader

Bender1987

Senior Member
Sep 27, 2014
137
137
0
Thats not true, you don't have to relock the bootloader. You only need to restore/flash stock boot.img, recovery.img and system.img, then you can take the OTA-update and root again.
 
  • Like
Reactions: audismart007

royroyal

Senior Member
Mar 2, 2014
89
6
0
You'll have to reflash stock rom - and end with oem lock command....

Full reflash sequence:

mfastboot oem fb_mode_set
mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash dsp adspso.bin
mfastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot erase cache
mfastboot erase userdata
mfastboot erase customize
mfastboot erase clogo
mfastboot oem fb_mode_clear
mfastboot oem lock
After flashing with the above commands lastly the cmd says "signed boot.img required" for the relocking part..plz post a working guide to reloack the bootloader

---------- Post added at 06:11 PM ---------- Previous post was at 05:12 PM ----------

Can Anyone Who has relocked the Bootloader, Execute this command - "fastboot getvar all", and check the line - "iswarrantyvoid", does the value here, return back to "no" after relocking, or does it stays to "yes"?

Also, can the motorola figure out if we've unlocked the bootloader before, but then reflashed and locked it again, maybe something like a flash counter or a qfuse?

~Thanks
ya dude i have successfully relocked my bootloader,and rest u can see in the below log# its the log after running the command that u gave.

E:\MOTO G4 PlUS\Stock Firmware>mfastboot getvar all
(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8952-B0.0E(*)
(bootloader) product: athene_16mp
(bootloader) board: athene_16mp
(bootloader) secure: yes
(bootloader) hwrev: P2A
(bootloader) radio: 4
(bootloader) storage-type: emmc
(bootloader) emmc: 32GB SAMSUNG RX1BMB RV=08 PV=07 FV=0000000000000007
(bootloader) ram: 3GB SAMSUNG LP3 DIE=6Gb M5=01 M6=05 M7=00 M8=7B
(bootloader) cpu: MSM8952
(bootloader) serialno: ZY2239MDL6
(bootloader) cid: 0x0032
(bootloader) channelid: 0xc0
(bootloader) uid: A5C1A90000000000000000000000
(bootloader) securestate: oem_locked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 536870912
(bootloader) reason: Volume down key pressed
(bootloader) meid:
(bootloader) date: 06-15-2016
(bootloader) sku: XT1643
(bootloader) battid: SNN5970A
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Sun Jul 17 13:26:17 UTC 2016"
(bootloader) ro.build.fingerprint[0]: motorola/athene_f/athene_f:6.0.1/M
(bootloader) ro.build.fingerprint[1]: PJ24.139-23.1/1:user/release-keys
(bootloader) ro.build.version.full[0]: Blur_Version.24.24.1.athene.retai
(bootloader) ro.build.version.full[1]: l.en.US
(bootloader) ro.build.version.qcom: LA.BR.1.3.3-02720-8976.0
(bootloader) version-baseband[0]: M8952_70004.04.03.32R ATHENE_INDIA_DSD
(bootloader) version-baseband[1]: S_CUST
(bootloader) kernel.version[0]: Linux version 3.10.84-gcf01273 (hudsoncm
(bootloader) kernel.version[1]: @ilclbld52) (gcc version 4.9.x-google 20
(bootloader) kernel.version[2]: 140827 (prerelease) (GCC) ) #1 SMP PREEM
(bootloader) kernel.version[3]: PT Thu Apr 28 13:04:48 CDT 2016
(bootloader) sbl1.git: git=MBM-NG-VB0.0E-0-g83950b7
(bootloader) rpm.git: git=1dc910e
(bootloader) tz.git: git=9fa1804
(bootloader) hyp.git: git=9fa1804
(bootloader) keymaster.git: git=9fa1804
(bootloader) cmnlib.git: git=9fa1804
(bootloader) aboot.git: git=MBM-NG-VB0.0E-0-g4986429
(bootloader) qe: qe 1/1
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: retin
all: listed above
finished. total time: 0.085s

E:\MOTO G4 PlUS\Stock Firmware>

---------- Post added at 06:23 PM ---------- Previous post was at 06:11 PM ----------

You'll have to reflash stock rom - and end with oem lock command....

Full reflash sequence:

mfastboot oem fb_mode_set
mfastboot flash partition gpt.bin
mfastboot flash bootloader bootloader.img
mfastboot flash logo logo.bin
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash dsp adspso.bin
mfastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot flash modem NON-HLOS.bin
mfastboot erase modemst1
mfastboot erase modemst2
mfastboot flash fsg fsg.mbn
mfastboot erase cache
mfastboot erase userdata
mfastboot erase customize
mfastboot erase clogo
mfastboot oem fb_mode_clear
mfastboot oem lock
Mate i have successfully relocked my bootloader..this is what i did. after flashing the last command"mfastboot oem lock" it was giving me the error that "signed boot.img is required"

This is what i did. flashed the below commands simultaneously
mfastboot oem lock
mfastboot flash boot boot.img
mfastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot oem lock(lastly hit enter)

my device rebooted without any bootloader ulocked warning and without entering any fastboot reboot command.

Hope it helps Some one..(peace)###
 
Last edited:

audismart007

Senior Member
Jul 28, 2014
113
20
18
London
Thats not true, you don't have to relock the bootloader. You only need to restore/flash stock boot.img, recovery.img and system.img, then you can take the OTA-update and root again.
is it possible to restore stock system,boot via TWRP i have a back up in Twrp and to flash the recovery.img via pc to get ota?
 

srgudhka

Senior Member
Oct 6, 2008
675
32
28
MUMBAI
After flashing with the above commands lastly the cmd says "signed boot.img required" for the relocking part..plz post a working guide to reloack the bootloader

---------- Post added at 06:11 PM ---------- Previous post was at 05:12 PM ----------



ya dude i have successfully relocked my bootloader,and rest u can see in the below log# its the log after running the command that u gave.

E:\MOTO G4 PlUS\Stock Firmware>mfastboot getvar all
(bootloader) version: 0.5
(bootloader) version-bootloader: moto-msm8952-B0.0E(*)
(bootloader) product: athene_16mp
(bootloader) board: athene_16mp
(bootloader) secure: yes
(bootloader) hwrev: P2A
(bootloader) radio: 4
(bootloader) storage-type: emmc
(bootloader) emmc: 32GB SAMSUNG RX1BMB RV=08 PV=07 FV=0000000000000007
(bootloader) ram: 3GB SAMSUNG LP3 DIE=6Gb M5=01 M6=05 M7=00 M8=7B
(bootloader) cpu: MSM8952
(bootloader) serialno: ZY2239MDL6
(bootloader) cid: 0x0032
(bootloader) channelid: 0xc0
(bootloader) uid: A5C1A90000000000000000000000
(bootloader) securestate: oem_locked
(bootloader) iswarrantyvoid: yes
(bootloader) max-download-size: 536870912
(bootloader) reason: Volume down key pressed
(bootloader) meid:
(bootloader) date: 06-15-2016
(bootloader) sku: XT1643
(bootloader) battid: SNN5970A
(bootloader) iccid:
(bootloader) cust_md5:
(bootloader) max-sparse-size: 268435456
(bootloader) current-time: "Sun Jul 17 13:26:17 UTC 2016"
(bootloader) ro.build.fingerprint[0]: motorola/athene_f/athene_f:6.0.1/M
(bootloader) ro.build.fingerprint[1]: PJ24.139-23.1/1:user/release-keys
(bootloader) ro.build.version.full[0]: Blur_Version.24.24.1.athene.retai
(bootloader) ro.build.version.full[1]: l.en.US
(bootloader) ro.build.version.qcom: LA.BR.1.3.3-02720-8976.0
(bootloader) version-baseband[0]: M8952_70004.04.03.32R ATHENE_INDIA_DSD
(bootloader) version-baseband[1]: S_CUST
(bootloader) kernel.version[0]: Linux version 3.10.84-gcf01273 (hudsoncm
(bootloader) kernel.version[1]: @ilclbld52) (gcc version 4.9.x-google 20
(bootloader) kernel.version[2]: 140827 (prerelease) (GCC) ) #1 SMP PREEM
(bootloader) kernel.version[3]: PT Thu Apr 28 13:04:48 CDT 2016
(bootloader) sbl1.git: git=MBM-NG-VB0.0E-0-g83950b7
(bootloader) rpm.git: git=1dc910e
(bootloader) tz.git: git=9fa1804
(bootloader) hyp.git: git=9fa1804
(bootloader) keymaster.git: git=9fa1804
(bootloader) cmnlib.git: git=9fa1804
(bootloader) aboot.git: git=MBM-NG-VB0.0E-0-g4986429
(bootloader) qe: qe 1/1
(bootloader) frp-state: no protection (0)
(bootloader) ro.carrier: retin
all: listed above
finished. total time: 0.085s

E:\MOTO G4 PlUS\Stock Firmware>

---------- Post added at 06:23 PM ---------- Previous post was at 06:11 PM ----------



Mate i have successfully relocked my bootloader..this is what i did. after flashing the last command"mfastboot oem lock" it was giving me the error that "signed boot.img is required"

This is what i did. flashed the below commands simultaneously
mfastboot oem lock
mfastboot flash boot boot.img
mfastboot flash oem oem.img
mfastboot flash system system.img_sparsechunk.0
mfastboot flash system system.img_sparsechunk.1
mfastboot flash system system.img_sparsechunk.2
mfastboot flash system system.img_sparsechunk.3
mfastboot flash system system.img_sparsechunk.4
mfastboot flash system system.img_sparsechunk.5
mfastboot flash system system.img_sparsechunk.6
mfastboot flash system system.img_sparsechunk.7
mfastboot oem lock(lastly hit enter)

my device rebooted without any bootloader ulocked warning and without entering any fastboot reboot command.

Hope it helps Some one..(peace)###

But the warranty is gone. Damn it :(
 

swarupgolui

Senior Member
Sep 7, 2016
97
73
18
Howrah
I recommend to relock the bootloader with flashing complete stock rom,it worked for me.
@anhoxhrs relock the bootloader Not Working For Me, My variant Is XT1643 , and I am Using ( XT1626-XT1640-XT1641_ATHENE_6.0.1_MPJ24.139-23.1_cid50_subsidy-DEFAULT_CFC.xml ) This Stock Image..
mfastboot oem lock Command Not Work For Me...

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock
...
(bootloader) WARNING: This command erases all user data.
(bootloader) Please re-run this command to continue.
OKAY [ 0.014s]
finished. total time: 0.015s

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock
...
(bootloader) Flash valid Android images now
(bootloader) Then re-run this command to lock
OKAY [ 0.023s]
finished. total time: 0.024s

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock
...
(bootloader) Still require signed boot.img
OKAY [ 0.016s]
finished. total time: 0.016s

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock

Can You Please Tell Me What Stock Image You Use?
And What Command You Use?

Thanks....
 
Last edited:

anhoxhrs

Senior Member
Jul 23, 2016
236
42
0
Somewhere on map!
@anhoxhrs relock the bootloader Not Working For Me, My variant Is XT1643 , and I am Using ( XT1626-XT1640-XT1641_ATHENE_6.0.1_MPJ24.139-23.1_cid50_subsidy-DEFAULT_CFC.xml ) This Stock Image..
mfastboot oem lock Command Not Work For Me...

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock
...
(bootloader) WARNING: This command erases all user data.
(bootloader) Please re-run this command to continue.
OKAY [ 0.014s]
finished. total time: 0.015s

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock
...
(bootloader) Flash valid Android images now
(bootloader) Then re-run this command to lock
OKAY [ 0.023s]
finished. total time: 0.024s

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock
...
(bootloader) Still require signed boot.img
OKAY [ 0.016s]
finished. total time: 0.016s

C:\Program Files (x86)\Minimal ADB and Fastboot>mfastboot oem lock

Can You Please Tell Me What Stock Image You Use?
And What Command You Use?

Thanks....
Buddy just see the thread i have made in the guides section how to relock the bootloader http://forum.xda-developers.com/moto-g4-plus/how-to/relock-bootloader-t3459333Moreover just typinv oem lock does not lock the bootloader you have to flash the complete stock rom with it not just sys.img or boot.img.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone