yashsingh1/xdaforums huggingface dataset:
[Google Pixel 7 Pro] i5lee8bit:
Weird.. any difference between this test build and the one you uploaded to GitHub (mod2.0)?

I'm subbed to your GitHub fork, and as soon as it was released there I downloaded that one. Before flashing, I read both the description there and your infamous original mod post from the other thread (which I see you updated too). AND here too (lol). So I went ahead and flashed the GitHub Mod 2.0 build. It kept freezing at "Pixel is starting..." and I had to reboot in safe mode. I could enable every mod I had running except USNF mod 2.0 and once I enabled that, Pixel is starting stuck again.

The one you attached to your above post worked perfectly though! But all that to say there's obviously something different about the GitHub 2.0 release. (and yes, I downloaded again and checked hash, the download wasn't corrupted 😉)

Just wanted to let you be aware about that little hiccup I had with the new build released on GitHub. But anyway as always, THANK YOU!!

Edit: CTS good, Play Store certified after clear data. A thousand times again, thank you
[Google Pixel 7 Pro] rlewis312010:
That safety net fix worked perfectly, great job!
[Google Pixel 7 Pro] swieder711:
Hooray!

Passed!
[Google Pixel 7 Pro] Jon8RFC:
2.0 works on my Pixel 7 Pro just fine. For grins I tried it on my Pixel 6 Pro. I encountered that problem as well, but it's on Android 12 SQ3A.220705.003.A3.

For the future, you don't need to go into safe mode unless that's your preference. I forgot what all it resets, but it's many settings and it's bothersome. I'd rather just reinstall my modules and not have to figure out those Android settings/changes which I come across days or weeks later when I infrequently do something. Have your phone reboot and run this:

adb wait-for-device shell magisk --remove-modules

I like to just do this first:

adb devices

So the server is running, then I have the long one pasted and ready to go once the phone turns off.
[Google Pixel 7 Pro] thereason00:
Another +1/confirmation that @Displax 's new test USNF build works/passes CTS profile match.

Also, just wanted to say I was able to make a purchase with GPay earlier today with Displax's earlier modded USNF that didn't pass CTS profile match, FWIW.
[Google Pixel 7 Pro] Annie the Eagle:
What a legend bro... 👍 😍

Confirming that this works perfectly and device is now certified in Play Store
[Google Pixel 7 Pro] rage302:
Yeah! This Module does the Trick!

Thank you very much.
[Google Pixel 7 Pro] emontes:
Yep, works for me as well.

Many thanks, @Displax !
[Google Pixel 7 Pro] xdagee:
Well, let's see how it goes. With Google's own custom chip (Tensor), it's just a matter of time. Every year, it gets closer and closer with Google's own walled garden. I don't know how it's going to be different from Apple's.
[Google Pixel 7 Pro] roirraW "edor" ehT:
Yes, works perfectly. I'm using AOSPMods and Classic Power Menu with it.

Thank you very much @Displax!
[Google Pixel 7 Pro] madmuthertrucker:
I installed the new UNSF mod 2.0 & I'm still not passing cts. How do I clear gms data?
[Google Pixel 7 Pro] bosox284:
Interestingly the 2.0 build in the post fails CTS for me but the test build passes.
[Google Pixel 7 Pro] redondo_se:
Like @bosox284, the 2.0 build from the "main post" isnt' passing CTS profile for me. The "test" build seems to be gone. Can anybody share it with me please?

I cleared data for play store, play services, play services framework multiple times and rebooted and it's still failing.
[Google Pixel 7 Pro] Bxperiaz3:
Attempting to root my pixel 7 pro here but it's been a while and I'm rusty. I've gotten to the flash all.bat stage but it's saying its not recognised as an internal or external command. All drivers are installed, bootloader unlocked, boot img on the phones storage etc any pointers? Thanks

Edit. The only difference is my image doesn't have the cheetah-etcetera part, it's cheetah-td1a

Edit 2. is the adb reboot bootloader flash-all.bat all one command? It doesn't reboot just boots to the bootloader and I have to restart it manually. Or I get the above error if I apply the commands seperately. Apologies for the noob questions

I went ahead and installed magisk after I rebooted and the img I got is magisk_patched-25200_Pllga so I'm guessing that's not right
[Google Pixel 7 Pro] roirraW "edor" ehT:
Hi! You've opened a Command Prompt, correct, not PowerShell. In PowerShell, you have to proceed the commands with some characters, but I always forget what exactly, possibly .\ or ./ but I just stay simple and use Command Prompt.

