[GUIDE] Fix PERSIST.IMG Loss Of Finger Print Sensor

QuiDC96

Member
Oct 18, 2019
14
2
0
I'm confused...
If I backup the brocken persist.img and put it on the new fresh firmware it's have to still be brocken or not because the file is brocken and useless?
I believe that after I use the MSM tools its wipe all brocken/corrupt files and give me a new/unmodified persist.img that works.

Can someone explain that magic?
 

starcms

Senior Member
May 7, 2010
901
400
83
New Orleans
I'm confused...
If I backup the brocken persist.img and put it on the new fresh firmware it's have to still be brocken or not because the file is brocken and useless?
I believe that after I use the MSM tools its wipe all brocken/corrupt files and give me a new/unmodified persist.img that works.

Can someone explain that magic?
The MSM tools don't touch persist. If it's corrupt, it cannot fix it. Once you follow the directions to fix the FP, the fix will persist through OTA updates.

HOWEVER, when relocking the bootloader, which the MSM tool does automatically, it somehow determines that the "fixed" persist is not the original one, and therefore corrupts persist again. So keep a copy of your fixed persist with FP working, and therefore if you ever run the MSM tool (or otherwise relock the bootloader), you'll still have it so it can be restored.

At the current time, it is not possible to relock the bootloader (including running the MSM tool) and keep FP working if you fixed it via this guide.
 
  • Like
Reactions: QuiDC96

QuiDC96

Member
Oct 18, 2019
14
2
0
The MSM tools don't touch persist. If it's corrupt, it cannot fix it. Once you follow the directions to fix the FP, the fix will persist through OTA updates.

HOWEVER, when relocking the bootloader, which the MSM tool does automatically, it somehow determines that the "fixed" persist is not the original one, and therefore corrupts persist again. So keep a copy of your fixed persist with FP working, and therefore if you ever run the MSM tool (or otherwise relock the bootloader), you'll still have it so it can be restored.

At the current time, it is not possible to relock the bootloader (including running the MSM tool) and keep FP working if you fixed it via this guide.

What if I never unlocked the bootloader before and I want to downgrade via MSM tools. So is there a guide to back up the persist in locked bootloader?
 

shaneg79

Senior Member
Sep 10, 2009
541
95
48
This guide no longer works for the new T-Mobile update that provides standalone 5G. I tried it with no success. It did work on the previous update that had the June security update.
 

Tech_Wun

Member
Dec 31, 2016
7
1
0
..

---------- Post added at 08:49 AM ---------- Previous post was at 08:33 AM ----------

Do you know what the correct/default permissions of the files in /persist/data and /persist/engineermode should be?

Edit: The reason I am asking is because the FP sensor works perfectly (100%, never misses a scan, literally always on first try) when I am using it to unlock an app or in an app. On the main lock screen it works about 90% of the time on first try. But on the ambient screen, it only works maybe 25% of the time at most. The vast majority of the time it fails the first three scans and the camera pops up and unlocks for me. It's definitely not a calibration issue since it works inside of Android perfectly and the only issues are at the lock screen and especially on the ambient lock screen. Never had this issue before I broke it. Tried wiping cache from Ambient app as some had suggested in other fp threads but of no help. Any advice?
I've been having the same issue. Did you have any luck?
 
Last edited:

starcms

Senior Member
May 7, 2010
901
400
83
New Orleans
This guide no longer works for the new T-Mobile update that provides standalone 5G. I tried it with no success. It did work on the previous update that had the June security update.
I'm finding this hard to believe. Persist is never touched by OTA updates.
Never ever, ever. And it's not modified by the MSM tool either (although running the msm tool or otherwise relocking the bootloader will cause persist to become corrupted again). Did you restore a backup of your fixed persist? Did you remember to make one in the first place?

Maybe factory mode/calibration tool was updated in latest OTA and isn't working anymore and you need to revert to an older version of OOS as mentioned in step 2. But if you had backed up your fixed persist, all you would need to do is restore it. Even after not having taken a backup b4 persist was first corrupted is understandable, all of us in this thread did it, but then not learning from that mistake and not taking a backup of the fixed persist either? Come on...



---------- Post added at 07:49 ---------- Previous post was at 07:46 ----------

..

---------- Post added at 08:49 AM ---------- Previous post was at 08:33 AM ----------



I've been having the same issue. Did you have any luck?
Permissions were fine/not the issue. I eventually just programmed my thumb and forefinger twice each (the only 2 fingers I use) with a perfectly clean screen and clean hands, and it unlocks on first try 95% of the time, from ambient, lock screen, and inside Android. It learns also, so the more you use it, the better it'll get. But just so you can double check, see pics for correct permissions for /persist/data. Some files/file names may differ slightly from yours. This is from my T-Mobile 7T Pro 5G McLaren, not OP8, but the instructions worked perfectly for me, and I'm positive the permissions are the same.
 

Attachments

Last edited:

shaneg79

Senior Member
Sep 10, 2009
541
95
48
I'm finding this hard to believe. Persist is never touched by OTA updates.
Never ever, ever. And it's not modified by the MSM tool either (although running the msm tool or otherwise relocking the bootloader will cause persist to become corrupted again). Did you restore a backup of your fixed persist? Did you remember to make one in the first place?

