zhkl0228 / unidbg

Allows you to emulate an Android native library, and an experimental iOS emulation
Apache License 2.0
3.88k stars 966 forks source link

重写android/content/pm/Signature->hashCode()I 之后,报异常 Fetch memory failed: address=0x0, size=1, value=0x0 #520

Open CoderProducer opened 1 year ago

CoderProducer commented 1 year ago

@Override public int callIntMethodV(BaseVM vm, DvmObject<?> dvmObject, String signature, VaList vaList) { switch (signature) { case "android/content/pm/Signature->hashCode()I": { CertificateMeta[] metas = vm.getSignatures(); System.out.println("metas: " + metas); if (metas != null) { Signature[] signatures = new Signature[metas.length]; for (int i = 0; i < metas.length; i++) { signatures[i] = new Signature(vm, metas[i]); } System.out.println("signatures: " + Arrays.toString(signatures)); return vm.resolveClass("android/content/pm/Signature").newObject(signatures).hashCode();

        }

    }
}
    throw new UnsupportedOperationException(signature);
}

hashCode: com.github.unidbg.linux.android.dvm.api.Signature@9629756 JNIEnv->CallIntMethodV(android.content.pm.Signature@617c74e5, hashCode() => 0x62ee68d8) was called from RX@0x40013d54[libshield.so]0x13d54 [12:35:21 704] WARN [com.github.unidbg.arm.AbstractARM64Emulator] (AbstractARM64Emulator$1:63) - Fetch memory failed: address=0x0, size=1, value=0x0 [12:35:21 708] WARN [com.github.unidbg.AbstractEmulator] (AbstractEmulator:420) - emulate null exception sp=unidbg@0x40500000, msg=unicorn.UnicornException: Invalid memory fetch (UC_ERR_FETCH_UNMAPPED), offset=5ms exit with code: 1 Exception in thread "main" java.lang.IllegalStateException: Illegal JNI version: 0x1 at com.github.unidbg.linux.android.dvm.BaseVM.checkVersion(BaseVM.java:207) at com.github.unidbg.linux.android.dvm.DalvikModule.callJNI_OnLoad(DalvikModule.java:39) at com.xingin.shield.http.XhsHttpInterceptor.(XhsHttpInterceptor.java:130) at com.xingin.shield.http.XhsHttpInterceptor.main(XhsHttpInterceptor.java:158)

Pr0214 commented 1 year ago

为啥重写它啊

CoderProducer commented 1 year ago

为啥重写它啊

java.lang.UnsupportedOperationException: android/content/pm/Signature->hashCode()I 异常了

Jayce-Jian commented 7 months ago

为啥重写它啊

java.lang.UnsupportedOperationException: android/content/pm/Signature->hashCode()I 异常了

哥们,你解决了吗?我也在载入libxyass.so测试下,发现已有的android/app/ActivityThread->currentApplication()Landroid/app/Application;方法也报异常了

CoderProducer commented 7 months ago

没有,好久没看这个东西了

---原始邮件--- 发件人: @.> 发送时间: 2024年4月11日(周四) 中午12:24 收件人: @.>; 抄送: @.**@.>; 主题: Re: [zhkl0228/unidbg] 重写android/content/pm/Signature->hashCode()I 之后,报异常 Fetch memory failed: address=0x0, size=1, value=0x0 (Issue #520)

为啥重写它啊

java.lang.UnsupportedOperationException: android/content/pm/Signature->hashCode()I 异常了

哥们,你解决了吗?我也在载入libxyass.so测试下,发现已有的android/app/ActivityThread->currentApplication()Landroid/app/Application;方法也报异常了

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>