You also have the flash-all.bat in the same folder as the most recent ADB and Fastboot, correct?

No, these are two separate commands:

adb reboot bootloader

is done while you're running normal Android. It reboots into Bootloader mode.

flash-all.bat

is one of the files extracted from the factory image zip, which you should have extracted into the same folder as the latest ADB and Fastboot. Let me know if I goofed up the order of the instructions somehow, but I believe I have them correct.

No apologies are necessary. I had been very rusty a year ago when I got the Pixel 6 Pro, but am now very used to it all again.

Edit: I just checked my instructions, and they seem correct. Steps 1 through 7 are what put the necessary files into the same place as ADB and Fastboot, plus modifies your flash-all.bat to not wipe - although you can go ahead and let it wipe this one time if you want since I presume you just unlocked your bootloader.
[Google Pixel 7 Pro] JakeDHS07:
Here is last night's working test build by @Displax . Passes all but Strong integrity for me which is expected and everything works. Not sure what's going on with the subsequent releases.
[Google Pixel 7 Pro] roirraW "edor" ehT:
Thanks for posting that again - I was about to myself. I've just let @Displax know in their thread:

I'll change the isntructions too.
[Google Pixel 7 Pro] roirraW "edor" ehT:
All, please see @JakeDHS07's post two above, where they've re-attached the test version that does definitely work for me, wheras, like for you, the Mod 2.0 version did not work. Changing the instructions in the OP again.
[Google Pixel 7 Pro] PensionFond:
I have tried both 2.0 and first versions of SafetyNet fix and all of them failed. I have restarted the phone many times, cleared storage of G Services, G Store and so on many times, and tried to turn on and off denylist. The magisk app is hidden. Only the test version that from the night I guess worked for me. All passing, not strong integrity ofc.
[Google Pixel 7 Pro] JakeDHS07:
No problem. I'm following both threads myself and just saw. It must be a simple typo or something during the upload process not sure. Hopefully it all gets sorted quickly and we can get some clarification. In the meantime at least there is a working version. 👍
[Google Pixel 7 Pro] roirraW "edor" ehT:
You saw my other reply a few posts up, correct? Just asking since you edited your post that I replied to after I replied to it. :D

The filename is correct. The characters at the end of the filename are unique/random/or a hash.
[Google Pixel 7 Pro] redondo_se:
Thank you. This version is working for me.
[Google Pixel 7 Pro] JakeDHS07:
You are very welcome. That's what we are here for. 💪🤘
[Google Pixel 7 Pro] madmuthertrucker:
The test build passes for me too. @JakeDHS07 thanks!
[Google Pixel 7 Pro] Bxperiaz3:
Hi thanks for your patience appreciate the help. So I have my platform tools folder setup, I've extracted the factory image folder into platform tools so it's at the top. I have my init_boot and flash all.bat in the platform tools folder with adb etc now. But when I flash all in cmd it says it can't find the. Img and lists cheetah - cloudripper and radio then fails.

My platform tools folder is on the C drive. Is that possibly causing an issue? I've been through your steps a few times and I'm doing something wrong, I just can't see what. Thanks for the help
[Google Pixel 7 Pro] roirraW "edor" ehT:
@JakeDHS07 it would probably be a good idea to credit @Displax in the post where you share their work.

You're welcome! The location of the platform-tools folder should be fine.

Please confirm that your files and folders look similar to the following screenshot - ignoring the .txt files I have in there, which I put to remind myself what the commands are, so I can copy and paste them:
[Google Pixel 7 Pro] Bxperiaz3:
Yes very similar. When I run the command I get cannot load for both cheetah - cloud ripper and radio - cheetah

Then unable to open image-cheetah etc no such file or directory. But my platform tools setup looks the same as yours. Do I need to specifically execute the cmd window from that folder perhaps?
[Google Pixel 7 Pro] Texan1:
Can you install the Test version straight over the 2.0 version? ie. no need to remove the safetynetfix module first.
[Google Pixel 7 Pro] madmuthertrucker:
That is how I did it. It just replaces the version you have now.
[Google Pixel 7 Pro] roirraW "edor" ehT:
Yes, in the command prompt, for where you extracted everything, you have to:

CD platform-tools

I guess I should add that to the OP. 😁

Actually, I do have it in the instructions as:

I also just tell Magisk to remove the old module, but I don't reboot, and add the new module, then reboot, but apparently it works either way.
[Google Pixel 7 Pro] johnha:
+1 `test` version working

