Tutorial Bypass SafetyNet Signature&Root Detection on some games

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

YasKashije

Full Member
Mar 3, 2020
4
138
0
Hello GH,


In case you don't know, SafetyNet is some kind of test that detects abnormalities (like root) on your device. Not only that, test may also fail if original apk signature gets broken. Some games use this as a novice repellant "anti-cheat security".

Game I'll be using as example: Magia Record Madoka Magica (tested on versions 1.10 and 1.12)


Tools requiered:
>Apktool or any apk decompiler\compiler.
>Notepad++


Procedure:
> Once we recompile and install this apk, the following pop-up will appear on screen, blocking our way:
1605473240657.png

> We open Notepad++, and search for that same string ("Only applications downloaded from the Google Play Store can be used") in the smali folder of the decompiled apk.
> One of the results will be the following file (found in \smali\jp\f4samurai\bridge): CheatHandler.smali
> We open and inspect it. We will find the following:
1605473400640.png

(Interesting, right? This piece of smali calls fromGooglePlay and does some kind of boolean check)
> We go to "fromGooglePlay()" function, delete everything and add a return 1 in smali. It should look like this:
fromGooglePlay():
.method private fromGooglePlay()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method
> By further inspecting the file, we will also find the following function: checkDevice()V
> This should be the function that manages the root detection. Maybe we are using a rooted device, and we want our mod to work there too, so we just wipe it clean. Final result should look like this:
checkDevice():
.method private checkDevice()V
    .locals 0

    return-void

.end method
(The original function calls an array found just afterwards, we delete it too).
> Save changes and compile the apk.

This popup should no longer appear.

I hope this is helpful to you.



I'm attaching the already modified file if instructions were not clear enough.
Scans of file and .rar (I can't attach the .smali)
VirusTotal
VirusTotal
 

Attachments

You can download 0 Attachments
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods