frida hook Toast

  // 获得Toast组件
  var Toast = Java.use("android.widget.Toast");
  var makeText = Toast.makeText;
  var String = Java.use("java.lang.String");
  // 函数重载, 设置参数类型
  makeText.overload("android.content.Context", "java.lang.CharSequence", "int").implementation = function (
    context,
    content,
    time
  ) {
    var hookContent = String.$new(content);
    printStack();
    return this.makeText(context, hookContent, time);
  };
posted @ 2023-07-13 16:00  公众号python学习开发  阅读(89)  评论(0编辑  收藏  举报