Relock Bootloader without flshing stock zip(i already have stock Nougat 7.0) - Moto G4 Plus Questions & Answers

I was updating my system security patch from official moto but after restarting it started twrp and asked me if i want to flash that update file, after swiping it opened Twrp homepage(i was unable to restart from its reboot option but i went to the bootloader and started cell (Working correctly currently))
Two Options
1. I should lock the bootloader
2. Leave it as it is.
If option 1. lock my bootloader on stock Android Nougat 7.0 on Moto G4 plus Athene XT1643. As i have stock android and precious data so i only want to lock bootloader Without wiping my system Data (I can wipe if no other way is available).
For option 2. Keep it as it is.
Please suggest me what to do and how?
And tell me about official Oreo or Custom Oreo(best option)
Sorry for my bad English and errors(If any).
Thanks in advance

@cooldude1598 official update can not be flashed through TWRP, you need to have stock recovery and unmodified system/kernel/etc as well.
If you have played with stock ROM (flashed custom kernel/ rooting / installing and flashing other stuff ), it will fail through stock recovery too, for that you need to download appropriate stock ROM according to your current version of stock ROM, and it will erase everything (includes apps and app data, photos, videos and anything on internal storage)
you said, you have system data ?
What is that?
If it is photos, videos, or personal data then move it to external sd card or PC, apps and app-data can be backup through titanium backup, and also move it to safe place.
If not this, then tell us what system data?
Fro another question about LOCKING, it is not necessary to re-lock bootloader, you can go with unlocked bootloader, don't lock again, once you flash stock ROM through fastboot, you can update to any security updates without fail.
English is weak here too, hope you got it what i said.

Related

MotoG4+ XT1644 6.01 to 7.0 Saga (for others to avoid)

