test

by
4 views a9d1b98c...

Description

test

How to Use

Download the script and run it with Frida CLI:

Download Script

Then run with Frida:

frida -U -f YOUR_PACKAGE_NAME -l test.js

Replace YOUR_PACKAGE_NAME with the target app's package name.

Source Code

JavaScript
// bypass_debug.js
Java.perform(function () {
    var Debug = Java.use('android.os.Debug');
    Debug.isDebuggerConnected.implementation = function() {
        console.log("Bypassing Debug.isDebuggerConnected()");
        return false;
    };

    var DebugFlags = Java.use('android.os.Debug$DebugFlags');
    DebugFlags.DEBUG_ENABLE_DEBUGGER = 0;
    
    var System = Java.use('java.lang.System');
    System.getenv.overload('java.lang.String').implementation = function(name) {
        console.log("Bypassing System.getenv(" + name + ")");
        if (name === 'debug') {
            return null;
        }
        return this.getenv(name);
    };

    var ActivityThread = Java.use('android.app.ActivityThread');
    ActivityThread.currentApplication().getApplicationContext().getApplicationInfo().flags.value = 0;
    
    console.log("Bypassing complete");
});
Share this script:
Twitter LinkedIn

Comments

Login or Sign up to leave a comment.
Loading comments...