Want to flash TWRP Flashable 7.0 to downgrade from Soak Test. How to avoid IMEI loss? - Moto G4 Plus Questions & Answers

Hello everyone, i installed the leaked soak test with the "apply update from SD card" on stock recovery after locking my bootloader.
One week later, i unlocked it again and flashed TWRP for rooting with magisk.
Even with root tweaks i still face problems with soak 8.1, due to the lack of custom kernels.
So i decided to flash Stock N (1st April) with the TWRP Flashable zip from @Jleeblanch , how i avoid IMEI loss doing that? If i backup Oreo's EFS with TWRP, it will be compatible if i try to restore it after flashing, or it's not even necessary?

The TWRP flashable zip files by @Jleeblanch does not have the commands "fastboot erase modemst1" and "fastboot erase modemst2" so your IMEI will be fine. However Stock Oreo does mess up with IMEI.
Flash TWRP flashable Stock Nougat by Jleeblanch. You will not lose IMEI, but there will still be a problem of persist (i.e you will lost IMEI if you flash Stock ROM via fastboot). So to fix persist, follow this thread: [Guide] [XT16XX] [Solve] Moto G4/Plus IMEI=0 issue
Losing IMEI is a persist related problem (Soak Test 8.1, and all 64bit Pie ROMs are causing this). So if you fix persist, then you will never lose IMEI.
I recommend you to take backup of EFS before this process (i.e while having a bad persist and working EFS) and also after fixing persist (i.e while having a good persist and working EFS).
EFS backup by Lyuu's TWRP takes a backup of EFS, fsg and persist.
Since you upgraded to Soak test from a locked bootloader, I strongly oppose moving back to Stock Nougat. Even if you go back to Nougat, MAKE SURE THAT YOU NEVER DO ANY OTA UPDATE. Whenever Official Oreo comes out, either flash it by fastboot or by TWRP flashable zip file (Jleeblanch said that he will make one for Official Oreo too once it's released)

Heeth21 said:
The TWRP flashable zip files by @Jleeblanch does not have the commands "fastboot erase modemst1" and "fastboot erase modemst2" so your IMEI will be fine. However Stock Oreo does mess up with IMEI.
Flash TWRP flashable Stock Nougat by Jleeblanch. You will not lose IMEI, but there will still be a problem of persist (i.e you will lost IMEI if you flash Stock ROM via fastboot). So to fix persist, follow this thread: [Guide] [XT16XX] [Solve] Moto G4/Plus IMEI=0 issue
Losing IMEI is a persist related problem (Soak Test 8.1, and all 64bit Pie ROMs are causing this). So if you fix persist, then you will never lose IMEI.
I recommend you to take backup of EFS before this process (i.e while having a bad persist and working EFS) and also after fixing persist (i.e while having a good persist and working EFS).
EFS backup by Lyuu's TWRP takes a backup of EFS, fsg and persist.
Since you upgraded to Soak test from a locked bootloader, I strongly oppose moving back to Stock Nougat.
Click to expand...
Click to collapse
Rajat's 64bit TWRP doesn't have EFS Backup option here. I will try Lyuu's
Thanks for the help.

xSamukaBRx said:
Rajat's 64bit TWRP doesn't have EFS Backup option here. I will try Lyuu's
Thanks for the help.
Click to expand...
Click to collapse
Read the second post again, I have edited it.

Heeth21 said:
Since you upgraded to Soak test from a locked bootloader, I strongly oppose moving back to Stock Nougat. Even if you go back to Nougat, MAKE SURE THAT YOU NEVER DO ANY OTA UPDATE. Whenever Official Oreo comes out, either flash it by fastboot or by TWRP flashable zip file (Jleeblanch said that he will make one for Official Oreo too once it's released)
Click to expand...
Click to collapse
I kinda fear it auto-updating, so i'll make sure to delete the "3c_ota" app from /priv-app
EDIT: Already know the risks of taking OTA with unlocked bootloader or after downgrade...

Heeth21 said:
Since you upgraded to Soak test from a locked bootloader, I strongly oppose moving back to Stock Nougat. Even if you go back to Nougat, MAKE SURE THAT YOU NEVER DO ANY OTA UPDATE. Whenever Official Oreo comes out, either flash it by fastboot or by TWRP flashable zip file (Jleeblanch said that he will make one for Official Oreo too once it's released)
Click to expand...
Click to collapse
What about Lineage-based 7.1.2 32 bits ROMs? Can i flash them without issue? Already flashed Stock N
with TWRP, and It worked fine. Just want to know.
Please don't tell me i need the fastboot Stock N, i can't flash that anymore i think. :crying:

xSamukaBRx said:
What about Lineage-based 7.1.2 32 bits ROMs? Can i flash them without issue? Already flashed Stock N
with TWRP, and It worked fine. Just want to know.
Please don't tell me i need the fastboot Stock N, i can't flash that anymore i think. :crying:
Click to expand...
Click to collapse
Yes you can flash Custom ROMs from TWRP, however, I don't think you should right now.
I got my device hard bricked randomly from Custom ROM. idk what caused it, maybe some changes which I did or something else. If a similar thing were to happen with you, there's no guarantee whether the current blankflash would work or not.

Heeth21 said:
Yes you can flash Custom ROMs from TWRP, however, I don't think you should right now.
I got my device hard bricked randomly from Custom ROM. idk what caused it, maybe some changes which I did or something else. If a similar thing were to happen with you, there's no guarantee whether the current blankflash would work or not.
Click to expand...
Click to collapse
Even through i just want a pure lineage OS instead of a custom based on it (too many stuff comes with a risk, right?), i better not try...

Related

Baseband: Not found/Unknown, imei 0... Let's find a definitive solution

XT 1806 here. Well, not long ago I posted about thinking I found a way... well... nothing. followed every single thread on hoy to restore basemand/imei to no avail.
So far what I know is that I was running fine, while trying to make cerberus a system app. The phone rebooted and bam. No more baseband.
Before that, I had done the trick of installing an oreo rom (Validus) and going back to stock. It worked and I got back Baseband on bootloader and then in the OS.
I have backups from my EFS from TWRP and PartitionsManager (modem, modemst1, modemst2 and persist) within the OS. Restoring those was no good. It worked before but not now.
I have bootloader C2.06. Before, I had C2.07. Installing the latest update from https://firmware.center/firmware/Motorola/Moto G5s Plus/Stock/ , being it SANDERS_NPSS26.116-61-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml did nothing to update the bootloader or writing the modem.
So far I have a theory and is that, the phone is not taking flashing to the bootloader and or the modem as it should. I am using a high quality USB cable. Changed cables, too. Also, I think something weird is happening with the bootloader or chip programming. It is the first time I face something as weird as this.
I also think it does not like when you start the phone and reboot it quickly. Forgot its Baseband.
Let's be detailed and share experiences to find a cause and then a solution. I have more than 30 hours spent trying to fix this and it is getting to a scary point.
I lost imei and signal....somehow I don't have my efs backup....tried every combo of ROM to get signals ie. something 2g/3g but nothing happens...
However my baseband is intact
Am on 1686 Indian varient
Q. Will moto z Oreo modem work?? Am planning to give it a try
mohitzr said:
I lost imei and signal....somehow I don't have my efs backup....tried every combo of ROM to get signals ie. something 2g/3g but nothing happens...
However my baseband is intact
Am on 1686 Indian varient
Q. Will moto z Oreo modem work?? Am planning to give it a try
Click to expand...
Click to collapse
Any ideas on what happened when you lost the imei?
Please start in bootloader and see what it says in baseband.
barbaroja said:
XT 1806 here. Well, not long ago I posted about thinking I found a way... well... nothing. followed every single thread on hoy to restore basemand/imei to no avail.
So far what I know is that I was running fine, while trying to make cerberus a system app. The phone rebooted and bam. No more baseband.
Before that, I had done the trick of installing an oreo rom (Validus) and going back to stock. It worked and I got back Baseband on bootloader and then in the OS.
I have backups from my EFS from TWRP and PartitionsManager (modem, modemst1, modemst2 and persist) within the OS. Restoring those was no good. It worked before but not now.
I have bootloader C2.06. Before, I had C2.07. Installing the latest update from https://firmware.center/firmware/Motorola/Moto G5s Plus/Stock/ , being it SANDERS_NPSS26.116-61-5_cid50_subsidy-DEFAULT_regulatory-DEFAULT_CFC.xml did nothing to update the bootloader or writing the modem.
So far I have a theory and is that, the phone is not taking flashing to the bootloader and or the modem as it should. I am using a high quality USB cable. Changed cables, too. Also, I think something weird is happening with the bootloader or chip programming. It is the first time I face something as weird as this.
I also think it does not like when you start the phone and reboot it quickly. Forgot its Baseband.
Let's be detailed and share experiences to find a cause and then a solution. I have more than 30 hours spent trying to fix this and it is getting to a scary point.
Click to expand...
Click to collapse
You can start with this
Code:
https://www.androidbrick.com/ultimate-guide-qualcomm-snapdragon-xiaomi-mi5-imei-and-baseband-repair-fix/
and it's sister article part 2. I wrote a how-to on using QFIL to back-up and restore qcn files, and my research started there. However, after seeing how many cannot follow basic instructions to use adb/fastboot and even sometimes twrp, I am not going to post it. Let's just say you can edit the proper baseband components, but it is not going to be download and click to install. You will need the following to get started:
Code:
1.[QPST] https://www.androidbrick.com/download/download-latest-qualcomm-flasher-qfil-qpst-2-7-460/
2.[Qualcomm drivers]https://gsmusbdrivers.com/download/android-qualcomm-usb-driver/
3.[hexeditor]http://www.mitec.cz/hex.html
4.[IMEI convertor]https://androidfilehost.com/?fid=962021903579482959
5.Motorola USB drivers [you probably already have these, if you have used adb/fastboot]
You will also need a knowledgeable donor who is willing and able to donate a working backed up qcn file, of the same make/model, and bootloader must be in same state as yours. Although this will have the IMEI , it can be edited to 0 out all but the first digit of the IMEI and thus be safe for posting without fear of someone cloning it. This method has been done with other qualcomm chipsets, and the ultimate goal would be to get the proper working qcn file disassembled and compared to the faulty ones to see exactly where the basebands are being corrupted by the Oreo roms.
barbaroja said:
Any ideas on what happened when you lost the imei?
Please start in bootloader and see what it says in baseband.
Click to expand...
Click to collapse
i get baseband
[email protected] said:
You can start with this
Code:
https://www.androidbrick.com/ultimate-guide-qualcomm-snapdragon-xiaomi-mi5-imei-and-baseband-repair-fix/
and it's sister article part 2. I wrote a how-to on using QFIL to back-up and restore qcn files, and my research started there. However, after seeing how many cannot follow basic instructions to use adb/fastboot and even sometimes twrp, I am not going to post it. Let's just say you can edit the proper baseband components, but it is not going to be download and click to install. You will need the following to get started:
Code:
1.[QPST] https://www.androidbrick.com/download/download-latest-qualcomm-flasher-qfil-qpst-2-7-460/
2.[Qualcomm drivers]https://gsmusbdrivers.com/download/android-qualcomm-usb-driver/
3.[hexeditor]http://www.mitec.cz/hex.html
4.[IMEI convertor]https://androidfilehost.com/?fid=962021903579482959
5.Motorola USB drivers [you probably already have these, if you have used adb/fastboot]
You will also need a knowledgeable donor who is willing and able to donate a working backed up qcn file, of the same make/model, and bootloader must be in same state as yours. Although this will have the IMEI , it can be edited to 0 out all but the first digit of the IMEI and thus be safe for posting without fear of someone cloning it. This method has been done with other qualcomm chipsets, and the ultimate goal would be to get the proper working qcn file disassembled and compared to the faulty ones to see exactly where the basebands are being corrupted by the Oreo roms.
Click to expand...
Click to collapse
Thanks for sharing. Very interesting, indeed.
In my particular case, it happened for no apparent reason. Quick reboots being a suspect here. It seems some got baseband and no imei, others no baseband at all... Any ideas on this?
dev here.
I've been looking into this problem for quite a while now.
Can anyone briefly summarise the problem? Like what all you flashed?
From my understanding:
efs = modemst1 & modemst2 = baseband cache = created on the fly
important baseband related partitions: modem, fsg, persist
Additionally I'm sharing potter retin (march) firmware files: (Download)
Try flashing this (on stock 7.0):
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash persist persist.img
rachitrawat said:
dev here.
I've been looking into this problem for quite a while now.
Can anyone briefly summarise the problem? Like what all you flashed?
From my understanding:
efs = modemst1 & modemst2 = baseband cache = created on the fly
important baseband related partitions: modem, fsg, persist
Additionally I'm sharing potter retin (march) firmware files: (Download)
Try flashing this (on stock 7.0):
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash persist persist.img
Click to expand...
Click to collapse
Thank you so much.
Can you tell me what is your model no.?
And build no ?
And is this backup is from stock rooted rom.?
Is your device bricked yet,or have you loose IMEI in past.?
akshu2697 said:
Thank you so much.
Can you tell me what is your model no.?
And build no ?
And is this backup is from stock rooted rom.?
Is your device bricked yet,or have you loose IMEI in past.?
Click to expand...
Click to collapse
This a dump of an untouched XT1686 92-8 firmware.
rachitrawat said:
This a dump of an untouched XT1686 92-8 firmware.
Click to expand...
Click to collapse
Can you provide me twrp flashable rom 92-8.?
Because I can't find it anywhere.
akshu2697 said:
Can you provide me twrp flashable rom 92-8.?
Because I can't find it anywhere.
Click to expand...
Click to collapse
There isn't one as there is no 92-8 firmware out there.
Sent from my Moto G5 Plus using XDA Labs
did it worked ? .. im having the same problem .. cant get my network signal and imei
akshu2697 said:
Thank you so much.
Can you tell me what is your model no.?
And build no ?
And is this backup is from stock rooted rom.?
Is your device bricked yet,or have you loose IMEI in past.?
Click to expand...
Click to collapse
im having the same problem with my XT1686 indian version .. can we get it back with other efs backups ?
can we import backups from other mobiles and get the job done ?
Repiix said:
im having the same problem with my XT1686 indian version .. can we get it back with other efs backups ?
can we import backups from other mobiles and get the job done ?
Click to expand...
Click to collapse
I haven't tried it yet,
I will tell you if this work.
rachitrawat said:
dev here.
I've been looking into this problem for quite a while now.
Can anyone briefly summarise the problem? Like what all you flashed?
From my understanding:
efs = modemst1 & modemst2 = baseband cache = created on the fly
important baseband related partitions: modem, fsg, persist
Additionally I'm sharing potter retin (march) firmware files: (Download)
Try flashing this (on stock 7.0):
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot flash persist persist.img
Click to expand...
Click to collapse
Can you help me how to flash this file..??
Because the non-hlos.bin is of 100 mb while in stock ROM it is of around 75 mb,
So can you describe the method to restore this.
1. my device is xt1686 retin and i lost my imei and volte after reverting back to twrp flashable stock nov security patch from pixel experience oreo rom ....
2. i recovered my imei using #castell93 guide ....
https://forum.xda-developers.com/g5-plus/help/restore-imei-0-moto-g5-xt1687-t3739808
3. then i flashed twrp flashable stock jan security patch but no volte yet....
4. then i got my volte back thanks to akshu2697 guide... and backed up my efs
https://forum.xda-developers.com/g5-plus/how-to/solved-volte-fix-lost-flashing-stock-rom-t3773524
5. for a while i used custom oreo roms... and today i flashed twrp flashable stock jan security patch again and i lost imei =0 .... i have my efs backup so i recovered my efs and got my imei and volte working again..
6. today i downloaded #rachitrawat's twrp system backup file and formatted every thing using twrp and restored the system file and reboot... now i am on stock march security patch and i didnot loose my imei and volte .....
I'm on an oreo rom(no volte). Will i be able to flash stock when the oreo rom is officially released? And hopefully get volte?
Arunxyz said:
1. my device is xt1686 retin and i lost my imei and volte after reverting back to twrp flashable stock nov security patch from pixel experience oreo rom ....
2. i recovered my imei using #castell93 guide ....
https://forum.xda-developers.com/g5-plus/help/restore-imei-0-moto-g5-xt1687-t3739808
3. then i flashed twrp flashable stock jan security patch but no volte yet....
4. then i got my volte back thanks to akshu2697 guide... and backed up my efs
https://forum.xda-developers.com/g5-plus/how-to/solved-volte-fix-lost-flashing-stock-rom-t3773524
5. for a while i used custom oreo roms... and today i flashed twrp flashable stock jan security patch again and i lost imei =0 .... i have my efs backup so i recovered my efs and got my imei and volte working again..
6. today i downloaded #rachitrawat's twrp system backup file and formatted every thing using twrp and restored the system file and reboot... now i am on stock march security patch and i didnot loose my imei and volte .....
Click to expand...
Click to collapse
Which system backup did you restore.???
There are two system backup zip in that folder.
And what if you again flash system with fastboot after restore that backup.????
Is IMEI still there.??
akshu2697 said:
Which system backup did you restore.???
There are two system backup zip in that folder.
And what if you again flash system with fastboot after restore that backup.????
Is IMEI still there.??
Click to expand...
Click to collapse
Extract twrp backup system img zip file and it contains system_img folder...
Copy that folder to twrp backup and then restore...
After restore you don't need to fastboot system..
I didn't try to flash fastboot system
Arunxyz said:
Extract twrp backup system img zip file and it contains system_img folder...
Copy that folder to twrp backup and then restore...
After restore you don't need to fastboot system..
I didn't try to flash fastboot system
Click to expand...
Click to collapse
What if you fastboot flashing and again IMEI goes to 0,..??
Can you try.?
Either flashing system via fastboot or flashing stock ROM with twrp.
akshu2697 said:
Can you help me how to flash this file..??
Because the non-hlos.bin is of 100 mb while in stock ROM it is of around 75 mb,
So can you describe the method to restore this.
Click to expand...
Click to collapse
Code:
fastboot flash modem NON-HLOS.bin
akshu2697 said:
Which system backup did you restore.???
There are two system backup zip in that folder.
And what if you again flash system with fastboot after restore that backup.????
Is IMEI still there.??
Click to expand...
Click to collapse
system.img is a bit perfect backup of /system which will not break dm-verity.
akshu2697 said:
What if you fastboot flashing and again IMEI goes to 0,..??
Can you try.?
Either flashing system via fastboot or flashing stock ROM with twrp.
Click to expand...
Click to collapse
you can restore via twrp or fastboot flash
Edit: fastboot won't work. Need to compress into sparse chunks. Try motofastboot

[Q] Revert to Stock After Update to Stock 8.1?

Hello, I have a brazilian G5 Plus that originally didn't have the retail Nougat image Installed (bought form a carrier), but I was able to update to the leaked brazilian 8.1 update. The phone was never bootloader unlocked or rooted, however I'm willing to return to stock nougat in order to try Pie roms and not lose the fingerprint function. What I want to know is A) can i flash retail nougat images on my phone (as it wasnt retail at first)? and B) at what time should I make backups of EFS and Persist partitions?
Should I unlock bootloader while on oreo. install twrp, make backups of efs and persist and then flash stock nougat?
Or should I be able to downgrade to Nougat without any issues, and take backups of EFS and Persist before flashing Pie Roms?
Any clarification on the subject would be deeply appreciated.
Thanks in advance.
Mrkblo said:
Hello, I have a brazilian G5 Plus that originally didn't have the retail Nougat image Installed (bought form a carrier), but I was able to update to the leaked brazilian 8.1 update. The phone was never bootloader unlocked or rooted, however I'm willing to return to stock nougat in order to try Pie roms and not lose the fingerprint function. What I want to know is A) can i flash retail nougat images on my phone (as it wasnt retail at first)? and B) at what time should I make backups of EFS and Persist partitions?
Should I unlock bootloader while on oreo. install twrp, make backups of efs and persist and then flash stock nougat?
Or should I be able to downgrade to Nougat without any issues, and take backups of EFS and Persist before flashing Pie Roms?
Any clarification on the subject would be deeply appreciated.
Thanks in advance.
Click to expand...
Click to collapse
Don't try to downgrade your bootloader as it going to brick your device. If you want to make back up made the back up of Oreo(now in which your using) and nougat also, as we can't say where it goes wrong. And you can flash retail nougat image but don't flash gpt and bootloade so it don't brick your device.
Read this: https://forum.xda-developers.com/g5...o-twrp-flashable-stock-builds-coming-t3830482
If you want to try some custom rom and not lose fingerprint, all you have to do is run the persist fix, flash a 7.0 TWRP-flashable stock build and THEN flash your custom rom. No need to fastboot flash the stock image. Of course also backup your persist and EFS as soon as you first boot into TWRP.
prokaryotic cell said:
Read this: https://forum.xda-developers.com/g5...o-twrp-flashable-stock-builds-coming-t3830482
If you want to try some custom rom and not lose fingerprint, all you have to do is run the persist fix, flash a 7.0 TWRP-flashable stock build from and THEN flash your custom rom. No need to fastboot flash the stock image. Of course also backup your persist and EFS as soon as you first boot into TWRP.
Click to expand...
Click to collapse
Thanks, will have a look at it.

