Closed liukuo362573 closed 1 year ago
doBackupAndHook 方法中,targetMethod 是 Java 方法,hookMethod 如果是 JNI 方法会报以上的错误,如果 hookMethod 也是 Java 方法,就不会报错了。
2023-03-28 16:59:57.950 26315-26315 SO_TEST com.friday.sotest I getHelloWorld: Hello World
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I getHelloWorld1 : Hello World Hooked
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I target method is at 0x7ba64cd930, hook method is at 0x7ba64cd960, backup method is at 0x0
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I setNonCompilable: change access flags from 0x80009 to 0x1080009
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I replace method from 0x7ba64cd930 to 0x7ba64cd960
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I allocating space for trampoline code at 0x7c27298000
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I replace entry point from 0x7ba5bddcb0 to 0x7c27298004
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I change access flags from 0x1080009 to 0x1080109
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I hook and backup done
2023-03-28 16:59:57.951 26315-26315 SO_TEST com.friday.sotest I getHelloWorld hooked: Hello World Hooked1
执行 hook 的方法时候报错。