yashsingh1/xdaforums huggingface dataset:
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Omg, I've been messing with this thing for 2 months trying to fix it, all because I didn't take a backup of my /persist as soon as I got the phone, but there is a way to fix it!!! The only pre-requisites are that:

A) you still have your own /persist (that came with your specific phone, didn't overwrite it with one from the forums and didn't save your original somewhere) AND

B) all sensors still work (only the fingerprint scanner is broken) AND

C) that you have NEVER ran the hidden fingerprint calibration tools accessible from *#808# (unless you have a backup of /persist from before you did that)

Follow these simple instructions and enjoy:

https://xdaforums.com/oneplus-8/how-to/guide-fix-persist-img-loss-finger-print-t4126455

You can ignore the entire part about having to run the MSM tool to roll back to a previous version of OOS (Step 2). Therefore, no data is lost, no factory reset is required, etc.

Also in very first part of Step 4, you need to dial *#808#, not *#801#

It took me less than 15 minutes and now it's good as new!!! Please give the OP thanks! He spent almost 200 hours figuring this out (and I don't doubt it; I must have spent easily over 20 hours myself and didn't get anywhere...). All I did was find his genius instructions and post them here.

Edit: And to add one last step to the guide, after you finish and get the fp scanner working again, please be sure to take a backup of your now fixed persist partition and store it in at least two different locations. Because if you are reading this, you are most likely modding your phone with at least Magisk (why else unlock the bootloader? ;) and almost anything can cause persist to be corrupted. For me, it was simply installing a bad build of magisk canary back in May that did it. It's not just important for those installing aftermarket ROMs. It's vital for anyone who even thinks about unlocking the bootloader on this device. Because even the act of relocking the bootloader has caused persist to be corrupted for some...

Edit2: If you run the MSM tool after fixing persist, or manually relock the bootloader, you'll wind up with your FP being broken again. I'm assuming because the checksum of the "fixed" persist doesn't match that of the original, unmodified persist, so it gets marked as corrupt again. So you'll need to unlock the bootloader and restore/flash your backed up, fixed persist (you did back it up this time, right? ;) Impossible to run msm tool to get back to stock AND have FP working. Bootloader must be unlocked after using msm tool and fixed persist restored.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] the hellboy:
please help HD9010 indian firmware currently..before i had global

i messed up my persist too while reverting back from open beta to stable via fastboot

now fingerprint enrollment error

i tried the guide but its not the same with 7tpro

there wasnt 'gf_persist.so' in data folder of my extracted persist.img

and calibrating was confusing for me but i did it upro my limit but i didnt have those many reds as the original OP had in his guide video while calibrating the fp

so please can you be kind enough to share your whole process that you used to manage the fingerprint error issue?

like what roms you used before and after or during fix?

and lastly, since the backedup persist didnt work i deleted and again backedup the persist in next attempt so it means my fingerprint is gone permanently? maybe?

please help me..ive spent my whole night and day searching and trying workarounds flashing roms back and forth
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
I used his exact instructions on my 7T Pro 5G McLaren edition from T-Mobile. With a few helpful tips I added. You must have the global version of the 7T Pro McLaren since you are talking about open beta and stable releases. Unfortunately I can't help you there. It seems that the TMobile 7T Pro 5G McLaren is much more similar to the OP8 in some ways than the global 7T Pro, especially when it comes to OOS, partitioning, extra security crap, etc.

Edit:. You are in the wrong forum. You don't even have the global 7T Pro McLaren. You have the HD1910 Global (originally Chinese version) 7T Pro. Wrong forum. The 7T Pros didn't even have this issue (or if they did, it was no where near as widespread, I've never even seen it mentioned a single time). To the best of my knowledge, it began with the 7T Pro 5G McLaren from T-Mobile which was the newest phone released by 1+ until the OP8.

And if you deleted your backup of your original persist after trying to fix it unsuccessfully, it's now broken forever regardless. You need to RMA.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] derget1212:
Late response, but this worked 100% for me after switching back to stock from AOSiP.

Thank you!
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Glad to hear it worked!

One important thing to add:

If you run the MSM tool after fixing persist, or manually relock the bootloader, you'll wind up with your FP being broken again. I'm assuming because the checksum of the "fixed" persist doesn't match that of the original, unmodified persist, so it gets marked as corrupt again. So you'll need to unlock the bootloader and restore/flash your backed up, fixed persist (you did back it up, right? ;). Impossible to run msm tool to get back to stock AND have FP working. Bootloader must be unlocked after using msm tool and fixed persist restored.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] cgrimm9:
in the guide it tells you to get your phone into factory mode but does not tell you to take it out of factory mode. of you turn factory mode off and use the msm tool will fingerprint still work afterwords
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Apparently you need to reread the instructions
[OnePlus 7T Pro 5G McLaren Guides, News etc.] cgrimm9:
I did step three says.

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

