yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] david.gs.gm:
Hello ... I'm using persist from another device ... inside it I do not have .Bin files ... but I'm using Oreo twrp with firmware soak test 1 ... with VoLTE ... 4g ... everything normal. .. and all this restoring only my EFS ... is this normal?
[Moto G5 Plus Guides, News, & Discussion] Dave-C:
Hello, i'm using a Moto G6+, and I think I could find help here too.

My Problem is after a Switch from Custom ROM back to Stock, my Wireless (Mobile Network) is not working anymore.

WIFI and anything else works, my EMEI is still visible, but it says Sim Card is locked and no Service Provider found, while my Sim Card is inserted.

After working through this thread and following the steps in Post No.1, I may found my Issue.

Executing the "ls -l /persist" command I get the following output:

-rw-r--r-- 1 9004 9004 8 2018-04-08 05:16 captouch_basedata.bin

Everything else seems normal.

I'm not an expert in this but I guess, the permissions are wrong here.

In post 1 there are examples for fixing the rfs/hlos_rfs.

Can someone tell me the right Commands for fixing my captouch_basedata.bin?

Thanx in advance
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
It's very unlikely that anything in this thread will help you sorry. If there is an issue with your persist (and that's an assumption at this point), you would need someone with the same model to be able to tell you what changes need to be made to get things back to normal. Best to ask in a forum for G6+.
[Moto G5 Plus Guides, News, & Discussion] Dave-C:
Like I said, i'm not an expert, but doesn't my case look similar, like the quoted above?

Maybe it's worth a try, since anything else works except my baseband...
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
The G6+ shipped with Oreo. The issue for the G5 series was when downgrading from Oreo to Nougat, Nougat wouldn't reset the permissions. The permissions issues were not a problem with Oreo, as Oreo set them correctly on every boot.

Even if the issue is similar for your device, we still don't know what the correct user/permissions are. Someone with a G6+ would need to provide that info.
[Moto G5 Plus Guides, News, & Discussion] Dave-C:
My girlfriend has the same Phone.

Maybe I can get the needed information out of it...
[Moto G5 Plus Guides, News, & Discussion] ST Dog:
I'm going to go out on a limb and say that file is probably not related to you issue.

I'm guessing it's related to the capacitive sense touchscreen.

And FWIW the group/user matches the same file on my E4+ (nougat).

View attachment 4821061
[Moto G5 Plus Guides, News, & Discussion] Dave-C:
Thank you both for your input, you were most likely both right, I took a look at my sisters phone and right, the baseband file looks the same.

I made a backup of the modemst1.img, modemst2.img, and persist.img file months ago , while everything was working, would restoring them be worth another try?

If so, whats the best way of restoring them?
[Moto G5 Plus Guides, News, & Discussion] ST Dog:
What baseband file? The file you mentioned says basedata not baseband.

Probably wouldn't hurt.

But as already mentioned, you should ask people more familiar with the device in the correct forum not this thread about an older device.
[Moto G5 Plus Guides, News, & Discussion] Abhi@titan:
Moving back to stock oreo

Hi all, need some help. Not very proficient with the whole IMEI issue.

my situation:

1. Was on stock nougat, updated to stock oreo via OTA

2. Flashed pixel experience 8.1 rom, running fine but later came to know of the IMEI issue.

3. I do not have back up of stock state, only a nandroid back up of after pixel exp 8.1

4. Currently both IMEI are present. Have backed up the current efs and persist using twrp also.

Now if I want to go back to

stock

oreo via twrp flashable roms, what should be my steps to avoid the missing IMEI issue.

I read through the thread and seem to be at risk of losing it, but do not understand the way to prevent it.

The way I understand is:

Go back to stock nougat, then flash stock oreo then flash pie roms (optional)

please guide me

device details:: Moto g5 plus RETIN XT1686
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
As far as I know that problem you shouldn't go back to Nougat because the whole IMEI disaster is related to 7.0. You were on 8.1 before you flashed a custom ROM so most probably there won't be any issues with losing IMEI.

So two paths to go:

- Flash a signed Motorola firmware by fastboot which should be the safest method.

- Flash a TWRP flashable.

In the second case I would ask [MENTION=7346927]NZedPred[/MENTION] (OP of this thread and developer of the TWRP flashables) first, I haven't used one so better get a second opinion to be on the safe side.

There shouldn't be a problem to change to a pie ROM without reverting to stock before if that's what you want to do. Clean flash highly recommend!

