frida android 对话框
Java.use("android.app.AlertDialog$Builder").$new(this).setTitle(String.$new("Hook tips"))
.setMessage(String.$new("Hook success"))
.setPositiveButton(String.$new("OK"), null)
.show();
第二种写法:
function showDialog(activityContext: Java.Wrapper, message: string | Java.Wrapper) {
if(Process.platform == "linux" && Java.available){
Java.scheduleOnMainThread(function() {
const AlertDialogBuilder = Java.use("android.app.AlertDialog$Builder");
const JavaString = Java.use("java.lang.String");
const builder = AlertDialogBuilder.$new(activityContext);
const s = JavaString.$new(message);
builder.setMessage(s);
builder.create().show();
});
}
}
页:
[1]