|
@@ -7,7 +7,7 @@ export let HOOK_DY = {
|
|
|
// 重写 setOnClickListener
|
|
|
View.setOnClickListener.implementation = function (listener) {
|
|
|
// 检查 this 是否是 TextView 的实例
|
|
|
- console.log("type of this: " + this.getClass().getName());
|
|
|
+ // console.log("type of this: " + this.getClass().getName());
|
|
|
if (this.getClass().getName().includes("TextView")) {
|
|
|
try { // 安全地转换 this 为 TextView
|
|
|
var textView = Java.cast(this, TextView);
|
|
@@ -40,12 +40,19 @@ export let HOOK_DY = {
|
|
|
this.setOnClickListener(listener);
|
|
|
};
|
|
|
|
|
|
- //监听Toast.makeText
|
|
|
- var Toast = Java.use("android.widget.Toast");
|
|
|
- Toast.makeText.overload('android.content.Context', 'java.lang.CharSequence', 'int').implementation = function (context, text, duration) {
|
|
|
- console.log("Toast.makeText:", text);
|
|
|
- return this.makeText(context, text, duration);
|
|
|
- };
|
|
|
+ //hook X.0mSO
|
|
|
+ setTimeout(function (){
|
|
|
+ let use = Java.use("X.0mSO");
|
|
|
+ if (use!==null){
|
|
|
+ console.log("hook java")
|
|
|
+ use.LIZJ.overload().implementation=function () {
|
|
|
+ let lizj = this.LIZJ();
|
|
|
+ console.log("call lizj:",lizj);
|
|
|
+ return lizj;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ },5000);
|
|
|
});
|
|
|
}
|
|
|
}
|