For future actions: Never flash anything relevant without making a nandroid backup.
[Moto G5 Plus Guides, News, & Discussion] Abhi@titan:
Which firmware should I download? I am from INDIA.

Can you point me to any guide for flashing official factory images via fastboot? I am familiar with twrp methods
[Moto G5 Plus Guides, News, & Discussion] Abhi@titan:
Thank you so much for the step by step guide. One small doubt, this firmware is for XT1685, and my device is XT1686. So is there any chance of incompatibility?

---------- Post added at 05:41 PM ---------- Previous post was at 05:06 PM ----------

Thank you so much for the step by step guide. One small doubt, this firmware is for XT1685, and my device is XT1686. So is there any chance of incompatibility?

Edit: "fastboot devices" shows nothing. Did all the steps prior to that. Did multiple times with same outcome. Any reason why the device is not being detected?

---------- Post added at 05:43 PM ---------- Previous post was at 05:41 PM ----------

Thank you so much for the step by step guide. One small doubt, this firmware is for XT1685, and my device is XT1686. So is there any chance of incompatibility?

Edit: "fastboot devices" shows nothing. Did all the steps prior to that. Did multiple times with same outcome. Any reason why the device is not being detected?
[Moto G5 Plus Guides, News, & Discussion] ST Dog:
Either drivers not installed or phone not in bootloader.

If you're sure you have those, maybe try different USB port and/or different cable.

As for model mismatch, get the files for your device. But the process is the same.

https://mirrors.lolinet.com/firmware/moto/potter/official/RETIN/
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
The firmwares aren't really incompatible, if you flash one for another region (XT1686 for India in your case) you wouldn't receive any future OTA updates, but it will work normally. As I wrote this is the last firmware from Motorola, no future OTA will be released so it doesn't matter if your device would receive any. But [MENTION=5320537]ST Dog[/MENTION] posted the indian variant of the firmware which is perfectly fitting, so you can use that one.

He's also right, if your device is in bootloader mode (you should see the lying android) the "fastboot devices" command should work.

Did the drivers and the linked ADB+Fastboot tools install successfully? There are some different ones if not.

Which Windows version are you running?

Change cable/port as written above.
[Moto G5 Plus Guides, News, & Discussion] Abhi@titan:
Oddly, changing the USB cable worked. In the about phone section it is showing XT1686 and retin with the firmware you provided !

Everything is working. I have 4G, but no volte. Is any additional step required? The radio signal strength in 4G also is very weak. But calling is working fine.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
As volte is not supported by my provider I never used it. Which firmware did you use in the end?

I attached the Indian variant to my post, if you used the other one you could give that one a try.
[Moto G5 Plus Guides, News, & Discussion] ST Dog:
Not showing the option to turn on in the settings menu?

