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

mrshahriar

Member
Aug 30, 2020
7
0
1
Request for persist.img for OnePlus 7T Pro

Hi there, my OnePlus 7T sensors are not working.
I have found a persist.img for OnePlus 7T Pro and flashed it.
That solved the problems for all the sensors EXCEPT for this fingerprint sensor.
The persist.img's data folder only has 8 files, and it does not contain 'gf_persist.so'.
I suspect that it is not a complete persist.img, although it seems to have fixed all the other sensor problems.
May I request for another persist.img file?
Thanks.
Brother have the save device and the same problem, i couldn't find "gf_persist.so" file, Did you get any solution? Or could you give me the persist files you have? It will be a great help brother, you can contact me through my mail - [email protected]
 

afiqz1996

New member
Apr 25, 2017
4
0
1
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.
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.
i followed every step, but in my backed up persistent img only have this file in persistent/data :
my device is OP7T. i tried calibrate using *#808#. it didnt work.

*i can enroll my fp but i cannot unlock the device from lock screen. fingerprint not recognize
1612613107946.png
 
Last edited:

shakathesaint

Senior Member
Jan 12, 2009
87
17
28
The only way to permanently fix it (meaning FP sensor working with bootloader locked) is to run the MSM tool and then RMA to OnePlus asking for fingerprint recalibration. Or RMA it with a picture showing the FP error message. Believe it or not, this has occured to people who never unlocked their bootloader. And never modded their phone one bit.

If you back up your persist.img immediately when you first get the phone back before even unlocking the bootloader, you can easily restore it if/when it gets corrupted again. And not have this issue. I'd recommend backing it up even if you don't plan to unlock the bootloader again because it has happened to people that never did...

Rebranding didn't cause it. Unlocking the bootloader combined with dozens of possible different things most likely caused it.

The whole issue is due completely to OnePlus's incompetence, A10 and the new dynamic file system, OnePlus not fully understanding how it works, and putting persist in an "open" area of the phone. Instead of locking it down and making it virtually impossible to corrupt. As I said, it can even become corrupt even if the bootloader has never been unlocked...
Thanks for the explanation. My phone has exactly the same problem you described.
I'm just wondering, since it's been a while since your post, if in the meanwhile some new solution has possibly been found to avoid the need of RMA.

Thank you very much! :giggle: