yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] alwayspunk:
potter:/ $ su
potter:/ # ls -la persist
total 108
drwxrwx--x 28 root system 4096 1970-03-24 22:39 .
drwxrwxrwt 21 root root 1000 2018-08-04 04:10 ..
drwxrwx--- 2 system system 4096 1969-12-31 21:01 alarm
drwxr-xr-x 2 oem_5001 oem_5001 4096 1969-12-31 21:01 batt_healthdrwxrwx--- 2 bluetooth bluetooth 4096 2017-05-11 12:14 bluetooth
drwx------ 2 root system 4096 1969-12-31 21:01 bms
drwxr-xr-x 2 oem_5004 bluetooth 4096 1969-12-31 21:01 bt
drwxr-xr-x 4 oem_5004 oem_5004 4096 1969-12-31 21:01 camera
drwxrwx--- 2 system system 4096 1970-03-24 22:39 chargeonly
drwx------ 6 system system 4096 2017-10-31 06:09 data
drwxrwx--- 2 system graphics 4096 1970-03-12 02:29 display
drwxrwx--- 2 system system 4096 1969-12-31 21:01 drm
drwxr-xr-x 5 oem_5004 oem_5004 4096 2017-05-11 12:15 factory
drwxrwx--- 3 oem_2951 oem_2952 4096 1969-12-31 21:01 hlos_rfs
drwx------ 2 root root 4096 1969-12-31 21:00 lost+found
drwxrwx--- 2 radio radio 4096 2017-05-11 12:14 mdm
drwxrwx--- 2 system system 4096 1969-12-31 21:01 misc
drwxrwx--- 2 system system 4096 1970-03-12 02:29 properties
drwxr-xr-x 11 oem_5004 oem_5004 4096 1970-03-24 22:38 public
drwx--x--x 6 oem_2951 oem_2951 4096 1969-12-31 21:01 rfs
drwx------ 2 root root 4096 1970-03-12 02:29 sds
drwxrwx--- 2 system system 4096 1970-03-12 02:29 secnvm
drwxrws--- 2 oem_5007 oem_5007 4096 2017-10-31 06:09 security
drwxrwxr-x 2 root root 4096 2017-05-11 12:23 sensors
drwxrwx--- 2 system system 4096 2017-12-27 18:40 time
drwxrwx--- 2 media media 4096 1970-03-12 02:29 vpp
drwxr-xr-x 2 oem_5004 oem_5004 4096 1969-12-31 21:01 wifi
drwxrwxr-x 2 oem_5003 oem_5003 4096 1969-12-31 21:01 wmdr

This is what i get from terminal emulator on lineage 15.1

Never flashed anything else besides that and gapps.

What does it mean?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Unlikely.
[Moto G5 Plus Guides, News, & Discussion] FiddlePop:
No VoLTE after flashing TWRP Oreo

I'll keep using it without VoLTE, it's not that big of an issue, thanks for the asssistance though, appreciate it :good:
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
When you installed Oreo, did you select the option to erase efs? That's the only other thing I can think of that could be software related. Make sure to safely store the backups of efs and persist before you try that (they go in the root of your sdcard when you did the install).

Other option is to check with your carrier, in case they're having problems...
[Moto G5 Plus Guides, News, & Discussion] FiddlePop:
I did erase the EFS, but LTE worked despite it

And as a insurance I restored my EFS and persists using the backup too

I've tried the same SIM in different phones as well other SIMs in this phone

The problem seems to be my phone
[Moto G5 Plus Guides, News, & Discussion] Alex_Trane:
help me
[Moto G5 Plus Guides, News, & Discussion] Doxmey:
C:\Users\DOX\Desktop\platform-tools>adb shell

evert:/ $ su

:/ # ls -l /persist

total 128

drwxrwx--- 2 system system 4096 1969-12-31 13:01 alarm

drwxr-xr-x 2 vendor_mot_pwric vendor_mot_pwric 4096 2018-04-16 16:27 batt_healt

