Unlocked bootloader and OTA updates - Moto G5 Plus Questions & Answers

Will i recive OTA update if i unlock the bootloader?

Androidtroll said:
Will i recive OTA update if i unlock the bootloader?
Click to expand...
Click to collapse
Yes. Just unlocking the bootloader still allows everything to work normally, though you can't install otas if you mounted or modified /system and /oem partitions, or have twrp recovery.
Otherwise your phone should still function as if it weren't unlocked.

In addition to the above reply - if you do modify your system and want to flash back to stock firmware, please check if you can download the correct firmware for your device. I see from your history you have a retEU device, so the latest series of firmwares would be the NPNS25.137-93 series (with NPNS25.137-93-10 being the April 2018 security patch). I'd suggest checking to see if there is a stock ROM matching your current build before you unlock the bootloader (either at https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/ or https://firmware.center/firmware/Motorola/Moto G5 Plus/Stock/ or https://androidfilehost.com/?a=show&w=files&flid=171014 ) though it seems the latest firmware that's been leaked is NPNS25.137-93-4 (the Jan 2018 security patch build). Just as a headsup, firmware.center has a cryptominer that could keep your CPU at 100 % if you have their page open.
If you download and flash the NPNS25.137-92-10 firmware, which is the April 2018 security patch for Brazil/India devices, you may be able to re-lock your bootloader and get back to full stock, but you may not be able to receive OTA updates (as the NPNS25.137-92 series of updates do not appear to be deployed to the retEU channel), so be careful which firmware you flash.
You can still unlock your bootloader without having the latest firmware to hand, but until the firmware matching your stock firmware before you unlocked or newer is available, you may not be able to re-lock your device. You may be able to flash older stock firmware for EU devices, but please do not use OTA updates if you flash older stock firmware, else you may hard brick your device.
Good luck whichever way you decide.

bazinga137 said:
Yes. Just unlocking the bootloader still allows everything to work normally, though you can't install otas if you mounted or modified /system and /oem partitions, or have twrp recovery.
Otherwise, your phone should still function as if it weren't unlocked.
Click to expand...
Click to collapse
Yes the Same thing Happened
I had TWRP recovery and I installed the Security Patch
my Phone Stuck at TWRP
but it has One solution
First, take the data backup of all in twrp at your sd card
now install any custom Rom
Reboot your device and check the rom is working or not
do reboot and go back to your Twrp and Restore the backup
I tested it and It worked perfectly

echo92 said:
In addition to the above reply - if you do modify your system and want to flash back to stock firmware, please check if you can download the correct firmware for your device. I see from your history you have a retEU device, so the latest series of firmwares would be the NPNS25.137-93 series (with NPNS25.137-93-10 being the April 2018 security patch). I'd suggest checking to see if there is a stock ROM matching your current build before you unlock the bootloader (either at https://mirrors.lolinet.com/firmware/moto/potter/official/RETAIL/ or https://firmware.center/firmware/Motorola/Moto G5 Plus/Stock/ or https://androidfilehost.com/?a=show&w=files&flid=171014 ) though it seems the latest firmware that's been leaked is NPNS25.137-93-4 (the Jan 2018 security patch build). Just as a headsup, firmware.center has a cryptominer that could keep your CPU at 100 % if you have their page open.
If you download and flash the NPNS25.137-92-10 firmware, which is the April 2018 security patch for Brazil/India devices, you may be able to re-lock your bootloader and get back to full stock, but you may not be able to receive OTA updates (as the NPNS25.137-92 series of updates do not appear to be deployed to the retEU channel), so be careful which firmware you flash.
You can still unlock your bootloader without having the latest firmware to hand, but until the firmware matching your stock firmware before you unlocked or newer is available, you may not be able to re-lock your device. You may be able to flash older stock firmware for EU devices, but please do not use OTA updates if you flash older stock firmware, else you may hard brick your device.
Good luck whichever way you decide.
Click to expand...
Click to collapse
I would unlock the bootloader just to try to fix the camera (then edit the system files), not for flash twrp / custom rom

Androidtroll said:
I would unlock the bootloader just to try to fix the camera (then edit the system files), not for flash twrp / custom rom
Click to expand...
Click to collapse
Just unlocking the BL wouldn't be enough to edit system files. You'll need root privileges to do so and for that you will have to flash/boot TWRP to install a root app like magisk.
So all the useful information @echo92 posted above is significant for you.
Sent from my Moto G5 Plus using XDA Labs