OK Please note (4-25-17) this message is a work in progress, as I slowly restore my system.
This is a listing and hopefully helpful listing of what I did (right and wrong)
in upgrading my Systemless-rooted (suuser) phone from 6.01 to 7.00 (nougat)
# 1. it did not work, and I went back to 6.01 successfully using the twrp recovery
I have previously used Bender's guid (here) to get the system-less root on 6.01.
essentailly, here's the best plan. Use the Minimal ADB and Fastboot package (MADB &F) (here)
(Explanation: the MADB&FB package will allow you do do LOTS of stuff related to updating your phone, with very little grief.)
it also includes the ability to automatically "push" a package over your usb connection if the ZIP file doesnt load right. **THIS will come in handy later!
Once MADB&F is installed, make note of your directory, and then make sure you start your dos window (for pc users) as an administrator!
BTW, if I HADN'T made the "TWRP backup" of my system, I'd be Sh*t out of luck right now...", because I screwed up the 7.0 upgrade.
the technical problem was that I had no data, no modem, no way of getting data/voice in/out.
SIMPLY using the TWRP restore fixed me!!!
(so far, we have MADB&FB, downloaded and bender's (chainfire) rootless guide.
Next you want to download the current firmware image for your phone. This will be a lifesaver, I promise!
3) Download a TWRP image (this will MAGICALLY load on your pc when you tell it you need help! Look HERE
(Athene is the Motorola Codename for the motoG4+)
3) copy the athene TWRP image into your madb&FB directory to make it easy to load
4) next, (you still haven't touched your phone yet, you realize: (skipping some basics here, you can search here on XDA to find more info)
a) plug your phone into your pc
b) make sure you are a developer
c) make sure your phone shows you are connected to your pc for file transfers, NOT for charging
5) in your MADB&FB directory, (aka a dos/(admin) window) type the following:
all commands at this point will take place in whatever directory you installed Minimal ADB & Fast boot (MADB&FB)
Connect your phone to your PC and open MADB&FB, check the connection with:
adb devices
return should include your "serial-no" and "device".
6) next, on pc, tell the system to reboot your phone to the bootloader!
Reboot into bootloader with:
adb reboot-bootloader
and check again with:
fastboot devices
7) Next you are going to download TWRP to your phone (not permanently, just for a bit!)
fastboot. flash recovery twrp-3.0.2-0-athene.img
Now you have TWRP (Team Windows RECOVERY PROJECT) loaded.
SO.. THIS is where you create a backup of your current stuff using the backup options.
NEXT:
take the suUser2.78 (stateless rooting), and once your backup is done, install it from TWRP
Then (I was) back to 6.01 rooted.
NEXT: 7.0 and then rooting... (will update tomorrow)
did a successful upgrade to 7.0,
then unsuccessfully tried to sideload supersu2.78, which bricked loader
then downgraded again to 6.01 (and rooted again, ok)
will continue tomorrow.
need working phone for now..
cheers to all, and to all, a happy spelunking!
You can't root factory Nougat as is, it is well encrypted.
You need to replace first the kernel with the ElementalX one, or you will end up with bootloops.
Only after that you can do SuperSU, but only with the latest beta.
A few pointers from your story:
1)As you've found out the hard way, you won't be able to update to Nougat if you have root and/or TWRP, because the update requires a stock system - stock recovery, system and no modifications (bootloader status doesn't matter). In other words, you'll need to unroot and restore your stock recovery - might be easier to reflash the stock system, probably the quickest way to flash a stock ROM (and update to Nougat) is to use the fastboot ROM. https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369 Of course, this will remove root and TWRP, as well as potentially wipe your data, so back up accordingly. This should flash the NPJ25.93-14 build on your device, which appears to be the latest global build.
1a)Also, if you flash Nougat this way, your bootloader and GPT partitions will be updated, so if you wish to downgrade to Marshmallow at any point, when flashing do not flash these partitions from the Marshmallow ROM. Fastboot should stop you, but a brick may occur if these get flashed.
1b) You may find in the Guides section TWRP backups of Nougat builds, I don't recommend using these to update your system with. Granted, they have most of the Nougat system in a TWRP backup, but some crucial firmware (e.g. the baseband) is not included, and may cause you issues if your device is not formally flashed to Nougat.
2) As SoNic67 has already mentioned, the stock kernel security will cause your device to bootloop should you choose to try to root following the Marshmallow method. If you wish to use SuperSU, follow this guide: https://forum.xda-developers.com/mo...de-root-moto-g4-plus-supersu-android-t3587918 You may wish to use a more up to date TWRP than the official 3.0.2 (I recommend shrep's TWRP 3.0.3 n4 here:https://forum.xda-developers.com/mo...covery-twrp-3-0-2-r3-moto-g4-g4-plus-t3494337) Whatever you do, ensure you flash first the ElementalX kernel before you flash the SuperSU v2.79 SR3 beta (https://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133), or apply the systemless fix with earlier SuperSU versions as directed in the aforementioned rooting with SuperSU guide. Else you'll be having bootloops or your device will not boot whatsoever. Here's my steps in successfully rooting Nougat: https://forum.xda-developers.com/showpost.php?p=71817346&postcount=225. Good luck either way.
echo92 said:
A few pointers from your story:
[...]
1b) You may find in the Guides section TWRP backups of Nougat builds, I don't recommend using these to update your system with. Granted, they have most of the Nougat system in a TWRP backup, but some crucial firmware (e.g. the baseband) is not included, and may cause you issues if your device is not formally flashed to Nougat.
[...]
Click to expand...
Click to collapse
After updating my US retail xt1644 to nougat, by restoring totally-stock marshmallow then taking the OTA, I wiped data and made a *complete* TWRP backup using @Shreps' unofficial 3.1 TWRP build (https://moto.shreps.fr/Moto G4 (athene)/recovery/twrp-3.1.0-athene_shreps.img).
This version of TWRP allows backup/restore of the full set of firmware partitions including baseband, DSP, etc.
In other words, I believe the TWRP backup folder in the following .zip file provides a one-stop path to the latest xt1644 USRET firmware by doing a restore from TWRP 3.1.0.
https://drive.google.com/file/d/0B4XobQzgZVHyRTlmSDMtYkdZeUU/view?usp=drivesdk
My only uncertainly is if the ota process modified the partition table in a way that might make this backup image incompatible with the xt1644 still in the marshmallow state.
I've often wondered if I (or a more skilled enthusiast) couldn't build a TWRP-flashable .zip that would setup the partition table, update the baseband, etc. This is what I've grown used to from devs on other phones I've had, but perhaps there's something about the way moto does things that makes this problematic.
Sent from my Moto G4 Plus using Tapatalk
bmeek said:
After updating my US retail xt1644 to nougat, by restoring totally-stock marshmallow then taking the OTA, I wiped data and made a *complete* TWRP backup using @Shrep's unofficial 3.1 TWRP build (https://moto.shreps.fr/Moto G4 (athene)/recovery/twrp-3.1.0-athene_shreps.img).
This version of TWRP allows backup/restore of the full set of firmware partitions including baseband, DSP, etc.
In other words, I believe the TWRP backup folder in the following .zip file provides a one-stop path to the latest xt1644 USRET firmware by doing a restore from TWRP 3.1.0.
https://drive.google.com/file/d/0B4XobQzgZVHyRTlmSDMtYkdZeUU/view?usp=drivesdk
My only uncertainly is if the ota process modified the partition table in a way that might make this backup image incompatible with the xt1644 still in the marshmallow state.
I've often wondered if I (or a more skilled enthusiast) couldn't build a TWRP-flashable .zip that would setup the partition table, update the baseband, etc. This is what I've grown used to from devs on other phones I've had, but perhaps there's something about the way moto does things that makes this problematic.
Sent from my Moto G4 Plus using Tapatalk
Click to expand...
Click to collapse
Nice one, hopefully that'll help more XT 1644 users I'm still not sure if TWRP can backup/flash the baseband by itself, but I don't have a XT 1644 to test. I imagine your backup will need a clean flash (wipe data/cache/Dalvik) to work?
The OTA process does update the partition table, but as far as I know, that should not prevent you from flashing back to Marshmallow/Nougat as you wish, so long as you did not try to downgrade the GPT/bootloader.
There was an effort to create TWRP flashables of the stock ROMs a little while ago (you can see the thread here: https://forum.xda-developers.com/moto-g4/development/fxz-athene-twrp-flashable-fastboots-t3562147) which if I understood it created flashable radios and ROMs from the firmware files we have. We can't touch the GPT/bootloader since, as I recall, you need a signed stock firmware to do so (and besides, downgrading GPT might be asking for a brick). I recall some users mention they were able to run Nougat TWRP flashes on the MM bootloader/GPT without issue.
There were issues with simply flashing the Nougat 93-14 radio baseband files for some US users, losing LTE in the process and appears the only resolution was to flash the stock ROM - I don't know what the cause was (perhaps no/incorrect CDMA support in the radio files?). Your TWRP flash is from a US based phone so may have better luck in that department, and will likely behave on your device since that OTA has updated all the firmware on your device that TWRP isn't able to touch. I still am not sure if we can use this TWRP backup to update on a MM device without issue, but only one way to find out...

[HELP]: XT1644 Keeps Rebooting to TWRP After Moto Security Update

Received security update notification from Moto, and installed.
Moto G4+ XT1644 (4GB/64GB)
TWRP 3110, ElementalX kernel, Magisk rooted, custom logo
bootloader unlocked
Latest TWRP backup on 08/31/17
After install:
Phone now always reboots to TWRP
tried wiping data, cache, Dalvik but no difference
tried restore backup but still reboots to TWRP
Can only shut phone off via power button
Any advice to get my phone back to normal will be greatly appreciated. Thanks.
mel2000 said:
Received security update notification from Moto, and installed.
Moto G4+ XT1644 (4GB/64GB)
TWRP 3110, ElementalX kernel, Magisk rooted, custom logo
bootloader unlocked
Latest TWRP backup on 08/31/17
After install:
Phone now always reboots to TWRP
tried wiping data, cache, Dalvik but no difference
tried restore backup but still reboots to TWRP
Can only shut phone off via power button
Any advice to get my phone back to normal will be greatly appreciated. Thanks.
Click to expand...
Click to collapse
You messed up your rom by installing official update on custom kernel. Can you boot from twrp to system? What happens if you do that? Which stock rom you have exactly? Otherwise you can flash stock rom with fastboot, but never downgrade!
strongst said:
Can you boot from twrp to system? What happens if you do that? Which stock rom you have exactly? Otherwise you can flash stock rom with fastboot, but never downgrade!
Click to expand...
Click to collapse
Thank you for your reply, strongst. When I press the Reboot->System buttons in TWRP, the phone boots back to TWRP recovery.
Here are the stats I recorded before things went sideways:
Original stock firmware Build Number - NPJS25.93-14-4
Original OS version - 7.0
Original Kernel - 3.10.84-gb9596e1 [email protected] #1 Fri Mar 3 02:04:02 CST 2017
Original Baseband version - M8952_70030.25.03.62RATHENE_RETUSA_CUST
Updated Kernel - 3.10.84-ElementalX-G4-1.04 [email protected] #1 Sat Mar 11 14:16:55 EST 2017
Note: I found NPJS25.93-14-4 firmware at
https://www.getdroidtips.com/npjs25-93-14-4-march-security-moto-g4-plus
but it's titled as "March 2017 security patch" OTA update. I'm not sure if that is full replacement firmware or not.
If necessary, should I simply flash NPJS25.93-14 (full firmware) via fastboot and allow Moto to finish the updates via OTA?
mel2000 said:
Thank you for your reply, strongst. When I press the Reboot->System buttons in TWRP, the phone boots back to TWRP recovery.
Here are the stats I recorded before things went sideways:
Original stock firmware Build Number - NPJS25.93-14-4
Original OS version - 7.0
Original Kernel - 3.10.84-gb9596e1 [email protected] #1 Fri Mar 3 02:04:02 CST 2017
Original Baseband version - M8952_70030.25.03.62RATHENE_RETUSA_CUST
Updated Kernel - 3.10.84-ElementalX-G4-1.04 [email protected] #1 Sat Mar 11 14:16:55 EST 2017
Note: I found NPJS25.93-14-4 firmware at
https://www.getdroidtips.com/npjs25-93-14-4-march-security-moto-g4-plus
but it's titled as "March 2017 security patch" OTA update. I'm not sure if that is full replacement firmware or not.
If necessary, should I simply flash NPJS25.93-14 (full firmware) via fastboot and allow Moto to finish the updates via OTA?
Click to expand...
Click to collapse
You can also flash the latest available for your device with June security patch. After that you can root again with ex kernel if you want https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
Make sure to mount storage within twrp first and save your internal memory before flashing stock rom!
In future, if that happens, you could try booting to the bootloader, then on the bootloader screen, press 'Start' and try to get your device to boot normally. Credit to: https://forum.xda-developers.com/showpost.php?p=72114657&postcount=170
Personally, I'd go with strongst's suggestion to flash the June 2017 stock fastboot ROM - you'd have to revert to stock (completely) anyway to accept the OTA - as you've found out, OTAs will only successfully flash onto a device with stock recovery, kernel, and unmodified system including no root. You may as well update at the same time to the same patch level that the OTA would have brought you up to.
echo92 said:
In future, if that happens, you could try booting to the bootloader, then on the bootloader screen, press 'Start' and try to get your device to boot normally. Credit to: https://forum.xda-developers.com/showpost.php?p=72114657&postcount=170
Personally, I'd go with strongst's suggestion to flash the June 2017 stock fastboot ROM - you'd have to revert to stock (completely) anyway to accept the OTA - as you've found out, OTAs will only successfully flash onto a device with stock recovery, kernel, and unmodified system including no root. You may as well update at the same time to the same patch level that the OTA would have brought you up to.
Click to expand...
Click to collapse
This 100%. Boot into bootloader and choose start from there. I ran into the same issue last night whilst trying to update my XT1644 and figure this out through trial and error. Once I got it back up though, flashing many stock recoveries that I found online couldn't get the update to work either. It would error out a few seconds after booting into the stock recovery and starting the update. I finally resigned to re-flashing a stock image of marshmallow and updating it all again from there. I wanted to pull the stock recovery before I replaced it with TWRP again but I couldn't find a way to do that. Any method I found required having root access already, and of course I can't get root access without flashing a custom recovery first.
echo92 said:
In future, if that happens, you could try booting to the bootloader, then on the bootloader screen, press 'Start' and try to get your device to boot normally.[/url]
Click to expand...
Click to collapse
Thanks for all replies. Rebooting from the bootloader screen brought my phone back to normal. Same March 2017 patch, as well as the same TWRP and ElementalX kernel and build number. Unlocked bootloader logo.bin remains intact. Magisk is still at v13.3 and it passes SafetyNet. Internal memory intact. I'm relieved.
Settings->System Updates->New version NPJ25.93-14.5
However, I'm now contemplating whether it'll be worthwhile to patch my phone to the NPJ25.93-14.5, June 2017 update.
Can I assume that the June 2017 1.1 GB "patch" contains the full NPJ25.93-14.5 firmware for XT1644?
( https://www.androidfilehost.com/?fid=889764386195918175 )
Is there a way to flash the June 2017 ROM via TWRP, and without having to reinstall ElementalX kernel, etc.?
mel2000 said:
Thanks for all replies. Rebooting from the bootloader screen brought my phone back to normal. Same March 2017 patch, as well as the same TWRP and ElementalX kernel and build number. Unlocked bootloader logo.bin remains intact. Magisk is still at v13.3 and it passes SafetyNet. Internal memory intact. I'm relieved.
Settings->System Updates->New version NPJ25.93-14.5
However, I'm now contemplating whether it'll be worthwhile to patch my phone to the NPJ25.93-14.5, June 2017 update.
Can I assume that the June 2017 1.1 GB "patch" contains the full NPJ25.93-14.5 firmware for XT1644?
( https://www.androidfilehost.com/?fid=889764386195918175 )
Is there a way to flash the June 2017 ROM via TWRP, and without having to reinstall ElementalX kernel, etc.?
Click to expand...
Click to collapse
Yes it's the full rom. And no, you need to flash kernel and magisk after every rom flash, stock twrp, fastboot or custom rom doesn't matter(otherwise it's already included).
strongst said:
Yes it's the full rom. And no, you need to flash kernel and magisk after every rom flash, stock twrp, fastboot or custom rom doesn't matter(otherwise it's already included).
Click to expand...
Click to collapse
Thanks again strongst. I'm still contemplating because of the complexity. However, the constant phone notification to update is weakening my resistance. Not sure I want to have to look at that for days on end.
Just to clarify, are you stating that I won't have to reinstall TWRP? That would be a relief.
Would it suffice to copy my internal SD to my PC and restore it later? Do I need to copy everything? Will my Nandroid backup save my Magisk settings?
I did make a TWRP backup of the XT1644 updated to NPJ25.93-14.5. I could share it with you if you'd like. However, you'd still need to flash ElementalX and root after.
mel2000 said:
Thanks again strongst. I'm still contemplating because of the complexity. However, the constant phone notification to update is weakening my resistance. Not sure I want to have to look at that for days on end.
Just to clarify, are you stating that I won't have to reinstall TWRP? That would be a relief.
Would it suffice to copy my internal SD to my PC and restore it later? Do I need to copy everything? Will my Nandroid backup save my Magisk settings?
Click to expand...
Click to collapse
You need to flash twrp after you flashed the stock rom cause the stock rom flash the stock recovery. Copy the whole internal memory, better to save everything when you don't know exactly what you need
Restore the whole internal memory isn't good, just restore what's missing if you recognize it. Your magisk settings will be saved with nandroid, that's true, but don't restore your partitions from nandroid backup from your prior rom version to the new, that cause trouble. Make backup of your apps with titanium backup instead.
Just to clarify - are you on the Amazon software channel (amz) or do you have the Amazon Prime edition of the XT1644 (with the ads on the lockscreen)? I'm just curious as whether this NPJ25.93-14.5 update is exclusive to Amazon or if it's more widespread.
EDIT - seen a couple of users reporting they've received it on the retus channel, so maybe more widespread to US users, maybe to include the Verizon emergency calling patch that the G5 Plus got too?
tmp000 said:
I did make a TWRP backup of the XT1644 updated to NPJ25.93-14.5. I could share it with you if you'd like. However, you'd still need to flash ElementalX and root after.
Click to expand...
Click to collapse
That sounds great tmp000. I'd definitely like you to share it. How would I go about flashing it? Any particular precautions? Thanks.
mel2000 said:
That sounds great tmp000. I'd definitely like you to share it. How would I go about flashing it? Any particular precautions? Thanks.
Click to expand...
Click to collapse
Sorry, I'm not an expert, so I can't say much about precautions. What I will do is tell you what I did to get my phone to its current state now is:
Backup my data
After failing to apply the NPJ25.93-14.5 update many times through a bunch of different stock recoveries that I found online (including versions extracted from full stock ROMs), I found a way to downgrade back to the stock ROM of Marshmallow for the XT1644. I applied all the OTA updates, all the way to NPJ25.93-14.5.
At this point, I flashed TWRP recovery again. At the same time, right after running the command to flash TWRP with fastboot, I also flashed logo.bin to get rid of that unlocked bootloader message. I then booted into TWRP and then backed up the system and boot partition as it was (so stock kernel and no root).
In TWRP, I flashed ElementalX, and then SuperSU after that (I know you are using a different root method so flash yours).
Then I restored the data (data partition only) of the backup I made.
After that, I rebooted into system and everything booted up just fine. I had root access and all of my data was intact. Your steps 2 and 3 would be:
Put my backup with your other backups in the TWRP folder
Do an wipe in TWRP to wipe dalvik cache, cache, system, and boot. DO NOT WIPE INTERNAL STORAGE
Then continue on with step 4 from above. And of course, I can't emphasize enough to back up your data. Not just through TWRP, but any photos, etc that you can copy onto your computer first. I'll PM you a link to my backup.
strongst said:
Your magisk settings will be saved with nandroid, that's true, but don't restore your partitions from nandroid backup from your prior rom version to the new, that cause trouble.
Click to expand...
Click to collapse
Thanks for the advice. However, I'm having trouble determining exactly what I need to backup before the firmware flash.
Which folders from the Root dir of internal memory need to be saved?
Do I need to save the SDCARD directory?
Can I use TWRP to restore individual apps within the Nandroid backup instead of the whole archive?
Just trying to be extra careful to preempt things from going sideways. Thanks.
echo92 said:
I'm just curious as whether this NPJ25.93-14.5 update is exclusive to Amazon or if it's more widespread.
Click to expand...
Click to collapse
I have the retail version of xt1644 and hope that NPJ25.93-14.5 is intended for or compatible with that.
tmp000 said:
I'm ready to do the NPJ25.93-14..5 update. For clarity, I reordered your steps for the update:
Backup my data
Put my backup with your other backups in the TWRP folder
Do an wipe in TWRP to wipe dalvik cache, cache, system, and boot.DO NOT WIPE INTERNAL STORAGE
In TWRP, I flashed ElementalX, and then SuperSU after that (I know you are using a different root method so flash yours).
Then I restored the data (data partition only) of the backup I made.
Click to expand...
Click to collapse
Am I to assume that after step 2 or 3, the actual updating consists of doing a TWRP Restore using the NPJ25.93-14.5 folder that I downloaded? Do I do the wipes before the Restore update? Thanks again for all your help.
mel2000 said:
Am I to assume that after step 2 or 3, the actual updating consists of doing a TWRP Restore using the NPJ25.93-14.5 folder that I downloaded? Do I do the wipes before the Restore update? Thanks again for all your help.
Click to expand...
Click to collapse
Yes, wipe then restore the backup. Sorry for the terrible instructions with missing steps.
mel2000 said:
Received security update notification from Moto, and installed.
Moto G4+ XT1644 (4GB/64GB)
TWRP 3110, ElementalX kernel, Magisk rooted, custom logo
bootloader unlocked
Latest TWRP backup on 08/31/17
After install:
Phone now always reboots to TWRP
tried wiping data, cache, Dalvik but no difference
tried restore backup but still reboots to TWRP
Can only shut phone off via power button
Any advice to get my phone back to normal will be greatly appreciated. Thanks.
Click to expand...
Click to collapse
When you are booted in twrp, reboot to bootloader of system (obviously). Then press power button when it displays start. Like this the phone will boot into system and not in recovery
Or
Just reboot to bootloader and read the thread attached with it.
https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369
Be sure to turn on usb debugging and oem unlock mode
DgnrtnX said:
When you are booted in twrp, reboot to bootloader of system (obviously). Then press power button when it displays start. Like this the phone will boot into system and not in recovery
Or
Just reboot to bootloader and read the thread attached with it.
https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369
Be sure to turn on usb debugging and oem unlock mode
Click to expand...
Click to collapse
Thank you for your reply DgnrtnX. It matches the successful solution I received from exho92 on 09/01/17. The only issue is that I need to boot via that method each time. I no longer boot directly into my system. However I plan to update to NPJ25.93-14.5 shortly so I'm hoping the reboot issue will go away if that upgrade goes well.
USB debugging and OEM unlock were already enabled and remain so.

Noob Questions: Firmware,Bootloader, root.

Hi, i just got the moto g5 plus, i always have phones that from the moment i bought them they wouldn recive any updates, so i realy didnt care if unlocking the bootloader installing new recoverys will affect the OTA updates. So i have a couple of questions.
1- first i want to at least have a stock firmware just in case, but i cant figure out which one should i download from here
firmware.center/firmware/Motorola/Moto%20G5%20Plus/Stock/
Before i always use sammobile.com and it was really easy to found a stock firmware from Argentina. My compilation number is: npns25.137-15-11 this means that i suppose to download that one XT1681-XT1683_POTTER_BRASIL_LATAM_MEXICO_7.0_NPN25.137-15_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml.zip ?
2- it is possible to unlock the bootloader and root your phone without installing a new recovery? i was reading some post and when you change your recovery or you modify something the OTA update will stop working. they are some methods like the magisk but they seem i little bit too complex for me and i don't want to do it every time that a new update is available.
thanks for the help, and sorry for my English i am from Argentina.
1. yes, but any build will flash and run, so it doesn't really matter that much...
2. Nope. You need to flash TWRP in order to root. This is because the stock recovery will only flash signed images... You can use Magisk, after backing up a stock build. Anytime there is an OTA, just restore to that system image, Flash the original recovery via fastboot, and then take the OTA. Once you have it, flash TWRP again, and restore to your other build. Or just run a custom room like Lineage or RR, and this whole thing isn't really an issue anymore.
Karlinski said:
1. yes, but any build will flash and run, so it doesn't really matter that much...
2. Nope. You need to flash TWRP in order to root. This is because the stock recovery will only flash signed images... You can use Magisk, after backing up a stock build. Anytime there is an OTA, just restore to that system image, Flash the original recovery via fastboot, and then take the OTA. Once you have it, flash TWRP again, and restore to your other build. Or just run a custom room like Lineage or RR, and this whole thing isn't really an issue anymore.
Click to expand...
Click to collapse
yeah i know i had a samsung galaxy s3 until now, and i always have cyanogen, slimrom or now lineage, but this is the first device that i have one that will get updates (at least 1 more :S) and i want to seize that
i will start downloading that file just in case
1- ok so unlocking the bootloader doesn't affect updates only when you modify files? when the update is installing is basically comparing the files that you have with the ones that you suppose to have and if there is something different it will fail? its something like that?
2-dumb question how do you do a full backup in the stock recovery there is no option no do a nandroid backup or it will appear after i just unlock the bootloader?

Some questions regarding flashing the stock firmware

Hello, so basically when I was on the June update of my Moto G4 Plus, build NPJS25.93-14-8, software channel reteu, model XT1642 when I decided to unlock my bootloader and flash RR. Now I want to go back to the stock firmware for several reasons, but I have some questions about flashing it. I know how to flash it trough fastboot, but I have some other questions.
1. What are the risks if I flash it?
2. Can I just restore my twrp backup for the fully stock rom, flash the stock recovery and update to the last build through ota? will that work?
3. Will there appear other problems I have to worry about?
4. Can I just flash the June patch through fastboot so that I don't have to flash the updated modems, fsg, bootloader, etc. but instead update them through ota after flashing the stock firmware? Or will that cause bugs?
Thanks for the help and please don't throw hate at me, the last device that I hade with android had android 4.4 and a MediaTek chipset, then I switched to Windows Mobile till last year.
1) As long as you flash the same or newer stock firmware as the latest on your device, you should be okay.
As of writing, if you flash the June 2017, Sept 2017 or Dec 2017 stock firmwares (NPJS25.93-14-8, NPJS25.93-14-10 or NPJS25.93-14-13 respectively) then you shouldn't run into issues and be okay to take OTA updates provided you do a full flash. By a full flash, I mean flashing GPT, bootloader, system, OEM, DSP, modem and the erase steps. If you're flashing the NPJS25.93-14-8 firmware, flashing the same firmware should do nothing to your GPT, bootloader or modem, but is a good routine to ensure your device is clean.
As you're switching from RR to stock firmware, a data wipe/erase is recommended - you may be able to use Titanium Backup or another backup app to preserve your app data, then restore it after flashing the stock ROM (though ensure the backup is off your device). You will have to root your stock ROM to use Titanium Backup however.
The risks come when you flash stock firmware of an older patch level than the stock firmware currently on your device (custom ROMs do not matter in this regard) - strictly speaking, it's not the act of downgrading but attempting to take OTA updates whilst downgraded that causes hard bricks. In most cases, if not all, I've noted that a mismatch of the bootloader patch level and the system patch level are what cause issues for most users. You cannot downgrade bootloaders, so downgrading leads to the following situation:
Say you're on the June 2017 firmware:
June 2017 bootloader, June 2017 system (or RR).
You downgrade to Marshmallow or an earlier build of Nougat (say in this case Dec 2016 Nougat firmware):
June 2017 bootloader (bootloader will block downgrades with a security downgrade error), December 2016 firmware.
You try to take an OTA update. However, OTA updates are only designed for updating, and appear to assume (from looking at the script) your system patch level is the same as your bootloader. If you did not downgrade, this assumption would hold. However, as you've downgraded, you'll get this:
March/June 2017 bootloader *, March 2017 system.
Due to the OTA having authorisation to flash to your bootloader without prior checks, the older OTA corrupts your newer bootloader (as denoted by the *), leading to a hard brick. We do have a blankflash at the moment to help with this, though the easiest way to avoid this situation is to only flash firmware of the same or newer build that what is on your device. Motorola does not support downgrading and assumes the user takes responsibility for downgrading.
2)In theory yes. However, if TWRP was allowed to make modifications before you took the backup, the subsequent OTA might fail as your system partition would be detected as not read-only. Furthermore, you'd need a stock logo.bin, so if you've flashed a logo.bin to hide the bootloader unlocked warning, you'd have to pull that from the NPJS25.93-14-8 stock ROM. TWRP to my knowledge does not back that up.
3)As long as you take your time, and have not downgraded/hard bricked in the past, you should be okay. Ensure you back up as much data with Titanium Backup as previously mentioned, and ensure that you do a full flash, so your GPT, bootloader and system are at the same patch level. As mentioned previously, having your device on the same patch level should mean you have fewer issues with OTAs and stability.
4)I'm not sure what you mean by the June patch, do you mean the June OTA update, or do you mean the June stock ROM?
echo92 said:
1) As long as you flash the same or newer stock firmware as the latest on your device, you should be okay.
As of writing, if you flash the June 2017, Sept 2017 or Dec 2017 stock firmwares (NPJS25.93-14-8, NPJS25.93-14-10 or NPJS25.93-14-13 respectively) then you shouldn't run into issues and be okay to take OTA updates provided you do a full flash. By a full flash, I mean flashing GPT, bootloader, system, OEM, DSP, modem and the erase steps. If you're flashing the NPJS25.93-14-8 firmware, flashing the same firmware should do nothing to your GPT, bootloader or modem, but is a good routine to ensure your device is clean.
As you're switching from RR to stock firmware, a data wipe/erase is recommended - you may be able to use Titanium Backup or another backup app to preserve your app data, then restore it after flashing the stock ROM (though ensure the backup is off your device). You will have to root your stock ROM to use Titanium Backup however.
The risks come when you flash stock firmware of an older patch level than the stock firmware currently on your device (custom ROMs do not matter in this regard) - strictly speaking, it's not the act of downgrading but attempting to take OTA updates whilst downgraded that causes hard bricks. In most cases, if not all, I've noted that a mismatch of the bootloader patch level and the system patch level are what cause issues for most users. You cannot downgrade bootloaders, so downgrading leads to the following situation:
Say you're on the June 2017 firmware:
June 2017 bootloader, June 2017 system (or RR).
You downgrade to Marshmallow or an earlier build of Nougat (say in this case Dec 2016 Nougat firmware):
June 2017 bootloader (bootloader will block downgrades with a security downgrade error), December 2016 firmware.
You try to take an OTA update. However, OTA updates are only designed for updating, and appear to assume (from looking at the script) your system patch level is the same as your bootloader. If you did not downgrade, this assumption would hold. However, as you've downgraded, you'll get this:
March/June 2017 bootloader *, March 2017 system.
Due to the OTA having authorisation to flash to your bootloader without prior checks, the older OTA corrupts your newer bootloader (as denoted by the *), leading to a hard brick. We do have a blankflash at the moment to help with this, though the easiest way to avoid this situation is to only flash firmware of the same or newer build that what is on your device. Motorola does not support downgrading and assumes the user takes responsibility for downgrading.
2)In theory yes. However, if TWRP was allowed to make modifications before you took the backup, the subsequent OTA might fail as your system partition would be detected as not read-only. Furthermore, you'd need a stock logo.bin, so if you've flashed a logo.bin to hide the bootloader unlocked warning, you'd have to pull that from the NPJS25.93-14-8 stock ROM. TWRP to my knowledge does not back that up.
3)As long as you take your time, and have not downgraded/hard bricked in the past, you should be okay. Ensure you back up as much data with Titanium Backup as previously mentioned, and ensure that you do a full flash, so your GPT, bootloader and system are at the same patch level. As mentioned previously, having your device on the same patch level should mean you have fewer issues with OTAs and stability.
4)I'm not sure what you mean by the June patch, do you mean the June OTA update, or do you mean the June stock ROM?
Click to expand...
Click to collapse
Thanks for taking your time and answering my silly questions. 4) I mean the June stock ROM. And I've forgotten...
5) If you relock the bootloader, will you be able to unlock it again? How exactly does this work? The device gets another ID that you use again on the Moto site? Or you unlock it with the key that you used the first time you unlocked?
6) I have seen people that flashed the stock firmware through fastboot without relocking the bootloader and the software status shown in bootloader mode changed from "Official" (like mine) to "Modified" and the phone would show "Your device has failed verification and may not boot propertly." instead of the one with the unlocked bootloader. Just like here: https://www.youtube.com/watch?v=4OQQn105Bp8 . Though I have seen that some of these packages on xda are "Signed by Moto". So the problem does not occur when flashing those images?
corlatemanuel said:
Thanks for taking your time and answering my silly questions. 4) I mean the June stock ROM. And I've forgotten...
Click to expand...
Click to collapse
You have stock backup of current firmware, restore it and check build number in settings >about.
5) If you relock the bootloader, will you be able to unlock it again? How exactly does this work? The device gets another ID that you use again on the Moto site? Or you unlock it with the key that you used the first time you unlocked?
Click to expand...
Click to collapse
There are no benefits for relocking. if you want to lock you can, and it can be unlocked with same key.
6) I have seen people that flashed the stock firmware through fastboot without relocking the bootloader and the software status shown in bootloader mode changed from "Official" (like mine) to "Modified" and the phone would show "Your device has failed verification and may not boot propertly." instead of the one with the unlocked bootloader. Just like here: https://www.youtube.com/watch?v=4OQQn105Bp8 . Though I have seen that some of these packages on xda are "Signed by Moto". So the problem does not occur when flashing those images?
Click to expand...
Click to collapse
Not true, that Modified status comes when you try to modify stock ROM, for various meaning, say installing mods in system (not in case of systemless), or if you try to remove/add apps to system/oem, when you change something in stock ROM, then you will get modified status. (Modification in custom ROM will not change it, only stock ROM does.)
So if you have official status right now, you don't need to worry about it.
Otherwise, to remove modified status,
You need to take OTA, (which can be dangerous as echo92 told you above.),
Bootloader relocking is not necessary to remove Modified, you can still take OTA and it will work..
> Flash June's patch (if you are 100% sure about current firmware)
> take OTA of September
Taking OTA makes it again official. (There was no update for bootloader in September patch, if not official again, December will make it..)
____Mdd said:
You have stock backup of current firmware, restore it and check build number in settings >about.
There are no benefits for relocking. if you want to lock you can, and it can be unlocked with same key.
Not true, that Modified status comes when you try to modify stock ROM, for various meaning, say installing mods in system (not in case of systemless), or if you try to remove/add apps to system/oem, when you change something in stock ROM, then you will get modified status. (Modification in custom ROM will not change it, only stock ROM does.)
So if you have official status right now, you don't need to worry about it.
Otherwise, to remove modified status,
You need to take OTA, (which can be dangerous as echo92 told you above.),
Bootloader relocking is not necessary to remove Modified, you can still take OTA and it will work..
> Flash June's patch (if you are 100% sure about current firmware)
> take OTA of September
Taking OTA makes it again official. (There was no update for bootloader in September patch, if not official again, December will make it..)
Click to expand...
Click to collapse
Ok then, since I'm 100% sure that I was on NPJS5.93-14-8 I'll flash that firmware, but where exactly do I find the one that I need? Doesn't the region matter? I'm on XT1642, in Europe, on the software channel reteu. So which one package do I use? I found 2 of them on AFH from tywinlannister7. And also, quite many people flashed the wrong modem and got into trouble, from what I've seen on xda. So any precautions I should take in that matter?
P.S. I don't want to flash the December patch since it updates the bootloader and there is no blankflash for that version yet... Also can't find the September one.
corlatemanuel said:
Ok then, since I'm 100% sure that I was on NPJS5.93-14-8 I'll flash that firmware, but where exactly do I find the one that I need? Doesn't the region matter? I'm on XT1642, in Europe, on the software channel reteu. So which one package do I use? I found 2 of them on AFH from tywinlannister7. And also, quite many people flashed the wrong modem and got into trouble, from what I've seen on xda. So any precautions I should take in that matter?
P.S. I don't want to flash the December patch since it updates the bootloader and there is no blankflash for that version yet... Also can't find the September one.
Click to expand...
Click to collapse
One by tywinlennister7, it is fine and confirmed working on different retails, (retin, retus, retla, many others.)
I have seen modem and other critical problems when one flashes old firmware (marshmallow roms), those all problems happened when old (MM) firmware is flashed.
You can take backup of all partitions by TWRP (fsg, data, system, boot, firmware, all options in shreps twrp), this all things can be helpful in case if something wrong happens, internal memory will be wiped so move them to external... Then flash....
About December, it's your wish to update or not.
If you are worried about blank-flash, then let me remind you again, you will need blank-flash only if you downgrade and take OTA. When you update to December's patch update, remove all older firmware on your computer and keep December's firmware zip only. If you need to flash stock, flash it, not other old..
List of Nougat firmware:
NPJS25.93-14-8 (June 2017) : https://androidfilehost.com/?fid=889764386195918175
This build appears to be targeted towards India, Brazil, EU and UK users, other territories may apply. This updates to NPJS25.93-14-10 (Sept 2017):
https://drive.google.com/file/d/0B9tngVBGIajVQkQtLUUxR2NOTnc/edit
NPJS25.93-14-13 is the December 2017 update from NPJS25.93-14-10: https://androidfilehost.com/?fid=745849072291698845
As ____Mdd has mentioned, the blankflash is only useful if you hard brick your device, and even then that usually only happens if you go flashing older firmware than what's on your device and then take an OTA update. If you don't downgrade, then you won't have a use for the blankflash normally.
If you want to be sure you're getting the right updates, you can flash the NPJS25.93-14-8 stock ROM, which should leave your device on the same patch level (if it was previously on NPJS25.93-14-8 and you're certain about that), then let the OTA updates download the correct patch. As your device firmware should all be on the same patch level, OTA updates should be okay. Bear in mind you may not receive the December 2017 OTA yet, as I've only seen it deployed to India/Mexico so far. It should be coming to EU soon if it's not arrived.
____Mdd said:
You can take backup of all partitions by TWRP (fsg, data, system, boot, firmware, all options in shreps twrp), this all things can be helpful in case if something wrong happens, internal memory will be wiped so move them to external... Then flash....
Click to expand...
Click to collapse
Ok, I was busy this week but I'm back with just a couple more questions:
Which partitions should I back up with the Partition Backup app and with TWRP? What format should I choose for the Partition Backup app?
Can I lock the bootloader after flashing and booting the stock ROM or do I have to do it while flashing?
I have restored my TWRP backup for NPJS5.93-14-8 and rooted it for the backup app. Is there any other helpful information about my device that I should share with you?
What should I install on my PC? I currently have mfastboot-v2 on my C:\ drive in the adb folder, should I install the Minimal ADB and Fastboot as I have seen people using it for the stock ROM flash? Also, do I need to install any drivers in particular?
echo92 said:
2)In theory yes. However, if TWRP was allowed to make modifications before you took the backup, the subsequent OTA might fail as your system partition would be detected as not read-only. Furthermore, you'd need a stock logo.bin, so if you've flashed a logo.bin to hide the bootloader unlocked warning, you'd have to pull that from the NPJS25.93-14-8 stock ROM. TWRP to my knowledge does not back that up.
Click to expand...
Click to collapse
So If I use this guide and relock the bootloader would I be okay? https://forum.xda-developers.com/moto-g4-plus/how-to/guide-sucsessfull-ota-update-rooting-t3472658
Also, relocking wipes Data and Internal Storage, right?
corlatemanuel said:
Ok, I was busy this week but I'm back with just a couple more questions:
Which partitions should I back up with the Partition Backup app and with TWRP? What format should I choose for the Partition Backup app?
Can I lock the bootloader after flashing and booting the stock ROM or do I have to do it while flashing?
I have restored my TWRP backup for NPJS5.93-14-8 and rooted it for the backup app. Is there any other helpful information about my device that I should share with you?
What should I install on my PC? I currently have mfastboot-v2 on my C:\ drive in the adb folder, should I install the Minimal ADB and Fastboot as I have seen people using it for the stock ROM flash? Also, do I need to install any drivers in particular?
So If I use this guide and relock the bootloader would I be okay? https://forum.xda-developers.com/moto-g4-plus/how-to/guide-sucsessfull-ota-update-rooting-t3472658
Also, relocking wipes Data and Internal Storage, right?
Click to expand...
Click to collapse
1) If you want to make a backup, I would make a backup with the standard TWRP partitions selected (should be all of them but without cache). I've not used the Partition Backup app so cannot comment as to which formats to use, but standard formats for system and cache should be ext4, and data as f2fs.
2)Generally if you want to lock your bootloader, you should flash the stock ROM first, then boot to the stock ROM. In Settings > Developer Options, you will want to turn on OEM unlocking. Then, you can re-lock your bootloader with a full flash of all the commands. For more info and things to be aware of, have a look at this post: https://forum.xda-developers.com/showpost.php?p=74971791&postcount=497 Be aware that if you choose to lock your bootloader, you may not be able to use backups of data you made as TWRP and backup apps may require an unlocked bootloader. Anything you kept on internal storage should be transferable back to your device though.
Re-locking likely wipes data and internal storage, so ensure you back up and keep the back ups off your device - on your computer is the best location - until you are done. Also, be warned that any SD cards you have formatted and adopted as internal storage will be unreadable and need erasing, unless you retain the encryption key. So if you have an adopted SD card, back that up too.
3)I would install Minimal ADB and fastboot (v1.4.2 or newer) as most of the newer guides are based on fastboot rather than mfastboot (which is Motorola's version of fastboot, if I recall). You may wish to have the Motorola device drivers installed too - https://motorola-global-portal.custhelp.com/app/answers/prod_detail/a_id/79106/p/30,75,27,
4)That guide is quite old, plus only restores your device back to a state where OTA updates would be possible (i.e. flashing stock recovery, system, OEM). That guide you linked will not re-lock your bootloader. If you want the commands to re-lock your device bootloader, this guide should help: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 Again, heed the warnings I note in the above link.
echo92 said:
1) If you want to make a backup, I would make a backup with the standard TWRP partitions selected (should be all of them but without cache). I've not used the Partition Backup app so cannot comment as to which formats to use, but standard formats for system and cache should be ext4, and data as f2fs.
2)Generally if you want to lock your bootloader, you should flash the stock ROM first, then boot to the stock ROM. In Settings > Developer Options, you will want to turn on OEM unlocking. Then, you can re-lock your bootloader with a full flash of all the commands. For more info and things to be aware of, have a look at this post: https://forum.xda-developers.com/showpost.php?p=74971791&postcount=497 Be aware that if you choose to lock your bootloader, you may not be able to use backups of data you made as TWRP and backup apps may require an unlocked bootloader. Anything you kept on internal storage should be transferable back to your device though.
Re-locking likely wipes data and internal storage, so ensure you back up and keep the back ups off your device - on your computer is the best location - until you are done. Also, be warned that any SD cards you have formatted and adopted as internal storage will be unreadable and need erasing, unless you retain the encryption key. So if you have an adopted SD card, back that up too.
3)I would install Minimal ADB and fastboot (v1.4.2 or newer) as most of the newer guides are based on fastboot rather than mfastboot (which is Motorola's version of fastboot, if I recall). You may wish to have the Motorola device drivers installed too - https://motorola-global-portal.custhelp.com/app/answers/prod_detail/a_id/79106/p/30,75,27,
4)That guide is quite old, plus only restores your device back to a state where OTA updates would be possible (i.e. flashing stock recovery, system, OEM). That guide you linked will not re-lock your bootloader. If you want the commands to re-lock your device bootloader, this guide should help: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 Again, heed the warnings I note in the above link.
Click to expand...
Click to collapse
So shreps' twrp can also backup the modems? I am on the 64-bit twrp from lannister7 (too lazy to check his name ) and it doesn't show the modems in "Backup", it only shows firmware, fsg, hw and ol the other stuff. And also, I have to flash the firmware twice if I want to lock the bootloader? I can imagine some really bad situations if you flash it with the OEM lock command included, some sh*t happens, you get an error and the device gets bricked whilst also being locked, and not being able to unlock it because of the "OEM Unlocking" option not being accessible, since the device would be bricked. So if I understand correctly, the OEM lock begin and OEM lock commands fully wipe the device, even the system, causing the need to flash everything again? Or the OEM lock commands require you to flash the stock ROM again because of safety issues?
corlatemanuel said:
So shreps' twrp can also backup the modems? I am on the 64-bit twrp from lannister7 (too lazy to check his name ) and it doesn't show the modems in "Backup", it only shows firmware, fsg, hw and ol the other stuff. And also, I have to flash the firmware twice if I want to lock the bootloader? I can imagine some really bad situations if you flash it with the OEM lock command included, some sh*t happens, you get an error and the device gets bricked whilst also being locked, and not being able to unlock it because of the "OEM Unlocking" option not being accessible, since the device would be bricked. So if I understand correctly, the OEM lock begin and OEM lock commands fully wipe the device, even the system, causing the need to flash everything again? Or the OEM lock commands require you to flash the stock ROM again because of safety issues?
Click to expand...
Click to collapse
Don't think shrep's TWRP backs up the modem, only the FSG partition (which appears to be half of the modem/baseband function). Modems are provided in the stock firmware anyhow.
Yes, you have to flash the firmware first (without OEM locking commands), then enable OEM unlocking in Settings>Developer Options, as I mentioned in the other post I wrote. Else, you may not be able to re-lock your bootloader. With OEM unlocking enabled, if a flash failed, you may still be able to unlock your bootloader and flash a custom ROM. Hence, this way gives you a way out, as you have OEM unlocking enabled, hence I recommending that you flash twice. After enabling OEM unlocking, then you flash fully with the OEM locking commands included.
Again, this is why I always say have plenty of time and do not rush this process, as this is critical to your device properly functioning, and to read up as much as you can on the pros and cons of the process.
The two OEM lock begin commands at the beginning of the locking command list will erase your device. Entering the first of those commands will prompt you and alert you to the fact your device is going to be erased. It only erases your data and likely your internal storage/cache, it should not erase any other partitions as they are usually not user modifiable.
If you are certain that your device is fully stock and at the same patch level, then you can use the OEM lock begin commands and OEM lock commands to lock your bootloader. However, if any of your device firmwares is not on the same patch level as your bootloader, you will likely have a boot failure as the firmware fails the bootloader verification checks (as the bootloader expects only firmware of the same patch level). Hence, I strongly recommend to re-flash the firmware to ensure you have clean stock firmware with matching patch levels.
Again, this process of re-locking your bootloader will mean no TWRP (no backups) or root or Titanium Backup.
echo92 said:
Don't think shrep's TWRP backs up the modem, only the FSG partition (which appears to be half of the modem/baseband function). Modems are provided in the stock firmware anyhow.
Yes, you have to flash the firmware first (without OEM locking commands), then enable OEM unlocking in Settings>Developer Options, as I mentioned in the other post I wrote. Else, you may not be able to re-lock your bootloader. With OEM unlocking enabled, if a flash failed, you may still be able to unlock your bootloader and flash a custom ROM. Hence, this way gives you a way out, as you have OEM unlocking enabled, hence I recommending that you flash twice. After enabling OEM unlocking, then you flash fully with the OEM locking commands included.
Again, this is why I always say have plenty of time and do not rush this process, as this is critical to your device properly functioning, and to read up as much as you can on the pros and cons of the process.
The two OEM lock begin commands at the beginning of the locking command list will erase your device. Entering the first of those commands will prompt you and alert you to the fact your device is going to be erased. It only erases your data and likely your internal storage/cache, it should not erase any other partitions as they are usually not user modifiable.
If you are certain that your device is fully stock and at the same patch level, then you can use the OEM lock begin commands and OEM lock commands to lock your bootloader. However, if any of your device firmwares is not on the same patch level as your bootloader, you will likely have a boot failure as the firmware fails the bootloader verification checks (as the bootloader expects only firmware of the same patch level). Hence, I strongly recommend to re-flash the firmware to ensure you have clean stock firmware with matching patch levels.
Again, this process of re-locking your bootloader will mean no TWRP (no backups) or root or Titanium Backup.
Click to expand...
Click to collapse
Well how can I backup the modem, modemst1 and modemst2 partitions then? that app that I mentioned doesn't work, It doesn't backup anything, and the shreps TWRP doesn't include modem backup. Need help ASAP, everything else is ready except for the backup.
P.S. I'm really tired of my G4 Plus having the icon of a keyboard in This PC )
Edit: I'm dumb, just realised that the FSG IS the modemst1 and modemst2, right?
corlatemanuel said:
Well how can I backup the modem, modemst1 and modemst2 partitions then? that app that I mentioned doesn't work, It doesn't backup anything, and the shreps TWRP doesn't include modem backup. Need help ASAP, everything else is ready except for the backup.
P.S. I'm really tired of my G4 Plus having the icon of a keyboard in This PC )
Edit: I'm dumb, just realised that the FSG IS the modemst1 and modemst2, right?
Click to expand...
Click to collapse
Let me clarify my recent post of backup of modem,
All issue i have seen related to corrupted modems and HW partition are happened when one tried to flash older firmwares, those are marshmallow firmwares..
Till then, i have never seen any modem or corrupted hw partition while flashing latest firmwares..
Just make sure your downloaded firmware is latest or same as you have right now..
corlatemanuel said:
Well how can I backup the modem, modemst1 and modemst2 partitions then? that app that I mentioned doesn't work, It doesn't backup anything, and the shreps TWRP doesn't include modem backup. Need help ASAP, everything else is ready except for the backup.
P.S. I'm really tired of my G4 Plus having the icon of a keyboard in This PC )
Edit: I'm dumb, just realised that the FSG IS the modemst1 and modemst2, right?
Click to expand...
Click to collapse
As ____Mdd has mentioned, backups of modem is only required if you've flashed the wrong firmware at some point (due to the different variants of stock firmware). You've given us no indication of that.
modemst1 and modemst2 are, as I understand it, caches and temporary storage of details that are normally wiped during a stock ROM flash, and are then re-filled when the device reboots. FSG is different to modemst1 and modemst2 I think, being one part of the modem/baseband firmware.
As we've both mentioned, modem and FSG are both provided by the stock ROM (as NON-HLOS.bin and fsg.mbn).
I have made it! I've flashed the stock rom without any problem or error!
I want to thank you all because I wouldn't have been able to flash this without your help! I have also locked the bootloader, then I updated to September update and, shortly afterwards, to December update. Now, if I will ever flash custom ROMs again (which has a high probability) I will know how to restore to the stock ROM. So thanks, and I will leave the thread open if anyone will have the need of assistance with this process, or maybe I will have other questions in the future! So, for the third time, thanks for your valuable help guys!

