Moto G5S PLUS INDIAN VARIANT LOCKING THE BOOTLOADER WITH JUNE PATCH INCLUDED - Android Q&A, Help & Troubleshooting

DISCLAIMER
I am not to be held responsible for any of the damage that occurs to your device during this process. You are yourself responsible for any damage done (if) to your device during this process.
REQUIREMENTS
1. Make sure your device is charged above 80%.
2. We recommend creating a backup of all your important files before beginning with this process.
HOW TO INSTALL STOCK ROM IN MOTO G5 PLUS And LOCK THE BOOT LOADER
1. Download Moto G5s Plus Stock Firmware and other necessary files from the download link.
2. Extract and install ABD Fastboot Drivers drivers
3. Install ADB Fastboot Driver on your PC.
4. Install the Latest Motorola Drivers
5. Now extract stock firmware in ADB Fastboot folder
6. Now, turn off your device and boot into bootloader by pressing volume down button +power button simultaneously.
7. Now, connect your device to your PC via a USB Cable.
8. Open a command prompt or PowerShell window and type the following commands:
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 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
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash oem oem.img
fastboot erase cache
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear
fastboot reboot
Now Setup the phone properly till you reach the main screen, don't skip any steps
Now use this second command
Code:
fastboot oem lock
fastboot oem lock
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash boot boot.img
fastboot oem lock
Flash the phone again with the first command and set it up again then boot to the fastboot again and flash the phone twice with the second command and your Motorola G5S PLUS should have a locked bootloader, keep in mind older Firmware would not work for this process to work, if you see any errors regarding bootloader.img not signed, don't worry and proceed with it.
Downloads:
HTML:
https://drive.google.com/drive/folders/1lWCQAjZBXM_iYHNwBO-5xKU4RY1FK9QV?usp=sharing
Kindly copy the full link to your browser and download the files, all the required files are present on the link
WIsh you guys all the best, I locked my bootloader the same and hope it will solve your problems too if you follow the instructions properly, I am no developer, I learned the hardway
Please Rate and comment if you liked my post helped you.

Shampak said:
DISCLAIMER
I am not to be held responsible for any of the damage that occurs to your device during this process. You are yourself responsible for any damage done (if) to your device during this process.
REQUIREMENTS
1. Make sure your device is charged above 80%.
2. We recommend creating a backup of all your important files before beginning with this process.
HOW TO INSTALL STOCK ROM IN MOTO G5 PLUS And LOCK THE BOOT LOADER
1. Download Moto G5s Plus Stock Firmware and other necessary files from the download link.
2. Extract and install ABD Fastboot Drivers drivers
3. Install ADB Fastboot Driver on your PC.
4. Install the Latest Motorola Drivers
5. Now extract stock firmware in ADB Fastboot folder
6. Now, turn off your device and boot into bootloader by pressing volume down button +power button simultaneously.
7. Now, connect your device to your PC via a USB Cable.
8. Open a command prompt or PowerShell window and type the following commands:
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 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
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash oem oem.img
fastboot erase cache
fastboot erase userdata
fastboot erase DDR
fastboot oem fb_mode_clear
fastboot reboot
Now Setup the phone properly till you reach the main screen, don't skip any steps
Now use this second command
Code:
fastboot oem lock
fastboot oem lock
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash boot boot.img
fastboot oem lock
Flash the phone again with the first command and set it up again then boot to the fastboot again and flash the phone twice with the second command and your Motorola G5S PLUS should have a locked bootloader, keep in mind older Firmware would not work for this process to work, if you see any errors regarding bootloader.img not signed, don't worry and proceed with it.
Downloads:
HTML:
https://drive.google.com/drive/folders/1lWCQAjZBXM_iYHNwBO-5xKU4RY1FK9QV?usp=sharing
Kindly copy the full link to your browser and download the files, all the required files are present on the link
WIsh you guys all the best, I locked my bootloader the same and hope it will solve your problems too if you follow the instructions properly, I am no developer, I learned the hardway
Please Rate and comment if you liked my post helped you.
Click to expand...
Click to collapse
hi, i have tried the same as you gave command. but unfortunately it doesn't work for me. i had installed soak test OREO then moved to Android P custom ROM, finally rolled back to android N to relock the bootloader. now i couldn't relock it.
i am getting error "still require valid signed image"
i am using sanders.
kindly assist me
Thanks
---------- Post added at 06:39 PM ---------- Previous post was at 06:35 PM ----------
hi, i have tried the same as you gave command. but unfortunately it doesn't work for me. i had installed soak test OREO then moved to Android P custom ROM, finally rolled back to android N to relock the bootloader. now i couldn't relock it.
i am getting error "still require valid signed image"
i am using sanders.
kindly assist me
Thanks

