yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Naifqar:
I disabled the old version and i installed this, did not work, I'm starting to lose hope i might try a different rom later, thank you for your effort though
[Android Software Development] pndwal:
Yes, could be ROM. Did it work on stock w/ no MHPC module?

Any other modules installed? PW
[Android Software Development] oldbear3:
Until the RQ3A.210605.005 update on my Pixel 3a, even with Safetynetfix 1.1.1 installed (and uninstalled and reinstalled) my CtsProfile remains false, so i don't get safetynet checked.

The evaltype is Basic with the module installed but it keeps on refusing the ctsProfile.

Do I miss something or does Google made new changes ?
[Android Software Development] pndwal:
I don't know for sure.

Try disabling any modules other than this one to eliminate these...

Do are you on stock ROM? Do you run any mods to System? PW
[Android Software Development] oldbear3:
Ok, that's what i made this morning and actually it's magisk hide props which was the cause strangely. I didn't need it anyway because i'm on stock rom.

Thanks for your help.
[Android Software Development] pndwal:
Guessing you pass SN now.

Just out of curiosity, what was configured in MHPC? PW
[Android Software Development] ReK_:
I'm having trouble with Google Pay. Magisk says SafetyNet passes with eval basic, however Google Pay won't enable contactless, saying "Your phone doesn't meet security requirements."

OnePlus 7 Pro GM1917

LineageOS 18.1 (20210606-nightly)

MindTheGapps 11.0.0

Magisk 23.0 (installed via boot.img, app renamed)

MagiskHide Props Config 5.4.0-v128

Universal SafetyNet Fix v1.1.1

I've renamed the Magisk app, turned on MagiskHide for all Google services, Google Pay and banking apps, and used the props config to emulate a Pixel 3a. This has gotten SafetyNet passing according to Magisk, and my related banking apps are working fine, but I still can't enable contactless payment in Google Pay. I've checked for the Play Protect certificate issue but it looks like the menus have changed in Google Play and I can't see anything that positively says it passes, but there's also no warning popup or anything that says it fails either.
[Android Software Development] ahecht:
https://xdaforums.com/showpost.php?p=79643248&postcount=176
[Android Software Development] ReK_:
Thanks for that! I may not need the module: I had cleared data for Pay and Services before but not with the airplane mode and reboot trick. After doing it that way adding the card still said "something went wrong" but after clicking OK on the error everything looks good and it says it's ready to be used for contactless. I'll give it a try at a coffee shop tomorrow.
[Android Software Development] ju_one06:
Hello,

Im have issue bypass safetynet, im install magisk by rename and install thru twrp as zip..then rename back to apk and install apk..

Phone : Redmi Note 9S

OS : Miui 12.0.2.0 Android 11

Im already try safetynet fix from 1.0 to 1.1.1 but still prob..did i miss step or do wrong?..
[Android Software Development] wertguygywe:
how to use zip filllelleleleklele??
[Android Software Development] fobtob387:
Thank you! This worked for me.
[Android Software Development] BattleRobot_HK47:
Hello,

I was wondering whether there is a way the module survives factory reset ? Or can it be modified to do so ? I am in a situation where I only need to bypass SafetyNet from the initial setup without being able to upgrade Magisk or access the developers options before the test.

Thanks for reading.
[Android Software Development] zgfg:
No

Factory reset wipes Data partition

To the other side, Magisk database and all Magisk modules are installed to /data/adb folder - therefore, they will be all wiped by Factory reset
[Android Software Development] BattleRobot_HK47:
I mean, there is a "way" to change the app in order to obtain this result. Like Magisk-Frida, the Frida agents survive the factory reset and don't need to be reinstalled by Magisk.
[Android Software Development] zgfg:
I told you how the nodule installs. Check your /data/adb/modules and consult Magisk documentation on Github (scroll to the Magisk modules chapter):

Developer Guides

The Magic Mask for Android

topjohnwu.github.io

Otherwise, try Factory reset and report the result
[Android Software Development] BattleRobot_HK47:
Thanks for the link. I think I have found a way to circumvent the problem. I could install the module manually from TWRP. I'm just stuck because Magisk doesn't seem to have the "full install" after the initial setup. (The Magisk icon is present after factory reset, but it needs to be installed by the user. I'm wondering whether it's possible to fully install Magisk from TWRP without having to do this)
[Android Software Development] pndwal:
This module?