Is there a way to take TWRP off or disable to still grab the security patches? Or is clean install/backup (like Rutambh mentioned) the only option? The reason I ask I needed TWRP to install camera mod, so it would be nice to still get those OTA's. I tried to just fastboot boot TWRP but it would just hang at it's logo. Flash was only option.

Frawgg said:
Is there a way to take TWRP off or disable to still grab the security patches? Or is clean install/backup (like Rutambh mentioned) the only option? The reason I ask I needed TWRP to install camera mod, so it would be nice to still get those OTA's. I tried to just fastboot boot TWRP but it would just hang at it's logo. Flash was only option.
Click to expand...
Click to collapse
If anything in /system or /oem is tampered like installing a camera mod (or just mounting system r/w) the only way to receive future OTA updates is flashing your current ROM incl. stock recovery via fastboot.
Sent from my Moto G5 Plus using XDA Labs

Related

XT-1644 Official Nougat Update?

My Phone Info:
Single sim 2gb ram + 16gb rom
Hello folks I've been searching for a nougat update for XT-1644, but unable to find over the xda if anyone of you havs upgraded your xt-1644 then kindly tell the procedure here, Thanks.
Here is my About Phone Info.
http://cloud.tapatalk.com/s/589c8f61b2eab/Screenshot_20170209-203359.png
http://cloud.tapatalk.com/s/589c8f48b01b2/Screenshot_20170209-203401.png
You mean a method like this? https://forum.xda-developers.com/moto-g4-plus/how-to/xt1644-stock-marshmallow-to-nougat-t3540022
If you download the 93-14 Nougat firmware, that's the latest version. Nougat OTAs currently only exist for the 93-11 firmware.
echo92 said:
You mean a method like this? https://forum.xda-developers.com/moto-g4-plus/how-to/xt1644-stock-marshmallow-to-nougat-t3540022
If you download the 93-14 Nougat firmware, that's the latest version. Nougat OTAs currently only exist for the 93-11 firmware.
Click to expand...
Click to collapse
Sorry didn't find that,
One more question i have unlocked my bootloader will it work? I mean will i be able to flash this 7.0?
waseemmayaa said:
Sorry didn't find that,
One more question i have unlocked my bootloader will it work? I mean will i be able to flash this 7.0?
Click to expand...
Click to collapse
Yes, your bootloader status won't matter - as long as that's all you've done. As I understand it, the update via stock recovery only cares if the rest of your phone has been modified - if you've still got a stock bootloader, stock recovery and stock kernel (from MM, provided it's up to date), it should work and you should be eligible for future OTAs.
The only hurdle I could see happening is that the build of Marshmallow expected by the OTA and your phone's current OS build do not match, in which case it won't install. Thus, you may have to consult one of the fastboot Nougat 93-11 or 93-14 threads to install, which you'll have to do if your system is modified past the bootloader.
Here are a couple for your perusal:
https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369
https://forum.xda-developers.com/moto-g4-plus/how-to/android-7-0-install-nougat-official-t3531612
echo92 said:
Yes, your bootloader status won't matter - as long as that's all you've done. As I understand it, the update via stock recovery only cares if the rest of your phone has been modified - if you've still got a stock bootloader, stock recovery and stock kernel (from MM, provided it's up to date), it should work and you should be eligible for future OTAs.
The only hurdle I could see happening is that the build of Marshmallow expected by the OTA and your phone's current OS build do not match, in which case it won't install. Thus, you may have to consult one of the fastboot Nougat 93-11 or 93-14 threads to install, which you'll have to do if your system is modified past the bootloader.
Here are a couple for your perusal:
https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369
https://forum.xda-developers.com/moto-g4-plus/how-to/android-7-0-install-nougat-official-t3531612
Click to expand...
Click to collapse
Thanks for the brief info, it means i have to flash it via fastboot and if that works fine then I'll be able to get OTA, but for your info, I've unlocked bootloader and installed Official TWRP but if i flash any of the firmware (given above) will i face bootloop kinda stuffs? I am scared if something goes wrong then i will even not able to restore nandroid backup. Hope you gotta help me.
Thanks.
waseemmayaa said:
Thanks for the brief info, it means i have to flash it via fastboot and if that works fine then I'll be able to get OTA, but for your info, I've unlocked bootloader and installed Official TWRP but if i flash any of the firmware (given above) will i face bootloop kinda stuffs? I am scared if something goes wrong then i will even not able to restore nandroid backup. Hope you gotta help me.
Thanks.
Click to expand...
Click to collapse
I see you've received a response in the other thread regarding if XT1644 will accept the update; given you've flashed TWRP, if you wish to be very safe, I would suggest re-installing your Marshmallow ROM so you have a stock install before proceeding to Nougat. There's nothing stopping you from directly flashing Nougat, and the fastboot method for either Nougat build may correctly overwrite the relevant files, the only way is to try the procedure. Don't use the TWRP backup images of Nougat - they don't contain updates to your baseband modem and other core parts of your device - they are only meant to be used once your entire phone is updated to Nougat.
If you wish to restore back to stock MM before flashing Nougat, here's links to stock firmware for XT1644: https://forum.xda-developers.com/moto-g4-plus/how-to/xt1644-firmware-t3454980
But either way, read all the instructions first, ensure you've got all the firmware and tools you need installed/downloaded, your phone has at least 50 % battery and plenty of time, and you should be okay.

Can I Update further upcoming security patch

Hi everyone When I am Rooted My Moto G4 Plus and install custom rom thn i downgrade to Official 7.0 with Dec 2016 Security Patch Update and when i try to Official OTA update of march 2017 with unlock bootloader but my phone goes hardbrick than via "blank flash" now i am on Official stock June 2017 security patch update and i Relocked my bootloader.....So My Question Is can i Update Further Upcoming Security patch or any official OTA update..??? Or My phone get Hardbrick????? Plz reply....
pritesh barot said:
Hi everyone When I am Rooted My Moto G4 Plus and install custom rom thn i downgrade to Official 7.0 with Dec 2016 Security Patch Update and when i try to Official OTA update of march 2017 with unlock bootloader but my phone goes hardbrick than via "blank flash" now i am on Official stock June 2017 security patch update and i Relocked my bootloader.....So My Question Is can i Update Further Upcoming Security patch or any official OTA update..??? Or My phone get Hardbrick????? Plz reply....
Click to expand...
Click to collapse
I have same question ,but I'm asking you can I unlock bootloader again
1) You can unlock the bootloader again, each time will wipe your device however. I think you can use the same unlock code as issued by Motorola (provided nothing has changed with your device hardware - i.e. you have the same motherboard).
2)As I mentioned in the other thread, if you've hard bricked and you flashed the June 2017 stock ROM in its entirety - all commands and wipes, then you may be okay to accept and install OTA updates. This is dependent on you having flashed all parts of that stock ROM, so your device is at the same patch level - if you have not, then taking the OTA might hardbrick you again. The OTA updates do not necessarily include complete files, they mainly are a collection of patches, and assume your device is at the same patch level (GPT, bootloader, system, kernel, and other firmware are all at the June 2017 patch level, for example).
If you're worried at all about the OTA updates, wait for an updated fastboot stock ROM with the included update, which is safer.
3)Once you've taken any OTA updates newer than June 2017, it is no longer safe to attempt to flash the June 2017 stock ROM - if you want to go back to stock, wait for an updated stock ROM to be leaked. Else, you could downgrade (which I do not recommend), but do not accept OTA updates. Our newest blankflash works on B1:06 bootloaders, I do not know if it works on newer bootloaders. If not, and you hard brick, you'll likely have to wait for a new blankflash or pay for a new motherboard. A new motherboard is around 7000-10000 rupees or your regional equivalent, from what I've seen.
echo92 said:
1) You can unlock the bootloader again, each time will wipe your device however. I think you can use the same unlock code as issued by Motorola (provided nothing has changed with your device hardware - i.e. you have the same motherboard).
2)As I mentioned in the other thread, if you've hard bricked and you flashed the June 2017 stock ROM in its entirety - all commands and wipes, then you may be okay to accept and install OTA updates. This is dependent on you having flashed all parts of that stock ROM, so your device is at the same patch level - if you have not, then taking the OTA might hardbrick you again. The OTA updates do not necessarily include complete files, they mainly are a collection of patches, and assume your device is at the same patch level (GPT, bootloader, system, kernel, and other firmware are all at the June 2017 patch level, for example).
If you're worried at all about the OTA updates, wait for an updated fastboot stock ROM with the included update, which is safer.
3)Once you've taken any OTA updates newer than June 2017, it is no longer safe to attempt to flash the June 2017 stock ROM - if you want to go back to stock, wait for an updated stock ROM to be leaked. Else, you could downgrade (which I do not recommend), but do not accept OTA updates. Our newest blankflash works on B1:06 bootloaders, I do not know if it works on newer bootloaders. If not, and you hard brick, you'll likely have to wait for a new blankflash or pay for a new motherboard. A new motherboard is around 7000-10000 rupees or your regional equivalent, from what I've seen.
Click to expand...
Click to collapse
Now I Hve Successfully Relock My Bootloader and now i am on stock June 2017 Can I Reflash With Same June 2017 without Unlocking Bootloader Again because during Relock i used Command Directly From X Da Thread For Relock Bootloader and Don't Sure Fully Install June 2017 Rom So Want To Reflash With 'Stock Flash.Bat' File So I Will Get OTA Without Waiting For Updated Fastboot Stock Rom....So Can I Flash June 2017 Without Unlocking Bootloader....??? Plz Reply...
pritesh barot said:
Now I Hve Successfully Relock My Bootloader and now i am on stock June 2017 Can I Reflash With Same June 2017 without Unlocking Bootloader Again because during Relock i used Command Directly From X Da Thread For Relock Bootloader and Don't Sure Fully Install June 2017 Rom So Want To Reflash With 'Stock Flash.Bat' File So I Will Get OTA Without Waiting For Updated Fastboot Stock Rom....So Can I Flash June 2017 Without Unlocking Bootloader....??? Plz Reply...
Click to expand...
Click to collapse
Can I Reflash With Same June 2017 without Unlocking Bootloader - yes, the stock ROMs we have access to should be signed by Motorola, so should flash on a locked or unlocked bootloader regardless.
You should be able to get OTA updates without waiting for an updated stock ROM. From your previous posts, you seem unsure of this. It is still up to you and your responsibility whether you choose to take an OTA or wait for the updated stock ROM. If you re-locked your bootloader, then you must have been able to re-flash the entire stock ROM, else you may have failed to boot (as you'd have likely failed the verification checks performed by a locked bootloader). Thus, your device might be okay to update. Again, as I have mentioned previously in replies to your posts, if you are worried about hard bricking, then wait for the updated fastboot ROM. The updated fastboot ROM has complete files and thus has a lower risk of damaging/bricking your device. I understand you're eager to get the latest OTA updates, however you could wait and see if there are any bugs/outstanding issues before updating.
Depending on the commands in that stock flash.bat file, you may wipe your device, so back up accordingly.
As an aside, how are you not sure you flashed the full stock ROM? Surely if you followed the guide and used all the commands, you'd have fully flashed? If you look in the stock flash.bat script (open it in Notepad or a text viewer), you'll note the commands should be the same as what you used previously?

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!

Help regarding flashing stock and ota

Hello!
I've the Indian variant of the Moto G5 Plus (XT1686), software channel: Retin. I have unlocked the device and flashed a custom ROM. I want to return to stock now but I have a few questions.
1) Where can I get the latest factory image for my XT1686?
2) Which one should I flash on my device amongst AMZ, RETLA & RETAIL?
3) I was on the November security patch before I unlocked and rooted. Should I flash stock, will my device continue receiving ota updates that are released for India?
4) If I flash the firmware that you guys will link me to here, will it hard brick my device when I try for ota update in the future? I read somewhere about mismatch in the partition table will lead to 9008/ some error and device won't go in bootloader mode and that you'll need blankfiles to revive your device and stuff.
Please tell me what to do to return to my complete stock image and to continue receiving ota updates safely on my XT1686, RETIN Software Channel?
1) To the best of my knowledge, this NPN25.137-92, Nov 2017 stock Motorola firmware, is the latest for retIN (retail India) devices, amongst other regions. https://forum.xda-developers.com/g5-plus/how-to/moto-g5-plus-patch-november-npn25-137-92-t3718976 It's been received by OTA to users, indicating it's been formally deployed in India and other regions too. Please verify this before flashing
Flash using the flashing instructions provided in this post: https://forum.xda-developers.com/g5-plus/how-to/solution-to-flash-stock-romfactory-t3691396 but using the above NPN25.137-92 ROM - the flashing instructions should apply to this ROM.
2)As you're on retail India, you want retail stock ROMs. AMZ are only for Amazon Prime devices (bootloader locked to Amazon, adverts on the lockscreen) and whilst you could flash retla (retail Latin America), it may cause problems for your device later down the line.
3)Provided you flash the correct stock firmware for your region, you should continue to receive OTA updates.
4)As this should be the same firmware as you had previously, you should not hard brick when receiving OTA updates in the future. Users appeared to commonly hard brick when they attempted to flash stock Motorola firmware older than the stock firmware they had (custom ROMs don't appear to matter here), then attempted to use OTA updates. You cannot downgrade bootloaders, thus you have a mismatched bootloader and system - your new bootloader and your downgraded system - so using an OTA update would flash older bootloader files. As OTA updates do not have the same checks as fastboot for bootloaders, that would corrupt your newer bootloader and hard brick your device. The OTA updates don't appear designed to consider downgraded devices, i.e. newer bootloaders but older stock systems, hence why Motorola likely warns you that whatever happens when unlocking the bootloader is the user's responsibility. If you were in that situation, then flashing fastboot ROMs would be the safest way to update.
However, as you're being conscientious enough to flash the same or latest firmware, then this should not occur. To summarise, hard bricks only appear to occur when downgrading/cross flashing stock firmware and then taking OTA updates when you previously had newer/different stock firmware on your device.
If you want to be truly sure this is the right firmware to revert back to stock to, then I would like to see your getvar info before proceeding:
1)Boot your device to the bootloader, connect to your computer via USB.
2)In the ADB terminal, type 'fastboot getvar all' without quotes and press Enter.
3)Copy the output to a post here. This output contains device variables including what the last stock firmware was on your device, which will be helpful in verifying the correct firmware for you. You may wish to remove IMEI from the output before posting.
Guys i unlocked the bootloader of NPN 25.137-92 indian retin variant with nov 1 patch. I unlocked the bootloader and rooted the phone with SU, only problem is that cam stops working. Then i installed Elemental X kernel 2.02 as a workround to get the cam working which went ok . But i want to go back to the stock kernel, i dont want to flash whole rom . Is their a way i get info or download link for the stock kernel, please reply. Is it possible that i can just flash the kernel.
Stifmeister11 said:
Guys i unlocked the bootloader of NPN 25.137-92 indian retin variant with nov 1 patch. I unlocked the bootloader and rooted the phone with SU, only problem is that cam stops working. Then i installed Elemental X kernel 2.02 as a workround to get the cam working which went ok . But i want to go back to the stock kernel, i dont want to flash whole rom . Is their a way i get info or download link for the stock kernel, please reply. Is it possible that i can just flash the kernel.
Click to expand...
Click to collapse
Answered on your post, please check