Check phone info in the hidden menu (dial *#*#INFO#*#* ). Is the VoLTE provisioned switch on?

Does your carrIer require VoLTE? Was it working in the past?
[Moto G5 Plus Guides, News, & Discussion] Abhi@titan:
Yes, it was working in the past and also on the PE 8.1 custom rom. No, there is no option for volte in settings.

I used the RETEU version. Will try again with the other firmware and see if that works.

Also, if I want to lock bootloader, what would be the commands?

Edit: please have a look at the attached screenshot. Cannot enable the volte option.

Edit2: seem to lost turbocharging also. While charging, it is showing charging slowly (and it really is slow)
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Flash the Indian firmware (linked in my post and in the one of [MENTION=5320537]ST Dog[/MENTION]. That should fix your issues.

About locking the bootloader: I can guide you when I'm at home (working right now but why do you want to that? The device will always show that it has been unlocked, imho there isn't any advantage in doing it.

What's the reason?
[Moto G5 Plus Guides, News, & Discussion] juampapo546:
Hello, i am having a similar problem on my Moto g6 plus, can anyone help me?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Different device, sorry, even just guessing would be

untrustworthy. Ask in the forum for G6+.
[Moto G5 Plus Guides, News, & Discussion] juampapo546:
Tried but no one answers :crying:
[Moto G5 Plus Guides, News, & Discussion] cheeserabbit:
Help!

Sir,

I flashed TWRP Stock Oreo (https://xdaforums.com/g5-plus/development/oreo-twrp-flashable-stock-builds-coming-t3830482), and found my IMEI to be 0.

I made the backup of my persist, efs immediately. I did NOT flash any other persist

I followed this thread strictly.

I even used TWRP persist fix given in this thread, but no luck.

Here are the outputs of commands given in this thread:

# ls -l /persist

# find /persist -type f

# chown -R rfs:rfs /persist/rfs

# chown -R rfs:rfs_shared /persist/hlos_rfs

# ls -l /persist

Any help would be appreciated, as this phone is my only device.

---------- Post added at 10:44 PM ---------- Previous post was at 09:55 PM ----------

I recently flashed Pixel Experience Pie https://xdaforums.com/g5-plus/development/rom-pixel-experience-t3880088 and got my IMEI back!

But Only Sim2 is working, Sim1 (VOLTE/4G) is not getting any signals.

Please see the attached screenshot :

[IMG="After dialing *#06#"]https://i.imgur.com/XV8YWlzh.jpg[/IMG]

I think this issue with my device can be fixed, can you assist me,or guide me to fix it?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
When you flash the zip from the stock Oreo thread below, a backup of the efs and persist is made at the time. Hopefully they are fully functioning. First thing is to get them, and make a copy in the cloud so you don't lose them. They are stored in /sdcard.

Have a look at the second post of the thread on how to restore them.
[Moto G5 Plus Guides, News, & Discussion] cheeserabbit:
I think you are referring to the .img files present in my /sdcard - Please see the screenshot below.

I made the backup of those IMG Files too!

How do I restore persist.img file using TWRP??

[IMG="The .img files?"]https://i.imgur.com/eOlxnCvh.png[/IMG]

Thanks for your help.

---------- Post added at 11:43 PM ---------- Previous post was at 11:09 PM ----------

I found the way to restore the backup from .img files, it was on that TWRP Stock Oreo site https://xdaforums.com/g5-plus/development/oreo-twrp-flashable-stock-builds-coming-t3830482.

I am moving back to TWRP Stock Oreo, and then I'll be restoring those backups, and report back here.

---------- Post added 22nd November 2019 at 12:35 AM ---------- Previous post was 21st November 2019 at 11:43 PM ----------

After booting into stock TWRP ROM,I restored backup of those three .img files using ADB shell. after then Stock ROM won't even detect sim cards, and shows Unknown Baseband. (Please see the attached screenshot)

I cannot even take screenshots in TWRP Stock because it was saying "Low Storage Available", even when I have

16GB Internal Memory and 32GB SDCard.

[IMG="Unknown Baseband in stock ROM!"]https://i.imgur.com/dsNNLUol.jpg[/IMG]

Then I flashed Pixel Experience Pie again, but it's going straight into bootloop.

I think those files may have messed my phone.

Please help!

---------- Post added at 01:07 AM ---------- Previous post was at 12:35 AM ----------

Fixed It!

I was using Adoptable Storage, where /sdcard is in my external SDCard.

After restoring those files, and then flashing Pixel Experience Pie ROM, facing multiple bootloops,

I rebooted back to TWRP, wiped everything that could be wiped,

copied the backup into /sdcard,

Entered Only ONE command of three commands given to restore those image files in TWRP Terminal.

Got error stating that location does not exist,

Lost hope completely, then I flashed TWRP Stock Oreo Again,Thinking to remove Adoptable Storage.

But luckily after booting, phone got network and IMEI back!

Thanks a lot to you sir, you saved my only phone from becoming a brick.
[Moto G5 Plus Guides, News, & Discussion] C4mine:
Bro I've flashed someone else efs and I'm getting imei 0 error l, anyway to fix it ?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
If it's not the persist file you flashed you should be able to flash stock firmware, that should restore the EFS files and the IMEI. Persist is where the IMEI is stored.
[Moto G5 Plus Guides, News, & Discussion] arodeodream:
Which version of STOCK rom are you on?

checked for the last installed ROM earlier which is NPS26.116-61 but presently its on OPS28.65-36

- Are you rooted, and running the commands under root privileges?

yes, and yess

- Have you ever flashed someone else's, or another device's persist?

don't know for sure but probably not.. I was a PE custom rom user..

THIS IS HOW I GOT STOCK ROM WORKING

1) PE CUST ROM[WORKING BUT NO VOLTE] -

2) CLEAN FLASHED base NOUGAT STOCK -

3) INSTALLED ALL OTAs - GOT IMEI IN OREA OTA(LTE was back) -