... Whole other can of worms. - Most got bootloops doing so.

I think mileage varies per device. Many do have App fully functional after Custom Recovery zip Installation.

A factory reset wipes all setup data as discussed. Normal App Uninstall doesn't, unlike other apps, due to separate app data location in /data/adb. PW
[Android Software Development] BattleRobot_HK47:
So okay it's risky... Now the biggest problem is finalizing the installation of Magisk without going through the GUI. (Here Fairphone 3) After that I would have the Magisk CLI to install the module. (The purpose is to obtain the module and Magisk fully installed before the inital setup. In this way, I could have a rooted device that bypasses a MDM activation for forensic analyzes)
[Android Software Development] BattleRobot_HK47:
It is all good, I have managed to completely install Magisk by enabling USB debugging from TWRP and then adb install the APK before the initial setup. From that, we can install the module with the magisk CLI and the SafetyNet of the MDM is bypassed.
[Android Software Development] pndwal:
That's very interesting, and potentially helpful. - And well done!

I take it you mean you started fresh and no longer have USNF (this) module Installation via TWRP? Or did you mean you installed using TWRP Terminal and Magisk CLI? (see following post).

The process is still a bit beyond me too. Please can you link or point to your method for installing modules thru CLI? - John seems to indicate (here https://github.com/topjohnwu/Magisk/issues/2254 ) that complex scripts to do this would be too difficult for CLI commands. But I see from his updated docs that we now have "magisk --install-module ZIP" working.

https://topjohnwu.github.io/Magisk/tools.html#magisk 👍 PW
[Android Software Development] pndwal:
I think I misunderstood you here.

If you search this thread, a number of users have tried to install this module by flashing the zip in TWRP. I think every report was a boot loop.

It now appears from your recent posts (and I'm guessing as it's not clear) that you may have meant installing module using TWRP Terminal as CLI to perform "magisk --install-module [path_to_your_module.zip]"

However, in TWRP Terminal, trying the above returns "sh: Magisk: not found"

Please confirm working method. 🙂 PW
[Android Software Development] zgfg:
And btw, how would that solve his original issue:

If he really installs the module through TWRP, it would be also installed /data/adb/modules and therefore would again be later wiped by factory resetting

If he unpacked the module, he can make his own flashabe zip for TWRP that would not install USNF as a (systemless!!!) Magisk module but would apply the (permanent!!!) changes to props and /system - then it would survive the factory resetting

However, changes cannot be made if his system is read only - i.e., it would work only if he has an older version of Android

But he must be also aware that by applying direct changes to the system, he might have later problems with OTA (I don't recall or there was no info what is his phone, ROM, particularly stock or custom)

In the worst case, by applying changes directly to the System he could cause a bootloop or would not be able to update OTAs.

That (and of course the fact that direct changes to system are no more possible for new phones with read only systems) is the reason for systemless approach, and therefore the fact that modules install to Data (and not System) - but unfortunately, still many people are not aware of all that and not familiar with the systemless concept, and they want to debloat and do other changes directly to system through TWRP (no more applicable to stock A11, even on A10 or A9 on some phones)
[Android Software Development] pndwal:
Well, seems he was actually aiming to achieve something different, and I agree his initial questions were somewhat unclear / misleading. (Seems native language may be French, so some things may have been 'lost in translation'.)

Here too:

https://github.com/kdrag0n/safetynet-fix/issues/66#issue-925478570

But after this issue was closed he said:

https://github.com/kdrag0n/safetynet-fix/issues/66#issuecomment-864956722

Unfortunately, he had not really asked about that, and GitHub Issues was the wrong place to ask anyway (it's not a help forum as we know).

Also, here he later explains this:

So it now appears that his real aim was basically to achieve a full Magisk root setup w/ SafetyNet pass on a clean Android Installation before booting system for the purpose of bypassing 'root' detection by Mobile Device Management (or Master Data Management which includes EDM, Enterprise Data Management) for some kind of forensic investigation purpose... not simply to find "a way the module survives factory reset". 😜

It now seems he has realised his goal, and this could be potentially useful for others. 😛

However, I am seeking clarity as I haven't been able to achieve Magisk CLI module installs before booting system, at least through TWRP Terminal. PW
[Android Software Development] Mohamed_Midoo:
Asus rog phone 5 magisk failed with safetynet how can I fix
[Android Software Development] gorthon:
Galaxy S20 with Android 11 stock suddenly fails safetynet since two days ago, no change made to phone. Check type is still basic, not hardware. Has Google changed something and this doesn't work anymore?
[Android Software Development] aenews:
Unrelated to this thread, but yeah a few days ago both my OnePlus 7 Pro suddenly starting failing SafetyNet. One is Android 10 and the other is Android 11. Updated to latest version of Riru/EdXposed and still failed. Pretty sure something happened on the back-end. Can't seem to find many talking about it tho.
[Android Software Development] zgfg:
For "SafetyNet failing", more info is important to better understand what's going on:

- API error?

- basicIntegrity failing?

- ctsProfile failing?

- evalType is Basic or Hardware?

More simple, provide a screenshot of your SafetyNet test from Magisk app, v23

(E.g., the USNF module - this thread is about, assumes there is no API error and that Basic Integrity passes, and it tricks G to use Basic for CTS eval type, to help hiding the fact that Bootloader is unlocked - resulting that CTS Profile and the whole SN passes)
[Android Software Development] MoL_82:
If you have EdXposed, that is the source of the issue. Had the same issue, switched to LSPosed and all works and passes SN.
[Android Software Development] LeMaki:
Same here, i tried updating Magisk, Magisk Manager, Riru/EdXposed, nothing worked. I switched to LSPosed, uninstalled Riru/EdXposed and it worked again ! Thanks a lot @MoL_82
[Android Software Development] FilipNone:
Samsung Galaxy J6 SM-J600FN Android 10 (crDroid unofficial): ctsProfile doesn't word :(
[Android Software Development] gorthon:
Switching from EdXposed to LSPosed also did the trick for me. It's not difficult, though, as LSPosed does Whitelisting instead of blacklisting. Kind of a hassle to set everything up again. I guess there must be something new that would simply need to be blacklisted in EdXposed and then EdXposed would work as well. We just don't know what.
[Android Software Development] BattleRobot_HK47:
You have made the thing clearer. The thing is I only want to bypass the activation (enrollment) to the MDM. In my case, the MDM is BlackBerry and the enrollment takes place right after filling the Google account on initial setup with "afw#blackberry". (Several MDM's for Android phones proceed in this way) This activation will perform several check (custom + SafetyNet) and I needed to bypass them.

The operations with Magisk CLI and "adb install" are performed before filling the Google account, not before booting the system. And the command is as simple as you said. No science rocket or clever scripts.

Finally the solution is trivial : managing to fully install Magisk after factory reset and BEFORE the Android's initial setup. So sorry for the misleading description of the problem. "Can Magisk survive the factory reset" was a preliminary question to the real problem, because if there was a way to do this, the problem was automatically solved. :)

Here, I think it's like exploit a bad design of the activation method. Other methods couldn't allow such modifications between the factory reset and the enrollment (Apple Configurator 2 for example)
[Android Software Development] G0dZill4:
sm-g9600 stock Rom. If I set SafetyNet Fix, getting random reboots..(sometimes it's just enough for someone to call). But all the checks pass and the Gpay works fine. If I remove this module via Magisk - I don't see any more reboots.
[Android Software Development] pndwal:
Guys, if you have tried

without

EDXposed and still have issues with Universal SafetyNet Fix, try this experimental solution c/o OP @kdrag0n (thanks Danny! 👍👍👍 ), already working for many (Samsung especially) with 'heavily skinned' OS's like One UI (with non AOSP keystore implementation, etc):

Shim the keystore service instead of replacing it #13​

This method is more portable, does not require a different executable for each Android version, and avoids breaking ROMs with heavy keystore customizations. It works by injecting a shared library into the keystore service and wrapping the Binder transaction handler in the generated AIDL interface...

Scenarios and issues to test​

32-bit ARM devices

Heavy OEM skins

Samsung One UI

MIUI

Broken biometric authentication in apps

Unstable system (i.e. rebooting and/or crashing)

https://github.com/kdrag0n/safetynet-fix/pull/13#issuecomment-767863635

Nb. S9 and other users still report problems with this, but additional working module variations for several specific devices are found in the closed issues mentioned / linked from PR thread above. These solutions use Keystores from specific OneUI/other OS versions. You'll likely find a modified fix for your particular Sammy device in this post or elsewhere in this long issue thread:

https://github.com/kdrag0n/safetynet-fix/issues/6#issuecomment-764129632

Happy reading! PW
[Android Software Development] Riucario:
Tried installing the latest universal safetynet fix, the magiskhide props config, and used a terminal to change the fingerprint, but still doesn't works. I can use Google Pay, but my other banking apps, still doesn't work (due the phone being rooted)

Phone: Mototola G8 Play

OS Installed: Motorola One Macro

Compilation Number: PMDS29.80-85-2

System: Android 9
[Android Software Development] pndwal:
@Riucario

Read recent posts here. 😉

- Remove EDXposed. Install LSPosed instead if you wish, and set up again.

- You don't need MHPC for most stock ROMs, only if you have uncertified ROM fingerprint (some custom, China stock etc) 👍 PW
[Android Software Development] Riucario:
Worked with the LSPosed, basic integrity and ctsProfile are ok, but my banking aplications still can't work due the phone being rooted (In the second screenshot says: Acces Denied For security measures, the app can't be used in devices which had obtained root privileges). Any suggestion on that situation?
[Android Software Development] pndwal:
Check if Play Protect (PlayStore settings) says Device is certified, clear PlayStore and Play Services data if not.

After that, hide root from bank app in MagiskHide list, toggle MagiskHide off and on again in Magisk settings, clear bank app data, reboot, try/set up bank app again.

If still not working, bank employs custom measures in addition to checking SafetyNet API (as they are aware, like us, that SafetyNet is unreliable pre full hardware Tee activation 😜). Check measures to take here:

https://www.didgeridoohan.com/magisk/MagiskHide#

https://www.didgeridoohan.com/magisk/MagiskHide#

Hope it helps... Thanks (like) button feels forgotten! 😀 PW
[Android Software Development] G0dZill4:
Thanks, this way helped!
[Android Software Development] pndwal:
Great!

Please can you state for others searching exactly which solution fixed Samsung Galaxy S9? 👍 PW
[Android Software Development] G0dZill4:
The message you mentioned has a link to safetynet mod for Android 10 (One UI 2.5).

While it works)
[Android Software Development] Riucario:
I tired many of the advices given there, but still no avail. I tired to identify which validations uses those apps, but couldn't find. If someone could help me, i'd be thankfull. The banking app is called "Yape", and I'm attaching two logs, one is when the phone is turning on and the other is when I try to use the app.

Turning on phone log: https://drive.google.com/file/d/1_mrIzMkfPkVuiAsMwSxM588eXWlFJqse/view?usp=sharing

Opening app log: https://drive.google.com/file/d/1pTa-6Wo6iszKoecfhTkHazuPNtD6XaPW/view?usp=sharing
[Android Software Development] marcussacana:
It has working in my Redmi Note 9S but now don't works, strange I didn't updated the system at all
[Android Software Development] zgfg:
Did you follow/read previous posts and discussion about similar problems the other had, and about the possible cause and solution (EdXposed/LSposed)?
[Android Software Development] Sherbi:
The safety check faild without any updates

I made reinstall for the module but still not working

View attachment 5352119
[Android Software Development] zgfg:
Same comment as to the previous post (possible problem and solution already discussed here)
[Android Software Development] Sherbi:
There is no updates EdExposed too i made installe for hidden core module after this happen
[Android Software Development] zgfg:
So what if there were no 'updates' on your EdXposed - G makes changes on their side (SafetyNet consists also of the backend part and you don't see their 'updates')

Users clearly described that EdXposed (if using it) causes a problem now and must be replaced by LSposed
[Android Software Development] Sherbi:
Thanks for helping I made replace EdXposed by LSposed now work fine again thanks
[Android Software Development] pasbec:
This is just to confirm that this works with latest S9/S9+ with Android 10 (DevBase 7.4).
[Android Software Development] marcussacana:
Thanks, by replacing the EXPosed with LSPOSED solved my problem :)

By the way isn't there a way or why isn't possible block the safety net backend to be updated?
[Android Software Development] zgfg:
You can write an e-mail to Google asking them to stop updating their backend parts on their servers, and explain that it really bothers you because of your issues with EdXposed and SafetyNet 🥸😂😍
[Android Software Development] marcussacana:
No, like, in sure there's some code running in our devices and probably he is updated to became "better" otherwise how the hell he begin detect from nothing things that he didn't found before? I'm just curious about that... Well I would read a wiki to reply that then whatever
[Android Software Development] zgfg:
Google for the official Google document (it has been attached or URL given in some early posts in this thread and/or in General Magisk thread also here on XDA), to read about the SafetyNet architecture and its components consisting of:

- appilcation calling SN check

- API part in Google Play Services

- Google server (backend) side

- Backend part of the application executing the SN check

And think for which of those parts you (don't) have control on changes and updates (or you even know when they happen)

Ofc that Google intents to harden the procedure and they will not ask you and me and zillion of other users for confirmation when they want to make updates to GMS (you could probably block updates of Google Play Services on your phone) or their server side (you have no control whatsoever and Google will not warn you with their Changlogs)

Hence always be ready that without your awareness of any 'updates' on your phone, things start to behave differently

And one more thing - you were asking for your problem (expecting that us, others spend our time to read your mail and answer you).

But in parallel you were participating in this same thread where the same problem was already asked, answered and solution given (to replace EdExposed by LSposed) - but you didn't bother to read that discussion, to search about, etc.

Think what if everybody would be lazy and ignorant to read other posts - who would anawer to questions from you or somebody else?!

This is a Forum (and there are rules to read and search before asking!), not a Telegram channel where every soul lost in virtual world posts dozen of his cats every day and the same things are asked every hour (because, nobody could follow the whole noise of thousands of useless posts every day)

Sorry, I didn't want to be arogant, but some things really bother
[Android Software Development] WhiteAsIce:
Pixel 4a 5G, safetynet was passing during the June 2021 OTA. Then I installed the July 2021 OTA, and safetynet started failing. Where I was confused is that I never had any module from Riru installed previously (neither EDXposed nor LSPosed were on my device). However, installing LSPosed seemed to fix the safetynet issue. Hope this helps anyone else with my problem.
[Android Software Development] Danblotter:
Redmi Note 7 Pro china version destroyed support to google play store and other google products, so I changed to India official Rom (I wanted to keep as stock as possible...). But since I have started to tweak the phone, I installed Magisk, and this fix Worked like a charm.
[Android Software Development] pndwal:
Yep, it's pretty much all you need with certified stock ROM at present!

Alternatively, you could keep China ROM, root with Magisk and use MagiskHide Props Config module configured to spoof a certified fingerprint in addition this module and sideload GApps.

For custom ROMs, you can also add device to Google's whitelist to allow use of GApps. (I think that this will, in practice, also allow China stock ROM to use GApps, but I'm doubtful whitelisting will help with bootloader locked; perhaps it does.)

Be aware that you will likely brick device if you try to lock bootloader w/ non-China ROM incl. any non-stock partitions (this can possibly be overcome by applying signing keys to images, but this entails risk of hard brick / problems with OTA updates, etc), so enjoy passing SafetyNet while you can!

When / if Google finish / fully roll out hardware TEE attestation (meaning forced fallback to basic attestation using solutions like USNF module can no longer be achieved), there are (as yet) no options for passing with Google's SafetyNet API on non-certified devices. PW
[Android Software Development] zgfg:
For China MIUI 12.5 ROMs, I'm not sure (not using China stock ROMs) is it only a problem that ROM is not certified or that even Google Play Services are missing
[Android Software Development] justDave:
I'm seeing random lockups, especially while charging, but not reboots. I have to reset the phone myself. See if this issue sounds similar https://github.com/kdrag0n/safetynet-fix/issues/60
[Android Software Development] G0dZill4:
it looks like, but because the phone starts to behave very strange and unstable, a lot may be suitable). And I repeat, then I installed the modified version SafetyNet-Fix (my post with link below) and the phone works stably as before.
[Android Software Development] pndwal:
Sorry, unintended post! 😮
[Android Software Development] waliuxd:
Not working on my op6 oos11 (beta)View attachment 5363199
[Android Software Development] zgfg:
MagiskHide emabled?
[Android Software Development] pablooo1984:
I installed safetynet fix v1.1.1 with twrp on my samsung s20

Got in a bootloop. But i can get in twrp.

Anyway to get out?

Or flash stock rom en start over?