yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Questions & Answers] thedr34m13:
No problem. Happy to help. If there's a way to get a better backup, tell me and I'll try.
[Moto G5 Plus Questions & Answers] akshu2697:
sorry brother ,

i tried your backup,but this backup isn't working,

we need twrp persist backup as i have posted on the thread of volte.
[Moto G5 Plus Questions & Answers] thedr34m13:
Not sure how to backup persist in twrp. Couldn't find instructions anywhere. If you find instructions, tell me and I'll upload the backup.
[Moto G5 Plus Questions & Answers] akshu2697:
sure,i'll do
[Moto G5 Plus Questions & Answers] akshu2697:
DELETED
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
With a lot of research, I was able to dump the persist partition using adb. My dump will do no good, as I have only been able to get persist back by OP's method. We need someone to dump who has not flashed an oreo rom. Ok, that being said, here is how.

Make sure your phone is rooted.

Make sure usb debugging is enabled.

Boot phone into recovery.

Open adb with phone connected to pc.

adb devices

You should see your device listed.

adb shell

You should get ~# and something like a backward arrow [6N. That was mine yours may differ. If you have ~$ instead of ~# you are not rooted properly. If you used magisk you may have to add the sudo module.

ls -al /dev/block/platform/soc/7824900.sdhci/by-name

This will give you a list of all partitions. Look through them and find one described as persist. Mine was this:

lrwxrwxrwx 1 root root 21 Jan 1970 persist -> /dev/block/mmcblk0p30

We are interested in the address /dev/block/mmcblk0p30.

We need to type in

dd if=/yourMountingPoint of=/yourDestination/partitionType

where /yourMounting point is the persist address, if like mine /dev/block/mmcblk0p30. /your destination will be where you want to save it, and partition type should be persist.img.

My command was this

dd if=/dev/block/mmcblk0p30 of=/external_sd/persist.img

This will give us a proper persist .img file.
[Moto G5 Plus Questions & Answers] N1vBruno:
Here it is.

I clean flash stock rom (potter_NPNS25.137-93-4) before getting the persist file, was on crDroid 7.1 before. I don't know if volte is working because we don't have it on my country, but I never flashed Oreo before and never lost imei or 4g/lte, so it should be fine.

Hope it helps us and use at your own risk. :)

https://drive.google.com/drive/folders/1bqdxheka3jKG76AXdEExIdhG81D3agLM
[Moto G5 Plus Questions & Answers] akshu2697:
How to restore this file brother.?
[Moto G5 Plus Questions & Answers] akshu2697:
Thank you sooo much brother.

Thank you for your support.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Aren't you the OP of this? I thought you needed a way to dump the original partitions, and I provided the method with step by step to do so. I've never coded for android systems, but I'm very familiar with close cousin linux, so I suppose I could investigate and learn. However I would think whomever developed the G4 plus method could use the above dump for our phone. I guess I assumed it was you who discovered this method. I'll dig into it further when I get some time, but getting the clean persist dump was what was asked to do.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I was able to write the above persist.img file by:

1. transfer persist.img to my external_sd

2. booting into twrp

3. opening terminal

4. entering

dd if=/external_sd/persist.img of=/dev/block/mmcblk0p30

However, this placed my EMEI to 0, and I had to restore my saved efs with moto g4 + persist to get signal back. But remember, I had problem with efs every time I reboot, so my case may not be typical of those of you whose moto g4+ persist was working fine for. I would be curious if N1vBruno's persist was at the same address as mine, namely

/dev/block/mmcblk0p30
[Moto G5 Plus Questions & Answers] psychopac:
Guys who have restored their VoLTE, does your IMEI match the one that came with your phone or has it changed to something else?

I'm just being curious as I thought using someone else's persist backup would restore his IMEI to your phone, or was it efs?

Please correct me if I'm wrong.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
It is efs.
[Moto G5 Plus Questions & Answers] N1vBruno:
Yes,

persist -> /dev/block/mmcblk0p30

I hope not lol
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
In the original thread OP asked for persist, modem, and fsg. I'm wondering if you could pull those.

dd if=/dev/block/mmcblk0p19 of=/external_sd/modem.img

dd if=/dev/block/mmcblk0p27 of=/external_sd/modemst1.img

dd if=/dev/block/mmcblk0p28 of=/external_sd/modemst2.img

