SafetyNet Suddenly Fails

Search This thread

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
Tried flashing by using platform tools instead of minimal adb.

First installed this:
ADB, Fastboot and Drivers.jpg

Then installed platform tools and ran cmd from the platform tools explorer folder:

platform tools screen.jpg


Same erroneous result as before. :(
 

gfrank227

Senior Member
Feb 12, 2018
158
23
Moto G8 Plus
Tried flashing by using platform tools instead of minimal adb.

First installed this:
View attachment 5443703
Then installed platform tools and ran cmd from the platform tools explorer folder:

View attachment 5443705

Same erroneous result as before. :(
In my mind, it's clearly a driver issue, not a phone issue. Unfortunately, I don't have a Samsung phone, so it's difficult for me to give specific driver advice. Have you tried on a different computer? Also try with a different charging cord. Sometimes cords can cause weird problems as well. For example, I've had cords that would charge my device just fine but would not be recognized for file transfer at all.
 

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
I have just tried a different cable and that made no difference. Unfortunately I don't have access for this task to a different computer., I was hoping I could fix this one.
It's strange because my drivers seem up-to date, and my phone gets recognized by the drivers in normal MTP/charging mode and adb works like that. :unsure:

Drivers 1.jpg


Drivers 2.jpg
 
Last edited:

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
In my mind, it's clearly a driver issue, not a phone issue. Unfortunately, I don't have a Samsung phone, so it's difficult for me to give specific driver advice. Have you tried on a different computer? Also try with a different charging cord. Sometimes cords can cause weird problems as well. For example, I've had cords that would charge my device just fine but would not be recognized for file transfer at all.

I just thought that this might work..

I have twrp recovery which seems to have overridden the stock recovery when I press the required button combinations to get into recovery mode.
Well anyway, when I boot into twrp (phone plugged in), my adb drivers are present in device manager (see image below⬇) (whereas in normal download mode they are not). Thus i was wondering if I could be able to flash the magisk_patched.img with twrp, rather than with adb in download mode?

Device Manager 2.jpg



I would like to know which partition I choose to carry out this flashing of the magisk_patch.img in twrp?

twrp1.png
twrp2.png
twrp3.png
twrp4.png


I think this could be the answer, if someone knows which partition I need to flash this magisk_patched image to?
Any Samsung/twrp users? Thanks.

UPDATE:

According to this instruction (see pic below ⬇) regarding adb flashing, it must be the 'boot' partition option to choose in the above twrp screen - and I have created the magisk_patched.img file from the stock 'boot.img' file.

Patching Images.jpg


If I'm correct with this (?) I will take a deep breath and go ahead with it.
 

Attachments

  • Patching Images.jpg
    Patching Images.jpg
    203 KB · Views: 1
Last edited:

gfrank227

Senior Member
Feb 12, 2018
158
23
Moto G8 Plus
I just thought that this might work..

I have twrp recovery which seems to have overridden the stock recovery when I press the required button combinations to get into recovery mode.
Well anyway, when I boot into twrp (phone plugged in), my adb drivers are present in device manager (see image below⬇) (whereas in normal download mode they are not). Thus i was wondering if I could be able to flash the magisk_patched.img with twrp, rather than with adb in download mode?

View attachment 5444055


I would like to know which partition I choose to carry out this flashing of the magisk_patch.img in twrp?

View attachment 5444059View attachment 5444061View attachment 5444063View attachment 5444065

I think this could be the answer, if someone knows which partition I need to flash this magisk_patched image to?
Any Samsung/twrp users? Thanks.
magisk takes the boot.img file and patches it. you would patch it to the boot partition. If you had been using adb, the command would have been "fastboot flash boot ..." so therefore, you should choose 'boot" where your question mark is
 

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
magisk takes the boot.img file and patches it. you would patch it to the boot partition. If you had been using adb, the command would have been "fastboot flash boot ..." so therefore, you should choose 'boot" where your question mark is
Yes, (see my update comments in post above @ Oct 29, 2021 at 10:12 AM).

So therefore I take it I should proceed with trying to do the flashing 'but in twrp' by choosing the Boot partition option on that twrp screen (?)
 
Last edited:

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
@gfrank227.
Just flashed the patched .img file in twrp and the process reported as successful. However after immediate reboot I checked the Magisk app and it shows as not installed:

afterflashing.jpg


Root checker app confirms that there's still no root.
Therefore it appears it's via adb fastboot or nothing.
Not sure how to proceed now, but I need to ensure my adb driver stays active in device manager when I plug in phone in download mode.

Just noticed, there's no menu options on this home screen at the bottom of my Magisk app; and when I choose the option cog at the top right hand corner and go into the options, there's a lot of stuff missing. (?)

Will try a reinstall of the app, recreation of patch file, and try this patching process all over again.
 

Attachments

  • afterflashing.jpg
    afterflashing.jpg
    280.9 KB · Views: 3
Last edited:

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
Installed canary/app-debug.apk (22003) version of manager, made sure channel was on canary and patched boot.img. Then flashed patched.img using the twrp method and was unsuccessful again.

Need to concentrate I think on v.(23000) and using adb fastboot method somehow - meaning my adb driver needs to stop disappearing from device manager when I plug phone into PC in download mode.

If I can achieve that then I think I can achieve root.

Any help?
 

gfrank227

Senior Member
Feb 12, 2018
158
23
Moto G8 Plus
Installed canary/app-debug.apk (22003) version of manager, made sure channel was on canary and patched boot.img. Then flashed patched.img using the twrp method and was unsuccessful again.

Need to concentrate I think on v.(23000) and using adb fastboot method somehow - meaning my adb driver needs to stop disappearing from device manager when I plug phone into PC in download mode.

If I can achieve that then I think I can achieve root.

Any help?
I am not familiar with twrp. I think it might be flashing to the wrong boot sector. Is there any way in twrp to specify which boot sector to install to? make sure it's installing to boot_a, not boot_b
 

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
I am not familiar with twrp. I think it might be flashing to the wrong boot sector. Is there any way in twrp to specify which boot sector to install to? make sure it's installing to boot_a, not boot_b
There doesn't appear to be any way to specify a or b. It's just 1 option for boot. Nothing is reported in twrp logs after the flashing process completes.

Here is a website extract explaining the process:

How to Flash Image Files Using TWRP.jpg
 
Last edited:

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
Enabled 'show hidden' drivers in Device Manager

When in download mode and plugged into PC..

download mode.jpg


..All adb drivers are blanked out. This is like this when phone unplugged also:

Blanked out drivers in Device Manager.jpg


When in normal charging/MTP mode, these drivers are no longer hidden/blanked out, and are active.
Therefore, phone is not being recognized in download mode.
 
Last edited:

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
Interesting..when phone in download mode and plugged in, I'm still getting the no show in Device Manager, but I started up Odin just to check and the phone was actually recognized:

Odin screen.jpg
 

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
Booted phone into fastboot mode (below is an example, not my PC):

adb flash command 3.jpg


Copied magisk_patched image into the platform tools folder in explorer. Then ran command fastboot flash boot (name of my magisk patched image), as per instructions: (I don't understand the /path/to/magisk.patched.img part if the image is in the platform tools folder anyway).

adb flash command 2.jpg


Ran the command as shown below. Coming up with an error (unknown command)??:

adb flash command.jpg


If anyone knows how I should express this command correctly that would be much appreciated.

Phone is being recognized in this fastboot mode: (re. fastboot devices)

adb flash command 4.jpg
 

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
Fastboot flashing error. I must be entering a bad command, but can't work out what I'm doing wrong.
As can be seen - my bootloader is confirmed as unlocked.
Wondering if fastboot mode actually allows flashing of patched magisk image files, although it should do because it's just a modified boot.img file. :unsure:

fastboot flash error.jpg


fastboot is reporting the correct size of the magisk_patched file at 65536 KB. It's the "FAILED (remote: unknown command) that is the problem.

fastboot flash error 2.jpg


In this instance above I tried dropping the magisk_patched file straight on the root of C:\ instead of trying via the platform tools folder, but it came up with the same error.

The good news is my drivers are ok when I'm in fastboot mode:

Device Manager 3.jpg


Does anyone have any ideas how I should proceed?
 
Last edited:

gfrank227

Senior Member
Feb 12, 2018
158
23
Moto G8 Plus
Fastboot flashing error. I must be entering a bad command, but can't work out what I'm doing wrong.
As can be seen - my bootloader is confirmed as unlocked.
Wondering if fastboot mode actually allows flashing of patched magisk image files, although it should do because it's just a modified boot.img file. :unsure:

View attachment 5445297

fastboot is reporting the correct size of the magisk_patched file at 65536 KB. It's the "FAILED (remote: unknown command) that is the problem.

View attachment 5445411

In this instance above I tried dropping the magisk_patched file straight on the root of C:\ instead of trying via the platform tools folder, but it came up with the same error.

The good news is my drivers are ok when I'm in fastboot mode:

View attachment 5445447

Does anyone have any ideas how I should proceed?
The command as you entered it appears correct.

Several ideas: run the following command before you run the flash command:

fastboot --set-active=a

if you have more than one boot slot, this will make sure you're booting to the correct boot slot before you flash it.

Also, try a different set of adb platform tools. It could be the platform tools adb that you're using.
 

jaccydan

Senior Member
Jun 15, 2021
69
4
Samsung Galaxy S20
The command as you entered it appears correct.

Several ideas: run the following command before you run the flash command:

fastboot --set-active=a

if you have more than one boot slot, this will make sure you're booting to the correct boot slot before you flash it.

Also, try a different set of adb platform tools. It could be the platform tools adb that you're using.
Thanks for the advice, but before I proceed with that script, Is it slot a or slot b I need to be flashing to?
How do I know if my phone has more than 1 boot slot?

I have used minimal adb method and standard platform tools method. (I have also tried using a couple of transfer cables.)

Getting back to the partition slot, I followed this tutorial (https://krispitech.com/check-partition-slot-a-b/) and found cmd is displaying a whole load of other stuff about the phone but is not displaying (bootloader) current-slot, or the slot that is currently being used.
 
Last edited:

gfrank227

Senior Member
Feb 12, 2018
158
23
Moto G8 Plus
Thanks for the advice, but before I proceed with that script, Is it slot a or slot b I need to be flashing to?
How do I know if my phone has more than 1 boot slot?

I have used minimal adb method and standard platform tools method. (I have also tried using a couple of transfer cables.)

Getting back to the partition slot, I followed this tutorial (https://krispitech.com/check-partition-slot-a-b/) and found cmd is displaying a whole load of other stuff about the phone but is not displaying (bootloader) current-slot, or the slot that is currently being used.
you'll want to flash to slot a. It's possible that your phone doesn't have more than one boot slot, in which case this whole thing is moot...but i couldn't find that detail from a quick search of your phone.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    OK. I set up the XPrivacyLua with the assistance of this youtube video.


    I only watched the video once and set it up using the google play store app. but after reading your response, I set it up using the "google play services" process, and now my phone passes safetynet again.

    Hope this helps someone. :)
    1
    D
    Deleted member 1890170
    The cat-and-mouse game has ended. :)
    1
    OK. I set up the XPrivacyLua with the assistance of this youtube video.


    I only watched the video once and set it up using the google play store app. but after reading your response, I set it up using the "google play services" process, and now my phone passes safetynet again.

    Hope this helps someone. :)
    Its work for me is poco x3 pro , thanks
    1
    You can still spoof Safety Net on Pie but later Android version you need, Gapps, GPlayServices, Universal Safety Net fix, manual fingerprinting change with MagiskHideprop, no MicroG, Riru, Riru Hide and of course Magisk. for now it fixes the server side Safety Net test.

    On the other hand, JohnW is actively trying to make Android stop not security based apps stop using Safety Net. Pokemon and McDonalds shouldnt use that API.
    i disagree with the entire concept of SafetyNet. If I can log into a banking website on my Windows PC from an administrator account, then I should be able to log into the same system from my phone as an administrator. I don't blame John for taking a job at google, but if google suddenly succeeds in causing every single rooted device to permanently fail safetynet, then I will most definitely blame him.

    Can you be more specific regarding the steps to pass safetynet with the latest canary version as you described? Thanks.