Stacktracing Activities
4 views
9bf6d79c...
Description
Script to observer the Activities stack trace in Runtime.
How to Use
Download the script and run it with Frida CLI:
Download ScriptThen run with Frida:
frida -U -f YOUR_PACKAGE_NAME -l stacktracing-activities.js
Replace YOUR_PACKAGE_NAME with the target app's package name.
Source Code
JavaScript
Java.perform(function() {
var currentActivity;
// Intercept the call to the 'onCreate' method of all the Activities
var Activity = Java.use('android.app.Activity');
Activity.onCreate.overload('android.os.Bundle').implementation = function(savedInstanceState) {
// Save the reference to the current activity
this.onCreate.overload('android.os.Bundle').call(this, savedInstanceState);
currentActivity = this;
console.log("The current Activity is: " + currentActivity.getClass().getName());
var stack = Java.use("android.util.Log").getStackTraceString(Java.use("java.lang.Exception").$new())
console.log("Here is your stacktrace: " + stack);
}
});
Comments