-1 `2.0` version failing
[Google Pixel 7 Pro] jac0b:
+1 test version passes on mine also.
[Google Pixel 7 Pro] Anonshe:
@roirraW "edor" ehT, The reason the test version of USNF is working compared to the older mods is due to it spoofing api to 32. Devices launched with A13+ i.e. Api 33 won't fall-back to basic attestation hence the failure to pass integrity checks.

By spoofing to api 32, basic attestation works hence Safetynet passing and both basic+device integrity checks passing.
[Google Pixel 7 Pro] Bxperiaz3:
Thanks I'll try that. I didn't understand that part fully so I shall try that now. Ty👍🏻
[Google Pixel 7 Pro] Jon8RFC:
Similar/same. Today's 2.0 doesn't pass, but last night's pulled 2.0 from github passes.
[Google Pixel 7 Pro] badabing2003:
The 2.0 version is also trying to drop the api version to 32 only if it is greater than or equal to 33

But it is failing to do so because it is comparing a string to a numeric.

# avoid breaking encryption, set shipping level to 32 for devices >=33 to allow for software attestation.
if [[ "$(getprop ro.product.first_api_level)" -ge 33 ]]; then
resetprop ro.product.first_api_level 32
fi

The test version should only be used on P7 or P7P, otherwise it would break older devices that don't support api 32, because it is setting it to 32 regardless of the current value, that is why it is a test version.
[Google Pixel 7 Pro] roirraW "edor" ehT:
We'll have to find out why the new Mod 2 which @Displax provided as an official release instead of the test version doesn't work, unless you're saying the Mod 2 also doesn't spoof API 32.

You're welcome, good luck!

Thanks for the information. I wonder if @Displax will come out will a Mod 2.1 that can be used on all phones.
[Google Pixel 7 Pro] badabing2003:
I'm sure he will, in the meantime if anyone wants can give this a try.

Update: I had the zip one level deeper, download again if you downloaded before this update.
[Google Pixel 7 Pro] roirraW "edor" ehT:
Hi @Bxperiaz3, where is your platform-tools folder? The prompt below you gave as an example (I blanked out your username) isn't the platform-tools folder. Where exactly did you extract the platform-tools to? Don't get frustrated, we'll figure it out.

If C:\Users\username\ is where the command prompt opens for you when launch it, and if the platform-tools are in the C:\platform-tools folder, then from where the command prompt opened, you need to type the following (slightly different than the example I gave previously):

CD C:\platform-tools

Once you've done that, the command prompt should show C:\platform-tools.
[Google Pixel 7 Pro] JakeDHS07:
Fails device integrity
[Google Pixel 7 Pro] Lughnasadh:
I just checked mine and same thing. Unknown baseband version on my inactive slot. Strange...

I also flashed the factory image to the inactive slot as well, just in case.

Thanks for the heads up on that.
[Google Pixel 7 Pro] badabing2003:
Just making sure you downloaded after the update.

What do you get when you do

adb shell getprop ro.product.first_api_level
[Google Pixel 7 Pro] Bxperiaz3:
Thank you. Got it sorted now so I'm opening the commands from platform tools folder. Mine is in the C drive in programme files. Unfortunately I'm still getting the same errors. Cannot load etc. Swear I used to be able to do this stuff. My platform tools folder looks the same as yours too but for some reason it won't run the img file
[Google Pixel 7 Pro] JakeDHS07:
I already reverted back to the test version as I have to leave for work soon. But it was after the update as it was already mentioned in the post when I retrieved the zip.
[Google Pixel 7 Pro] Bxperiaz3:
This is where I'm at. Everything has been combed through a few times now. But I cannot get it to work. Apologies for all the spam
[Google Pixel 7 Pro] Gordietm:
Are you using the latest sdk platform tools?
[Google Pixel 7 Pro] Bxperiaz3:
Yeah I downloaded this one yesterday. Everything seems ok, but I'm falling at the last hurdle and can't get it to flash
[Google Pixel 7 Pro] Lughnasadh:
Just catching the last end of this, so sorry if this has already been asked. Have you tried putting the factory image files inside the Platform Tools folder? Also, have you tried using an A to C cable using USB 2.0 port? And do you have the latest USB drivers installed?
[Google Pixel 7 Pro] Bxperiaz3:
Hey thanks for the reply. Raging so many others have managed this and I'm still asking questions 😅 the factory image files are in the folder which now looks like the attached image. I have the latest drivers installed and haven't yet tried a different cable. But I've managed to unlock the bootloader with this setup so I should be ok to do the flash I'd have thought?
[Google Pixel 7 Pro] Lughnasadh:
Are you using the same flash-all.bat file that came out of the factory image where the other files came out of? I'm asking because it has a different date than the other 5 images from the factory image.
[Google Pixel 7 Pro] Bxperiaz3:
It should be, but I've done this process a few times so it's possible I mixed it up. Is it possible to do this process with magisk instead? Or do I need to get this img flashed first?
[Google Pixel 7 Pro] Lughnasadh:
Kind of confused on what you are actually trying to do? I think I found your first post and you said you were attempting to root, but then you made an attempt to flash the factory image. Are you trying to flash the factory image to update your firmware from the build that was on the phone when it was released and then root?

