Last active
September 28, 2023 01:56
-
-
Save myzhan/ab13068463cd7f77b7f06ae561ea853a to your computer and use it in GitHub Desktop.
Frida android make toast
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java.scheduleOnMainThread(function() { | |
Toast = Java.use("android.widget.Toast"); | |
var currentApplication = Java.use('android.app.ActivityThread').currentApplication(); | |
var context = currentApplication.getApplicationContext(); | |
Toast.makeText(context,"hello world", Toast.LENGTH_SHORT.value).show(); | |
}); |
iddoeldor
commented
Aug 8, 2018
It doesn't work! Why?
IDK, it works for me
@0xE4s0n @pitust This is works.
Java.perform(function () {
var context = Java.use('android.app.ActivityThread').currentApplication().getApplicationContext();
Java.scheduleOnMainThread(function() {
var toast = Java.use("android.widget.Toast");
toast.makeText(Java.use("android.app.ActivityThread").currentApplication().getApplicationContext(), Java.use("java.lang.String").$new("This is works!"), 1).show();
});
});
For detail information and debugging, please check https://www.yodiw.com/frida-android-make-toast-non-rooted-device/
i know, that is more or less what worked for me
What about hyperlinks and stuff?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment