diff --git a/Il2cppHook/agent/base/breaker.ts b/Il2cppHook/agent/base/breaker.ts index e891327..3233a34 100644 --- a/Il2cppHook/agent/base/breaker.ts +++ b/Il2cppHook/agent/base/breaker.ts @@ -562,10 +562,10 @@ globalThis.BFA = (filterStr: string, allImg: boolean = true): void => { globalThis.getPlatformCtxWithArgV = (ctx: T, argIndex: number): NativePointer | undefined => { if ((ctx as ArmCpuContext).r0 != undefined) { if (argIndex > 15 || argIndex < 0) throw new Error(`ARM32 -> argIndex ${argIndex} is out of range`) - return eval(`((ctx as ArmCpuContext).r${argIndex})`) as NativePointer + return eval(`(ctx as ArmCpuContext).r${argIndex}`) as NativePointer } else { if (argIndex > 32 || argIndex < 0) throw new Error(`ARM64 -> argIndex ${argIndex} is out of range`) - return eval(`((ctx as Arm64CpuContext).x${argIndex})`) as NativePointer + return eval(`(ctx as Arm64CpuContext).x${argIndex}`) as NativePointer } } diff --git a/Il2cppHook/agent/java/dialog.ts b/Il2cppHook/agent/java/dialog.ts index 956b394..1e1261d 100644 --- a/Il2cppHook/agent/java/dialog.ts +++ b/Il2cppHook/agent/java/dialog.ts @@ -11,6 +11,7 @@ globalThis.HookDialog = () => { /// // public void show(String message) + LOGD("[*] HOOK androidx.appcompat.app.AlertDialog") Java.use("androidx.appcompat.app.AlertDialog").show.implementation = function () { let params: string = arguments.length == 0 ? '' : JSON.stringify(arguments) LOGW(`CALLED -> ${this.toString()}`) @@ -21,6 +22,7 @@ globalThis.HookDialog = () => { /// ↓↓↓↓↓↓↓ androidx.fragment.app.DialogFragment ↓↓↓↓↓↓↓ + LOGD("[*] HOOK androidx.fragment.app.FragmentTransaction") /// // public int show(FragmentTransaction transaction, String tag) DialogFragment.show.overload('androidx.fragment.app.FragmentTransaction', 'java.lang.String').implementation = function () { @@ -46,6 +48,7 @@ globalThis.HookDialog = () => { /// ↓↓↓↓↓↓↓ android.app.Dialog ↓↓↓↓↓↓↓ + LOGD("[*] HOOK android.app.Dialog") Java.use('android.app.Dialog').show.overload().implementation = function () { let params: string = arguments.length == 0 ? '' : JSON.stringify(arguments) LOGW(`CALLED -> ${this.toString()}`) @@ -58,6 +61,7 @@ globalThis.HookDialog = () => { let PopupWindow = Java.use("android.widget.PopupWindow") + LOGD("[*] HOOK android.widget.PopupWindow") /// // public void showAsDropDown(View anchor) PopupWindow.showAsDropDown.overload('android.view.View').implementation = function () {