• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Were you successful?


  • Total voters
    58
Search This thread

Smittyzz

Senior Member
Sep 16, 2011
354
44
Wanna thank you for this. I broke my screen and bought a used one that was a in2020 and I had a 2025.. the 2020 didn't connect to Verizon so I put my motherboard in but had fingerprint issues.. after watching this I pulled these files from the original motherboard and put them on my 2025 and am now set thank you again 🖤
 
I don't know why, but I didn't have to do any of this for some reason.
I had the enrollment issue on build 11.0.8.8.IN11AA and the version before.
I unlocked the bootloader so I could get root. While I was rushing through the initial device setup after the factory reset the fingerprint sensor just worked. Didn't even need to root or start this guide.

I do thank everyone involved in its creation and hope it helps many a person who wasn't as lucky as myself.
 

byAidan

Senior Member
Dec 28, 2012
226
123
OnePlus 8 Pro
I've just been brainstorming a potential way to keep the fingerprint working after we re-lock our bootloaders (Haven't tested it at all though, just ideas right now).

As you know, the MSM tool uses a file ending in the extension ".ops", for example, "instantnoodlep_15_E.34_210201.ops" and this is around 6.5GB in size and contains all of the partitions/data required by the tool to unbrick a OnePlus device.

Now, there's a tool on GitHub that allows you to decrypt .ops files, so that you can see each file inside of it (A bit like extracting a zip file for example). The tool is located here - https://github.com/bkerler/oppo_decrypt.

The tool also allows you to re-compile the individual files back into a .ops file once you have finished doing whatever changes you want to them.

So, if we are able to extract the .ops file, replace the persist file with our working one and then re-compile the .ops file and use it to restore our phones via MSM it would hopefully use the working persist partition AND re-lock the bootloader at the same time.

I no longer have a OnePlus 8 Pro so I can't test this but thought it might help for anyone willing to investigate it further.

(Happy to be told this idea is stupid and won't work by the way, I won't be offended!).

EDIT 1: I've also stumbled across this thread in the OnePlus 7 Pro section where people are trying to do a similar thing but with a different goal - Having a magisk patched boot.img on a locked bootloader. They've been able to edit the files and re-flash them using MSM tool. It looks like this definitely could work for our persist partition issue for anyone willing to try it.

EDIT 2: Another thread to read through with a similar idea and some success for what they were trying to achieve (They can flash a different ROM version with a locked bootloader).
 
Last edited:
  • Like
Reactions: Unn113

NoPlanXD

Member
Mar 2, 2015
33
21
OnePlus 8 Pro
I've just been brainstorming a potential way to keep the fingerprint working after we re-lock our bootloaders (Haven't tested it at all though, just ideas right now).

As you know, the MSM tool uses a file ending in the extension ".ops", for example, "instantnoodlep_15_E.34_210201.ops" and this is around 6.5GB in size and contains all of the partitions/data required by the tool to unbrick a OnePlus device.

Now, there's a tool on GitHub that allows you to decrypt .ops files, so that you can see each file inside of it (A bit like extracting a zip file for example). The tool is located here - https://github.com/bkerler/oppo_decrypt.

The tool also allows you to re-compile the individual files back into a .ops file once you have finished doing whatever changes you want to them.

So, if we are able to extract the .ops file, replace the persist file with our working one and then re-compile the .ops file and use it to restore our phones via MSM it would hopefully use the working persist partition AND re-lock the bootloader at the same time.

I no longer have a OnePlus 8 Pro so I can't test this but thought it might help for anyone willing to investigate it further.

(Happy to be told this idea is stupid and won't work by the way, I won't be offended!).

EDIT 1: I've also stumbled across this thread in the OnePlus 7 Pro section where people are trying to do a similar thing but with a different goal - Having a magisk patched boot.img on a locked bootloader. They've been able to edit the files and re-flash them using MSM tool. It looks like this definitely could work for our persist partition issue for anyone willing to try it.

EDIT 2: Another thread to read through with a similar idea and some success for what they were trying to achieve (They can flash a different ROM version with a locked bootloader).
As I want to send in my Phone to oneplus today anyways, I will try repacking my persist backup with this Idea and flash it. will see if it works
 
  • Like
