java.lang.UnsupportedOperationException: android/system/Os->stat(Ljava/lang/String;)Landroid/system/StructStat;
at com.github.unidbg.linux.android.dvm.AbstractJni.callStaticObjectMethodV(AbstractJni.java:504)
at com.github.unidbg.linux.android.dvm.AbstractJni.callStaticObjectMethodV(AbstractJni.java:438)
at com.github.unidbg.linux.android.dvm.DvmMethod.callStaticObjectMethodV(DvmMethod.java:59)
时间:2024-07-21 00:35:26 类名:android.system.Os 日志名称:stat(String) 参数1 参数类型:java.lang.String 参数值:/data/user_de/0/com.tencent.mobileqq/code_cache 返回结果类型:android.system.StructStat 返回结果值:StructStat[st_atim=StructTimespec[tv_nsec=389602659,tv_sec=1721493326],st_atime=1721493326,st_blksize=4096,st_blocks=8,st_ctim=StructTimespec[tv_nsec=389602659,tv_sec=1721493326],st_ctime=1721493326,st_dev=2066,st_gid=20054,st_ino=786640,st_mode=17913,st_mtim=StructTimespec[tv_nsec=389602659,tv_sec=1721493326],st_mtime=1721493326,st_nlink=2,st_rdev=0,st_size=4096,st_uid=10054]
java.lang.UnsupportedOperationException: android/system/Os->stat(Ljava/lang/String;)Landroid/system/StructStat; at com.github.unidbg.linux.android.dvm.AbstractJni.callStaticObjectMethodV(AbstractJni.java:504) at com.github.unidbg.linux.android.dvm.AbstractJni.callStaticObjectMethodV(AbstractJni.java:438) at com.github.unidbg.linux.android.dvm.DvmMethod.callStaticObjectMethodV(DvmMethod.java:59)
@Override public DvmObject<?> callStaticObjectMethodV(BaseVM vm, DvmClass dvmClass, String signature, VaList vaList) { switch (signature) { case "android/system/Os->stat(Ljava/lang/String;)Landroid/system/StructStat;": String path = String.valueOf(vaList.getObjectArg(0)); if (path.contains("/storage/emulated")) { // 创建 Stat64 对象 Stat64 stat64 = new Stat64(new Pointer(0)); // 设置属性值 stat64.st_blksize = 4096; stat64.st_blocks = 8; stat64.st_dev = 2066; stat64.st_gid = 20054; stat64.st_ino = 786640; stat64.st_mode = 17913; stat64.st_nlink = 2; stat64.st_rdev = 0; stat64.st_size = 4096; stat64.st_uid = 10054; // 设置时间属性 TimeSpec64 atim = new TimeSpec64(new Pointer(0)); atim.tv_nsec = 389602659; atim.tv_sec = 1721493326; stat64.st_atim = atim; TimeSpec64 mtim = new TimeSpec64(new Pointer(0)); mtim.tv_nsec = 389602659; mtim.tv_sec = 1721493326; stat64.st_mtim = mtim; TimeSpec64 ctim = new TimeSpec64(new Pointer(0)); ctim.tv_nsec = 389602659; ctim.tv_sec = 1721493326; stat64.st_ctim = ctim; } return vm.resolveClass("android/system/StructStat").newObject(); default: throw new UnsupportedOperationException(signature); } }