yashsingh1/xdaforums huggingface dataset:
[Moto G5 Plus Guides, News, & Discussion] BoxDraw:
hi i have a problem with my moto g5s plus (sanders)

I previously had Lineage 15.1 (oreo) and everything was fine, then I flashed lineage 17 (android 10) and I realized that the fingerprint reader did not work, so I went back to the 15.1 version (oreo), but it was still the same then see in the telegram groups and they told me that the solution was to update the Firmware, then I installed the stock Oreo rom

and everything is fine in that rom, the fingerprint reader worked "Great"

then I went back to lineage 15.1 (oreo) and again the fingerprint reader problem, after that someone told me "use the stock rom of android 7 and then update to the custom rom you want" when I did that stock rom the Imei comes out In "unknown" the baseband version the same and the fingerprint reader still did not work, after that I flashed lineage 15.1 again and the aforementioned did not work, I searched the internet for possible solutions (before arriving here) and a forum spoke of go to the oreo stock and from there update to a custom rom (in this case lineage 15.1) I did it and this time the imei worked and it had the baseband version, but it did not have the fingerprint reader, that is, it went back to the beginning of the problem, looking to get here to Xda forum, and I see this solution, I try it and nothing continues without giving me a positive answer, I use the nougat fix.zip file and then I flash the nougat rom with twrp but it remains the same, after several attempts I realized that, if I update to a custom rom from stock nougat the fingerprint reader works, but the imei and the baseband are "unknown" and if I update from the stock oreo the imei comes out normally and the baseband the same, but the fingerprint reader does not,

I know what I am describing is a bit complicated, but I would like to know if you can help me

PD: I'm sorry, I'm not very good at English >_<
[Moto G5 Plus Guides, News, & Discussion] Keith McKenzie:
Hello!

Can i use your

potter-stock-persist-fix.zip

on my Motorola G5 CEDRIC
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
The two devices are pretty similar but that doesn't mean that you have the same files with the same ownership in your persist partition.

So run the commands shown in the OP to make sure that's the case.

If you don't have exactly the same files and ownerships you can't use the zip.
[Moto G5 Plus Guides, News, & Discussion] rpcll:
I'm on Lineage 17.1 on a MotoG5s. My GPS doesn't get a fix and if I try fastboot erase modemst1/modemst2 it deletes my IMEI.

Any way to fix my persist without flashing a stock rom? I tried setting permissions in TWRP Terminal, but it doesn't stick. After a reboot the permissions are "2903 2904 hlos_rfs" and "2903 2903 rfs" again

EDIT: I fixed GPS by going to stock Oreo and then back to LOS17.1. But erasing modemst still deletes my IMEI and I have to restore EFS from backup.
[Moto G5 Plus Guides, News, & Discussion] Keith McKenzie:
What are the android IDS for the persist for moto g5?

I know one of them is 3012
[Moto G5 Plus Guides, News, & Discussion] nathanielsametz:
THANK YOU @NZedPred !!!!!

I was not ever aware of needing to backup the /persist partition (or that it even existed for that matter) !! Been backing up my EFS for a couple years but never persist until I flashed the newest Havoc 4.1 - trying out Android 11 - and that pretty much broke my device... no signal or camera :(

With your older guides and help from yourself and others on this forum I've managed to resurrect my G5+ and use Havoc 3.12 with 4G and my camera ! Huzzah !

Seriously, I cannot thank you enough. Really appreciate all the work you've done for people on this forum and the patience you hold too.

Cheers

All the best
[Moto G5 Plus Guides, News, & Discussion] Trebleuser:
Could anyone please help me fix my problem, I wrote fastboot erase all and my phone got hard bricked and later using edl mode I flashed the original rom but my imei was destroyed and while booting the phone at the top left corner it shows (invalid persist found , flash it with caution ) and it booted into system and the sim doesn't gets detected and gets stopped every 10 seconds

Phone model :- moto G8 plus

Android :- 10

Thanks in advance :) if u could fix😖
[Moto G5 Plus Guides, News, & Discussion] Anuj7798:
Hi,