Reactions: Unn113

NoPlanXD

Member
Mar 2, 2015
33
21
OnePlus 8 Pro
As I want to send in my Phone to oneplus today anyways, I will try repacking my persist backup with this Idea and flash it. will see if it works

Aight, results negative unfortunately, still only fp with unlocked bootloader.

My Steps:

1. Unpacked official msm .ops file.
2. Replaced the persist.img with my backed up persist.img
3. Repacked and flashed with msm recovery.

I think the problem lies within the persist itself. As we require root for backing it up, persist is already modified, I can see a magisk folder inside my backup. I guess some hashes are invalid then, which the phone detects while trying to access the fingerprint sensor data. Unlocking Bootloader seems to lift that verification for geniuine signed partitions would be my best guess.

Maybe someone can find a way to mount persist and modify it, so the image is in stock condition to reflash it or pack it into the .ops file which you can build yourself as mentioned here.

I myself will RMA my phone and say goodbye to Rooting/Custom Roms after that, at least on this phone. Messing around with it always leads to problems like these. I'll just use it as it was intended to and will be happy when all apps including banking/gpay will finally work again without limitations and workarounds.
 
  • Sad
Reactions: byAidan

Unn113

Senior Member
Nov 19, 2010
1,063
776
OnePlus 8
OnePlus 8 Pro
Aight, results negative unfortunately, still only fp with unlocked bootloader.

My Steps:

1. Unpacked official msm .ops file.
2. Replaced the persist.img with my backed up persist.img
3. Repacked and flashed with msm recovery.

I think the problem lies within the persist itself. As we require root for backing it up, persist is already modified, I can see a magisk folder inside my backup. I guess some hashes are invalid then, which the phone detects while trying to access the fingerprint sensor data. Unlocking Bootloader seems to lift that verification for geniuine signed partitions would be my best guess.

Maybe someone can find a way to mount persist and modify it, so the image is in stock condition to reflash it or pack it into the .ops file which you can build yourself as mentioned here.

I myself will RMA my phone and say goodbye to Rooting/Custom Roms after that, at least on this phone. Messing around with it always leads to problems like these. I'll just use it as it was intended to and will be happy when all apps including banking/gpay will finally work again without limitations and workarounds.
Maybe twrp backup will do, root isn't required
 

Aleplus

Member
Jul 13, 2020
41
1
After this command, ADB gives an error
dd if=/dev/block/bootdevice/by-name/persist of=/sdcard/persist.img

dd is not an internal or external command, executable program, or batch file.