4) GOT VOLTE IN THE NEXT UPDATE

- What functionality are you missing and trying to restore (e.g. IMEI=0, VolTE, etc)?

everything IMEI, VOLTE , PERSIST

I took backup of working EFS in STOCK OREO in which VOLTE was working and tried in custom ROM after but being not able to restore I repeated the steps (1-4)

now neither the steps are working nor am I able to restore efs into stock ROMS

- Do you get any error messages when trying to execute the commands?

chown -R rfs:rfs /persist/rfs
chown -R rfs:rfs_shared /persist/hlos_rfs
ls -l /persist

gives error bad user rfs

please help!
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
When I look at your build numbers I'm pretty sure that you don't own a Moto G5+ (potter) but an Moto G5S+ (sanders).
[Moto G5 Plus Guides, News, & Discussion] arodeodream:
It is indeed.. all I need is to look for way to restore persist .. because now my phone has turned to a real waste..

tried stock ROMS ,tried CUSTOM everything.

Is there anything I could use for help?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Have you tried the latest signed fastboot firmware by Motorola for your device?

https://mirrors.lolinet.com/firmware/moto/sanders/official/

If you don't get it back to work with that you're most probably screwed. If you don't have a working persist backup there is no way to restore it.
[Moto G5 Plus Guides, News, & Discussion] althafvly:
I got it fixed by flashing omni 9.0 . I tried arrow,lineage16.0 but it didn't help. maybe it will help in your condition too. Try
[Moto G5 Plus Guides, News, & Discussion] Tyakrish:
[MENTION=7346927]NZedPred[/MENTION]

I see that you do know a lot about the persist partition.

I don't have this device, but a different device i.e. Asus Zenfone Max Pro M2.

After some Android 10 ROMs came up for my device, I tested them and returned back to Pie ROMs. But faced persist issues.

Unfortunately, I restored some one else's persist that time to fix my problems.

According to you, persist contains the imei and if my original persist is lost, then my imei is gone forever, unless I have my efs partition/s intact. So I will have to keep a safe backup of efs.

My question is that, I have a fastboot ROM for my device model which is supposed to work on multiple devices. Upon extracting the ROM, I find a persist.img file in that ROM. But if persist is unique to every device, then how can the same persist.img work for different devices of the same model ?

So not every device stores its imei in persist then ? Do you think that it depends on the device manufacturer, where they decide to store the imei and it may be a different location for my device ?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
What I have posted is just applicable to the Motorola Moto G5 series of devices. I can't comment about any other device.

When it comes to the persist partition, for the said G5 series of devices, some special files dhob.bin and a few others have been put into the persist partition, and it is those files that contain information on your IMEI. But again, that is how the G5 series works, not necessarily any other device.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
All I can suggest is that you try upgrading to the Oreo stock rom. TWRP flashable ones are fine.
[Moto G5 Plus Guides, News, & Discussion] FiddlePop:
it shows drwx--x--x against rfs instead of drwx------

is that related to issue?
[Moto G5 Plus Guides, News, & Discussion] 5P4RT0N:
C:\Minimal ADB and Fastboot>adb shell
sanders_n:/ $ su
sanders_n:/ # ls -l /dev/block/bootdevice/by-name/modemst*
lrwxrwxrwx 1 root root 21 1970-02-19 16:13 /dev/block/bootdevice/by-name/modemst1 -> /dev/block/mmcblk0p27
lrwxrwxrwx 1 root root 21 1970-02-19 16:13 /dev/block/bootdevice/by-name/modemst2 -> /dev/block/mmcblk0p28
[Moto G5 Plus Guides, News, & Discussion] fivefour:
If official TWRP had the option to backup persist a lot of us wouldn't be in this predicament, ah well about time for a new device anyway I suppose.
[Moto G5 Plus Guides, News, & Discussion] 5P4RT0N:
what if i restored someone else persist ??

and try this steps then my imei change to their imei??
[Moto G5 Plus Guides, News, & Discussion] Jrhotrod:
I am going to say right now that I am speechless.

I thought that there was ultimately no hope for getting this issue solved, and that the efforts of [MENTION=4736004]rachitrawat[/MENTION] were in vain. I thought that I was going to have a dud device that could never be restored to stock and resold. But along comes [MENTION=7346927]NZedPred[/MENTION], who in the past months has earned my utmost respect through being helpful, friendly, and having a very impressive amount of knowledge! I never thought that I would just hop onto XDA one day and see this issue that has plagued so many devices SOLVED! It completely and totally worked for me!