https://xdaforums.com/oneplus-8-pro/how-to/guide-unlock-factory-mode-root-t4118527

No where on this instructions says to relock the factory mode. I am just asking if you where to do that will fingerprint scanner work after doing msm tool.

I did the process 2 times now. Have no interest in doing it again unless I need to update. I just putting some thought in why I don't know if it's relavent or not just asking. sometimes a difficult problem can have a easy solution just got to figure it out
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Yes, you can relock factory mode when done. Just re-edit those 2 lines. And once you have your FP working again, please be sure to make a backup of your fixed persist.img. Then you'll never have to do all the steps again. Simply restore your fixed persist.img if FP ever breaks again.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] albinoman887:
yep. same here spent so much time on it. Then me and that dev crossed paths. i told him what i found and he told me what he found and together it birthed that hack

fp also works in custom roms now
[OnePlus 7T Pro 5G McLaren Guides, News etc.] Trevaryn:
So this fixed my issue with registering my fingerprints, but even after registering 5 prints, when I go to unlock my phone or anything that uses my prints scanning fails like 90% of the time. I have to press really hard or just put in my pin to get my phone to unlock. I removed my screen protector and cleaned my screen. Is there a way to recalibrate the scanner?
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Program each finger twice. Also, it'll get much, much, much better with time as it autocalibrates/learns over a week or so.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] pgg285:
I don't quite follow step 5 in the guide:

Also, do you run the steps after flashing a custom ROM?
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
For step 5, just extract it as if it was a zip file on your PC.

After fixing persist and getting FP working, make sure you make a backup of the fixed persist.img and save it in at least 2 or 3 different places to be safe. Occasionally for custom ROMs, to get the FP working after flashing ROM, take your fixed persist, go to fastboot, and do "fastboot flash persist your_backed_up_fixed_persist.img"
[OnePlus 7T Pro 5G McLaren Guides, News etc.] Betrayy:
i just wanted to say that for some weird or maybe lucky reason, i did not have to reflash my backed up persist after using the msm to get back to stock from the aosip custom rom. I used the bootloader unlock trick through modded msm to install the rom and i went back using msm and fingerprint worked on the get go. I did not have to unlock bootloader and reflash persist.img .. not sure why i didnt have to its weird ( i never flashed my persist at all, even after installing the custom rom)
[OnePlus 7T Pro 5G McLaren Guides, News etc.] AssyrianHero:
i think i lost my fingerprint forever because i have never done any backup and i flashed custom rom so RIP my fingerprint.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] zizzyboi:
Would it make a difference if i dont lock factory mode or leave it unlocked?
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
That's exactly what these instructions are meant to fix...
[OnePlus 7T Pro 5G McLaren Guides, News etc.] mrshahriar:
Brother i am suffering the same problem with same device OP 7T PRO, Did you managed to solve the problem? It will be a great help if you tell me

My mail id - mahi2723shahriar@gmail.com
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
The instructions only work for the T-Mobile 7T Pro 5G Mclaren edition, all OP8, all OP8 pro, no idea about OP8T. That's because this was the first device that OnePlus used a different format for persist. That's confirmed by you not having gf_persist.so.

You would need to look at the forums for the OnePlus 7T Pro for a possible answer: https://xdaforums.com/c/oneplus-7t-pro.9327/ The forums you are in now are ONLY for the HD1925, the T-Mobile branded 7T Pro 5G Mclaren variant.

And lastly, if you deleted your original persist.img (the one with broken fp), which it sounds like you did, and then wiped persist again afterwards, then there is absolutely no hope of fixing it besides sending it to OnePlus. Because you've lost your entire original persist if that is the case, unless you still have a backup of original persist.img with broken fp from before you tried fixing it.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
See my reply directly above this
[OnePlus 7T Pro 5G McLaren Guides, News etc.] waleedbinwaheed:
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!
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
I already answered in your other thread. Please don't double post.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] waleedbinwaheed:
Sure. Appreciated.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
If gf_persist.so is what's causing the issue of it not working anywhere near as well as it should, then you/we are crap outta luck because that file must be over-written as per the instructions to get the FP sensor working again. Only way to properly restore that file is per re-cal by OnePlus. However, at least on the OP8, this file only seems to "tell" the system whether or not the FP cal data is "valid" and doesn't contain any actual calibration parameters.