[Q] XT1768 getting September Security Update

Hello all,
Been a LONG while since I've actively played around with rooting and unlocking an android device. I finally "upgraded" from my very aged Galaxy S4 to the Moto E4 XT1768. I have successfully unlocked the bootloader, got TWRP installed, rooted with Magisk, and gotten Xposed installed with my favorite modules.
This morning, I got a prompt that a new security update is available, and like a noob, I tried to take the update. This resulted in me getting stuck in a loop where the phone only wanted to boot into TWRP. I got that fixed thanks to XDA, got the pending and failing update completely cleared and am booted back into the device normally, and have frozen the moto update service.... but now...
Is there a way without completely flashing back to stock rom? I know how to take titanium or nand/twrp backups, but I feel like this would still be hours of work to go back to stock, flash, re-root restore all apps blah blah. what are the chances of there being a dirty-flashable zip put out at this point?
The way I normally do these type of upgrades is to download the firmware (from here), use fastboot commands to wipe (erase) and flash the needed partitions (everything but data and recovery), boot to TWRP - flash the no-verity-opt-encrypt.zip & root, and then reboot to system - done. It's easy enough for me, but I know some prefer to being able to use a flashable zip in TWRP.
Also, I have to ask - did you get your e4 cheap? It's was replaced by the e5, some other phones seem to be getting replaced like the G6 series (it's gone on clearance at some places), so they can be had cheap.
bast525 said:
Hello all,
Been a LONG while since I've actively played around with rooting and unlocking an android device. I finally "upgraded" from my very aged Galaxy S4 to the Moto E4 XT1768. I have successfully unlocked the bootloader, got TWRP installed, rooted with Magisk, and gotten Xposed installed with my favorite modules.
This morning, I got a prompt that a new security update is available, and like a noob, I tried to take the update. This resulted in me getting stuck in a loop where the phone only wanted to boot into TWRP. I got that fixed thanks to XDA, got the pending and failing update completely cleared and am booted back into the device normally, and have frozen the moto update service.... but now...
Is there a way without completely flashing back to stock rom? I know how to take titanium or nand/twrp backups, but I feel like this would still be hours of work to go back to stock, flash, re-root restore all apps blah blah. what are the chances of there being a dirty-flashable zip put out at this point?
Click to expand...
Click to collapse
Flashing back to stock and taking the updates is really the best way. Unless you can find a complete firmware package of the new update which of course takes back to stock as well. Really the only way to do it. @MotoJunkie01 makes some TWRP flashable stock roms. And he also creates the partition updater which updates your oem partition and other important things that can't be done in the Twrp flashable stock ROM.
madbat99 said:
Flashing back to stock and taking me updates is really the best way. Unless you can find a complete firmware package of the new update which of course takes back to stock as well. Really the only way to do it. @MotoJunkie01 makes some TWRP flashable stock roms. And he also creates the partition updater which updates your oem partition and other important things that can't be done in the Twrp flashable stock ROM.
Click to expand...
Click to collapse
Speaking of that, @ALI12 just posted a stock firmware package for the NCQS26.69-64-10 build. He gave me approval to use it to update my firmware thread to the latest build, so I'll be updating that OP shortly.
MotoJunkie01 said:
Speaking of that, @ALI12 just posted a stock firmware package for the NCQS26.69-64-10 build. He gave me approval to use it to update my firmware thread to the latest build, so I'll be updating that OP shortly.
Click to expand...
Click to collapse
This will be for the XT1766, correct? Or will same build work for XT1768 (me thinks not)?
So what would the easiest/quickest way be to get updated with all of my apps and data intact? Twrp backup of data partition? Or would there be any way to do this without wiping data at all?
bast525 said:
So what would the easiest/quickest way be to get updated with all of my apps and data intact? Twrp backup of data partition? Or would there be any way to do this without wiping data at all?
Click to expand...
Click to collapse
If you're going to slash a firmware package you'll want to wipe everything. Especially data. Make a backup of your data first of course. After you flash TWR P you can try restoring your data and see if everything comes back. but everything in your downloads folder and all of that will be gone once you format data to remove encryption again.

Categories

Resources