h

drwxrwx--- 2 bluetooth bluetooth 4096 1969-12-31 13:01 bluetooth

drwx------ 2 root system 4096 1969-12-31 13:01 bms

drwxr-xr-x 2 vendor_mot_tcmd bluetooth 4096 1969-12-31 13:01 bt

drwxrwx--- 3 root root 4096 2019-05-19 07:32 cache

drwxr-xr-x 5 vendor_mot_tcmd vendor_mot_tcmd 4096 1970-06-17 09:26 camera

-rw-r--r-- 1 9004 9004 8 2018-04-16 16:27 captouch_b

asedata.bin

drwxrwx--- 2 system system 4096 1969-12-31 13:01 chargeonly

drwxr-xr-x 2 root root 4096 1970-01-01 20:54 coresight

drwx------ 5 system system 4096 2018-08-15 06:12 data

drwxrwx--- 2 system graphics 4096 1969-12-31 13:01 display

drwxrwx--- 2 system system 4096 1969-12-31 13:01 drm

drwxr-xr-x 5 vendor_mot_tcmd vendor_mot_tcmd 4096 2018-04-16 16:27 factory

drwxrwx--- 3 oem_2903 oem_2904 4096 1969-12-31 13:01 hlos_rfs

drwxrwx--- 2 root system 4096 1970-06-17 09:26 hvdcp_opti

drwx------ 2 root root 4096 1969-12-31 13:00 lost+found

drwxrwx--- 2 radio radio 4096 2018-04-16 16:27 mdm

drwxrwx--- 2 system system 4096 1969-12-31 13:01 misc

drwxrws--- 2 vendor_mot_tcmd vendor_mot_tcmd 4096 2018-09-24 13:41 paks

drwxrwx--- 2 system system 4096 1971-06-02 04:46 properties

drwxr-xr-x 12 vendor_mot_tcmd vendor_mot_tcmd 4096 1970-06-17 09:26 public

drwx------ 2 system system 4096 1969-12-31 13:01 qti_fp

drwx--x--x 6 oem_2903 oem_2903 4096 1969-12-31 13:01 rfs

drwx------ 2 root root 4096 1969-12-31 13:01 sds

drwxrwx--- 2 system system 4096 1969-12-31 13:01 secnvm

drwxrws--- 2 drmrpc drmrpc 4096 2018-08-15 06:12 security

drwxrwxr-x 3 system system 4096 1969-12-31 13:01 sensors

drwxrwx--- 2 system system 4096 2018-09-24 18:52 time

drwxrwx--- 2 media media 4096 1969-12-31 13:01 vpp

drwxr-xr-x 2 vendor_mot_tcmd vendor_mot_tcmd 4096 1969-12-31 13:01 wifi

drwxrwxr-x 2 vendor_mot_drm vendor_mot_drm 4096 1969-12-31 13:01 wmdrm

:/ # chown -R rfs:rfs /persist/rfs

chown: bad user 'rfs'

This is what i get, I don't have wi-fi and both my imei are blank. What should I do? Is there a way to fix?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
You have a G6+right? This guide only applies to the G5 series.
[Moto G5 Plus Guides, News, & Discussion] Doxmey:
Oh yeah, well i was able to fix it by flashing an older stock version. It restored my IMEI thank GOD. lol
[Moto G5 Plus Guides, News, & Discussion] ashahzadpk:
Hi brothers i have pixel 2 xl bl unlocked, rooted, twrp 3.33 installed. How can reset efs or del modemst1 or turn imei 0. Any help is appreciated. Thanks in advance
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
I don't think someone is able to help you here as this thread is only about the Moto G5+.

Btw, it's not easy to understand your question, you want to reset efs or turn IMEI 0? That wouldn't be a good idea..

modemst1 and 2 can be erased by the following fastboot commands:

fastboot erase modemst1
fastboot erase modemst2
[Moto G5 Plus Guides, News, & Discussion] ashahzadpk:
fastboot: erase is not allowed
[Moto G5 Plus Guides, News, & Discussion] pmko1917:
hi

