Process: com.y.hookdemo, PID: 24014
java.lang.IllegalArgumentException: method android.app.IActivityManager$Stub$Proxy.getActivityDisplayId argument 1 has type android.os.IBinder, got java.lang.Object[]
at java.lang.reflect.Method.invoke(Native Method)
at com.y.hookdemo.HookUtil$HookInvocationHandler.invoke(HookUtil.kt:121)
kotlin书写:
private class HookInvocationHandler(private val iam: Any): InvocationHandler {
@Throws(Throwable::class)
override fun invoke(proxy: Any, method: Method, args: Array<Any>): Any {
if (method.name.contains("startActivity")) {
Log.e("Hook", "IActivityManager动态代理的invoke方法,伪装intent")
for (i in args.indices) {
if (args[i] is Intent) {