I do not know what to do
help me please
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Aight, results negative unfortunately, still only fp with unlocked bootloader.

    My Steps:

    1. Unpacked official msm .ops file.
    2. Replaced the persist.img with my backed up persist.img
    3. Repacked and flashed with msm recovery.

    I think the problem lies within the persist itself. As we require root for backing it up, persist is already modified, I can see a magisk folder inside my backup. I guess some hashes are invalid then, which the phone detects while trying to access the fingerprint sensor data. Unlocking Bootloader seems to lift that verification for geniuine signed partitions would be my best guess.

    Maybe someone can find a way to mount persist and modify it, so the image is in stock condition to reflash it or pack it into the .ops file which you can build yourself as mentioned here.

    I myself will RMA my phone and say goodbye to Rooting/Custom Roms after that, at least on this phone. Messing around with it always leads to problems like these. I'll just use it as it was intended to and will be happy when all apps including banking/gpay will finally work again without limitations and workarounds.
    Maybe twrp backup will do, root isn't required
    1
    I've just been brainstorming a potential way to keep the fingerprint working after we re-lock our bootloaders (Haven't tested it at all though, just ideas right now).

    As you know, the MSM tool uses a file ending in the extension ".ops", for example, "instantnoodlep_15_E.34_210201.ops" and this is around 6.5GB in size and contains all of the partitions/data required by the tool to unbrick a OnePlus device.

    Now, there's a tool on GitHub that allows you to decrypt .ops files, so that you can see each file inside of it (A bit like extracting a zip file for example). The tool is located here - https://github.com/bkerler/oppo_decrypt.

    The tool also allows you to re-compile the individual files back into a .ops file once you have finished doing whatever changes you want to them.

    So, if we are able to extract the .ops file, replace the persist file with our working one and then re-compile the .ops file and use it to restore our phones via MSM it would hopefully use the working persist partition AND re-lock the bootloader at the same time.

    I no longer have a OnePlus 8 Pro so I can't test this but thought it might help for anyone willing to investigate it further.

    (Happy to be told this idea is stupid and won't work by the way, I won't be offended!).

    EDIT 1: I've also stumbled across this thread in the OnePlus 7 Pro section where people are trying to do a similar thing but with a different goal - Having a magisk patched boot.img on a locked bootloader. They've been able to edit the files and re-flash them using MSM tool. It looks like this definitely could work for our persist partition issue for anyone willing to try it.

    EDIT 2: Another thread to read through with a similar idea and some success for what they were trying to achieve (They can flash a different ROM version with a locked bootloader).
    1
    EDIT 1: I've also stumbled across this thread in the OnePlus 7 Pro section where people are trying to do a similar thing but with a different goal - Having a magisk patched boot.img on a locked bootloader.
    This has already been done on my rom for Oneplus 8: here

    And there is no need to extract or decrypt anything.
    1
    I've just been brainstorming a potential way to keep the fingerprint working after we re-lock our bootloaders (Haven't tested it at all though, just ideas right now).

    As you know, the MSM tool uses a file ending in the extension ".ops", for example, "instantnoodlep_15_E.34_210201.ops" and this is around 6.5GB in size and contains all of the partitions/data required by the tool to unbrick a OnePlus device.

    Now, there's a tool on GitHub that allows you to decrypt .ops files, so that you can see each file inside of it (A bit like extracting a zip file for example). The tool is located here - https://github.com/bkerler/oppo_decrypt.

    The tool also allows you to re-compile the individual files back into a .ops file once you have finished doing whatever changes you want to them.

    So, if we are able to extract the .ops file, replace the persist file with our working one and then re-compile the .ops file and use it to restore our phones via MSM it would hopefully use the working persist partition AND re-lock the bootloader at the same time.

    I no longer have a OnePlus 8 Pro so I can't test this but thought it might help for anyone willing to investigate it further.

    (Happy to be told this idea is stupid and won't work by the way, I won't be offended!).

    EDIT 1: I've also stumbled across this thread in the OnePlus 7 Pro section where people are trying to do a similar thing but with a different goal - Having a magisk patched boot.img on a locked bootloader. They've been able to edit the files and re-flash them using MSM tool. It looks like this definitely could work for our persist partition issue for anyone willing to try it.

    EDIT 2: Another thread to read through with a similar idea and some success for what they were trying to achieve (They can flash a different ROM version with a locked bootloader).
    As I want to send in my Phone to oneplus today anyways, I will try repacking my persist backup with this Idea and flash it. will see if it works
  • 58
    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
    Aight, results negative unfortunately, still only fp with unlocked bootloader.

    My Steps:

    1. Unpacked official msm .ops file.
    2. Replaced the persist.img with my backed up persist.img
    3. Repacked and flashed with msm recovery.

    I think the problem lies within the persist itself. As we require root for backing it up, persist is already modified, I can see a magisk folder inside my backup. I guess some hashes are invalid then, which the phone detects while trying to access the fingerprint sensor data. Unlocking Bootloader seems to lift that verification for geniuine signed partitions would be my best guess.

    Maybe someone can find a way to mount persist and modify it, so the image is in stock condition to reflash it or pack it into the .ops file which you can build yourself as mentioned here.

    I myself will RMA my phone and say goodbye to Rooting/Custom Roms after that, at least on this phone. Messing around with it always leads to problems like these. I'll just use it as it was intended to and will be happy when all apps including banking/gpay will finally work again without limitations and workarounds.
    Maybe twrp backup will do, root isn't required
    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