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

Search This thread

antnyhills

Senior Member
Aug 6, 2012
161
179
USA
Samsung Galaxy Z Fold3
New video guide below

VIDEO GUIDE


1. *VERY IMPORTANT* We need to back up your broken persist.img and store it in a safe place. PC preferred. We will need this later. Do not leave the backup on the device as the next step will wipe the device.

*IF YOU LOOSE THIS PERSIST.IMG BEFORE WE MODIFY IT WITH A CALIBRATION, YOU LOOSE ALL CHANCE OF FIXING THIS YOURSELF*

*IT HOLDS IMPORTANT FP CALIBRATION DATA THAT WE WILL BE OVERWRIGHTING IN THE NEXT FEW STEPS*

Note: This requires root​

Type this into terminal or ADB shell with root privileges.
Code:
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

Backup the partition to another device. Preferably a PC as you may need one in the later steps.

2. Next we have to restore our OS to an earlier OOS. (10.5.4 is what I used and recomended)

Use the MSMTool to restore your device to 10.5.4.​
Note: You will loose your unlocked bootloader and will be required to unlock your bootloader once more.​

Guide and Source for MSMTool
MSMTool 10.5.4 Download

3. Next step is to unlock the built in 'Factory Mode' I have a guide on how to do this below.

[GUIDE] Unlock Factory Mode *root*