dd if=/dev/block/mmcblk0p29 of=/external_sd/fsg.img

However I hesitate to ask as I'm not sure where IMEI resides, and obviously we don't want to risk sharing that, but it is doubtful it is in those blocks, as they get flashed when flashing stock firmware.
[Moto G5 Plus Questions & Answers] akshu2697:
You are right,I have tried and,

They got flashed when we flash stock rom,so I think there is no point to restore backup,

Because eventually they again becomes same as they were before.

So may be we have to find another way .

If you will find way then tell us.

Anyway thank you for your efforts bro.
[Moto G5 Plus Questions & Answers] thedr34m13:
IMEI is stored in the EFS partition AFAIK, these partitions should be safe to share.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Thanks, I know IMEI is in the EFS partition, but that partition is made up of different blocks, and I'm not sure which block contains that info.
[Moto G5 Plus Questions & Answers] N1vBruno:
I uploaded fsg and modem -> https://drive.google.com/drive/folders/1bqdxheka3jKG76AXdEExIdhG81D3agLM

[MENTION=7907867]akshu2697[/MENTION] how did you get the moto g4 plus persist.ext4.win file?
[Moto G5 Plus Questions & Answers] akshu2697:
I was roaming around to XDA to get solution of volte,

And I saw a guide (I don't know what is the name ,I forgot to book mark that page),in which the persist file is already there,they didn't mention that it is useful for volte but I thought that let me try , so I tried and what I see is volte started to work...!!!

Seriously I don't have any idea how this work but luckily I got volte while doing this so I shared you this method.

I will upload whole file from which I extracted persist
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I figured out how to make N1vBrunos persist.img file into a proper ext4 file. Download and install Ext4Unpacker from https://androidfrog.com/67hytf. Load the persist.img file from N1vBruno into it and direct it to where you want the file saved. You will need to rename the file after it has been made it into a ext4 file to

persist.ext4.win

and put it into your saved efs folder as per akshu2697's original instructions. Tested by me and working on my phone, full VOLTE.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I wasn't sure the site would let me upload, but I did the work for you guys, and here is the file.
[Moto G5 Plus Questions & Answers] akshu2697:
OMG,...

YOU MADE IT BROTHER..

YOU ARE AWESOME.

THANK YOU THANK YOU THANK YOU SOOOO MUCH,

NOW WE NEED TO MAKE SURE THAT THIS FILE IS WORKING FOR ALL OTHERS OR IT'S JUST WORKING FOR US.

AGAIN THANK YOU SOOOO MUCH BROTHER.

I'LL DO SOME TESTING ON IT, BECAUSE THE BASEBAND NEEDS TO RESTORE AS IT BEFORE,

YOU PROBABLY KNOW THAT OUR BASEBAND IS CHANGED TO M8953XXXXa when we restore that first persist to get volte
[Moto G5 Plus Questions & Answers] Arunxyz:
i have already recovered my volte using ur persist backup of moto g4 plus ....

now i tried this moto g5 plus persist backup .....

i have tried it by placing it in my twrp backup folder and restored it and my baseband in bootloader was same as before M8953_37.46.07.47a POTTER_INDIADSDS_CUST but my aboutphone settings show baseband version as M8953_37.46.07.47e
[Moto G5 Plus Questions & Answers] bra1niac:
awesome.

I flashed a stock ROM through TWRP and restored your G5 persist along with my EFS backup before booting for the first time. I had LTE on the first boot, but lost it on a reboot the same way I did using the G4+ persist. Did you find a way to resolve this?
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I hadn't rebooted until I saw this, and when I did a pop-up came that it was trying to make network connection, could take up to 5 minutes. I let it sit and after a couple minutes, it connected. Tried again and it failed. There is still baseband problems, according to my research we need to rebuild efs completely. There are ways to do so, while keeping your own EMEI, or even manually writing your own EMEI. MTK Droid Tool, and MTK Extractor programs do this, but most of the write ups are for Samsungs. It seems they have a real problem with corrupt EFS files. My phone was hardbricked and brought back by me, so that could be a reason I have problems keeping EFS partition from corrupting.
[Moto G5 Plus Questions & Answers] bra1niac:
Very interesting. If I reboot to recovery and restore my EFS+the G5+ persist backup again, I regain LTE, which I believe also happened with the G4+ persist. This is still on the stock ROM flashed from recovery (137-92-4 FWIW). I am uncertain what happens if I proceed to flash a custom ROM from this point. I've been using AICP 13.1 previously for potter. I'll try that again at some point.

The need to restore each time I reboot isn't the end of the world, and if I get to that point while having a custom ROM w/root I'd be relatively satisfied. This isn't my daily driver so some quirks are acceptable.

I started skimming pages on the MTK tools and noted that there are some Qualcomm tools as well for writing IMEI and serial number. This seems like dangerous territory to explore without a better understanding though.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I had downloaded and tried the Qualcomm tools, but if I remember correctly, there is a driver package needed with it, and when I tried to install them, the installer gave errors. This is on a Windoze 7 installation. I moved on because the other MTK programs installed correctly.

I agree, this could be dangerous ground, but I don't think it is that bad for someone used to working in android systems. I have an old Galaxy S4 that i was able to pull the efs partition and found the IMEI and converted it to 0's in hexeditor, then wrote to the phone, and of course IMEI was 0. Then I changed it back, and using IMEI convertor was able to put it back in the correct address and reflash getting service back. The documentation for the Galaxys is extensive, so I had an easy time finding the right address of the IMEI number. I am not an android dev yet I have been able to follow along on this project, so I would think I dev if he/she were so inclined could straighten this out rather easily.
[Moto G5 Plus Questions & Answers] bra1niac:
So, I took the phone running the stock ROM flashed from TWRP, with EFS+persist restored and having LTE connected and rebooted and flashed AICP 13.1, opengapps, and Magisk (all latest versions) then restored EFS+persist and booted into the system for the first time. On boot, the phone only connected at 3G. I rebooted to recovery, restored EFS only and booted into the system, and again only had 3G. I rebooted to recovery, restored EFS+partition, and booted and still had only 3G.

I noticed after booting the first time with the custom ROM, that my IMEI did not match the IMEI I had when I was connected with LTE on the stock ROM. The IMEI stayed the same through flashing EFS, rebooting, flashing EFS+persistent and rebooting again. The IMEI is not 0.

So, aside from the issues with accidentally flashing an IMEI that isn't mine, is the reason I'm only connecting at 3G because the IMEI is wrong? If I use the MTK or Qualcomm tools to write the correct IMEI (the one I have when on stock and after restoring EFS+persist), might that restore LTE?

The other question is how did I end up with an incorrect IMEI? I thought that the IMEI was stored in the EFS backup, and I've only ever used the one I took of my own phone prior to this whole mess. Does the persist partition within EFS actually contain the IMEI, meaning anyone who flashes these persist partitions that were uploaded are going to end up with the same IMEI?
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
EMEI isn't in persist. You have a corrupt efs, not someone elses. If you remember the OP of this method to get volte back, said that method was only good for stock roms. To flash an Oreo rom, you need to take an efs backup of your stock with the efs and persist together. At least that is the way I read it. Maybe the OP will chime in and verify. I'll try an Oreo rom if I can find one that doesn't drive me nuts with the little bugs they all seem to have.
[Moto G5 Plus Questions & Answers] akshu2697:
Hey brother,

Can you take backup of persist partition in this twrp,

This twrp is made by DEVELOPER in motog5plus announcement telegram group.

https://potterroms.ddns.net/TWRP/twrp-3.2.1-1-potter_persist.img

You have to just flash this twrp ,go in to backup and select twrp backup.

And can you please share this,

Thank you very much.

??
[Moto G5 Plus Questions & Answers] bra1niac:
ok, I've tried a few different things but have been unable to get an 8.1 ROM to come up with LTE.

I've flashed stock ROM, restored EFS+persist, booted into it, powered off and taken an EFS backup, flashed custom ROM, gapps, magisk and restored EFS.

I've flashed stock ROM, restored EFS+persist, taken EFS backup, flashed custom ROM, gapps, magisk, and restored EFS.

Is there a specific order I'm missing here?
[Moto G5 Plus Questions & Answers] Arunxyz:
I flashed the twrp and it shows persist folder 0mb
[Moto G5 Plus Questions & Answers] akshu2697:
Because this persist file is in kB so it won't show that.

This file is less than 1 mb.

So do not worry ??
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I don't think persist repair alone is going to do it for our phones. We need to fix EFS which will fix baseband. I finally got QPST drivers and program to install on my PC. Next obstacle is to get it recognized as qualcom snapdragon 625 device, which so far no joy. I don't think there will be a plug and play fix, but once we can identify exactly where IMEI is stored, and how to edit it, someone can make a good backup and share it with IMEI zeroed out, then individuals can use it editing their proper IMEI and restore the phones to what they should be. However, even this can be undone if Oreo rom is flashed again, until rom devs address this problem for our specific devices. Samsung devices have gone through this for years.
[Moto G5 Plus Questions & Answers] akshu2697:
I have find a guide from mi,

May be this guide can able to help you

http://en.miui.com/thread-299779-1-1.html
[Moto G5 Plus Questions & Answers] bra1niac:
Very interesting. I'll keep an eye out here and if I find anything else I'll update the thread.
[Moto G5 Plus Questions & Answers] N1vBruno:
Here (I'm not in stock right now, I am back with crdroid 3.8.6 nougat. I don't know if there is any problem).
[Moto G5 Plus Questions & Answers] akshu2697:
Thank you so much BROTHER.

????
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Yes, thank-you, I have read that, but not really applicable to our phone, plus my IMEI is ok. I have figured out how to get QPST to recognize my phone, and can now use it's many utilities. For any following along and wanting to try it, proceed at your own risk, as there are no how-to's for moto g5 +, but since the moto z play is very close, I was able to work around this. To get your phone recognized in QPST you need to boot into Qcomm, with phone plugged in to PC, then go to device manager on your PC. You will see Motog5+ listed under devices, several times. Right click on the first one, and then click install drivers. Manually point it to where your motorola usb drivers are stored, [obviously you have to have them already installed] and click on install. Then you can open QPST and your phone should show up under ports, and phones. How-to's for using QPST are findable all over the net, so proceed at your own risk from here. Reading utilities within QPST are safe, but be careful of any writing as you can brick your phone very easily. I suggest a google search of phones with same qualcomm chipset as ours, and only use those guides. Examples are the motoz play, Asus Zenfone3, Huawei Nova Plus, etc. There are some differences, but many things you will be able to use from the devs of those phones.
[Moto G5 Plus Questions & Answers] smartish123:
So I just want clarify some stuff. Does the g5 plus persist backup work? Is it considered an official fix? If not why?
[Moto G5 Plus Questions & Answers] Mrkblo:
It cant be considered an official fix, as people are reporting that they're getting no signal or no volte after rebooting their phone. This behaviour has been reported by people using both the Moto G4 Plus and Moto G5 plus persist backups. Still, if you have enough knowledge to carry the partition backup on your phone at all times, it can be used to keep your phone fully functional.

You can also try the latest backup provided by a brazilian user a couple posts earlier, and see if it does the trick for you.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
After looking through the dumped files with QPST, Ext4_unpacker, and hex editor, I think those of us who are having problems with the generously donated persist file, may be having those problems because it is a different device. My device is a XT1687, and donors files identify coming from XT1681, if I have learned this stuff correctly. My thoughts are that our losing our efs is these 2 devices are closely related, but different, as we know there are different firmwares for both. I'm putting out a call for a generous individual to make a copy of a XT1687 persist back-up and share it with us. Our well meaning focus has been on the means of extracting the file instead of it being different firmware. This still will not fix baseband, but I am still looking into that problem.
[Moto G5 Plus Questions & Answers] akshu2697:
You don't have to do this all,

You have to just install Qualcomm drivers,

Enable usb debugging from developer option in mobile,

Boot in to bootloader,

Now press volume down button and select A

QCOM,AND PRESS POWER BUTTON,

Now your phone will start and connect it with pc,and in pc you will able to show QCOM port.
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Nope, it didn't recognize it until I pointed the moto drivers to it in device manager, at least with my PC and windows 7. Of course I have a few programs with proprietary drivers installed, so there may have been conflicts going on.
[Moto G5 Plus Questions & Answers] akshu2697:
I have found solution for may be same problem,

But if we want to follow this we need someone's qcn file.

https://www.androidbrick.com/ultimate-guide-qualcomm-snapdragon-imei-baseband-repair-fix-part-2/
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Yes, I have been through that article. Be careful, as that guide is not the qualcomm snapdragon 625. Many of those commands do not work, and the /dev/block addresses are incorrect.

I would be happy to get a persist backup for my XT 1687 and see if that addresses my losing efs on reboot.
[Moto G5 Plus Questions & Answers] cubermax:
In my situation completely gone into 0 please help me restore imei
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Instead of hijacking this discussion did you even read 4 threads down https://xdaforums.com/g5-plus/help/restore-imei-0-moto-g5-xt1687-t3739808???
[Moto G5 Plus Questions & Answers] cubermax:
I've already tried many ways to repair IMEI, including erasing the modem and recovering Persist from this branch, helped restore the mobile connection only IMEI 0 and works only on Pixel rom
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
Adding the persist file has nothing to do with restoring EMEI, that is done by saving and restoring your EFS partition. Adding the persist file to the EFS is for those who lost 4g/Lte and Volte, and as per OP's initial instructions, is to be done only in stock roms.
[Moto G5 Plus Questions & Answers] cubermax:
Then please tell me how can I return my IMEI
[Moto G5 Plus Questions & Answers] akshu2697:
Guys I may have found solution for all kinds of problem after downgrading,

According to this forum I need Moto g5 plus unbricked HW PARTITION BACKUP from partition backup and restore application,or any other method.

Please can you help me with this.

https://xdaforums.com/moto-g4-plus/help/moto-g4-pluss-model-changed-to-g4-lost-t3496912/page10
[Moto G5 Plus Questions & Answers] gumpysitruc@gmail.com:
I have figured out how to take a backup qcn of a bootloader locked, never touched phone, and change IMEI, and write it to a rooted phone. We are testing and if all goes well, I'll share how to. However, it is still necessary to get someone who is willing to share the backup. I have shared the how-to with someone with a back-up phone, and it is up to the individual to share his back-up. I am looking at buying a used phone that is untouched with a broken screen for cheap, and if it goes through I can share it with the IMEI blacked out. I caution, this method is not for everyone. It is not just loading a partition file and flashing it. You have to convert IMEI to hex, search through and edit the qcn file, and write it to your phone. I will report on success or failure in a few days.
[Moto G5 Plus Questions & Answers] akshu2697:
Thank you so much brother for your help,

I am also finding the device for qcn backup,

And I know how to change IMEI in hex editor.

So if you need any help then pm me.
[Moto G5 Plus Questions & Answers] smartish123:
Ok guys here is something interesting. I flashed the g5 persist backup and ended up getting no signal with imei 0. I then restoreed my old efs backup and restored the g4 persist and got my signal back. HOWEVER, my imei in stock nougat still remained 0. I'm not sure what this means but can any of you guys explain what's going on?
[Moto G5 Plus Questions & Answers] Rahulgaur212:
Process to install Persist.img

Hi guys,

I would request you to please share me the process to install persist.img file in Moto G5 Plus
[Moto G5 Plus Questions & Answers] dhinesh_cool:
i can give persist. pm me
[Moto G5 Plus Questions & Answers] Harshil1999:
How did you change imei???

i am on aexrom flashed many roms but no imei no signal nothing cant go to stock

pls help me out...
[Moto G5 Plus Questions & Answers] nvntKriz:
Persist backup not working

Brother, This persist backup is finely in my stock Rom.

But it isnt working in Resurrection Remix Nougat ROM... It gives no errors or anything while restoring. But volte is not enabled still...

Please help.......
[Moto G5 Plus Questions & Answers] nvntKriz:
could you upload the file once again....

The file is not available...
[Moto G5 Plus Questions & Answers] NZedPred:
Just as a PSA (public service announcement), please do not flash anyone else's persist, as you will cause other problems for your phone. The thread I created below, explains what the original issue was and how to solve it, but you need your own persist.

https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147

If the post above at #61 was able to deliver, then that may be a solution for many of you. However, until they actually reply to confirm success...
[Moto G5 Plus Questions & Answers] M1810:
If i upgrade from 8.1 to a 9.0 ROM and i saved both efs and persist from 8.1 pixel experience, will i be able to get my signal back even if it's not stock ROM in case i lose it? i lost my stock efs/perdist backups while playing with treble but i was lucky and still got a working IMEI and 4G+ so i made a backup to an SD card
[Moto G5 Plus Questions & Answers] Cupcake 1.5:
Not to rush you, but it's been a few months...any news?
[Moto G5 Plus Questions & Answers] thedr34m13:
If you haven't flashed anyone elses persist, you can follow @NZPred's guide on the guides page to get your IMEI back on stock.