I am so grateful to both Rachit and NZedPred for figuring this issue out... along with the people who helped them by providing information from their own devices! The potter community is ecstatic for this new development and now I can finally go back to stock if I ever want to.

Thanks again!
[Moto G5 Plus Guides, News, & Discussion] Sinister Drake:
I'm experiencing this as well. I had imei 0. I followed some instructions involving installing an Oreo ROM and fastboot commands. I also restored a persist backup from same instructions. I have since saved a backup of both efs and persist folder. Would I ever need to do this on my device? It also makes me wonder if there is a connection between persist not being original to the device and volte not working with custom kernels.

Edit: Also worth noting that when I install a stock ROM I can restore those partitions and still have my imei with volte.
[Moto G5 Plus Guides, News, & Discussion] Dhan...:
me too...bro

wait for oreo...
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
OK, so your device is sanders, Moto G5

S

Plus, not G5 Plus. This guide may work on your device, but there are differences between devices so is not guaranteed to work. Regardless of device, DO NOT RESTORE SOMEONE ELSE'S PERSIST!

Aside from the fix, if you are having problems backing up your EFS, either you have an issue with TWRP, or one of your partitions is probably corrupt. As one of the IMEI came back, but not the other, it may be that you have to wipe one the partition that is causing the problem, and see if it gets recreated. I suggest you go and ask for help in the forums for your device.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
[MENTION=7896819]Jrhotrod[/MENTION], you have made my day with this message. Quite often we developers (well, I don't consider myself a developer, just someone who is good with technology, and good at working through problems, I digress...) toil away and all we get is an incremental count on the thanks meter. The amount of time we then spend trying to help those that we couldn't actually help, outweighs the recognition that we get from those that we could. Thank you for your kind words!
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Hi, but sorry, what I've highlighted above is the problem. If you don't have a backup of your own persist, then for now we can't do anything.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
You mention custom kernels above. Can you point me in the direction of one that gave problems with volte? I'm unsure if it's the kernel or the rom that determines the users and their IDs (this is in reference to the ownership of the /persist/rfs folder). But if I could try a kernel that fails with Volte, I may be able to work out why. (Only issue is Volte is not available in my country, so I can't actually test it.)
[Moto G5 Plus Guides, News, & Discussion] preethamkmr3:
Thanks for your effort but please find a way to fix it on devices with others persists.
[Moto G5 Plus Guides, News, & Discussion] Sinister Drake:
Sure, here's the XDA thread.

https://xdaforums.com/g5-plus/development/potter-acekernel-v1-10-t3801466
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
I think the OP explained it really understandable, as the persist file is unique there isn´t a way to restore something that is lost forever.
[Moto G5 Plus Guides, News, & Discussion] somnath911:
save us please!!!

my baseband version- M8937_22.29.02.66q CEDRIC_INDIADSDS_CUST

-> previously i flashed pixel experience which caused imei problem.

->following some of the guides in xda i was able to solve it, but no 4g (only 2g and 3g)

->following anouther tutorial i flashed my device with another g4 plus persist backup

result-> got back my volte and imei was working fine.

-> flashed the ota oreo soak test update it erased my modemst1,2

->lost imei (imei 0)

->i didn't thought that restoring someone else's backup will be so devastating.

->now i don't have any efs or persist backup.

please help.... hope you bring a fix of my problem.

a lot of people are in this situation as they followed that thread.

thanks in advance. hope you bring a fix soon.
[Moto G5 Plus Guides, News, & Discussion] 5P4RT0N:
how to wipe partition can you give me the commands ??
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
As it is your EFS2 that was giving the problem, reboot into fastboot mode, from a PC, type in this command:

fastboot erase modemst2

From there reboot and see if your second IMEI returns, otherwise you can hopefully restore your EFS backup.

Good luck.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Thanks. Just so I'm clear, is this kernel for Nougat or Oreo? And Volte fails to work with this kernel installed, but works fine with the rom's default kernel?
[Moto G5 Plus Guides, News, & Discussion] MarioMoncadaa:
Help pls

If I am on stock rom fully working, i can do a persist and efs backup with a modded twrp and restore it when i have a problem of signal and imei flashing custom roms?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Chance are you'll be fine with custom ROMs. It's switching back to stock ROM that results in the issues. But smart thing to back them both up now.