Custom ROMs and future updates. What do I have to bear in mind?

So, we all know Motorola will eventually (aka never) release Oreo for the G5 Plus.
I am way too anxious so I am going to flash a Custom ROM until they deliver it. However I am quite afraid about something.
I plan to use Lineage 15.1 until Oreo comes out for the G5 Plus. However, I am kind of afraid that I may screw things up when the OTA comes out.
I have recently hard bricked my Moto G 2014 because of OTAs and Bootloader.
So, Oreo releases...
Will it be fine to install the OTA (through normal System Update check) having the latest Stock ROM Firmware for my region installed? (I would erase Lineage 15 and use fastboot to flash Stock again)
Or will I instead need to wait for someone to post the system images and flash it through fastboot instead? (I assume I would need to install the OTA through normal methods because of bootloader changes but still...)
I just don't want this: https://forum.xda-developers.com/g5-plus/help/moto-g5-plus-hard-bricked-t3694119
To happen.
You won't get system updates when you are on a custom ROM like Lineage OS or any other custom ROM. The only system updates you might get are ROM updates if the ROM maintainer has that feature built in.
If official Oreo comes out and you are on the correct stock firmware for your model and region, everything should work fine.
Before flashing custom roms you should backup your efs partition using twrp else you could lose your imei(recoverable) / volte(not recoverable till now) when flashing fastboot firmwire.
You need to flash fastboot firmwire to receive oreo ota.
If you want to avoid hard bricking, then you must flash the same stock ROM or newer onto your device when you revert back to stock firmware.
I imagine your Moto G 2014 got bricked when you took an OTA update? That could have occurred if firmware older than what was present on your device was flashed (bootloaders cannot be downgraded), and like in that thread you linked, attempting to use OTA updates would corrupt your newer bootloader with the older OTA patches, leading to a hard brick.
As mentioned above, if you revert to the correct build for your region and matching your current build at least, you should be okay to receive OTA updates (should also include up to Oreo). Alternatively, you could wait for the Oreo fastboot ROM to be safe, or the Oreo TWRP flashable for a near stock ROM experience (since TWRP flashables shouldn't care about your bootloader or GPT partitions, do it'd be difficult to brick your device. However, TWRP flashable stock ROMs aren't OTA compatible).
Before you unlock your bootloader and flash TWRP/custom ROMs, make a note of your current build version and see if you can find a stock ROM leaked of that build, so you can be sure that you're reverting to the right build for your device.
Just do not flash older stock Motorola firmware to your device or if you do, do not use OTA updates.
Yeah, I did some research and now I understand what happened. Thanks for the comments.

Categories

Resources