arunkumar.rp said:
hi, i have tried the same as you gave command. but unfortunately it doesn't work for me. i had installed soak test OREO then moved to Android P custom ROM, finally rolled back to android N to relock the bootloader. now i couldn't relock it.
i am getting error "still require valid signed image"
i am using sanders.
kindly assist me
Thanks
---------- Post added at 06:39 PM ---------- the Previous post was at 06:35 PM ----------
hi, I have tried the same as you gave the command. but unfortunately, it doesn't work for me. i had installed soak test OREO then moved to Android P custom ROM, finally rolled back to android N to relock the bootloader. now I couldn't relock it.
i am getting the error "still require valid signed image"
i am using sanders.
kindly assist me
Thanks
Click to expand...
Click to collapse
Don't worry about the signed image. Try the locking command twice back to back. Hope this helps

Related

Phone messed up.

Ok, i have unlocked bootloader, installed this rom https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342, added twrp via fastboot, rooted and so on.
Everything worked like a charm.
Than yesterday I got this update notification (from nplp 25.86-15 to nplp 25.86 -17-3; something about fixing notification sound - about 500mb). I thought what the hell lets try it - ended up in boot loop to recovery(twrp).
After that I installed this rom (odexed version) https://forum.xda-developers.com/moto-z/development/twrp-ported-to-moto-z-eu-version-t3470920.
Again I tried the update since it restored stock recovery - it went into the process and than reported some error.
Now, no matter what rom I install(those 2 and I tried cm14) phone acts messed up, it freezes and reboots when using it randomly and always reboots when screen goes to sleep 4 about 10 seconds.
I have also tried to install mm rom via twrp but ended up in recovery loop.
Any help is highly appreciated..
You need to flash back full stock ROM for your device. Had same issue. But that's if you are downgradable to MM roms
tafarelli said:
Ok, i have unlocked bootloader, installed this rom https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342, added twrp via fastboot, rooted and so on.
Everything worked like a charm.
Than yesterday I got this update notification (from nplp 25.86-15 to nplp 25.86 -17-3; something about fixing notification sound - about 500mb). I thought what the hell lets try it - ended up in boot loop to recovery(twrp).
After that I installed this rom (odexed version) https://forum.xda-developers.com/moto-z/development/twrp-ported-to-moto-z-eu-version-t3470920.
Again I tried the update since it restored stock recovery - it went into the process and than reported some error.
Now, no matter what rom I install(those 2 and I tried cm14) phone acts messed up, it freezes and reboots when using it randomly and always reboots when screen goes to sleep 4 about 10 seconds.
I have also tried to install mm rom via twrp but ended up in recovery loop.
Any help is highly appreciated..
Click to expand...
Click to collapse
i have the exactly same situation with my phone please help... i flashed MM rom but it didn't help it keeps rebooting every 5-10 minutes for no reason... will cyanogenmod 14.1 from this forum help?
Ok I have tried.
I flashed http://www.filefactory.com/file/6ht...ubsidy-DEFAULT_regulatory-03_CFC_EMEA.xml.zip using following commands:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
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 customize
fastboot oem config carrier T-2
fastboot oem fb_mode_clear
Phone booted to mm stock (build number MPL 24.246-17) but I already had one reboot few minutes after.
Any suggestions?
kaxuna1 said:
i have the exactly same situation with my phone please help... i flashed MM rom but it didn't help it keeps rebooting every 5-10 minutes for no reason... will cyanogenmod 14.1 from this forum help?
Click to expand...
Click to collapse
I tried with cm but it's not helping.
Phone is stable so far after that initial self-reboot; I'll wait 4 couple hours and if it stays stable returning to n version because mm is too big of a downgrade.
If it continues rebooting, well I guess I'll just bang my head on the wall few times) cause I am out of ideas..
tafarelli said:
Phone is stable so far after that initial self-reboot; I'll wait 4 couple hours and if it stays stable returning to n version because mm is too big of a downgrade.
If it continues rebooting, well I guess I'll just bang my head on the wall few times) cause I am out of ideas..
Click to expand...
Click to collapse
i dont know what to do anymore i tried CM and it keeps rebooting...
do you have any more suggestions?
kaxuna1 said:
i dont know what to do anymore i tried CM and it keeps rebooting...
do you have any more suggestions?
Click to expand...
Click to collapse
Did you try what I posted above?
I have flashed nougat again after that and had one random reboot since. Don't like the fact that reboot happened but otherwise it feels stable and smooth.
Incomparable from what it was before-phone was unusable..
Ok now I have fully functional and stable Moto Z with rooted nougat (EU version).
Here is the receipt:
Download:
-(1) https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342 (mm rom)
-(2) https://mega.nz/#!ktxzwQrZ!UVHWD2B_ngkk7SiD9bWfVUhIfXkkdjpb2mgQhTrZIR8 (twrp img)
-(3) https://drive.google.com/file/d/0B7t82wiSkgOSdE5pbkVoZmNnLWM/view?usp=sharing (nougat modem)
-(4) https://mega.nz/#!5k5nCJAT!PUYLbJDGGyq3eZJMe38cl4tXG2vaXLIIID-wCdDjcYg (nougat rom)
-(5) superuser-r259.zip from https://superuser.phh.me/ (root zip)
Than from(1) fastboot as follows:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
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 customize
fastboot oem fb_mode_clear
Boot up and put (4) and (5) to internal storage (idealy to sd card or usb via otg cable).
Than fastboot twrp from (2): fastboot flash recovery TWRP-Moto-Z.img
Than fastboot modem from (3): fastboot flash modem NON-HLOS.bin
Enter twrp recovery, advanced wipe dalvik, data, cache, format data; install n rom from (4); install root zip from (5)
Reboot
I have also freezed Motorola Update Services via Root Freezer Pro so that I don't get bothered with that type of potential problems in future.
Also, if you want to get rid of that annoying warning message (unlocked bootloader) upon booting download:
https://forum.xda-developers.com/attachment.php?attachmentid=3927285&d=1478365739
https://forum.xda-developers.com/attachment.php?attachmentid=3484630&d=1443097711
Unzip both on your pc, drag logo.bin onto MotoLogo_Injectorv1.1.bat, connect your phone in fastboot mode and follow onscreen instructions.
Hello @tafarelli what versión bootloader have your ?? Very thanks
Downgrade the Nougat at Mm ?
Regards
I never upgraded to nougat through OTA but from fastbooting this:
https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342
so I believe I still have mm bootloader.
If you have n bootloader than I guess(don't know) you will have to wait 4 stock nougat zip equivalent to (1) mm posted above..
tafarelli said:
Did you try what I posted above?
I have flashed nougat again after that and had one random reboot since. Don't like the fact that reboot happened but otherwise it feels stable and smooth.
Incomparable from what it was before-phone was unusable..
Click to expand...
Click to collapse
Yes I tried and it's been a 12 hours without reboot so thanks friend you saved me... I will try that nougat method you posted bello ???
---------- Post added at 11:45 PM ---------- Previous post was at 11:40 PM ----------
tafarelli said:
Ok now I have fully functional and stable Moto Z with rooted nougat (EU version).
Here is the receipt:
Download:
-(1) https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342 (mm rom)
-(2) https://mega.nz/#!ktxzwQrZ!UVHWD2B_ngkk7SiD9bWfVUhIfXkkdjpb2mgQhTrZIR8 (twrp img)
-(3) https://drive.google.com/file/d/0B7t82wiSkgOSdE5pbkVoZmNnLWM/view?usp=sharing (nougat modem)
-(4) https://mega.nz/#!5k5nCJAT!PUYLbJDGGyq3eZJMe38cl4tXG2vaXLIIID-wCdDjcYg (nougat rom)
-(5) superuser-r259.zip from https://superuser.phh.me/ (root zip)
Than from(1) fastboot as follows:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
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 customize
fastboot oem fb_mode_clear
Boot up and put (4) and (5) to internal storage (idealy to sd card or usb via otg cable).
Than fastboot twrp from (2): fastboot flash recovery TWRP-Moto-Z.img
Than fastboot modem from (3): fastboot flash modem NON-HLOS.bin
Enter twrp recovery, advanced wipe dalvik, data, cache, format data; install n rom from (4); install root zip from (5)
Reboot
I have also freezed Motorola Update Services via Root Freezer Pro so that I don't get bothered with that type of potential problems in future.
Also, if you want to get rid of that annoying warning message (unlocked bootloader) upon booting download:
https://forum.xda-developers.com/attachment.php?attachmentid=3927285&d=1478365739
https://forum.xda-developers.com/attachment.php?attachmentid=3484630&d=1443097711
Unzip both on your pc, drag logo.bin onto MotoLogo_Injectorv1.1.bat, connect your phone in fastboot mode and follow onscreen instructions.
Click to expand...
Click to collapse
??????
tafarelli said:
I never upgraded to nougat through OTA but from fastbooting this:
https://forum.xda-developers.com/moto-z/development/android-nougat-moto-z-versions-t3506342
so I believe I still have mm bootloader.
If you have n bootloader than I guess(don't know) you will have to wait 4 stock nougat zip equivalent to (1) mm posted above..
Click to expand...
Click to collapse
Hello correct I have bootloader Nougat I do not understand what it means to expect 4 stcok nougat zip equivalent to 1 MM postado but back many thanks
regards
iron maiden said:
Hello correct I have bootloader Nougat I do not understand what it means to expect 4 stcok nougat zip equivalent to 1 MM postado but back many thanks
regards
Click to expand...
Click to collapse
It means when they put link for n factory image here
http://www.androidsage.com/2016/12/...ce-android-7-0-nougat-ota-and-factory-images/
(or elshewhere)
than you download it and fastboot stock n rom to repair your (I presume) damaged device.
tafarelli said:
It means when they put link for n factory image here
http://www.androidsage.com/2016/12/...ce-android-7-0-nougat-ota-and-factory-images/
(or elshewhere)
than you download it and fastboot stock n rom to repair your (I presume) damaged device.
Click to expand...
Click to collapse
Hello my Moto z is in nougat but I was wondering if you had bootloader Nougat and could return to forgive MM if I made you believe that it was in brick my phone sorry for my English there is no image factory of the last version? NPL25.86-17-3 " I installed this by adb sideload but I like to install the whole image thanks
regards

Boot Loop

Hi guys, I've tried all the threads so far and have got no where. I unlocked my device and flashed a custom rom, that worked fine. I then noticed no way to go back to stock so I tried the odexed version with no luck. Now any rom I flash does not boot, just loops back to twrp. I would like to get as close to stock as possible even if it's another region. Has anyone had any luck on getting their phones booting after this?
I've tried flashing stock firmware from 6.0.1 then flashing ota through side load
Flashing other countries firmware (which always ends in fail messages)
I've tried multiple rom from the forum which just loop.
I've spent about 6 hours trying different combinations of recovery, boot and other images with no luck.
Any help is appreciated.
Sent from my iPhone using Tapatalk
criptix said:
Hi guys, I've tried all the threads so far and have got no where. I unlocked my device and flashed a custom rom, that worked fine. I then noticed no way to go back to stock so I tried the odexed version with no luck. Now any rom I flash does not boot, just loops back to twrp. I would like to get as close to stock as possible even if it's another region. Has anyone had any luck on getting their phones booting after this?
Sent from my iPhone using Tapatalk
Click to expand...
Click to collapse
I have gotten stuck with bootloops a couple times now, for me re-flashing a backup or custom rom or custom kernel didn't fix it either. Keep in mind that you cannot go back to 6.0.1 once you have flashed 7.0, the bootloader won't allow it. I have had to flash back to a stock firmware from https:// firmware.center/firmware/Motorola/Moto%20Z/Stock/XT1650-03/ (remove the space after https:// ) and re-fastboot flash TWRP, re-root, and restore my Titanium Backups to get going again.
It's extremely helpful if you create a servicefile.bat to flash all the firmware parts in the right order. This is the one I made for flashing the RETMX 7.0 image (the main difference I noticed between different firmwares from that link is the number of sparsechunks, so add or delete lines as necessary. I'm sure all this info is available elsewhere, but I didn't manage to find it all in one shot. So I figured I would post it to help others out that are in the same boat. Also note that even though you are re-flashing the bootloader.img it does not re-lock your bootloader.
Code:
echo off
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 bluetooth BTFM.bin
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
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
fastboot flash oem oem.img
fastboot erase carrier
fastboot oem fb_mode_clear
pause
fastboot reboot
exit
Copy the above text and paste it into a new text file and change the name to "servicefile.bat" without quotes (not servicefile.bat.txt), and drop it in with the extracted firmware files. Then either copy-paste your adb and fastboot files into that folder or drop all that folder's contents into your Users/*YOURNAME*/App Data/Local/Android/sdk/platform-tools/ folder. Or better yet, add "%USERPROFILE%\AppData\Local\Android\sdk\platform-tools" to your Path in your system's Environment Variables. The latter will make adb and fastboot work from any command prompt window, then you can just press shift+right-click in the folder that already has the firmware files and choose "Open command window here" and then just type servicefile.bat and press enter. Hope this helps! Good Luck and Happy Flashing!
HippieFlasher said:
I have gotten stuck with bootloops a couple times now, for me re-flashing a backup or custom rom or custom kernel didn't fix it either. Keep in mind that you cannot go back to 6.0.1 once you have flashed 7.0, the bootloader won't allow it. I have had to flash back to a stock firmware from https:// firmware.center/firmware/Motorola/Moto%20Z/Stock/XT1650-03/ (remove the space after https:// ) and re-fastboot flash TWRP, re-root, and restore my Titanium Backups to get going again.
It's extremely helpful if you create a servicefile.bat to flash all the firmware parts in the right order. This is the one I made for flashing the RETMX 7.0 image (the main difference I noticed between different firmwares from that link is the number of sparsechunks, so add or delete lines as necessary. I'm sure all this info is available elsewhere, but I didn't manage to find it all in one shot. So I figured I would post it to help others out that are in the same boat. Also note that even though you are re-flashing the bootloader.img it does not re-lock your bootloader.
Code:
echo off
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 bluetooth BTFM.bin
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
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
fastboot flash oem oem.img
fastboot erase carrier
fastboot oem fb_mode_clear
pause
fastboot reboot
exit
Copy the above text and paste it into a new text file and change the name to "servicefile.bat" without quotes (not servicefile.bat.txt), and drop it in with the extracted firmware files. Then either copy-paste your adb and fastboot files into that folder or drop all that folder's contents into your Users/*YOURNAME*/App Data/Local/Android/sdk/platform-tools/ folder. Or better yet, add "%USERPROFILE%\AppData\Local\Android\sdk\platform-tools" to your Path in your system's Environment Variables. The latter will make adb and fastboot work from any command prompt window, then you can just press shift+right-click in the folder that already has the firmware files and choose "Open command window here" and then just type servicefile.bat and press enter. Hope this helps! Good Luck and Happy Flashing!
Click to expand...
Click to collapse
Dude, you are awesome. Worked like a charm. Was missing fastboot getvar max-sparse-size andbfastboot oem fb_mode_set plus I was flashing the modem after the chunks. Thanks again!
Sent from my iPhone using Tapatalk
Anytime! Glad I could help!

How to manually update Moto Z2P to NPS26.118-19 (August Security Patch)

Hello all!
So I got tired of waiting for the latest update to hit my phone so I figured I would do it manually. After plenty of experience with Moto phones I gathered that the official RETAIL files should work with all of the GSM versions of the Moto Z2 Play. This is confirmed to work with both XT1710-01 and XT1710-07, but is likely to work with others (but not the US Verizon Model). For those of us who are security minded, this is flashed w/o unlocking your bootloader which means that only Motorola signed images will work, and it also means that you do not need to wipe your data. Woohoo!
As usual, you take full responsibility for anything you do to your phone, but since your bootloader is locked, this should be fairly low risk, barring some sort of power loss mid-flash.
How to:
1. Download & Install Motorola Drivers from XDA.
2. Download & extract stock rom from here.
3. Use mfastboot/fastboot to run the following commands/run the attached .bat file. (Hint: make sure fastboot files are in the same directory as the the ROM files and .bat file).
3a. If you need more help on mfastboot or fastboot, look here.
Code:
echo off
echo -------------------------------------------------------------------------
echo Moto Z2 Play ROM Flash Start
echo -------------------------------------------------------------------------
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 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
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash oem oem.img
fastboot erase modemst1
fastboot erase modemst2
fastboot erase carrier
fastboot erase DDR
fastboot flash fsg fsg.mbn
fastboot oem fb_mode_clear
echo -------------------------------------------------------------------------
echo Moto Z2 Play ROM Flash End
echo -------------------------------------------------------------------------
pause
fastboot reboot
exit
4. Enjoy!
Hope this helps!
but how is obtained stock rom?
For those of us who are security minded, this is flashed w/o unlocking your bootloader which means that only Motorola signed images will work, and it also means that you do not need to wipe your data. Woohoo!
Click to expand...
Click to collapse
The file you linked to on lolinet isn't signed. You do need to unlock the bootloader to flash it.
timster01 said:
The file you linked to on lolinet isn't signed. You do need to unlock the bootloader to flash it.
Click to expand...
Click to collapse
I had no problem flashing with a locked bootloader. Didn't even have to wipe. What error did you get when you tried to flash?
I am wondering if it works on an XT1710-08 model...

[Updated][Fastboot] Stock N Firmware (Potter)

Disclaimer :
Code:
I am not responsible for bricked devices, dead SD cards,
thermonuclear war, or you getting fired because the alarm app failed.
YOU are choosing to make these modifications,
and if you point the finger at me for messing up your device, I will laugh at you.
and[COLOR="Red"] I am also not responsible for anything happens as a result of flashing these files[/COLOR]
Hey Guys,
Here are the Stock Firmwares for potter
Lets Proceed :
1) Install Minimal ADB and Fastboot
https://www.androidfilehost.com/?fid=745425885120698566
2) Extract stock firmware zip
3) Now copy all the stuff that is in this zip into the folder where you extract the firmware.
4) Turn on ADB debugging from dev options menu and use 'adb reboot-bootloader' (Without quotes) in cmd to reboot your phone into boot-loader mode
5) Open the extracted firmware folder then press SHIFT+right click in the folder where you extract the firmware and select 'open command window here' option
6) and then Paste the following commands and hit Enter :
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
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 customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
↑
This Script will not Re-Lock Your Boot-loader
But if you want to Re-lock your bootloader, then use the following commands: (Thanks to @Nirbhay2 and @aSaro12)
Code:
fastboot oem lock
fastboot oem lock
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash boot boot.img
fastboot oem lock
And After Flashing it Please Re-flash the whole firmware again :
Code:
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
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 customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
But if you Don't want to do it manually, Here's the automated BAT script for you;
Just copy and paste it to the extracted folder (Thanks to @Tech_Savvy) : Download Here
This Script will not Re-lock the Boot-loader
----
You can Skip GPT and Boot-loader Partitions if you want
But Keep in mind that You Cannot DOWNGRADE These 2 Partitions
And if you try to do so, then you'll Possibly end up with HardBrick
You will need the appropriate version of the firmware according to your device version
SO PROCEED WITH CAUTION
Firmware Download Links :
1) NPN25.137-67-5 for XT1686 (Indian Varient)
Download Directly from Motorola Servers
Mirror 1 -pCloud
Mirror 2 -Google Drive
Mirror 3 -Dropbox
---
2) NPN25.137-35-5 for all Amazon (US) variants : Link N/A
and NPNS25.137-83 for Non-US Amazon Variant : Link N/A
and for the Non-Amazon Variants NPN25.137-83 : Link N/A
---
3) NPNS25.137-35-5 for Retail GB varient (Thanks to skooter32 for info) Link N/A
And NPN25.137-83 : Link N/A
---
4) NPN25.137-15 for Brazil-Mexico varient (XT1681 - XT1683) Link N/A
-----
Choose Carefully which one to flash​​
Special Thanks to rikk and @anuraag.neo For Capturing Indian varient zip!​ if you like my work then please hit that THANKS ? Button!​
Troubleshooting :
Stuck on ' Waiting for devices' :
1) Make Sure your device is detected in Bootloader interface aka Fastboot mode, you can simple see your device listed in device manager.
2) Install Motorola Driver IF you haven't Installed it yet. Because it can be the main reason for this error. Download it HERE : http://motorola-mobility-en-in.custhelp.com/app/answers/detail/a_id/88481
access denied
bornlivedie said:
access denied
Click to expand...
Click to collapse
mirror is uploading, just be patient
bornlivedie said:
access denied
Click to expand...
Click to collapse
alright, mirror is up
https://goo.gl/oRp7ou
Thank you. I am already on this firmware. But will use this in future if I dare to root my mobile in future
Sent from my Moto G (5) Plus using Tapatalk
This work on xt1687?
JassyelZ said:
This work on xt1687?
Click to expand...
Click to collapse
Don't think so, the XT1687 should be the US variant of the G5 Plus, and the NPN25.137-67-5 is the Indian ROM.
You probably want to look for the NPN25.137-83 stock ROM.
JassyelZ said:
This work on xt1687?
Click to expand...
Click to collapse
This is the firmware I flash on my XT1687
https://drive.google.com/file/d/0BwXyT5PTGsEHWmVhZFBsV0szS1k/view?usp=drivesdk
mikeyinid said:
This is the firmware I flash on my XT1687
https://drive.google.com/file/d/0BwXyT5PTGsEHWmVhZFBsV0szS1k/view?usp=drivesdk
Click to expand...
Click to collapse
With this its possible relock the bootloader? I have agoust patch
JassyelZ said:
With this its possible relock the bootloader? I have agoust patch
Click to expand...
Click to collapse
I have Verizon so I haven't got that update. I can't say for sure.
Hey, I'd hard bricked my xt1686 and have revived it using Albus blankflash and am running the stock deodexed and debloated ROM provided here on the forum. Can I use your method to go back to stock?
roydhritiman said:
Hey, I'd hard bricked my xt1686 and have revived it using Albus blankflash and am running the stock deodexed and debloated ROM provided here on the forum. Can I use your method to go back to stock?
Click to expand...
Click to collapse
i also the same problem, i tried but failed . can you confirm that is working or not
Chandru1166 said:
i also the same problem, i tried but failed . can you confirm that is working or not
Click to expand...
Click to collapse
failed in reviving your phone using albus blankflash?
or using this method to go back to stock?
The commands
fastboot erase customize
fastboot erase clogo
return error messages and are not relevant. Check the flashfile.xml in the ROM.
Will i still be able to unlock again and flash twrp for customs roms and stuff.
I any complications please tell me the steps. BTW this is highly appreciated.
ksvirdi105 said:
Will i still be able to unlock again and flash twrp for customs roms and stuff.
I any complications please tell me the steps. BTW this is highly appreciated.
Click to expand...
Click to collapse
can you tell me the build no and the model no. of your device?
roydhritiman said:
Hey, I'd hard bricked my xt1686 and have revived it using Albus blankflash and am running the stock deodexed and debloated ROM provided here on the forum. Can I use your method to go back to stock?
Click to expand...
Click to collapse
if you have xt1686 and if you got the update before hardbricking then you can use it
siddhesh9146 said:
if you have xt1686 and if you got the update before hardbricking then you can use it
Click to expand...
Click to collapse
yup i got the xt1686 and yes i had the 67-5 update before hard bricking, so i can use it right!?
Should be work on xt1680?