Also, you should probably remove your init_boot.img from the folder as you don't need that in there.
[Google Pixel 7 Pro] SeeTurtle:
I cannot seem to pass cts or safteynet. I've installed/uninstalled all the fix modules in all different orders. I seem to be able to pass all tests right after I boot. But after a minute they fail. Sometimes I only fail cts. I notice that in magisk deny list, Google play services gets unchecked on each boot. Not sure this is normal.
[Google Pixel 7 Pro] Bxperiaz3:
Yeah apologies. I'm getting confused myself. I'm just following the steps at the start of this thread in order to use magisk and root. I've unlocked the bootloader, done all the extracting copied the init_boot to my phone and now I was hoping to do the flash all.bat command so I can proceed to the magisk part but it's not rebooting like the steps say it should. Hence my confusion.

Can I just go ahead and use magisk to patch the init_boot.img anyway?
[Google Pixel 7 Pro] JakeDHS07:
Make sure you have the three circled set to deny as well as Google Framework. The services and framework will show as unchecked upon reboot but will stay denied. Make sure you are using the "test" version of the mod posted earlier then clear data for services and you should be all good.
[Google Pixel 7 Pro] Lughnasadh:
Yeah, you don't need to flash the factory image to root. What build on you on? Are you on the one that ends in .031? If so, then that's the latest.

So if you want to root, you extract the init_boot.img from the factory image of the build you are on and patch it in Magisk, which it sounds like you've done? That file will be in your downloads folder on your phone (make sure you don't confuse it with any other files you may have in that folder). Then take that patched image and put it in the Platform Tools folder. Remove the init_boot.img file that you have in there now and remove those other 6 files from the factory image that you put in there. So basically you will just have your patched init_boot.img and the native files that came with the Platform Tools.

Then run the command:

fastboot flash init_boot <nameofyourpatchedinit_boot.img)
[Google Pixel 7 Pro] Bxperiaz3:
I see. I was gone way wrong in that case. Thank you so much for clearing that up. Apologies for the noobness
[Google Pixel 7 Pro] justDave:
The comparison is numeric with or without the quotes so removing them doesn't help (try it on the command line).

ro.product.first_api_level is 33. I've confirmed that if I set it to 32 manually in the shell, SN passes. Also that your code snippet works fine if I run it in the shell (changes the 33 to 32).

Puzzling.

Is it possible that that variable isn't set yet when the script runs?

EDIT: Turned out to be a simple error in editing the service.sh file. I posted an update: https://xdaforums.com/t/magisk-module-universal-safetynet-fix-2-3-1.4217823/page-114#post-87578965
[Google Pixel 7 Pro] SeeTurtle:
I still can't seem to pass. I uninstalled the module, rebooted. Installed the test version again/blocked all services and framework. Rebooted. Airplane mode and deleted all data of services and framework rebooted and still no luck.
[Google Pixel 7 Pro] roirraW "edor" ehT:
As @Lughnasadh has said, if you are already on the .031 firmware, there is indeed no reason to do the flash-all.bat at all - I prefer to make streamlined "catch-all" instructions, and that part of the instructions is actually applicable to updating from an old factory image to a new factory image, as you'll likely want to do every month when Google releases updates for the Pixels.

Also, the .031 factory image isn't what was on anyone's Pixel 7 Pro to start with, so the safe assumption is that everyone following these instructions is on the very first factory image and hasn't taken the OTA or updated it in any other way.

If you aren't on the .031 factory image, you'll want to get updated to it before you root the phone. If you're saying that are already on the .031 factory image, then no you don't need to flash it, although I'm curious to know what is causing the issue, as you'll have to follow the same instructions any time you want to update the phone - which most users do every month as it'll contain bug and security fixes.