4. Now we need to perform a FP calibration. We want to fail.

  • Enter Factory Mode as shown in the previous guide. (*#801# in the stock dialer)
  • Swipe over to "Device Debugging"
  • Select "Finger print test"
  • Select "Finger print calibration test(Pure White - 90% Blue)
  • Select "Start Test"
  • Keep on going through the tests (You must hold an object or your finger over sensor on all BUT THE BLACK RUBBER TEST of these test for it to work!)
  • The test will fail and this is what we want. There should be a lot of red lines, if you only have one or two try again.

5. We need to extract the the old broken persist.img
NOTE: It is important that we extract the backed up persist.img as it has been unmodified by our recent calibration. This persist.img although broken still has all our working calibrations on it including Finger Print calibrations.

The way I did this is by opening it extracting it via 7-ZIP on my PC​

Once extracted move the 'DATA' folder and the 'ENGINEERMODE' folder to the root of your sdcard.​


6. Download a root explorer. I highly recommend 'Solid Explorer' from the Play Store.

  • Open 'DATA' folder and delete 'gf_persist.so'
  • Select the 'DATA' and 'ENGINEERMODE' folders you just put on the device and place them at /mnt/vendor/persist/
  • It should ask you if you want to keep the old or new files. Select to keep the new.
  • Reboot.

7. If you followed all my steps correctly this you should be able to go into settings and add your fingerprints.


Why does this work?

Good question... I think what is happening is something in the persist partition breaks which causes the device to think that the sensor is not calibrated when in fact it still is.
When we start and fail a new calibration this fixes whatever was broken in our partition. But now we have a failed calibration.
So what we do is take the files from our backed up persist partition and move over all the necessary files that have our original calibration. But now our partition has the part of it that wasn't working fixed.

I spent a good many days working on this fix (1-2 hundred hours or so). I hope you can be respectful if you have issues. Please kindly ask below and I'll do my best to help.
 

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
I can confirm working on OOS 1.5.6 too. I downgraded from 10.5.9 with downgrade rom, which restores OOS to 10.5.6, and followed your guide and it worked as a charm. The only problem is that i cannot lock back the bootloader, cause it breaks FP again. Did you maybe try to lock it to try? Nice work man.
 

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
T-Mobile OnePlus 8 here. Stock firmware, orginally had my bootloader unlocked, rooted with TWRP and Magisk, backed up modem, converted to international firmware (10.5.7), lost signal, had to restore modem, ota'd to 10.5.9, unlocked bootloader again, rooted, etc. All while having a working FP the whole time. Ended up flashing EdXposed via Magisk, broke SafetyNet, etc, did a factory reset on TWRP (3.4.0-1 test), wiped data, rebooted recovery, rebooted system, booted back to TWRP. Installed Magisk to see if it'll boot with root, same thing. MSM'd back to T-Mobile firmware, then converted to international again. After the conversion was done and I unlocked bootloader and rebooted to system, my FP was broken. Ended up MSM'ing back to T-Mobile stock to see if it would work again, nothing.

TL;DR does this method only work if I had a working FP to begin with like it did stock out of the box?
 

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
T-Mobile OnePlus 8 here. Stock firmware, orginally had my bootloader unlocked, rooted with TWRP and Magisk, backed up modem, converted to international firmware (10.5.7), lost signal, had to restore modem, ota'd to 10.5.9, unlocked bootloader again, rooted, etc. All while having a working FP the whole time. Ended up flashing EdXposed via Magisk, broke SafetyNet, etc, did a factory reset on TWRP (3.4.0-1 test), wiped data, rebooted recovery, rebooted system, booted back to TWRP. Installed Magisk to see if it'll boot with root, same thing. MSM'd back to T-Mobile firmware, then converted to international again. After the conversion was done and I unlocked bootloader and rebooted to system, my FP was broken. Ended up MSM'ing back to T-Mobile stock to see if it would work again, nothing.

TL;DR does this method only work if I had a working FP to begin with like it did stock out of the box?

Just follow the guide, you'll have it working. You just have to backup your current persist
 

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
While on 10.5.7, unlocked bootloader, I flash TWRP, then reboot, and it boots back to TWRP. When I flash Magisk 20.4 zip in TWRP, it goes to boot, then enters CrashDump Mode. When I try and use the flash-all to downgrade to 10.5.4, I get a bunch of fastboot "cannot flash critical partitions" errors, it fails, and goes back to CrashDump Mode. What am I doing wrong? Also, is it really necessary to downgrade to an earlier version of OOS to use Engineering Mode or can I use 10.5.7?
 
Last edited:

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
While on 10.5.7, unlocked bootloader, I flash TWRP, then reboot, and it boots back to TWRP. When I flash Magisk 20.4 zip in TWRP, it goes to boot, then enters CrashDump Mode. When I try and use the flash-all to downgrade to 10.5.4, I get a bunch of fastboot "cannot flash critical partitions" errors, it fails, and goes back to CrashDump Mode. What am I doing wrong? Also, is it really necessary to downgrade to an earlier version of OOS to use Engineering Mode or can I use 10.5.7?

When you unlock bootloader, only boot into TWRP, then install magisk, i thin it Is still recommend to only boot into TWRP, not to flash it.
 

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
When you unlock bootloader, only boot into TWRP, then install magisk, i thin it Is still recommend to only boot into TWRP, not to flash it.

Thank you so much, that worked! New problem, what do I do since I can't downgrade to an earlier OOS (10.5.4)?

Performing the test on T-Mobile 10.5.7, when performing the test, nothing is failing after pressing start test. Its all passing, what should I do?

When trying to downgrade using the 10.5.4 MSM Tool. it gives an error of "Unsupported Target TMO" and "param preload" and fails.
 
Last edited:

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
Thank you so much, that worked! New problem, what do I do since I can't downgrade to an earlier OOS (10.5.4)?

Performing the test on T-Mobile 10.5.7, when performing the test, nothing is failing after pressing start test. Its all passing, what should I do?

When trying to downgrade using the 10.5.4 MSM Tool. it gives an error of "Unsupported Target TMO" and "param preload" and fails.

Did you follow the instructions in test exactly? In second test you must't press the sensor.
Can help you with TMobile model, I have international one.
 

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
I figured it out. I was just being a dumbass I guess. Has anyone noticed the fingerprint sensor not being able to read that well compared to before it was broken? It seems like it fails a lot more before it succeeds. Unless now that it's working, we can perform the calibration again and it'll work better?
 

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
I figured it out. I was just being a dumbass I guess. Has anyone noticed the fingerprint sensor not being able to read that well compared to before it was broken? It seems like it fails a lot more before it succeeds. Unless now that it's working, we can perform the calibration again and it'll work better?

Don't know about that, mine works just fine
 
  • Like
Reactions: TheKnux

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
So I think I messed up, I ended up performing the calibration again, while it was already working, and now it says "fingerprint hardware not present" any suggestions on how to fix? I performed the instructions in the guide (again) and nothing worked. When the error pops up, if I press back, the error message goes away and the FP icon is there. When I tap on it, it lights up white but doesn't vibrate or register anything. I already used the MSM tool to go back to Tmobile stock, then used the fastboot ROM to go to Global 10.5.7, followed the guide again, still nothing.
 
Last edited:

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
So I think I messed up, I ended up performing the calibration again, while it was already working, and now it says "fingerprint hardware not present" any suggestions on how to fix? I performed the instructions in the guide (again) and nothing worked. When the error pops up, if I press back, the error message goes away and the FP icon is there. When I tap on it, it lights up white but doesn't vibrate or register anything. I already used the MSM tool to go back to Tmobile stock, then used the fastboot ROM to go to Global 10.5.7, followed the guide again, still nothing.

The initial backup of the persist.img should do the trick, if you repeat the process once again, it should work
 

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
The initial backup of the persist.img should do the trick, if you repeat the process once again, it should work

I tried that, multiple times. Still not working. Is it possible for someone to upload their persist.img so I can try it or is it device specific? Granted, I pulled my initial persist.img from stock rooted Tmobile ROM AFTER I broke it even though it worked before (long story). I wasn't able to downgrade to 10.5.4 because when I tried using the MSM tool, it gave me a TMO device error and I couldn't use a fastboot ROM to go to 10.5.4 cause it kept entering CrashDump mode every time it tried rebooting to fastboot to finish the flash process .
 

dzontra83

Senior Member
Aug 24, 2010
366
70
OPPO Find X3 Pro
I tried that, multiple times. Still not working. Is it possible for someone to upload their persist.img so I can try it or is it device specific? Granted, I pulled my initial persist.img from stock rooted Tmobile ROM AFTER I broke it even though it worked before (long story). I wasn't able to downgrade to 10.5.4 because when I tried using the MSM tool, it gave me a TMO device error and I couldn't use a fastboot ROM to go to 10.5.4 cause it kept entering CrashDump mode every time it tried rebooting to fastboot to finish the flash process .

Your cannot use someone else's persist, you must't use yours.
 

TheKnux

Senior Member
Sep 28, 2011
2,927
920
Akron
Nexus Player
OnePlus 9
Your cannot use someone else's persist, you must't use yours.

What about someone else's DATA and ENGINEERINGMODE folders? I've tried everything. Even recalibrating multiple times. It's not giving me a bunch of errors like it did before, just one error. The last error is FAIL! OPERATION_STEP_GET_KB_CALIBRATION TEST FAIL:GF_ERROR_GENERIC

Just wondering, what is the point of downgrading to an earlier OOS? If I was able to do it on the Tmobile firmware with success, is there an importance in downgrading?
 
Last edited:

starcms

Senior Member
Thank you so very very much!!! I have a T-Mobile 7T Pro 5G McLaren which hasn't had a working fp in almost 2 months. I hadn't made a backup of persist before the fp broke, so I thought I was completely screwed. Luckily, I did make a backup of persist before trying to use the fp calibration tool myself without any luck shortly after it broke (basically just clicking stuff and guessing lol). Found this thread and I had my FP scanner working again perfectly in less than 15 minutes!!!! Thank you soooo much for all the hours and effort you put into figuring this out!!!!!!!

Didn't have to run the msm tool to revert to older version of OOS and lose all my data either!!

Just one question and it's just for my curiosity. Why do we delete "gf_persist.so" from our original persist.img before copying/pasting into /persist partition after "calibration"? Is gf_persist.so not a file containing part of the original calibration? Is that the file which is being fixed by running the hidden calibration commands?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    New video guide below

    VIDEO GUIDE


    1. *VERY IMPORTANT* We need to back up your broken persist.img and store it in a safe place. PC preferred. We will need this later. Do not leave the backup on the device as the next step will wipe the device.

    *IF YOU LOOSE THIS PERSIST.IMG BEFORE WE MODIFY IT WITH A CALIBRATION, YOU LOOSE ALL CHANCE OF FIXING THIS YOURSELF*

    *IT HOLDS IMPORTANT FP CALIBRATION DATA THAT WE WILL BE OVERWRIGHTING IN THE NEXT FEW STEPS*

    Note: This requires root​

    Type this into terminal or ADB shell with root privileges.
    Code:
    dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

    Backup the partition to another device. Preferably a PC as you may need one in the later steps.

    2. Next we have to restore our OS to an earlier OOS. (10.5.4 is what I used and recomended)

    Use the MSMTool to restore your device to 10.5.4.​
    Note: You will loose your unlocked bootloader and will be required to unlock your bootloader once more.​

    Guide and Source for MSMTool
    MSMTool 10.5.4 Download

    3. Next step is to unlock the built in 'Factory Mode' I have a guide on how to do this below.

    [GUIDE] Unlock Factory Mode *root*

    4. Now we need to perform a FP calibration. We want to fail.

    • Enter Factory Mode as shown in the previous guide. (*#801# in the stock dialer)
    • Swipe over to "Device Debugging"
    • Select "Finger print test"
    • Select "Finger print calibration test(Pure White - 90% Blue)
    • Select "Start Test"
    • Keep on going through the tests (You must hold an object or your finger over sensor on all BUT THE BLACK RUBBER TEST of these test for it to work!)
    • The test will fail and this is what we want. There should be a lot of red lines, if you only have one or two try again.

    5. We need to extract the the old broken persist.img
    NOTE: It is important that we extract the backed up persist.img as it has been unmodified by our recent calibration. This persist.img although broken still has all our working calibrations on it including Finger Print calibrations.

    The way I did this is by opening it extracting it via 7-ZIP on my PC​

    Once extracted move the 'DATA' folder and the 'ENGINEERMODE' folder to the root of your sdcard.​


    6. Download a root explorer. I highly recommend 'Solid Explorer' from the Play Store.

    • Open 'DATA' folder and delete 'gf_persist.so'
    • Select the 'DATA' and 'ENGINEERMODE' folders you just put on the device and place them at /mnt/vendor/persist/
    • It should ask you if you want to keep the old or new files. Select to keep the new.
    • Reboot.

    7. If you followed all my steps correctly this you should be able to go into settings and add your fingerprints.


    Why does this work?

    Good question... I think what is happening is something in the persist partition breaks which causes the device to think that the sensor is not calibrated when in fact it still is.
    When we start and fail a new calibration this fixes whatever was broken in our partition. But now we have a failed calibration.
    So what we do is take the files from our backed up persist partition and move over all the necessary files that have our original calibration. But now our partition has the part of it that wasn't working fixed.

    I spent a good many days working on this fix (1-2 hundred hours or so). I hope you can be respectful if you have issues. Please kindly ask below and I'll do my best to help.
    1
    I figured it out. I was just being a dumbass I guess. Has anyone noticed the fingerprint sensor not being able to read that well compared to before it was broken? It seems like it fails a lot more before it succeeds. Unless now that it's working, we can perform the calibration again and it'll work better?

    Don't know about that, mine works just fine
    1
    Thank you so very very much!!! I have a T-Mobile 7T Pro 5G McLaren which hasn't had a working fp in almost 2 months. I hadn't made a backup of persist before the fp broke, so I thought I was completely screwed. Luckily, I did make a backup of persist before trying to use the fp calibration tool myself without any luck shortly after it broke (basically just clicking stuff and guessing lol). Found this thread and I had my FP scanner working again perfectly in less than 15 minutes!!!! Thank you soooo much for all the hours and effort you put into figuring this out!!!!!!!

    Didn't have to run the msm tool to revert to older version of OOS and lose all my data either!!

    Just one question and it's just for my curiosity. Why do we delete "gf_persist.so" from our original persist.img before copying/pasting into /persist partition after "calibration"? Is gf_persist.so not a file containing part of the original calibration? Is that the file which is being fixed by running the hidden calibration commands?

    I would assume that file is what is being "fixed" yes. If you were to use your original the guide would not work. I would love to see what in that file changes to simplify the guide, but that is nearly impossible based on the type of file it is.
    1
    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 doubt it has anything to do with this fix, I would try adding your fingerprints again.
    1
    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.