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

Were you successful?


  • Total voters
    53
Search This thread

antnyhills

Senior Member
Aug 6, 2012
152
144
UTAH
Samsung Galaxy Z Fold2
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 OVERWRITTEN 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. (*#808# 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.
 
Last edited:

Duncan1982

Senior Member
Feb 6, 2014
2,486
1,815
Absolutely fantastic that you solved it, I RMA,'d mine, but for others this is Highly beneficial......?

I will also thank you for your many hours placed so that others now don't have to RMA.

Well done ......?
 

cultofluna

Senior Member
Nov 25, 2015
3,855
1,923
Google Pixel 4 XL
Google Pixel 5
1. *VERY IMPORTANT* We need to back up your broken persist.img and store it in a safe place. PC preferred. Do not leave the backup on the device as the next step will wipe the device.

Note: This requires root

Type this into terminal or ADB shell with root privileges.


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 (Do not touch or cover the sensor during any of these tests)
The test will fail and this is what we want.
Reboot.


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.

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.
Gteat job
 
  • Like
Reactions: Mesmurized

antnyhills

Senior Member
Aug 6, 2012
152
144
UTAH
Samsung Galaxy Z Fold2
So I went back to 10.5.4 as instructed. Previously on 10.5.10 and backed up persist.img before rolling back. Followed all steps correctly. Fingerprint still gets an enrollment error. I am honestly so confused what I did wrong.

And you made you you replaced all the files in the Data and Engineermode folder?

Will you also take a screenshot of the '"Passed" fingerprint test for me?
 

Fischer1234

Member
Aug 28, 2015
39
4
And you made you you replaced all the files in the Data and Engineermode folder?

Will you also take a screenshot of the '"Passed" fingerprint test for me?

Yes, I copied both data and engineer mode folders as instructed. Also, I was dumb and only did one fingerprint test. After going through all of them it did end up failing at the end.
Still wanted to give this a go before sending my phone back to OnePlus for repair.

Edit: Thought maybe upgrading from 10.5.4 to 10.5.10 would fix it after following all instructions, still have a fp enrollment error.
 

antnyhills

Senior Member
Aug 6, 2012
152
144
UTAH
Samsung Galaxy Z Fold2
Yes, I copied both data and engineer mode folders as instructed. Also, I was dumb and only did one fingerprint test. After going through all of them it did end up failing at the end.
Still wanted to give this a go before sending my phone back to OnePlus for repair.

Edit: Thought maybe upgrading from 10.5.4 to 10.5.10 would fix it after following all instructions, still have a fp enrollment error.

I'm currently working on a much easier to follow video. Should have that out in a few hours hopefully.
 
  • Like
Reactions: GHOST1010

Top Liked Posts

  • There are no posts matching your filters.
  • 53
    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 OVERWRITTEN 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. (*#808# 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.
    2
    This didn't work for me. My wifi and bluetooth are also not working so @dladz thought that fixing the fingerprint issue may help with wifi/bt.

    Precise log of the steps I took, after I took them.
    1. Factory reset using MSM tool-10.5.4
    2. Oem unlock
    3. Install MMv805 (stable channel)
    4. MM: Patch boot.img
    5. Flash boot_patched.img
    6. Backup persist.img to PC
    7. Extract persist.img files/folders
    8. Copy data/ and engineermode/ to phone/Download
    9. Phone: delete phone/data/gf_persist.so
    10. SKIP /mnt/vendor/persist/engineermode/engineermode_config first 2 lines already set to false
    11. Start fingerprint calibration
    12. Keep finger OFF sensor for Black rubber test
    13. Test successfully failed (several pages worth of red lines; last line: FAIL:GF_ERROR_PRESS_INCOMPLETE)
    (did not reboot)
    14. Copy data/ and engineermode/ over to /mnt/vendor/persist/ (merge, remember; new, remember **I didn't like this part, would have prefered to delete these folders. What do you recommend?)
    15. Reboot
    16. Fail fingerprint setup: Enrollment was not completed. Fingerprint registration error, please try again.

    This was my forth or so attempt. This last attempt (the one posted above), however, I deleted all previous .imgs/persists/everything and started from scratch just to be safe. Model of my device is IN2025.

    Did I go astray somewhere? Please see step 14.

    Thanks for this guide!
    2
    @antnyhills this is great work! But I assume you need to use device spesific persist.img? Even if its broken. I needed to rma mine because changing my display at service center broke my FP. And I think that even that I had backed up working persist.img it some how thinked that my device was different caused by different ID on a display? I tried to ask but no-one knew for sure..And that was result after talking to customer service dude who I spoke same language with..

    Correct, you need your personal persist.img

    Even though it is broken it still has all over your original factory calibrations including the fingerprint calibrations.
    1
    1. *VERY IMPORTANT* We need to back up your broken persist.img and store it in a safe place. PC preferred. Do not leave the backup on the device as the next step will wipe the device.

    Note: This requires root

    Type this into terminal or ADB shell with root privileges.


    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 (Do not touch or cover the sensor during any of these tests)
    The test will fail and this is what we want.
    Reboot.


    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.

    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.
    Gteat job
    1
    Yes, I copied both data and engineer mode folders as instructed. Also, I was dumb and only did one fingerprint test. After going through all of them it did end up failing at the end.
    Still wanted to give this a go before sending my phone back to OnePlus for repair.

    Edit: Thought maybe upgrading from 10.5.4 to 10.5.10 would fix it after following all instructions, still have a fp enrollment error.

    I'm currently working on a much easier to follow video. Should have that out in a few hours hopefully.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone