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

Search This thread

mrshahriar

Member
Aug 30, 2020
7
1
GB
meettomy.site
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 - mahi2723shahriar@gmail.com
 

ccgauvin94

New member
Jan 25, 2021
1
0
Has anyone been able to do this on LineageOS? When I run the *#808#, I get a popup saying "Connection problem or invalid MMI code"
 

afiqz1996

New member
Apr 25, 2017
4
0
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
88
17
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:
 
Jun 20, 2016
18
2
Hi All respected seniors!

can anybody please explain procedure for original persist.img backup. I have a TMO 7T PRO Mclaren and after bootloader unlock at android 11 after magisk i took all partition backup including then working finger print persist.img but after installing several magisk mods one day i woke up with no fingerpring hardware error. now i have my original persist.img at hand. i also backed up this corrupt fp persist.img.

every one here has workaround for broken persist.img but i want to know the restoration method of original woking persist.img backed up before any sensor issues..

please help!
 

starcms

Senior Member
Hi All respected seniors!

can anybody please explain procedure for original persist.img backup. I have a TMO 7T PRO Mclaren and after bootloader unlock at android 11 after magisk i took all partition backup including then working finger print persist.img but after installing several magisk mods one day i woke up with no fingerpring hardware error. now i have my original persist.img at hand. i also backed up this corrupt fp persist.img.

every one here has workaround for broken persist.img but i want to know the restoration method of original woking persist.img backed up before any sensor issues..

please help!

Simply take your backed up, original, persist.img, go to bootloader, and type

fastboot flash persist name_of_backup.img

And you'll be good as new. I recommend deleting the backup of the corrupt fp persist.img so you don't get them mixed up.

And if/when it ever happens again, simply do the same. Make sure you never ever ever lose that backup copy of original, uncorrupted persist.img
 
  • Like
Reactions: waleedbinwaheed
Jun 20, 2016
18
2
Simply take your backed up, original, persist.img, go to bootloader, and type

fastboot flash persist name_of_backup.img

And you'll be good as new. I recommend deleting the backup of the corrupt fp persist.img so you don't get them mixed up.

And if/when it ever happens again, simply do the same. Make sure you never ever ever lose that backup copy of original, uncorrupted persist.img
First of all thanks for your swift response!

Dear when i try to flash persist.img from bootloader it gives error saying its a critical partition and fastboot command not allowed, done on unlocked bootloader but error is same. Im sure this backup of persist.img was taken right away after initial bootloader unlock. So as additional precaution i took backup or broken persist.img also and double checked that both backups were separately stored.

Now for temporary solution i fillowed your guide from other thread and fp sensor is back to life again. But it worked on broken persist.img

But i want to use and learn to flash my original persist.img backup.
Kindly help in this regard.
 

starcms

Senior Member
First of all thanks for your swift response!

Dear when i try to flash persist.img from bootloader it gives error saying its a critical partition and fastboot command not allowed, done on unlocked bootloader but error is same. Im sure this backup of persist.img was taken right away after initial bootloader unlock. So as additional precaution i took backup or broken persist.img also and double checked that both backups were separately stored.

Now for temporary solution i fillowed your guide from other thread and fp sensor is back to life again. But it worked on broken persist.img

But i want to use and learn to flash my original persist.img backup.
Kindly help in this regard.

I've never ever, ever seen or heard that error reported. If you unlocked the bootloader using the token from OnePlus and did "fastboot oem unlock", there are no such thing as protected, critical partitions anymore -- hence the problem with persist being able to be so easily corrupted in the first place.

It doesn't matter if the file being flashed is "valid" or not, it will let you fastboot flash any and all partitions with literally any file.

Did you unlock the bootloader using the unofficial instructions and the unofficial MSM package that unlocks the bootloader without using the token from OnePlus and without having the phone carrier unlocked by T-Mobile?

Or did you do it the official way having the phone carrier unlocked by T-Mobile, requesting the unlock token from OnePlus, and used that along with fastboot oem unlock?
 
Last edited:
  • Like
Reactions: waleedbinwaheed
Jun 20, 2016
18
2
I've never ever, ever seen or heard that error reported. If you unlocked the bootloader using the token from OnePlus and did "fastboot oem unlock", there are no such thing as protected, critical partitions anymore -- hence the problem with persist being able to be so easily corrupted in the first place.

It doesn't matter if the file being flashed is "valid" or not, it will let you fastboot flash any and all partitions with literally any file.

Did you unlock the bootloader using the unofficial instructions and the unofficial MSM package that unlocks the bootloader without using the token from OnePlus and without having the phone carrier unlocked by T-Mobile?

Or did you do it the official way having the phone carrier unlocked by T-Mobile, requesting the unlock token from OnePlus, and used that along with fastboot oem unlock?
Yes i understand about unlocked bootloader power of flashing any partition and i have handsome experience of flashing partitions, but this error that i reported, in the first place made me post in this thread. When i rebooted to fastboot and run the command it responded with the error. I will later share screenshot with you also..

Also Im certain that this device is network unlocked because when in settings i tap on network lock it says it is unlocked and can be used with any other carrier.

And yes i bootloader unlocked this device myself after getting unlock token from oneplus after 7 days waiting period and by using cust-unlock flash method..

Should i backup my current working fixed persist.img partition before try again to flash original persist in its place? Would original partition work even after fixing broken persist?

PS i never used any MSM tool on this device uptill this moment. It came with android 10 and officially updated to android 11 OTA. I then bootloader unlocked and magisked it.
 

starcms

Senior Member
Yes i understand about unlocked bootloader power of flashing any partition and i have handsome experience of flashing partitions, but this error that i reported, in the first place made me post in this thread. When i rebooted to fastboot and run the command it responded with the error. I will later share screenshot with you also..

Also Im certain that this device is network unlocked because when in settings i tap on network lock it says it is unlocked and can be used with any other carrier.

And yes i bootloader unlocked this device myself after getting unlock token from oneplus after 7 days waiting period and by using cust-unlock flash method..

Should i backup my current working fixed persist.img partition before try again to flash original persist in its place? Would original partition work even after fixing broken persist?

Yes, it will definitely still work. All you need to do is flash it. Try renaming the original backed up file to persist.img and try fastboot flash persist persist.img

Make sure you are in the regular bootloader and not fastbootd when issuing command

Edit: Make sure you have the very latest adb and fastboot versions from Google for your PC. I betya this is the problem

Edit 2: Here's the link. Download and unzip to your adb/fastboot directory and choose to overwrite all existing files. Then try fastboot flash persist persist.img again.


Older versions can't deal with dynamic partitions and newer partitions like persist
 
Last edited:
  • Like
Reactions: waleedbinwaheed
Jun 20, 2016
18
2
Yes, it will definitely still work. All you need to do is flash it. Try renaming the original backed up file to persist.img and

Yes, it will definitely still work. All you need to do is flash it. Try renaming the original backed up file to persist.img and try fastboot flash persist persist.img

Make sure you are in the regular bootloader and not fastbootd when issuing command

Edit: Make sure you have the very latest adb and fastboot versions from Google for your PC. I betya this is the problem

Edit 2: Here's the link. Download and unzip to your adb/fastboot directory and choose to overwrite all existing files. Then try fastboot flash persist persist.img again.


Older versions can't deal with dynamic partitions and newer partitions like persist
So i tried again after fresh intalling adb and fastboot drivers along with oneplus usb drivers. but error is still there. kindly check reference images.
 

Attachments

  • error reference.jpg
    error reference.jpg
    90.4 KB · Views: 34
  • driver.PNG
    driver.PNG
    37.5 KB · Views: 34
  • bootloader.jpg
    6 MB · Views: 7

starcms

Senior Member
So i tried again after fresh intalling adb and fastboot drivers along with oneplus usb drivers. but error is still there. kindly check reference images.

It's not adb and fastboot drivers, it's the apps themselves. I see you have minimal adb installed which is very very old. Delete all that and use adb, fastboot, and the other files in the link I provided.

Edit: make sure you have stock recovery installed (not TWRP), go to bootloader, and issue the command "fastboot reboot fastboot"

This command will only work with the latest fastboot version on your PC.

That will bring you into fastbootd mode. Try the fastboot flash persist command from there. It works for me from the bootloader, but it doesn't hurt to try in fastbootd mode
 
  • Like
Reactions: waleedbinwaheed
Jun 20, 2016
18
2
It's not adb and fastboot drivers, it's the apps themselves. I see you have minimal adb installed which is very very old. Delete all that and use adb, fastboot, and the other files in the link I provided.
i copied all those files from your link in my minimal adb folder as you said. its just folder path showing now. should i run cmd from the folder itself that you linked?
 

starcms

Senior Member
i copied all those files from your link in my minimal adb folder as you said. its just folder path showing now. should i run cmd from the folder itself that you linked?

No, if you replaced/overwrote all the files you had with the latest ones in the package from Google, you are fine. But you can try that just to make sure

See my edit in the post above for something else to try
 
  • Like
Reactions: waleedbinwaheed
Jun 20, 2016
18
2
No, if you replaced/overwrote all the files you had with the latest ones in the package from Google, you are fine. But you can try that just to make sure

See my edit in the post above for something else to try
finally it worked in fastbootd mode. flashed my original persist.img but now when booted to os, finger print harware not available error is showing.

edit: This backup image was taken when fingerprint was working fine. now its showing error, also what should i do now, 1: try to fix this one using your instructions, 2: flash broken persist from fastbootd mode and try again fixing that one?
 

starcms

Senior Member
finally it worked in fastbootd mode. flashed my original persist.img but now when booted to os, finger print harware not available error is showing.

That's extremely odd...are you sure you flashed the original, non-modified, original persist.img and not the one you made after it was broken but before you fixed using instructions in thread?

Edit: If you did, then I guess you'll have to follow the instructions in thread again to get it working again, then take a backup, and save that one for future use. Unless you had already taken a backup of the broken persist.img after you followed instructions in thread to fix FP, then you could simply do fastboot flash persist with the broken but fixed persist

So strange all the odd issues you've had, especially fastboot flash persist not working in bootloader. But flashing it in fastbootd mode wouldn't cause any problems.

Edit2: What did you use to backup persist in the first place? The MSM tool? While the FP sensor was working? If so, it should definitely be working ¯\_(ツ)_/¯
 
Last edited:
  • Like
Reactions: waleedbinwaheed

starcms

Senior Member
finally it worked in fastbootd mode. flashed my original persist.img but now when booted to os, finger print harware not available error is showing.

edit: This backup image was taken when fingerprint was working fine. now its showing error, also what should i do now, 1: try to fix this one using your instructions, 2: flash broken persist from fastbootd mode and try again fixing that one?

I'd recommend 1) fixing the current one with instructions, then taking backup, and storing it for next time it gets corrupted

How are you taking backups? MSM tool?

All sensors, wifi, etc still working fine?
 
  • Like
Reactions: waleedbinwaheed
Jun 20, 2016
18
2
I'd recommend 1) fixing the current one with instructions, then taking backup, and storing it for next time it gets corrupted

How are you taking backups? MSM tool?

All sensors, wifi, etc still working fine?
so to answer all queries...

1: yes i followed one thread where i found msm tool for this device that after logging in and pressing f8 and selecting all partitions i took complete backup of all partitions in the first place right after initial bootloader unlock.

2. yes i flashed original persist.img that was working after initial bootloader unlock as said above.

3. NO i did'nt took backup of fixed persist partition earlier as i intended to use my original persist.img backup that i thought would work fine after flashing it, but it did not in my case, strange....

4. And finally yes i have fixed this persist.img and taken its backup for future use.. Also for persist file backup i used the command you quoted in your OP. to save it in SD root and from there to PC.

hope all this helps someone else too.. as this was a strange case specially fastbootd one.

Also Big thanks to You for your time and swift resposes. hats off!

EDIT: Yup all sensors, cam, wifi, all are working. infact they never caused any trouble even when initially FP went bad. they are working fine now too.
 
  • Like
Reactions: starcms

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    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.