访问apk文件,无论在rootdir还是重定向都报错。网上查了说是文件格式问题,但该apk能直接安装到手机上,格式应该没问题。
运行的so是64位的,该apk下只有arm64-v8a的lib,我换其他版本运行32位的so是正常的
java.lang.IllegalStateException: java.io.IOException: Negative seek offset
at com.github.unidbg.linux.AndroidElfLoader.mmap2(AndroidElfLoader.java:776)
at com.github.unidbg.linux.ARM64SyscallHandler.mmap(ARM64SyscallHandler.java:1218)
at com.github.unidbg.linux.ARM64SyscallHandler.hook(ARM64SyscallHandler.java:299)
at com.github.unidbg.arm.backend.UnicornBackend$11.hook(UnicornBackend.java:345)
at unicorn.Unicorn$NewHook.onInterrupt(Unicorn.java:128)
at unicorn.Unicorn.emu_start(Native Method)
at com.github.unidbg.arm.backend.UnicornBackend.emu_start(UnicornBackend.java:376)
at com.github.unidbg.AbstractEmulator.emulate(AbstractEmulator.java:380)
at com.github.unidbg.thread.Function64.run(Function64.java:39)
at com.github.unidbg.thread.MainTask.dispatch(MainTask.java:19)
at com.github.unidbg.thread.UniThreadDispatcher.run(UniThreadDispatcher.java:172)
at com.github.unidbg.thread.UniThreadDispatcher.runMainForResult(UniThreadDispatcher.java:96)
at com.github.unidbg.AbstractEmulator.runMainForResult(AbstractEmulator.java:340)
at com.github.unidbg.arm.AbstractARM64Emulator.eFunc(AbstractARM64Emulator.java:236)
at com.github.unidbg.Module.emulateFunction(Module.java:163)
at com.github.unidbg.linux.LinuxModule.callFunction(LinuxModule.java:258)
at com.meituan.android.common.mtguard.NBridge.call_main1(NBridge.java:69)
at com.meituan.android.common.mtguard.NBridge.init(NBridge.java:58)
at com.meituan.android.common.mtguard.NBridge.main(NBridge.java:53)
Caused by: java.io.IOException: Negative seek offset
at java.base/java.io.RandomAccessFile.seek(RandomAccessFile.java:589)
at com.github.unidbg.linux.file.SimpleFileIO.getMmapData(SimpleFileIO.java:142)
at com.github.unidbg.file.AbstractFileIO.mmap2(AbstractFileIO.java:123)
at com.github.unidbg.linux.AndroidElfLoader.mmap2(AndroidElfLoader.java:766)
... 18 more
访问apk文件,无论在rootdir还是重定向都报错。网上查了说是文件格式问题,但该apk能直接安装到手机上,格式应该没问题。 运行的so是64位的,该apk下只有arm64-v8a的lib,我换其他版本运行32位的so是正常的 java.lang.IllegalStateException: java.io.IOException: Negative seek offset at com.github.unidbg.linux.AndroidElfLoader.mmap2(AndroidElfLoader.java:776) at com.github.unidbg.linux.ARM64SyscallHandler.mmap(ARM64SyscallHandler.java:1218) at com.github.unidbg.linux.ARM64SyscallHandler.hook(ARM64SyscallHandler.java:299) at com.github.unidbg.arm.backend.UnicornBackend$11.hook(UnicornBackend.java:345) at unicorn.Unicorn$NewHook.onInterrupt(Unicorn.java:128) at unicorn.Unicorn.emu_start(Native Method) at com.github.unidbg.arm.backend.UnicornBackend.emu_start(UnicornBackend.java:376) at com.github.unidbg.AbstractEmulator.emulate(AbstractEmulator.java:380) at com.github.unidbg.thread.Function64.run(Function64.java:39) at com.github.unidbg.thread.MainTask.dispatch(MainTask.java:19) at com.github.unidbg.thread.UniThreadDispatcher.run(UniThreadDispatcher.java:172) at com.github.unidbg.thread.UniThreadDispatcher.runMainForResult(UniThreadDispatcher.java:96) at com.github.unidbg.AbstractEmulator.runMainForResult(AbstractEmulator.java:340) at com.github.unidbg.arm.AbstractARM64Emulator.eFunc(AbstractARM64Emulator.java:236) at com.github.unidbg.Module.emulateFunction(Module.java:163) at com.github.unidbg.linux.LinuxModule.callFunction(LinuxModule.java:258) at com.meituan.android.common.mtguard.NBridge.call_main1(NBridge.java:69) at com.meituan.android.common.mtguard.NBridge.init(NBridge.java:58) at com.meituan.android.common.mtguard.NBridge.main(NBridge.java:53) Caused by: java.io.IOException: Negative seek offset at java.base/java.io.RandomAccessFile.seek(RandomAccessFile.java:589) at com.github.unidbg.linux.file.SimpleFileIO.getMmapData(SimpleFileIO.java:142) at com.github.unidbg.file.AbstractFileIO.mmap2(AbstractFileIO.java:123) at com.github.unidbg.linux.AndroidElfLoader.mmap2(AndroidElfLoader.java:766) ... 18 more