just wanted to make sure before i do anything to my phone that i am backing up the EFS and persist partitions the right way.

i have a moto x4 that i wanna backup and my understanding is that the method is as follows:

1) you fastboot TWRP (or flash TWRP)

2) you backup the EFS and persist partition (as the TWRP for moto x4 has that option in the official build and its not necessary to use an unofficial build)

am i correct? do i have to backup all other partitions (system, data, boot, etc) and if yes should i do it in a single backup?

thanks in advance
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
That's correct. It's up too you if you save them separately or with other partitions, you will be able to restore only the ones you want or need.

Naturally you should have a full backup anyway.

Another way to backup persist.img is by dd command:

Backup:

dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

Restore:

dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist
[Moto G5 Plus Guides, News, & Discussion] pmko1917:
what does a full backup mean?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Everything you need to restore your complete system like system,data,vendor or boot. If you include persist and efs in it you can restore it from there just like only restoring system if needed.

A full nandroid backup is a must have for everyone who's flashing anything on his device.
[Moto G5 Plus Guides, News, & Discussion] pmko1917:
thanks!!

basically ticking all the options on the backup page?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Can't hurt if you have enough space.
[Moto G5 Plus Guides, News, & Discussion] khushpreet.sv:
IMEI Not coming back after all of the steps

Hi, Im using potter XT1686 on Oreo

I have an issue at the very last step.

when i change the permission and reboot, nothing happens.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
That's because the steps are for stock nougat. If you have problems with Oreo, then unless you have an old backup of persist or efs you may be out of luck. Stock Oreo fixes the permissions on boot. All of this is described in the OP.
[Moto G5 Plus Guides, News, & Discussion] PratyushJayachandran:
So, I was out trying to get VoLTE working on a carrier which is not supported officially. Flashed Stock Oreo, didn't uncheck erase EFS this time(was hoping this would grant me LTE). Lost IMEI, spent 3 hours trying different things. By the way even the supported carrier doesn't have VoLTE on my potter.

This Post #2 saved me. I had made a backup one month ago when I was fiddling with these things. Just restored that and IMEI is back. So anyone reading through the post may note that use dd commands to make a backup of your persist before you try anything.

---------- Post added at 09:47 PM ---------- Previous post was at 09:27 PM ----------

Mine gives a result of 16384 too, but the date is different. Would it be why I don't get VoLTE on even the supported carrier?

potter:/ # ls -l /persist/rfs/msm/mpss/dhob.bin
-rw------- 1 vendor_rfs vendor_rfs 16384 1970-01-03 11:40 /persist/rfs/msm/mpss/dhob.bin
[Moto G5 Plus Guides, News, & Discussion] PratyushJayachandran:
So, I have been trying to fix VoLTE in Oreo for a while. It didn't work unsurprisingly. I was vary of downgrading to Nougat. I always haave 0 IMEI after flashing Oreo TWRP with erase EFS checked. I was coming from PE Plus Android 10.

Restored persist.img backup using dd. Still didn't work. Erased both modems, thinking it would be rebuilt. No luck. My persist seems intact otherwise. Has all the important files.

Finally, I flashed Nougat. The device showed VoLTE in the setup screen itself! Tried to call using that SIM. It was working. Side Note: This carrier cannot place calls without VoLTE.

All these experiments were done using the only carrier supported by potter in my country. So, VoLTE works in stock Nougat. Then, I made a big brain move by trying to see what happens if I update via OTA. It failed obviously. No matter what ROM I flashed, it booted back to recovery. Hurriedly found some dd commands from XDA to fix it. Tried to flash stock Nougat again. Throws error. So I just flashed TWRP Oreo, with erase EFS checked. But I didn't lose IMEI this time. Lost VoLTE.

My question is, can I flash Nougat, backup working efs and persist, then upgrade to to Oreo TWRP build, restore nougat efs and persist and then move on to custom ROMs(like PE Plus Android 10)?