I was about to suggest you start from scratch, delete the platform-tools folder, and re-extract everything, but hopefully if you are already on .031 now, you can now flash the Magisk'd version of init_boot.img to your phone and you're done with everything except the SafetyNet steps.

If you're not on the .031 factory image yet, the Official Google Android Flash Tool (OEM Unlocking needs to be toggled on - you do not have to manually unlock the bootloader - their site will do that on its own) can get the job done as well if Google has updated it for use with the Pixel 7 Pro. It is typically an easier process than manually flashing the factory image - you should be able to use that method every month if you prefer. Just make sure to disable the options to Wipe, disable Force Flash all partitions, and disable re-lock bootloader.

My instructions have users copy the init_boot.img out of the inner zip and into the platform-tools folder even though, yes, a user could copy it directly from inside the zip to the phone in order to root it with Magisk.
[Google Pixel 7 Pro] jknaggs:
Hi, the GPS unchecking itself is a known bug but is still denied.Have you cleared all data from all respective Google apps in your deny list then rebooted?
[Google Pixel 7 Pro] Lughnasadh:
Yeah, I just copy the init_boot.img from the extracted folder from the inner zip itself onto the phone. I don't put any files that aren't needed in the Platform Tools folder for fear of forgetting to remove something from there while flashing that may cause an oops (this may or may not have happened to me years ago... 🙃).
[Google Pixel 7 Pro] Lughnasadh:
It's actually not a bug, but intended. The mod "denies" Google Play Services behind the scenes because if it is denied in the deny list the mod won't work properly. So kdragon made it so that it was taken care of behind the scenes. So unless there have been some changes that I'm not aware of, you never have to tick Google Play Services in the deny list because the mod will do it itself, covertly.
[Google Pixel 7 Pro] jknaggs:
Only quoting what I read earlier in this forum. It works as far as I'm concerned, just trying to help!
[Google Pixel 7 Pro] Lughnasadh:
Oh, I know you were just trying to help and you did. I was just trying to explain why it unticks itself 👍
[Google Pixel 7 Pro] jknaggs:
No probs 👍💂 and thanks for the explanation.
[Google Pixel 7 Pro] highgrade:
Use that file
[Google Pixel 7 Pro] SeeTurtle:
I finally found the culprit! I had SELinuxModeChanger apk installed which was from my swift backup. Upon uninstalling and rebooting everything passes as normal, except strong integrity obviously.
[Google Pixel 7 Pro] collegencmc:
Hey All,

I'm using Magisk-v25.2.apk and am running into something similar issue on rooting my Pixel 7 Pro as @Bxperiaz3 I'm able to patch and flash boot image:

fastboot flash boot magisk_patched-xx.img

Sending 'boot_a' (65536 KB) OKAY [ 0.262s]

Writing 'boot_a' OKAY [ 0.082s]

Finished. Total time: 0.446s

fastboot flash boot_a magisk_patched-xx.img

Sending 'boot_a' (65536 KB) OKAY [ 0.260s]

Writing 'boot_a' OKAY [ 0.076s]

Finished. Total time: 0.411s

fastboot flash boot_b magisk_patched-xx.img

Sending 'boot_b' (65536 KB) OKAY [ 0.257s]

Writing 'boot_b' OKAY [ 0.107s]

Finished. Total time: 0.491s

but when I reboot I'm not rooted. When I try to do:

fastboot flash init_boot magisk_patched-xx.img

Sending 'init_boot_a' (65536 KB) OKAY [ 0.352s]

Writing 'init_boot_a' FAILED (remote: 'failed to flash partition (init_boot_a)')

fastboot: error: Command failed

Thoughts on how to correct this?

Thanks!
[Google Pixel 7 Pro] Bxperiaz3:
I had completely mixed myself up this morning,my apologies. I now have the .031 build using your android flash tool suggestion, thanks for that. And the magisk patched.img placed in the platform tools folder.

Alas I still can't flash magisk file when I run my fastboot command from there, it says cannot load, no such file or directory. I reunzipped the platform tools as well but no joy. I think I'll just leave it for now. Thanks to everyone for the help.
[Google Pixel 7 Pro] rlewis312010:
I had to use the PixelFlasher tool. Choose the factory image and choose to patch for Magisk. When you hit flash be sure the phone is in USB file mode. You should click patch on the right side for the unit boot it finds in the firmware.The flasher takes care of the rest. Allow your phone to restart repeatedly until the process is complete. I tried and was stuck like you.
[Google Pixel 7 Pro] bigknowz:
Make sure you are running the latest version

fastboot --version

Should return 33.0.3