PAGalaxyLab / YAHFA

Yet Another Hook Framework for ART
GNU General Public License v3.0
1.56k stars 350 forks source link

调用backup函数就会调用回hook函数导致deadloop #141

Closed Art-Chen closed 3 years ago

Art-Chen commented 3 years ago

自从做了修复backup方法的NoSuchMethod之后 就一直出现这个问题 Hook Log如下 02-01 00:14:00.303 1523 1523 I YAHFA: Start hooking with item moe.chenxy.patch.miui.display.SetDozeModeBrightness

02-01 00:14:00.303 1523 1523 I YAHFA: HookMain: getArtMethod: 0x786fd062d8

02-01 00:14:00.304 1523 1523 I YAHFA: HookMain: getArtMethod: 0x786fe69728

02-01 00:14:00.304 1523 1523 I YAHFA: HookMain: getArtMethod: 0x786fe696b0

02-01 00:14:00.304 1523 1523 I YAHFA: target method is at 0x786fd062d8, hook method is at 0x786fe69728, backup method is at 0x786fe696b0

02-01 00:14:00.304 1523 1523 I YAHFA: setNonCompilable: change access flags from 0x10080002 to 0x12080002

02-01 00:14:00.304 1523 1523 I YAHFA: setNonCompilable: change access flags from 0x10080009 to 0x12080009

02-01 00:14:00.304 1523 1523 I YAHFA: replace entry point from 0x7878541fa0 to 0x78f99ff000

02-01 00:14:00.304 1523 1523 I YAHFA: replace entry point from 0x7878541fa0 to 0x78f99c0000

02-01 00:14:00.304 1523 1523 I YAHFA: hook and backup done

canyie commented 3 years ago

如果被hook的方法不是static的就把backup设置成private,应该能解决

Art-Chen commented 3 years ago

如果被hook的方法不是static的就把backup设置成private,应该能解决

已经切SandHook了 不过还是谢谢了 这个问题困扰我太久了