By the way big thanks for such a detailed post and all your resourceful replies. Your thread is like bible for Moto G5 users!
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
If you get IMEI 0 after flashing stock oreo with erase EFS then your persist is already broken in some way. Sorry, nothing that can be done there. If you have an old EFS backup that gives you an IMEI, that's the best you can get.
[Moto G5 Plus Guides, News, & Discussion] PratyushJayachandran:
That's the thing, I didn't get 0 IMEI this time when I flashed Oreo over Nougat. I had done nothing but restore the persist (I had backed up while on Android 10) in Oreo before I flashed Nougat base.

VoLTE working for the first time ever.

Did nothing to persist or efs, just flashed Oreo on top of this. VoLTE stopped working. Everything else worked. Got tired and went back to Andorid 10.

If I make up a backup in Nougat with working VoLTE and restore it in Android 10, is there any chance it will work or I am shooting arrows in the dark?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
OK, so when you flashed oreo, did you still select the option to erase EFS? If so, and your IMEI came back, then you may be good.

As for going to Android 10, you can try and see what happens. I have seen over time that some people go from working Volte on stock to custom roms and retain Volte, other people it just doesn't work.
[Moto G5 Plus Guides, News, & Discussion] PratyushJayachandran:
Flashing TWRP Oreo on Nougat didn't result in 0 IMEI with erase EFS checked

Yes, it didn't work for me.

I have a noob question... I downloaded the ROM that Lenovo Motorola Smart Assistant provided when I connected my phone to the PC. First of all the ROM downloaded was not region specific. But, the file matches the latest region specific firmware zip available on lolinet here

The modem version mentioned inside the txt file is:

Modem Version: M8953_46.55.07.90R

The Baseband Version shown on my phone: M8953_41.50.07.75R

