add r4, r2, #4 @ create space for method pointer in frame sub r4, sp, r4 @ reserve & align *stack* to 16 bytes: native calling and r4, #0xFFFFFFF0 @ convention only aligns to 8B, so we have to ensure ART mov sp, r4 @ 16B alignment ourselves.
mov r4, r0 @ save method* add r0, sp, #4 @ pass stack pointer + method ptr as dest for memcpy bl memcpy @ memcpy (dest, src, bytes) mov ip, #0 @ set ip to 0 str ip, [sp] @ store null for method* at bottom of frame
05-11 09:15:10.177 6575 6575 D ArtHook_native: fucking life I : handle = 0xace10e58 05-11 09:15:10.178 6575 6575 I test2:fake_dlfcn: _ZN3art9JNIEnvExt11NewLocalRefEPNS_6mirror6ObjectE found at 0xb3edffbd 05-11 09:15:10.178 6575 6575 D ArtHook_native: _ZN3art9JNIEnvExt11NewLocalRefEPNS_6mirror6ObjectE = 0xb3edffbd 05-11 09:15:10.178 6575 6575 I fucking life: this is java bridge ! 05-11 09:15:10.178 6575 6575 I fucking life: originalMethodPointer = -1231585092 05-11 09:15:10.178 6575 6575 I fucking life: thisObject = class de.larma.arthook.test.MyApplication value = de.larma.arthook.test.MyApplication@8f7524c