Our HD1925 is slightly different however because the OP8 doesn't even have a gf_persist_unlock.so file. However, your idea is an excellent one. The file dates on your pre-corrupted, backed-up persist partition in /persist/data should all share the same exact date (except for autoCalibrationParams.so_0) -- the date being when the phone was originally built and calibrated by OnePlus. Most likely a date in late 2019.

If the file date of gf_persist_unlock.so (or any other files in that directory besides gf_persist.so and autoCalibrationParams.so_0) in your backed-up, pre-corrupt persist is still showing back in late 2019, but the persist version you are currently using shows much more recent dates for any of these files (again, excluding gf_persist.so and autoCalibrationParams.so_0), specifically gf_persist_unlock.so, then do what you just thought of -- restore the original, "non-corrupted cal data but apparently corrupt gf_persist.so" version of persist, get a copy of /persist/data/gf_persist_unlock.so, then restore the "fixed" version of persist and copy over gf_persist_unlock.so.

But this will only have a chance of working if the date of gf_persist_unlock.so matches everything else in that folder (again, excluding gf_persist.so and autoCalibrationParams.so_0) -- a date in late 2019 or possibly early 2020, meaning it has never been touched or modified in any way since the phone was originally made.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] waleedbinwaheed:
So i think we might have a chance.. im attaching my persist.img extraction. Give a look at dates.. i think i have original OP cal at hand.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Yep, looks great. Just copy/overwrite the fixed gf_persist.so from following the instructions

Edit: just so strange you are even having issue since gf_persist.so has never even been altered/corrupted judging by the file date.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] waleedbinwaheed:
Sir this is the issue that started all this in first place.. now its confirmed that this indeed is original non broken persist.img. but neither flashing nor DD'ing it to my device solves the issue.. and also this file doesn't even flash in normal fastboot in my case.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
Well, since gf_persist.so isn't supposed to contain any actual calibration parameters, take your original backed-up persist (the one with the file dates you just posted), and perform the instructions again to fix it. Hopefully you should be good then. My gf_persist_unlock.so is also corrupt which I think explains the FP not working well like it used to
[OnePlus 7T Pro 5G McLaren Guides, News etc.] t436h05t:
Figured I would post this here for anyone that had my issue. The Fingerprint fix from the OP works perfect but after getting back the fingerprint it never registered my fingerprint properly(maybe 1 out of every 10 tries).

I decided to rerun the calibration test.

delete all fingerprints first if you can

1) Start test nothing pressed just hit start

2) Start flesh sleeve - quickly put your finger or palm completely over the white circle

3) Black Rubber Sleeve Test - Hit start and I used a black rubber mat I have to cover the whole bottom of the screen

4) Positioning Circle Test I quickly just used my thumb to cover the circles

5) Stripe Rubber Sleeve Test I rubber mat to cover half the circle.

Completed the file copy and rebooted

Now it works 4 out of 5 times - I can now disable face scanner again yay. What I also noticed is it take a bit longer to process the fingerprint.

Again thank you to the OP for this fix!

Also just noticed some people in this thread that are having difficulty getting the op instructions to work, I figured I would mention what happened to me. A while back I upgraded magisk and which broke my finger print. I used this guide to fix it. Then again later after upgrading magisk and phone upgrade and it broke again but I couldn't fix it no matter how many times I tried. What I didnt realize was I had a few scripts in post-fs-data.d and service.d to automate a few startup things through magisk(things that should not affect fingerprint scanner). I deleted everything in the folder and boom finger print worked again. Very weird to me, so thing with this process breaks the fp. Still need to do OP directions but was good again.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
I just updated to 11.0.1.4 and my fingerprint scanner is working like out of the box, not a single miss. I would have tried your advice as I was having the same issue (since I first fixed it), but the latest OTA made it work like new automatically...hasn't worked like this since 2 weeks after I got it and broke the FP sensor with a bad version of Magisk canary.

Wow, it's just amazing for it to work like it should lol especially after so long

Edit: it wasn't 11.0.1.4 that made it work like new. It was not having Magisk installed yet...

Edit2: More specifically it was my substratum theme, not Magisk itself
[OnePlus 7T Pro 5G McLaren Guides, News etc.] t436h05t:
Funny you mention the new update. I was trying not to update because didn't want to run into issue with magisk, fingerprint, safetynet, and edxposed. But woke up one day and was upgraded without interaction yay. Before I touched anything my fingerprint was perfect worked like a champ like you mentioned, even took a image of the persist first thing before touching a thing. But I install new magisk, moved to lsposed and started to have issues with fingerprint again. Flashed the persist from before magisk when it was running perfect but while this got the finger print register working the calibration was off finger print never unlocked the phone. Weird because the persist was restored from when it was working perfect(restored it like 10x because I knew it was perfect). Makes me think that it's storing something outside persist? That is what was infuriating, it was working perfect for like a day or 2 after the update. Then I broke it and couldn't get it back. So I gave another crack at the calibration and its a dream now. Very happy.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
I've wasted more time with this phone than every other one combined and I really don't know why I haven't sold it yet.