How To Re-Lock Bootloader

After successfully rooting using the recovery method, I figured I'd try re-locking the bootloader on this phone.
I have no idea why it was so difficult, but if you're looking to do the same, here's what you'll need to do:
You can obtain your firmware by using Lenovo assistant. Download speeds are good.
Ok, now I'm going to focus on the part where you've gone back to stock, unrooted of course and just want your bootloader locked, with no N/A at boot or how you're not able to receieve updates because you're such a bad person.
Enable hidden files if not already. You'll find your firmware in C:\ProgramData\LMSA\Download\RomFiles\*your firmware folder* if you used the assistant. Open power shell in your firmware folder obviously.
****MAKE SURE YOU ARE FLASHING THE CORRECT FIRMWARE FILES****
DO NOT DO THIS WHILE ROOTED. MAKE SURE TO BE STOCK... everything... with just the bootloader in the unlocked state.
Of course this will reset the device so don't forget to back up/save any important data
Obviously you'll need to have USB debugging enabled prior to flashing. Let's begin!
1) enter fastboot mode
2) check to make sure things are good (device properly detected and showing serial#) with fastboot devices command
3) Now Type (flash) ONLY these commands (files) and yes you need to do that first part THREE times:
fastboot oem lock
fastboot oem lock
fastboot oem lock
fastboot flash boot boot.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash vendor vendor.img
fastboot flash oem oem.img
fastboot oem lock
Then your powershell window should say:
(bootloader) Lock complete! Flash signed images after reboot if needed
OKAY [ 0.099s]
finished. total time: 0.101s
PS C:\ProgramData\LMSA\Download\RomFiles\SURFNA_your device firmware_DEFAULT_regulatory_DEFAULT_CFC.xml>
Your phone is now rebooting
If you are having difficulty locking a different device, then perhaps this may help...
In order to lock your bootloader, you must do it immediately after unlocking it.

Categories

Resources