Does this have something to do with broken VoLTE? Is it possible to upgrade the firmware from that stock image?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
You need to have been on stock Oreo before trying any custom roms based on Pie or above. That also means that if you have an out-of-date firmware, it's likely things won't work (the fingerprint sensor being the most obvious and easy one to test). So you should do the full Oreo update first - TWRP flashable ones should be fine (assuming that you actually keep your IMEI - I'm a little confused as to why it would work on Nougat, but not on Oreo).

Note that I haven't had this device for some time now, so I can provide limited input nowadays...
[Moto G5 Plus Guides, News, & Discussion] PratyushJayachandran:
Your work is really helpful for thousands of users! It has kept the ball rolling.

My bootloader seems to be the latest one. It's just the Baseband that is behind and I did a bit of research by asking around users to share their baseband version with volte working, and their baseband is indeed what I found in the stock rom I got from LMSA and also uploaded on lolinet.

What I'm not getting is why doesn't my baseband update when flashing the latest Oreo TWRP Flashable?:confused:

And I unlocked potter in August, 2019. Last Potter build by lenovo was in January, 2019 I guess. I was on the latest build.

I'm so tempted to flash the stock ROM via fastboot. Some user told me that he has flashed stock firmware from lolinet several times using Toolkit by drtechie. Is this advisable? I know it's the same as flashing using fastboot. I just want to know whether it is safe to flash via fastboot.

The confusing part is that VoLTE works on Nougat Stock, with that same baseband.
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
If your IMEI ist intact and you have a backup of persist and efs there's nothing that speaks against flashing signed firmware by fastboot. I don't recommend toolkits to do so, better use a flashall.bat with the needed commands in it. You'll find one here beside a complete tutorial and needed links:

https://xdaforums.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147/post80478329
[Moto G5 Plus Guides, News, & Discussion] PratyushJayachandran:
Thank You! I couldn't find you flashallO.bat but was able to boot into oreo signed firmware anyway. But erase clogo and erase customize failed for me with the following error:

PS C:\adb> fastboot erase clogo
Erasing 'clogo' (bootloader) Permission denied
FAILED (remote: '')
fastboot: error: Command failed
PS C:\adb> fastboot erase customize
Erasing 'customize' (bootloader) Permission denied
FAILED (remote: '')
fastboot: error: Command failed

I was able to upgrade my baseband to the latest version though and my IMEI is intact. Yet to test VoLTE with the carrier officially supported. 4G is working.

I did all this exercise to enable VoLTE on the carrier that was not officially supported. Many have got it working, but it was on the latest baseband.

I wonder why I was left behind by Lenovo for baseband upgrade. And why doesn't TWRP flashable update my baseband?
[Moto G5 Plus Guides, News, & Discussion] debopriyobasu:
[MENTION=7346927]NZedPred[/MENTION],

Hi, I need some help from your side.

I was on stock Oreo ROM(February 1,2019 security patch) and I unlocked bootloader, installed Pixel Experience Plus ROM. I wanted to go back to stock ROM, so I used LMSA(Lenovo Moto Smart Assistant) to rescue the device and flash the latest ROM. But, I faced IMEI 0 error for the first time. I had a backup of efs and persist but it was deleted unfortunately.

Now, the interesting part, I flashed twrp again and then flashed Pixel Experience Plus back, I got back IMEI, but there was no cellular reception or mobile data. I went to fastboot and did fastboot erase modemst1 and modemst2, and rebooted to find the mobile data working, but VoLTE not working. Flashing stock ROM without erasing modemst1 and modemst2 results in getting back IMEI, but again with no signal, no mobile data.

What should I do at this stage to get back VoLTE and mobile data when I go back to stock ROM with a locked bootloader?

I have never used anyone else's persist.

I am currently on Pixel Experience Android 10 ROM.

Kindly help this friend in need
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Sorry, but I really don't know. I've not seen any cases before where stock oreo didn't restore the IMEI but a custom rom did. But of course, I haven't had this device for around a year so the Android 10 roms weren't even around.
[Moto G5 Plus Guides, News, & Discussion] debopriyobasu:
Thanks for your help. I hope someone who still has the device provides me some guidance.
[Moto G5 Plus Guides, News, & Discussion] debopriyobasu:
Hi, I used your TWRP Flashable stock Nougat ROM with the erase EFS option unckecked. I got back LTE, VoLTE and everything back in working condition. I'm really thankful for your work. It at least brought my phone back to working state. Should I take a backup of my EFS and Persist in this state? Is my persist fixed permanently?

I want to go back to stock 8.1.0 Oreo with everything working and with a locked bootloader. I know the method of going back to stock, but anything special I have to do now to retain full functionality when I lock bootloader?

My apologies for disturbing you.

regards.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Just back up your persist and EFS as they are now. Better to have something than nothing.

And for relocking the bootloader, can't really help there myself. I only did it once - when I got rid of the phone. You may be able to skip the erase efs / modemst1/2 commands when you use fastboot to go fully back to stock and lock the bootloader. I'm not sure. Someone else can hopefully help you there.
[Moto G5 Plus Guides, News, & Discussion] Vinay425003:
Hello I had my IMEI and signal lost after flashing custom rom and still lost even after flashing stock rom. But what fixed this for me was reflashing stock(Clean flash and remove sim before flashing and reinsert after boot complete) ROM but now i want to backup efs and persist but twrp has only efs option and the link you provided is for potter and my device is sanders can you give link for sanders.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
I'm not familiar with the different versions of TWRP for sanders. However, Post #2 has generic 'dd' commands that will work from within TWRP for sanders.
[Moto G5 Plus Guides, News, & Discussion] Vinay425003:
Hello i found latest twrp 3.3.1-0 for sanders but the thing is whenever i flash it asks for password so i format data and then boot the phone but when i get back into recovery mode from phone it opens stock recovery mode not twrp so i have to reflash it and after reflashing it again asks for password and thats why i am unable to make backup of persist
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
Disable all pw/ pin or whatever you've got when you're in your OS before flashing TWRP.

When you flash TWRP than don't forget to boot again to TWRP to make it stick. Use the

fastboot boot recovery

command

or use the key combination.
[Moto G5 Plus Guides, News, & Discussion] Vinay425003:
Yes if I do it from fast boot it still asks for password I have not set any pin or pattern and this problem only occurs in latest version 3.3.1-0 not older version but only this version has option to backup persist as well

And when I try restoring persist and efs through DD commands it says flashing denied
[Moto G5 Plus Guides, News, & Discussion] noatboat:
Thanks for ur Help

I was able to fix my Moto E5 Plus with ur help thanks

https://xdaforums.com/moto-e5/help/1924-7-metro-e5-plus-lost-imei-baseband-t3868872/post82379903
[Moto G5 Plus Guides, News, & Discussion] Toufique Pasha:
i lost my persist file

i installed someone else persist file to use volte in pixelexperience without taking backup

it was working ok till than

but when i installed official stock rom with rescue and smart assistance

i lost my imei

is there any fix to create persist file of device

or

write imei in efs
[Moto G5 Plus Guides, News, & Discussion] Andrej_SK:
Well, sorry to say that, but you're pretty much screwed. Afaik there isn't anything to do, as you flashed someone else persist.
[Moto G5 Plus Guides, News, & Discussion] MohdAhmed:
Sir I have a simple question.

I have backed up system, vendor, persist, eds when I was on lastest stock rom Oreo.

I am currently using android 10 havoc os, and recently I bought a jio sim and it doesn't work, can't call, no volte.

Now how can I fix this?

I tried reading the thread, but it's very difficult and commands and codes are there.

Please help.
[Moto G5 Plus Guides, News, & Discussion] MohdAhmed:
Which version of STOCK rom are you on?

Sorry I don't know the exact version, but I was on Oreo 8.1, I have installed a custom rom in 2020 and hence I was on the latest build by moto.

- 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?

No.

I never had a jio sim, so I didn't cared about volte.

But recently I ported my sim to Jio.

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

VOLTE

I took backup of SYSTEM, VENDOR, EFS, PERSIST before installing custom rom.

I don't know whether Volte was working in stock rom or not.

I just need my jio sim to work as this is my dad's phone and if jio doesn't work, he can't talk. I tried removing radio.jbid entry in build prop.

I'm currently on havoc os 3.7 android 10 with magisk 20.4.

I have also checked the jio sim in other phone it's working fine.

Some help would be really appreciated.
[Moto G5 Plus Guides, News, & Discussion] 7407010700:
The first thing I did after installing TWRP is back up the entire phone to SD card.

I messed around and lost my IMEI. But even when restoring persist and EFS, it still says 0.

The users seem correct for rfs and hlos_rfs

====

drwxrwx--- 3 rfs rfs_shared 4096 2020-08-02 04:34 hlos_rfs

drwx------ 2 root root 16384 2020-08-02 04:34 lost+found

drwxrwx--- 2 radio radio 4096 2020-08-02 04:34 mdm

drwxrwx--- 2 system system 4096 1969-12-31 19:01 misc

drwxrws--- 2 mot_tcmd mot_tcmd 4096 1969-12-31 19:01 paks

drwxr-xr-x 12 mot_tcmd mot_tcmd 4096 2020-08-02 04:34 public

drwx--x--x 6 rfs rfs 4096 2020-08-02 04:34 rfs

===

But the files dont seem right.

===

/persist/rfs/msm/mpss/dhob_report.txt

/persist/rfs/msm/mpss/hob_report.txt

/persist/rfs/msm/mpss/datablock/id_00

/persist/rfs/msm/mpss/server_check.txt

/persist/rfs/msm/mpss/dhob.bin

/persist/rfs/msm/mpss/shob.bin

/persist/rfs/shared/server_info.txt

===

particularly there is no dhob.bin.bak

Shouldn't it have been in the persist backup?

added: i wiped data and restored everything. still no IMEI.