Maybe factory mode/calibration tool was updated in latest OTA and isn't working anymore and you need to revert to an older version of OOS as mentioned in step 2. But if you had backed up your fixed persist, all you would need to do is restore it. Even after not having taken a backup b4 persist was first corrupted is understandable, all of us in this thread did it, but then not learning from that mistake and not taking a backup of the fixed persist either? Come on...



---------- Post added at 07:49 ---------- Previous post was at 07:46 ----------



Permissions were fine/not the issue. I eventually just programmed my thumb and forefinger twice each (the only 2 fingers I use) with a perfectly clean screen and clean hands, and it unlocks on first try 95% of the time, from ambient, lock screen, and inside Android. It learns also, so the more you use it, the better it'll get. But just so you can double check, see pics for correct permissions for /persist/data. Some files/file names may differ slightly from yours. This is from my T-Mobile 7T Pro 5G McLaren, not OP8, but the instructions worked perfectly for me, and I'm positive the permissions are the same.

I finally got it to work I had to make a new persist backup on the previous update that ended in .10 then updated to .17 and it works not sure why that made a difference.
 
Last edited:

starcms

Senior Member
May 7, 2010
901
400
83
New Orleans
To @TheKnux and @Tech_Wun and anyone else that thinks after fixing the FP sensor, it doesn't work as well on ambient display and the unlock screen, but works perfectly fine in any/all apps once phone is unlocked:

Could you please check in /mnt/vendor/persist/data and check when the file gf_persist_unlock.so file is dated (was last modified)? Is it dated the same as all other files in /mnt/vendor/persist/data except for gf_persist.so?

If you open /mnt/vendor/persist/engineermode/fpcalibrationresult in any text viewer, you'll see the results of the fingerprint calibration done at 1+ when the phone was built. The very first line has the date and time this was done. This date should match all the files in /mnt/vendor/persist/data except for gf_persist.so.

However, in my case, gf_persist_unlock.so has a much newer date, which matches the date of gf_persist.so, which is the date I fixed the FP sensor thanks to @antnyhills (thank you sooo much for all the time you spent figuring this out!!!)

In my case, I'm pretty sure that is because before these genius instructions came out, I was messing around with *#808# and fingerprint calibration, trying to fix it, unsuccessfully, and wound up modifying/breaking gf_persist_unlock.so and didn't have a backup. However, I'm not positive that's what happened.

But considering the name of the file, and both of you not seeing the same reliability of the FP scanner at the lock screen as b4 breaking it in the first place, it would make sense that somehow your gf_persist_unlock.so got modified/corrupted as well.

So could you check the dates and let me know?

It's really a moot point tho. Even if your gf_persist_unlock.so somehow got modified/corrupted, they'd be no way to fix it without RMA to 1+. I'm just so happy to have my FP working again. If it's not quite as reliable at the lock screen, so be it. Much better than being without my phone for a few weeks or longer because I had to RMA it. It definitely works the majority of the time at ambient and lock screen after programming the same finger twice and giving it a week or so to auto calibrate/work even better. And once unlocked, it works 100% perfect, just like new.
 
Last edited:

vinayak.s19

Senior Member
Oct 14, 2016
110
56
28
Chennai
I followed the guide and got to the factory mode.
When I try to start the finger print calibration test, I get the following error: "The application cannot reach the android service for the sensor."
I am using the OP8 Indian Version.
Help!!!!
Edit: Fixed it by skipping the calibration test and restoring the FP data and then updating to the latest stable.
 
Last edited:

ryanrodio

New member
Aug 3, 2020
1
0
0
Working for me without using MSM

I was able to backup my old persist, and perform the failed calibration test and folder merge all without downgrading.

I'm using the T-Mobile variant that is currently on the latest global build. Not sure if I was just lucky or if there is a possibility of not having to downgrade first.
Also, after breaking my FP, i never attempted to go into factory calibration mode to try and fix the problem until I began following the instructions in this thread.
 

shaneg79

Senior Member
Sep 10, 2009
541
95
48
Something interesting happened today, I decided to install Android 11 developer preview 4 and I decided not to root but I noticed my fingerprint scanner is working without being rooted which is strange I wonder if somehow I could go back to 10.5.20 and get fingerprint working again without root?
 

naveedakhter01

New member
Sep 9, 2019
0
0
0
Error saving calibration

I was getting only getting 2 line of errors instead of multiple lines when calibrating. Messing around, I clicked on reliability test. Calibration was done in the same way and it finally worked *phew*.
P.S. this method does not work on 10.5.11. MSM to 10.5.4
 

dijia1124

Senior Member
May 12, 2017
105
28
28
Thanks for your great work!
I got a strange problem that may not be related to persist.img. After flashing custom kernels ( tried cleanslate and ex kernel) on my Oneplus 8 (OOS 10.5.12.IN21AA) , the whole fingerprint feature seems to be missing: I just can't unlock my phone with fingerprint, nor can I find it in Settings. But it recovers if I restore the stock kernel.
 

barisgg

Senior Member
Jan 19, 2017
108
25
28
Worked for me! Thanks for the video! I lost my finger print after flashing global on my t-mobile phone, after I fixed it I made sure to have a fingerprint registered before flashing global again, didn't have the same problem again!