I'm running Android 11 pixel experience plus edition for my moto g5+(potter). I upgraded to this from stock nougat after flashing in TWRP. Right after booting, I noticed my fingerprint is not responding and my LTE is not working. I fixed my fingerprint issue by referring to another forum but I'm not able to get my LTE back on my device and it stays in H+ when I on my mobile data. I checked my APN settings and when I put the preferred network to LTE only the signal goes off. I have backed up my EFS and persist. Is there a solution for this?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
As far as I know pixel experience needs Android 8 (Oreo) as base (check OP of the ROMs thread or ask the dev. Also search the thread:

https://xdaforums.com/t/rom-official-10-0-potter-pixel-experience-aosp.3995717//unread

Losing fingerprint is a typical issue when coming from nougat instead of Oreo!

So the best way would be going back to your stock firmware, update it to Oreo and than flash Pixel experience. Read first how to do it, check that the ROM is for your location and if the model is XT1684 or XT1685.

You may try to restore your efs and persist (important) now but I don't think that will help if PE needs Oreo as base for flashing as most custome ROMs do.

Don't forget to backup your persist/efs again when you're on Oreo stock.

Full signed firmwares can be found here:

https://xdaforums.com/t/guide-moto-g5-plus-flashing-stock-firmware-rooting-12-2020.4205293//unread
[Moto G5 Plus Guides, News, & Discussion] MohdAhmed:
Remember LTE works only on Sim 1. And when you flashed from nougat, the stock rom, your Jio sim (LTE sim) should be on sim 1 in stock rom.

If it was in sim 1 in stock rom, then just go to twrp and restore the EFS and Persist back you had of stock rom on this custom rom, and it will work.
[Moto G5 Plus Guides, News, & Discussion] Anuj7798:
Solved my issue by reverting back by flashing the latest android nougat with the aroma installer and then flashing the latest orea on it. Then went on with pixel experience plus rom android 11. This fixed my LTE and fingerprint issues. Thank you.
[Moto G5 Plus Guides, News, & Discussion] jaysonwcs:
I know this is for Moto G5 Plus, but on my Moto G5S (montana) there's no persist partition.

My phone is working fine with LineageOS 18, but everytime I try to flash the stock ROM, I lose my IMEI.

I believe the problem is the one described here, but I cannot access the partition to check the file permissions.

Can someone give me some help?

Thanks
[Moto G5 Plus Guides, News, & Discussion] jaysonwcs:
Found partition on /mnt/vendor/persist:

montana:/ # ls -l /mnt/vendor/persist
total 108
drwxrwx--- 2 system system 4096 1969-12-31 21:01 alarm
drwxrwxr-x 2 vendor_mot_pwric vendor_mot_pwric 4096 2019-10-18 17:26 batt_health
drwxrwx--- 2 bluetooth bluetooth 4096 2019-10-18 17:26 bluetooth
drwx------ 2 root system 4096 1969-12-31 21:01 bms
drwxr-xr-x 2 vendor_mot_tcmd bluetooth 4096 1969-12-31 21:01 bt
drwxr-xr-x 5 vendor_mot_tcmd vendor_mot_tcmd 4096 1971-03-09 13:44 camera
drwxrwx--- 2 system system 4096 2019-10-18 17:26 chargeonly
drwx------ 6 system system 4096 2019-10-18 17:26 data
drwxrwx--- 2 system graphics 4096 1970-08-10 06:21 display
drwx------ 2 system system 4096 1969-12-31 21:01 drm
drwxr-xr-x 5 vendor_mot_tcmd vendor_mot_tcmd 4096 2019-10-18 17:26 factory
drwxrwx--- 3 vendor_rfs oem_2904 4096 2019-10-18 17:26 hlos_rfs
drwxrwx--- 2 root root 4096 2019-10-18 17:26 lost+found
drwxrwx--- 2 radio radio 4096 2019-10-18 17:26 mdm
drwxrwx--- 2 system system 4096 1969-12-31 21:01 misc
drwxrws--- 2 vendor_mot_tcmd vendor_mot_tcmd 4096 2019-10-18 17:26 paks
drwxrwx--- 2 system system 4096 1970-04-25 08:36 properties
drwxr-xr-x 11 vendor_mot_tcmd vendor_mot_tcmd 4096 2019-10-18 17:26 public
drwx--x--x 6 vendor_rfs vendor_rfs 4096 2019-10-18 17:26 rfs
drwx------ 2 system system 4096 1970-01-03 05:55 sds
drwxrwx--- 2 system system 4096 1970-08-10 06:21 secnvm
drwxrws--- 2 drmrpc vendor_mot_tcmd 4096 2019-10-18 17:26 security
drwxrwxr-x 3 system system 4096 2019-10-18 17:26 sensors
drwxrwx--- 2 system system 4096 2019-10-18 17:26 time
drwxrwx--- 2 media media 4096 1970-08-10 06:21 vpp
drwxr-xr-x 2 vendor_mot_tcmd vendor_mot_tcmd 4096 1969-12-31 21:01 wifi
drwxrwxr-x 2 vendor_mot_drm vendor_mot_drm 4096 1969-12-31 21:01 wmdrm

However, the permitions are set to the users oem_2904 and vendor_rfs. Not sure if this is right. I will try to flash the stock ROM without erasing modem partitions and see what happens.
[Moto G5 Plus Guides, News, & Discussion] jaysonwcs:
Ok, I was wrong. That way the partition was mounted occurs only on LineageOS. Didn't know different ROMs mounted on different directories.

Found the Persist partition on the standard folder:

montana:/ # ls -l persist
total 108
drwxrwx--- 2 system system 4096 1969-12-31 21:01 alarm
drwxr-xr-x 2 mot_pwric mot_pwric 4096 2019-10-18 17:26 batt_health
drwxrwx--- 2 bluetooth bluetooth 4096 2019-10-18 17:26 bluetooth
drwx------ 2 root system 4096 1969-12-31 21:01 bms
drwxr-xr-x 2 mot_tcmd bluetooth 4096 1969-12-31 21:01 bt
drwxr-xr-x 5 mot_tcmd mot_tcmd 4096 1971-03-09 13:44 camera
drwxrwx--- 2 system system 4096 2019-10-18 17:26 chargeonly
drwx------ 6 system system 4096 2019-10-18 17:26 data
drwxrwx--- 2 system graphics 4096 1970-08-10 06:21 display
drwxrwx--- 2 system system 4096 1969-12-31 21:01 drm
drwxr-xr-x 5 mot_tcmd mot_tcmd 4096 2019-10-18 17:26 factory
drwxrwx--- 3 oem_2903 oem_2904 4096 2019-10-18 17:26 hlos_rfs
drwxrwx--- 2 root root 4096 2019-10-18 17:26 lost+found
drwxrwx--- 2 radio radio 4096 2019-10-18 17:26 mdm
drwxrwx--- 2 system system 4096 1969-12-31 21:01 misc
drwxrws--- 2 mot_tcmd mot_tcmd 4096 2019-10-18 17:26 paks
drwxrwx--- 2 system system 4096 1970-04-25 08:36 properties
drwxr-xr-x 11 mot_tcmd mot_tcmd 4096 2019-10-18 17:26 public
drwx--x--x 6 oem_2903 oem_2903 4096 2019-10-18 17:26 rfs
drwx------ 2 system system 4096 1970-01-03 05:55 sds
drwxrwx--- 2 system system 4096 1970-08-10 06:21 secnvm
drwxrws--- 2 drmrpc drmrpc 4096 2019-10-18 17:26 security
drwxrwxr-x 3 system system 4096 2019-10-18 17:26 sensors
drwxrwx--- 2 system system 4096 2019-10-18 17:26 time
drwxrwx--- 2 media media 4096 1970-08-10 06:21 vpp
drwxr-xr-x 2 mot_tcmd mot_tcmd 4096 1969-12-31 21:01 wifi
drwxrwxr-x 2 mot_drm mot_drm 4096 1969-12-31 21:01 wmdrm

Now, I'm not sure the user oem_2903 and oem_2904 are right or wrong. It found the IMEI number, but the brightness are always on maximum, and the screen takes too long to light up when I press the unlock button.

Not sure why I'm not able install the Stock ROM properly =(
[Moto G5 Plus Guides, News, & Discussion] jaysonwcs:
Tried to flash the Nougat Stock ROM (Android 7) without erasing modem partitions, without the SIM card . Started the system, inserted the SIM card, no signal, but IMEI detected.

After that, I formatted data and system with TWRP, reflashed Oreo Stock ROM (Android 8) without erasing modem partitions and without the SIM card. Started the system, inserted the SIM card and voilà!

Now it's working 100% (cell phone signal, 4G, brithgness working properly etc.).

Just in case someone has any problems, you can try this procedure, with Moto G5 Plus, G5S or any other.
[Moto G5 Plus Guides, News, & Discussion] Osjakvd:
I know this thread is old but recently I found my old moto g5+ and upgraded it to Pixel room with Android 11, I had some troubles and back to stock and got IMEI 0, I found a old backup with persist and efs but the persist file is corrupted (I Think something was wrong when I moved to pc or something elese, the efs file is ok) when I flash the efs the IMEI comes back but I don't have signal Is any oportunity to recover signal with only the efs backup?
[Moto G5 Plus Guides, News, & Discussion] Wolfcity:
You can try to follow the steps in the OP, notably

flash a TWRP flashable build:

https://xdaforums.com/t/oreo-stock-rom-twrp-flashable-stock-builds.3830482/post-77359950
[Moto G5 Plus Guides, News, & Discussion] Kaksrocks:
Hi. I recently was playing around with my old moto g5 plus and i lost the imei and baseband. After doing some things. I managed to get imei back. But still not able to get volte. I don't what to do. If someone is seeing this reply, please help me out on how can i get my volte support back. I'm running on stock rom now android 8.1.0 . Please someone help me with this.
[Moto G5 Plus Guides, News, & Discussion] 5P4RT0N:
ok bro... lemme check

the presist on the device is not mine.. thats may get problems.. ?? :((((((((((
[Moto G5 Plus Guides, News, & Discussion] echo92:
Comparing your persist results with that posted by NZedPred in the opening post, the owner and group, and the permissions appears to be changed compared to a working stock persist for your rfs and hlos_rfs. For reference, here's the working persist output

drwxrwx--- 3 rfs rfs_shared 4096 2018-08-04 16:44 hlos_rfs
drwx------ 6 rfs rfs 4096 2018-08-04 16:44 rfs

My knowledge of UNIX/Linux isn't comprehensive, though as I understand it - here in the first line, rfs and rfs_shared denote the owner and owner group of that file (hlos_rfs) - essentially what owners and groups are allowed to access the file. The drwxrwx--- also tells you the permissions - what each user that can access the file can do.

However, looking at your persist, it's quite different:

drwxrwx--- 3 oem_2951 oem_2952 4096 1969-12-31 21:01 hlos_rfs
drwx--x--x 6 oem_2951 oem_2951 4096 1969-12-31 21:01 rfs

The permissions for rfs (the 2nd line) have been changed, with (x) added in for executable permissions. Furthermore, the owner and owner group have been changed too to oem_2951 and oem_2952 (which seems to be a common alternative ID for rfs and rfs_shared)?

Thus, if you're on Lineage, you may experience no issues, but if you revert back to stock (which I saw you tried to in your previous posts) you may run into IMEI issues as the owner/group and permissions no longer match what a 'working' persist looks like.

If you were to revert back to stock (and you've still got your own persist, you have not flashed another device's persist), you'd likely have to perform the instructions in the opening post to change the ownership of hlos_rfs and rfs to the correct owners. You may also have to change the permissions yourself for rfs (from drwx--x--x to drwx------, which seems to be from 711 to 700 for the Linux octal codes?) . As for changing the permissions whilst running Lineage, as NZedPred notes here (https://xdaforums.com/showpost.php?p=77262329&postcount=15 ) we don't know yet whether those permissions are a quirk or required for running Oreo custom ROMs (or even required for running Oreo).

Any corrections welcome, I'm still learning about all this funkyness with IMEI, persists and permissions...
[Moto G5 Plus Guides, News, & Discussion] Sinister Drake:
This is for Oreo, and yes volte fails to work on this one as well as extended kernel I believe. Volte works with included ROM kernel and also optimus drunk kernel (which I am running now).
[Moto G5 Plus Guides, News, & Discussion] kauthuk:
Rooted the device with superuser su and it showing root access but su command is not working in the terminal.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
That's a fine response there echo92, you're showing a good understanding. The only thing that I'd mention is that the change of permissions on rfs (from drwx--x--x to drwx------) is optional and probably harmless leaving it as is, so I left out that command entirely in my guide.

And yes, changing the ownership within Lineage Oreo is not something I'd recommend. It may just end up changing it back itself, or you may end up losing functionality (e.g. Volte, 4G). That's why at this stage I only recommend doing the changes when in stock.

Thanks for that. I'll get onto looking at the differences over the next few days or so.

SuperSU is out of date, and unsupported nowadays... Magisk is preferable. In any case, make sure that your terminal or adb is specifically granted super user permissions. Consult the relevant forums for help with that.
[Moto G5 Plus Guides, News, & Discussion] alwayspunk:
[MENTION=7970352]echo92[/MENTION]

What if i went back to stock through a firmware without deleting modemst caches?

Maybe i could just restore those caches back, after deleting them. Would that work aswell?

I have not tried yet going back to stock, not sure if i will without a workaround of some kind to get at least 4g.

Also these lines draw my attention:

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

drwxr-xr-x 2 oem_5001 oem_5001 4096 1969-12-31 21:01 batt_health

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

drwxr-xr-x 11 oem_5004 oem_5004 4096 1970-03-24 22:38 public

drwxrws--- 2 oem_5007 oem_5007 4096 2017-10-31 06:09 security

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

Maybe just because i am looking at my persist from lineage. But i thought i would not get any unrecognised owner ids as you stated on main post. And actually 5 of them are.

Considering the ones above 5000. Is it possible that lineage has not changed them, they are just unrecognised?

Why would 2951 and 2952 not be seen as rfs/rfs_shared, if lineage supposedly changed the ownership. I dont get it.

Thanks in advance.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
I'm going to do some experimenting with lineage to try and better understand a few things. Can you tell me if you have installed a custom kernel on top of lineage?

Re if permissions would affect the hash check, the answer is no. The hash check is on the dhob.bin etc file content itself (otherwise the fix wouldn't have worked). At one stage it was thought that everything had to be bit perfect in the partition, but that is not the case, as evidenced by the fact the TWRP restore of persist works fine (and TWRP backs up persist at file level).
[Moto G5 Plus Guides, News, & Discussion] alwayspunk:
No I have not, I have installed lineage 15.1 twice (upgraded to weekly version once) and installed open gapps once, when i first installed lineage.

If you have a quicker communication channel, and need any help from me, let me know.

By the way, (not sure if helpful) after find /persist -type f command I have one more last line below these:

/persist/rfs/msm/mpss/datablock/id_01

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

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

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

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

--missing line on main post--

/persist/chargeonly/cooldown
[Moto G5 Plus Guides, News, & Discussion] treyweez11:
What negative effects can happen if you change permissions on those files while say on DU not stock. Could this be catastrophic? And also, my volte is working on this ROM currently but apparently I have a bad persist due to numbers owning the those folders/files. How is that possible?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
That last line is fine. It's added by Lineage, has no impact on stock rom as far as I can see. I guess the problem with the persist is that it has stuff that really should be read only, and a whole lot of temporary stuff...

I'm looking into Lineage a bit more, but I'd not change the permissions in there - that's why I say only run the commands in stock.
[Moto G5 Plus Guides, News, & Discussion] Akshobhya007:
Hey [MENTION=7346927]NZedPred[/MENTION],I just don't have /persist/rfs/msm/mpss/dhob.bin.bak

So,can I recover my IMEI?

I did try it but it did not work.

Can you suggest something?
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Good question. First off, if you wouldn't mind, could you edit your post and remove the entire quote of my OP. It's just a bit of a nuisance having the entire OP repeated.

I had to try it out myself to be sure. So, I deleted the dhob.bin.bak file, erased my modemst1/2 and rebooted. My IMEI were successfully re-created. Out of curiosity, I removed the dhob.bin file, but let the dhob.bin.bak in there, and it recreated dhob.bin from the backup and my IMEI.

So, if all was intact (and your persist was your own), it should have recreated IMEI. If it is your persist, then if the dhob.bin.bak file is not there, perhaps other files have been tampered with. Can you try running this to see how big the dhob.bin file is?

su
ls -l /persist/rfs/msm/mpss/dhob.bin

Mine gives a result of 16384, refer below:

potter_n:/ $ su
potter_n:/ # ls -l /persist/rfs/msm/mpss/dhob.bin
-rw------- 1 rfs rfs 16384 2018-08-10 21:01 /persist/rfs/msm/mpss/dhob.bin
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
TWRP flashable persist fix

Yup, you read that right. In order to make things a bit easier for the flashaholics who still want to flip between stock and custom roms, I've created a TWRP flashable fix. This does the same job as the fix script (although it has to do it slightly differently, using the AID (Android ID) of rfs and rfs_shared as TWRP thinks those users have different IDs. OP has been updated, but a link is here for convenience.

potter-stock-persist-fix.zip

Note that it is recommended to use this only when returning to stock. Nougat custom roms should also be safe.
[Moto G5 Plus Guides, News, & Discussion] Ju829:
- Which version of STOCK rom are you on?

I tried my hardest to restore the original stock that came with the device. 7.0 android (POTTER_NPNS25.137-93-10). I did not download it from the OP

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

Device is rooted

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

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

IMEI=0 in phone when dialing *#06#, however 'fastboot getvar imei' does actually report back the proper imei number if this means anything

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

su/adb su commands do not exist

Also adb shell gives an "device/emulator does not exist error"

Additional:

Phone ICCID unknown, SIM ICCID known, model is XT1687, USA, AT&T

So basically I was an idiot and wiped all my data without a backup, got stuck in bootloader for a long time before finally flashing Pixel Experience. Was slow and had no signal so I changed back to stock moto os but with still no signal. Every single guide I have looked up online has resulted in nothing being fixed. I tried doing what was described in the OP but met with errors described above. I have installed the motorolla device manager (which claims that nothing needs updating) and I'm pretty sure it is not showing up in my device manager.

I'm at a loss at what to do short of just reactivating my old phone. Any thing I can do to fix it? If I need to provide any info please tell me.
[Moto G5 Plus Guides, News, & Discussion] NZedPred:
Can you check your root status? I know you say you are rooted, but if su gives a command does not exist error, that suggests that you have not given your shell and / or adb root permissions. Did you root through Magisk? If so, install the Magisk Manager apk (search the forums) and make sure that the relevant app is granted super user permissions.

Also, if adb gives that error ("device/emulator does not exist"), check you have enabled USB debugging - Settings > Developer options > USB debugging. If Developer options isn't there, go to Settings > About Phone, scroll to the bottom and tap on Build number 6 times.
[Moto G5 Plus Guides, News, & Discussion] Ju829:
I read through the OP again and realized I was doing it wrong. I downloaded a terminal app with root access and put in the commands you listed. Worked perfectly. Thanks