Another question about Soak Test?

Hello everyone, so after flashing the current soak test with recovery stock(OPJ.28.108) i unlocked bootloader and flashed magisk 17.1 (which updated to 18.0 recently).
With TWRP in order to avoid any issues, i deleted the ota app from /priv-app and flashed 8.1 aroma gapps, stayed in stock kernel, due to sources not available yet.
How will i update to newer soak tests or final release when they come? Can i flash them with MinimalADB Fastboot? @Jleeblanch's TWRP Flashable one, uses 7.0 Firmware, from what i know.
Now that you've unlocked your bootloader, you can fastboot flash the stock firmware from this thread to return to the stock firmware. However, you may get errors when fastboot flashing the bootloader.img or gpt.bin (partition table), probably saying you can't downgrade or something along those lines.
If a newer version of the soak test or an official version becomes available, you should be able to easily update, but we won't know for sure until that time comes.
In my thread there is a TWRP flashable version of Stock 7.0 and the Oreo soak test 8.1.0, just so you know.
Jleeblanch said:
In my thread there is a TWRP flashable version of Stock 7.0 and the Oreo soak test 8.1.0, just so you know.
Click to expand...
Click to collapse
Oh really? Thanks for the help dude!
If previous soak tests have been anything to go by, we'll likely have to wait for the next soak test update to be leaked. Motorola only releases soak test updates to those users that have applied to its soak test program. If you've flashed the soak test from XDA, Motorola won't send you an update, so we'd have to wait for someone on the test program to provide a copy of said update/updates. However, the aforementioned TWRP versions of the soak test should be updated if we can find the next soak test update.
Guys, quick question, after a soak test begins, how long can we expect before a final version?
Edduardoa said:
Guys, quick question, after a soak test begins, how long can we expect before a final version?
Click to expand...
Click to collapse
About 2-3 months if the soak test doesn't encounter significant or serious bugs - from how long previous soak tests have taken. Expect the release to take longer if there are serious bugs or ones that are hard to fix.
Unless you're part of the soak test itself, there's no guarantee we'll see soak test updates between now and the final release. It depends on whether someone can capture them and leak them to XDA.
Jleeblanch said:
However, you may get errors when fastboot flashing the bootloader.img or gpt.bin (partition table), probably saying you can't downgrade or something along those lines.
Click to expand...
Click to collapse
Which one is the safer downgrade? Yours TWRP Flashable or Fastboot ignoring the "oem_lock" commands? I'm currently with the Oreo ROM, Partition and Bootloader.
xSamukaBRx said:
Which one is the safer downgrade? Yours TWRP Flashable or Fastboot ignoring the "oem_lock" commands? I'm currently with the Oreo ROM, Partition and Bootloader.
Click to expand...
Click to collapse
Though I've not tried this, I think the TWRP flashable would be the safer bet, given TWRP doesn't affect the bootloader or GPT. Furthermore, OTA updates with this set up may likely fail to install before they did any damage to your device.
However, I'm not sure if downgrading in this manner may cause you to lose IMEI or SIM usage, so you may wish to read up on a few of the IMEI threads on this forum before proceeding.
So installing a twrp flashable soak test won't effect/upgrade the bootloader?
If that's the case what if I actually wanted to do that using twrp?
Henry Markle said:
So installing a twrp flashable soak test won't effect/upgrade the bootloader?
If that's the case what if I actually wanted to do that using twrp?
Click to expand...
Click to collapse
Shouldn't do, since TWRP doesn't appear to have the security authorisation to write to the bootloader or GPT.
By the same thought, you'd have to fastboot flash the GPT or bootloader. However, fastboot may not let you flash an older bootloader/GPT (e.g. from Oreo to Nougat) and block you reporting a security downgrade error. This, I don't think you can downgrade your bootloader or GPT
echo92 said:
Though I've not tried this, I think the TWRP flashable would be the safer bet, given TWRP doesn't affect the bootloader or GPT. Furthermore, OTA updates with this set up may likely fail to install before they did any damage to your device.
However, I'm not sure if downgrading in this manner may cause you to lose IMEI or SIM usage, so you may wish to read up on a few of the IMEI threads on this forum before proceeding.
Click to expand...
Click to collapse
@xSamukaBRx, as @Jleeblanch mentioned, that the TWRP flashable Stock ROMs don't have "fastboot erase modemst1" and "fastboot erase modemst2", so you won't lost IMEI.
If you have never touched your persist partitions, then even if you lose IMEI, it can be fixed so no worries about that. However, I would strongly recommend to take EFS backup right now as your device shows IMEI in settings i.e you have a working efs now.
Edit: As @echo92 mentions in the next post, that OTA updates will erase modemst1 and mdoemst2.
I would recommend it is better to fix persist now since everything if working fine to avoid imei problem in future altogether.
Nobody knows what Official Oreo would do to the persist. In the worst case there might be some restriction which would prevent us from fixing/changing persist.
Heeth21 said:
@xSamukaBRx, as @Jleeblanch mentioned, that the TWRP flashable Stock ROMs don't have "fastboot erase modemst1" and "fastboot erase modemst2", so you won't lost IMEI.
If you have never touched your persist partitions, then even if you lose IMEI, it can be fixed so no worries about that. However, I would strongly recommend to take EFS backup right now as your device shows IMEI in settings i.e you have a working efs now.
Click to expand...
Click to collapse
In addition to the good points made above, try to avoid flashing the Nougat stock ROM (not referring to the TWRP flashable) and use OTA updates if you were previously on stock Oreo. Besides the possible risk of hard bricking, many if not all the OTA updates we have erase modemst1/modemst2 (your EFS, I think) as part of their update script, then rebuild modemst1/st2 on the next boot. Thus, you may then lose IMEI as your baseband and other partitions become mismatched and then you may have to try the persist repair.

How do I upgrade to latest firmware after a downgrade (bootloader and GPT confusion)

TL;DR
About two years back I upgraded from Marshmallow to Nougat then downgraded back to Marshmallow but didn't flash GPT or bootloader partitions (full details at the bottom)
I want to upgrade to the latest official stock firmware which I believe is this: https://forum.xda-developers.com/moto-g4-plus/how-to/guide-moto-g4-g4-oreo-soak-test-update-t3871136
But I don't know where to begin.
If I backup my phone with TWRP can I restore back to it (Marhsmallow) if I decide I don't like Oreo?
Appreciate any help
History:
A while back I upgraded from Marshmallow to Nougat using this guide: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
I then Flashed the June (2017) OTA update files
Xposed framework wasn't available for Nougat at the time so I downgraded back to Marshmallow; I believe I used the file XT1642_ATHENE_6.0.1_MPJ24.139-48_cid50_subsidy-DEFAULT_CFC.xml.zip
I THINK I followed this downgrade guide: https://forum.xda-developers.com/moto-g4-plus/how-to/how-to-downgrade-nougat-to-marshmallow-t3487201
But I vaguely remember not flashing the GPT and bootloader partitions (based on the advice of the wonderful echo92 here: https://forum.xda-developers.com/showpost.php?p=73031946&postcount=8) but I can't say for sure
I have a few backups from TWRP (https://imgur.com/a/QzgQNbh) from that time with this file structure: https://i.imgur.com/B2cxQvL.png
I blurred out the 10-character 0KB file - it seems unique but I can't remember what it's for
If you're wanting to downgrade back to Marshmallow at some point in the future, I would recommend you flash the TWRP flashable of OPJ28.111-22 https://forum.xda-developers.com/moto-g4-plus/development/rom-oreo-8-1-0-soak-test-t3873367 This TWRP flashable should update your device mostly to Oreo, but not update your GPT/bootloader partitions (your GPT/bootloader would stay on the same version as you are now). Also, you should be able to roll back using your TWRP backup (though I do not know if you'll have issues with the Oreo modem on your Marshmallow device, so you might want to find the modem/fsg files too for Marshmallow)
We found out subsequently that downgrading firmware does not downgrade your GPT/bootloader (fastboot will complain of security downgrade errors otherwise). This poses a big problem when downgrading and using old OTA updates - old OTA updates corrupt your newer bootloader and hard brick your device. By not updating your GPT/bootloader further, you reduce the number of updates that can damage your device, but again, if you roll back to Marshmallow from your TWRP back up, make sure you do not use OTA updates at all.
you might want to find the modem/fsg files too for Marshmallow
Click to expand...
Click to collapse
Not entirely sure what this means or how I do that.
I have XT1642_ATHENE_6.0.1_MPJ24.139-48_cid50_subsidy-DEFAULT_CFC.xml.zip which contains NON-HLOS.bin and fsg.mbn which I believe are the modem/baseband firmware. I don't really know what to do with them though.
Since I can flash the firmware (zip) directly on the device (and the lack of a recovery.img in the zip) I assume that TWRP stays intact and remains the default recovery?
So, as I understand it, my steps are simply:
Flash TWRP-athene-8.1.0-OPJ28.111-22.zip in TWRP
Flash Magisk stable in TWRP
We found out subsequently that downgrading firmware does not downgrade your GPT/bootloader (fastboot will complain of security downgrade errors otherwise). This poses a big problem when downgrading and using old OTA updates - old OTA updates corrupt your newer bootloader and hard brick your device. By not updating your GPT/bootloader further, you reduce the number of updates that can damage your device, but again, if you roll back to Marshmallow from your TWRP back up, make sure you do not use OTA updates at all.
Click to expand...
Click to collapse
The first part lost me a bit. Are you just saying, "Do not use OTA updates."?
Oh, and thank you very much for the help
tekwarfare said:
Not entirely sure what this means or how I do that.
I have XT1642_ATHENE_6.0.1_MPJ24.139-48_cid50_subsidy-DEFAULT_CFC.xml.zip which contains NON-HLOS.bin and fsg.mbn which I believe are the modem/baseband firmware. I don't really know what to do with them though.
Since I can flash the firmware (zip) directly on the device (and the lack of a recovery.img in the zip) I assume that TWRP stays intact and remains the default recovery?
So, as I understand it, my steps are simply:
Flash TWRP-athene-8.1.0-OPJ28.111-22.zip in TWRP
Flash Magisk stable in TWRP
The first part lost me a bit. Are you just saying, "Do not use OTA updates."?
Oh, and thank you very much for the help
Click to expand...
Click to collapse
1) Pretty much - keep the non-HLOS.bin, and FSG images from your fastboot zip handy. The TWRP flashable of the Oreo firmware contains the modem updates, whilst your TWRP backup likely does not have the modem partition. Thus, if you do downgrade and you get signal issues (don't know of anyone who downgraded from Oreo to Marshmallow, you'd be one of the first) you might have to flash the non-HLOS.bin and FSG via fastboot to downgrade your modem back to Marshmallow. The fastboot commands would be:
Code:
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
Failing that, you could flash this 64 bit TWRP and back up your EFS from both your Marshmallow and Oreo firmwares: https://forum.xda-developers.com/mo...t/recovery-team-win-recovery-project-t3842903 Then if you do have signal issues, you could try to restore your EFS. Or check out this guide if you have IMEI issues: https://forum.xda-developers.com/moto-g4-plus/how-to/guide-moto-g4-plus-imei0-issue-t3859068
2)With the TWRP flashable - yes, your TWRP should stay intact and those steps sound good. Backup your existing installation beforehand.
3)If you downgrade your device stock Motorola firmware, do not use OTA updates. Else, you may hard brick your device.
Failing that, you could flash this 64 bit TWRP and back up your EFS from both your Marshmallow and Oreo firmwares: https://forum.xda-developers.com/mot...oject-t3842903
Click to expand...
Click to collapse
I've got TWRP 3.1.1-0, that looks like it has new features including the ability to do EFS backups now so I'm fine to overwrite my existing Recovery with the one you linked?
I see there's apps that can do EFS backups too. Why TWRP over them?
Thank you very much for your help with this
tekwarfare said:
I've got TWRP 3.1.1-0, that looks like it has new features including the ability to do EFS backups now so I'm fine to overwrite my existing Recovery with the one you linked?
I see there's apps that can do EFS backups too. Why TWRP over them?
Thank you very much for your help with this
Click to expand...
Click to collapse
Should be okay to overwrite your existing TWRP with the 64 bit version - you can either install in TWRP or flash TWRP via fastboot.
Alternatively, if you want to keep TWRP 3.1.1, then you can boot the 64 bit TWRP from fastboot (using the fastboot command 'fastboot boot <name of TWRP>', without quotes and where <name of TWRP> is the full file name of the 64 bit TWRP, without the arrows), then back up your EFS with the 64 bit TWRP. When you next reboot, you should still have your TWRP 3.1.1.
Not used those apps, so I can't comment, be up to you which approach to use. I've seen members use this TWRP for EFS backup without issue.
Do I need to wipe before flashing this?
Notes for myself in the future:
Updated my phones recovery partition to TWRP 3.2.3-0:
Installed MotorolaDeviceManager_2.5.4.exe
Copied recovery.img to the same directory as fastboot.exe and ran the line:
fastboot flash recovery recovery.img
I did a factory reset in TWRP
Downloaded and copied the zip across a few times but I'm just getting "zip signature verification failed".
tekwarfare said:
I did a factory reset in TWRP
Downloaded and copied the zip across a few times but I'm just getting "zip signature verification failed".
Click to expand...
Click to collapse
Hmm, which TWRP zip did you download? You could always go into TWRP settings and turn off signature verification.
Not sure if you needed to do a factory reset, though always useful when updating (hope you had a backup).
TWRP-athene-8.1.0-OPJ28.111-22.zip like you said. It's the one where AFH is crossed out but GDrive is up
Edit: I disabled zip signature verification (even though I didn't want to) and installed it. Setting things up so will see what works and what doesn't.
Thank you very much for the help
tekwarfare said:
TWRP-athene-8.1.0-OPJ28.111-22.zip like you said. It's the one where AFH is crossed out but GDrive is up
Click to expand...
Click to collapse
That's the right zip - I'd double check the download went okay, though under TWRP settings there should be an option to turn off zip verification. After that, the zip should flash okay.
Installing magisk via TWRP aslo failed the zip signature verification (just disabled the verification to install things from now on)
Managed to get a few things up and running like ViperFX.
Xposed is constantly causing bootloops (soft brick) and I can't seem to fix it. I managed to get EdXposed working with Sand Hook but it slows the system down noticeably; all I want is gravitybox.

No network signal despite EFS and persist backup. Only have the IMEI numbers.

I was using Bootleggers (8.1 Oreo ) ROM on my XT1686 and tried flashing Pixel experience (9.0 pie ).
Steps i went through:
1. Clean Wipe
2. Flashing Pixel Experience
3. Losing my network signals and IMEI
4. TWRP flashable 8.1 stock rom
5. Flashing the bootleggers 9.0pie update
6. Trying the erasemodemst 1/2 commands. NO result.
6. Restoring EFS and persist from the previous backup.
7. Ended up having IMEI back but still no network signals after multiple reboots.
I do know that flashing a STOCK ROM using fastboot and performing a clean reset will get my network back but will i have to stay back in the STOCK ROM ? Can nothing be done that allows me to keep using this amazing rom with a functioning network ?
TL;DR: NO NETWORK, IMEI AVAILABLE. EFS AND PERSIST BACKUPS ARE FLASHED ALREADY.
sjjatin9568 said:
I was using Bootleggers (8.1 Oreo ) ROM on my XT1686 and tried flashing Pixel experience (9.0 pie ).
Steps i went through:
1. Clean Wipe
2. Flashing Pixel Experience
3. Losing my network signals and IMEI
4. TWRP flashable 8.1 stock rom
5. Flashing the bootleggers 9.0pie update
6. Trying the erasemodemst 1/2 commands. NO result.
6. Restoring EFS and persist from the previous backup.
7. Ended up having IMEI back but still no network signals after multiple reboots.
I do know that flashing a STOCK ROM using fastboot and performing a clean reset will get my network back but will i have to stay back in the STOCK ROM ? Can nothing be done that allows me to keep using this amazing rom with a functioning network ?
TL;DR: NO NETWORK, IMEI AVAILABLE. EFS AND PERSIST BACKUPS ARE FLASHED ALREADY.
Click to expand...
Click to collapse
You didn't say from what ROM/firmware the persist.img backup was taken. If it wasn't from your original stock firmware that may be a problem. If it was from stock which version, 7.0 or 8.1?
If you flash a 8.1 signed fastboot firmware you should be able to change to every ROM you want to afterwards.
Sent from my Moto G5 Plus using XDA Labs
Wolfcity said:
You didn't say from what ROM/firmware the persist.img backup was taken. If it wasn't from your original stock firmware that may be a problem. If it was from stock which version, 7.0 or 8.1?
If you flash a 8.1 signed fastboot firmware you should be able to change to every ROM you want to afterwards.
Sent from my Moto G5 Plus using XDA Labs
Click to expand...
Click to collapse
I lost the IMEI and VoLTE when i switched from 7.0 (stock) to 8.1 (experience ) rom and then had to use the VoLTE fix to set it straight.
After i got everything working in my 8.1 pixel experience ROM , i made a backup of all the partitions. I used that backup here.
sjjatin9568 said:
I lost the IMEI and VoLTE when i switched from 7.0 (stock) to 8.1 (experience ) rom and then had to use the VoLTE fix to set it straight.
After i got everything working in my 8.1 pixel experience ROM , i made a backup of all the partitions. I used that backup here.
Click to expand...
Click to collapse
Most probably the problem was to switch from 7.0 stock to a custom ROM, you should have updated to stock 8.1 and make a backup of persist before doing that. The persist.img will be modified when flashing a custom ROM.
If you haven't flashed someone else's persist file the best way to go would be flashing a signed Motorola 8.1 firmware by fastboot, take a full nandroid incl. persist and go from there to a custom ROM.
Here's how to do it and links to all available firmwares:
https://forum.xda-developers.com/g5...solve-imei0-explanation-t3825147/post80478329
Sent from my Moto G5 Plus using XDA Labs
Wolfcity said:
Most probably the problem was to switch from 7.0 stock to a custom ROM, you should have updated to stock 8.1 and make a backup of persist before doing that. The persist.img will be modified when flashing a custom ROM.
If you haven't flashed someone else's persist file the best way to go would be flashing a signed Motorola 8.1 firmware by fastboot, take a full nandroid incl. persist and go from there to a custom ROM.
Here's how to do it and links to all available firmwares:
https://forum.xda-developers.com/g5...solve-imei0-explanation-t3825147/post80478329
Sent from my Moto G5 Plus using XDA Labs
Click to expand...
Click to collapse
Thanks alot @Wolfcity. Sorry i couldnt reply sooner. I flashed a twpr flashable 8.0 stock by @NZpred from the page here:
https://forum.xda-developers.com/g5-plus/how-to/moto-g5-plus-fastboot-flash-stock-oreo-t3848433
It brought back the signals. After that i backed up all the files and EFS and reflashed the custom rom and the EFS and persist.
Thanks alot for your help and timely response.

Categories

Resources