zhkl0228 / unidbg

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

so中访问了env->NewDirectByteBuffer(buffer, _capacity)出现异常,求各位大佬帮忙看一下 #674

Open winnerMaster1 opened 3 weeks ago

winnerMaster1 commented 3 weeks ago

代码如下,麻烦各位大佬看一下: jobject NativeByteBuffer::getJavaByteBuffer() { if (javaByteBuffer == nullptr && javaVm != nullptr) { JNIEnv *env = 0; if (javaVm->GetEnv((void **) &env, JNI_VERSION_1_6) != JNI_OK) { if (LOGS_ENABLED) DEBUG_E("can't get jnienv"); exit(1); } javaByteBuffer = env->NewDirectByteBuffer(buffer, _capacity);

unidbg执行报定位到这个异常中
Pointer _NewDirectByteBuffer = svcMemory.registerSvc(new Arm64Svc() { @Override public long handle(Emulator<?> emulator) { throw new UnsupportedOperationException(); } });

zhaodice commented 2 weeks ago

unidbg有好多东西没实现,遇到throw new UnsupportedOperationException();这种情况你只能自己补咯。

毕竟不可能都补完,要不然不就变成Unidbg OS 了