Now mine is back to being hinky and only working like 15% of the time. The update fixed it, it was perfect for over an hour. I tested it over and over and over thru multiple reboots, maybe 1 miss the entire time? Lol. Install Magisk it was still perfect. Install substratum overlays now FP is back to crap, remove overlays, remove Magisk, restore stock boot and the possibly updated persist that I had immediately backed up when it was working perfect right after the update...still f'ed up...I don't get it...
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
In the OP, I had mentioned to skip step 2 (restore the OS to an earlier OOS). Maybe in the same way rolling back, an OTA update fixes/resets whatever is getting broken to make it not work reliably?? But once you do X with Magisk, it's back to not working well even with Magisk removed (stock boot img restored). But I don't understand what else could be changing...it's not persist...
[OnePlus 7T Pro 5G McLaren Guides, News etc.] t436h05t:
That's a good point, in the other thread they are restoring and maybe that is possibly fixing something out of persist. Another point to that is if I recall (not positive) but you can have fingerprints stored, and then break finger print sensor. Restore persist and still have the fingerprints still stored from before persist. So thats stored maybe with other information? I'm completely guessing here. But if your still having issues try out the recalibration, works perfect again for me. Also I use swift installer similar to you.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
I think restoring old build or updating to OTA is definitely fixing or resetting something to make the FP reliable, but that something definitely isn't in persist.

that's correct, you can have FPs saved, break the sensor due to persist corruption, fingerprints will still be stored. Fingerprints are definitely not stored in persist -- somewhere in /data. Persist is almost never supposed to be altered (although the upgrade to OOS11 most definitely updated it and added new directories and files).

It's as if something in the system can detect that something else is being changed by Magisk or substratum and purposely makes the FP reader unreliable.

Gonna try your instructions, I'll let u know how it goes! And I'm gonna try swift installer instead of substratum lite with the Swift black theme because there are differences there as well
[OnePlus 7T Pro 5G McLaren Guides, News etc.] t436h05t:
Can't understand what is being said but it looks like when they do a calibration they use a special tool for the fingerprint. If you look at 9 mins in that is a oneplus phone. Could also be bs idk. Based on the video my step 5 is wrong because the have a special rubber but hey it still works for me.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] waleedbinwaheed:
Dear starcms, so when we last talked about restoring original dates persist.img i did not got some time and today i opened thread and found your conversation...

now can i have same new like FP scanner by updating? im still at 11.0.1.3

and please can you share method for upgrade? as automatic update is failing. also i have magisk patched bootloader.

i can sacrifice root for working fp scanner..

please refer me step by step upgrade method...

Edit: So before doing anything silly, i tried to give it a go myself and it did work like a charm.... ill share details.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] waleedbinwaheed:
So when i went to root explorer today exploring data folder inside persist folder i noticed something strange, even after restoring my original non broken persist.img these files did not change as per my thinking and have newer calibration dates than that of 2019.

so what i did i copied data and engineer mode folder from my original unbroken persist.img after extracting it, to the Persist folder inside Root/mnt/vedor and merged both folders. this brought me back having all dates to 2019 except gf_persist.so and autoCalibrationParams.so.

then wat i did i rebooted and used command dd (dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist) to copy back my original unbroken persist.img.

rebooted and Boom now i have finger print working just like new. didnt even needed to use any fix or anything.

and now my question is... why even after flashing and dd'ing my persist.img many times the persist folder files were not getting modified? doesnt this partition flashing is actually re writing these files inside Root/mnt/vendor/persist ???

so many questions but no satisfying answer :( but im really very happy with your support and all the healthy inputs :)) double thumbs up to the efforts you guys are putting in this forum.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
You don't have a Magisk patched bootloader. Magisk works on this phone (as well as any phone that launched with A10) by patching the boot image/kernel. That's why you can't upgrade/take an OTA, you need to restore the stock boot image for whatever version of OOS you are on.
[OnePlus 7T Pro 5G McLaren Guides, News etc.] starcms:
As you probably found out by now, the FP scanner stopped working like new. It seems to only work like new after first following the steps posted. After a reboot or two, autoCalibrationParams.so gets updated (as it should) but it makes the FP scanner only work a small percentage of the time/works like crap. I've pretty much given up trying to fully understand why it does this and there is no permanent fix (besides sending it to 1+ for a fingerprint recalibration or motherboard replacement)