@Override
public DvmObject<?> callObjectMethodV(BaseVM vm, DvmObject<?> dvmObject, String signature, VaList vaList) {
switch (signature){
case "android/content/Context->getPackageCodePath()Ljava/lang/String;": {
return new StringObject(vm, "/data/app/com.sankuai.mhotel-1/base.apk");
}
}
return super.callObjectMethodV(vm, dvmObject, signature, vaList);
}
@Override
public FileResult resolve(Emulator emulator, String pathname, int oflags) {
System.out.println("pathname: " + pathname);
if(pathname.equals("/data/app/com.sankuai.mhotel-1/base.apk")){
return FileResult.success(new SimpleFileIO(oflags, new File("unidbg-android\\src\\test\\resources\\meituanhotel\\base.apk"), pathname));
}
return null;
}
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x40142d09[libmtguard.so]0x2d09
JNIEnv->RegisterNatives(com/meituan/android/common/mtguard/NBridge, RW@0x40189004[libmtguard.so]0x49004, 1) was called from RX@0x40142c93[libmtguard.so]0x2c93
RegisterNative(com/meituan/android/common/mtguard/NBridge, main(I[Ljava/lang/Object;)[Ljava/lang/Object;, RX@0x40142dc5[libmtguard.so]0x2dc5)
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x4014ed29[libmtguard.so]0xed29
JNIEnv->GetStaticMethodID(com/meituan/android/common/mtguard/NBridge.getPicName()Ljava/lang/String;) => 0xe82271b was called from RX@0x4014ed4d[libmtguard.so]0xed4d
JNIEnv->CallStaticObjectMethodV(class com/meituan/android/common/mtguard/NBridge, getPicName() => "ms_com.sankuai.mhotel.png") was called from RX@0x4014ed63[libmtguard.so]0xed63
JNIEnv->GetStringUtfChars("ms_com.sankuai.mhotel.png") was called from RX@0x4014f645[libmtguard.so]0xf645
JNIEnv->ReleaseStringUTFChars("ms_com.sankuai.mhotel.png") was called from RX@0x4014d763[libmtguard.so]0xd763
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x4014ed29[libmtguard.so]0xed29
JNIEnv->GetStaticMethodID(com/meituan/android/common/mtguard/NBridge.getSecName()Ljava/lang/String;) => 0xb3100ce2 was called from RX@0x4014ed4d[libmtguard.so]0xed4d
JNIEnv->CallStaticObjectMethodV(class com/meituan/android/common/mtguard/NBridge, getSecName() => "ppd_com.sankuai.mhotel.xbt") was called from RX@0x4014ed63[libmtguard.so]0xed63
JNIEnv->GetStringUtfChars("ppd_com.sankuai.mhotel.xbt") was called from RX@0x4014f645[libmtguard.so]0xf645
JNIEnv->ReleaseStringUTFChars("ppd_com.sankuai.mhotel.xbt") was called from RX@0x4014d763[libmtguard.so]0xd763
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x4014b915[libmtguard.so]0xb915
JNIEnv->GetStaticMethodID(com/meituan/android/common/mtguard/NBridge.getAppContext()Landroid/content/Context;) => 0xed47bf3a was called from RX@0x4014b9a7[libmtguard.so]0xb9a7
JNIEnv->CallStaticObjectMethodV(class com/meituan/android/common/mtguard/NBridge, getAppContext() => android.content.Context@6ad5c04e) was called from RX@0x4014ba5b[libmtguard.so]0xba5b
JNIEnv->GetMethodID(android/content/Context.getPackageName()Ljava/lang/String;) => 0xf6590850 was called from RX@0x4014ce71[libmtguard.so]0xce71
JNIEnv->CallObjectMethodV(android.content.Context@6ad5c04e, getPackageName() => "com.sankuai.mhotel") was called from RX@0x4014b771[libmtguard.so]0xb771
JNIEnv->GetStringUtfChars("com.sankuai.mhotel") was called from RX@0x4014cebf[libmtguard.so]0xcebf
JNIEnv->ReleaseStringUTFChars("com.sankuai.mhotel") was called from RX@0x4014d763[libmtguard.so]0xd763
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x4014b915[libmtguard.so]0xb915
JNIEnv->GetStaticMethodID(com/meituan/android/common/mtguard/NBridge.getAppContext()Landroid/content/Context;) => 0xed47bf3a was called from RX@0x4014b9a7[libmtguard.so]0xb9a7
JNIEnv->CallStaticObjectMethodV(class com/meituan/android/common/mtguard/NBridge, getAppContext() => android.content.Context@725bef66) was called from RX@0x4014ba5b[libmtguard.so]0xba5b
JNIEnv->FindClass(android/content/pm/PackageManager) was called from RX@0x4014c755[libmtguard.so]0xc755
JNIEnv->GetStaticFieldID(android/content/pm/PackageManager.GET_SIGNATURESI) => 0x50720de7 was called from RX@0x4014c805[libmtguard.so]0xc805
JNIEnv->GetStaticIntField(class android/content/pm/PackageManager, GET_SIGNATURES => 0x40) was called from RX@0x4014c843[libmtguard.so]0xc843
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x4014b915[libmtguard.so]0xb915
JNIEnv->GetStaticMethodID(com/meituan/android/common/mtguard/NBridge.getAppContext()Landroid/content/Context;) => 0xed47bf3a was called from RX@0x4014b9a7[libmtguard.so]0xb9a7
JNIEnv->CallStaticObjectMethodV(class com/meituan/android/common/mtguard/NBridge, getAppContext() => android.content.Context@2aaf7cc2) was called from RX@0x4014ba5b[libmtguard.so]0xba5b
JNIEnv->GetMethodID(android/content/Context.getPackageManager()Landroid/content/pm/PackageManager;) => 0x3acc78f0 was called from RX@0x4014ea13[libmtguard.so]0xea13
JNIEnv->CallObjectMethodV(android.content.Context@2aaf7cc2, getPackageManager() => android.content.pm.PackageManager@6e3c1e69) was called from RX@0x4014ea27[libmtguard.so]0xea27
JNIEnv->GetMethodID(android/content/pm/PackageManager.getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;) => 0x3bca8377 was called from RX@0x4014b535[libmtguard.so]0xb535
JNIEnv->NewStringUTF("com.sankuai.mhotel") was called from RX@0x4014b561[libmtguard.so]0xb561
JNIEnv->CallObjectMethodV(android.content.pm.PackageManager@6e3c1e69, getPackageInfo("com.sankuai.mhotel", 0x40) => android.content.pm.PackageInfo@35851384) was called from RX@0x4014b771[libmtguard.so]0xb771
JNIEnv->GetFieldID(android/content/pm/PackageInfo.signatures [Landroid/content/pm/Signature;) => 0x25f17218 was called from RX@0x4014c943[libmtguard.so]0xc943
JNIEnv->GetObjectField(android.content.pm.PackageInfo@35851384, signatures [Landroid/content/pm/Signature; => [android.content.pm.Signature@edf4efb]) was called from RX@0x4014c981[libmtguard.so]0xc981
JNIEnv->GetArrayLength([android.content.pm.Signature@edf4efb] => 1) was called from RX@0x4014c9c7[libmtguard.so]0xc9c7
JNIEnv->GetObjectArrayElement([android.content.pm.Signature@edf4efb], 0) => android.content.pm.Signature@edf4efb was called from RX@0x4014c9f7[libmtguard.so]0xc9f7
JNIEnv->GetMethodID(android/content/pm/Signature.toByteArray()[B) => 0x6a3e2031 was called from RX@0x4014cb4b[libmtguard.so]0xcb4b
JNIEnv->CallObjectMethodV(android.content.pm.Signature@edf4efb, toByteArray() => [B@566776ad) was called from RX@0x4014b771[libmtguard.so]0xb771
JNIEnv->FindClass(java/io/ByteArrayInputStream) was called from RX@0x4014bb19[libmtguard.so]0xbb19
JNIEnv->GetMethodID(java/io/ByteArrayInputStream.<init>([B)V) => 0xa3476a24 was called from RX@0x4014bb93[libmtguard.so]0xbb93
JNIEnv->NewObjectV(class java/io/ByteArrayInputStream, <init>([B@566776ad) => java.io.ByteArrayInputStream@1554909b) was called from RX@0x4014aec3[libmtguard.so]0xaec3
JNIEnv->FindClass(java/security/cert/CertificateFactory) was called from RX@0x4014bc23[libmtguard.so]0xbc23
JNIEnv->GetStaticMethodID(java/security/cert/CertificateFactory.getInstance(Ljava/lang/String;)Ljava/security/cert/CertificateFactory;) => 0x2cba31f6 was called from RX@0x4014bcbf[libmtguard.so]0xbcbf
JNIEnv->NewStringUTF("X509") was called from RX@0x4014bd1f[libmtguard.so]0xbd1f
JNIEnv->CallStaticObjectMethodV(class java/security/cert/CertificateFactory, getInstance("X509") => java.security.cert.CertificateFactory@6cd8737) was called from RX@0x4014ba5b[libmtguard.so]0xba5b
JNIEnv->GetMethodID(java/security/cert/CertificateFactory.generateCertificate(Ljava/io/InputStream;)Ljava/security/cert/Certificate;) => 0xdeaa2324 was called from RX@0x4014bdef[libmtguard.so]0xbdef
JNIEnv->CallObjectMethodV(java.security.cert.CertificateFactory@6cd8737, generateCertificate(java.io.ByteArrayInputStream@1554909b) => java.security.cert.Certificate@22f71333) was called from RX@0x4014b771[libmtguard.so]0xb771
JNIEnv->GetMethodID(java/security/cert/Certificate.getEncoded()[B) => 0x7b49dc1f was called from RX@0x4014bfb1[libmtguard.so]0xbfb1
JNIEnv->CallObjectMethodV(java.security.cert.Certificate@22f71333, getEncoded() => [B@13969fbe) was called from RX@0x4014b771[libmtguard.so]0xb771
JNIEnv->GetArrayLength([B@13969fbe => 643) was called from RX@0x4014c02d[libmtguard.so]0xc02d
JNIEnv->FindClass(com/meituan/android/common/mtguard/NBridge) was called from RX@0x4014b915[libmtguard.so]0xb915
JNIEnv->GetStaticMethodID(com/meituan/android/common/mtguard/NBridge.getAppContext()Landroid/content/Context;) => 0xed47bf3a was called from RX@0x4014b9a7[libmtguard.so]0xb9a7
JNIEnv->CallStaticObjectMethodV(class com/meituan/android/common/mtguard/NBridge, getAppContext() => android.content.Context@3498ed) was called from RX@0x4014ba5b[libmtguard.so]0xba5b
JNIEnv->GetMethodID(android/content/Context.getPackageCodePath()Ljava/lang/String;) => 0xc493eef7 was called from RX@0x4014d169[libmtguard.so]0xd169
JNIEnv->CallObjectMethodV(android.content.Context@3498ed, getPackageCodePath() => "/data/app/com.sankuai.mhotel-1/base.apk") was called from RX@0x4014b771[libmtguard.so]0xb771
JNIEnv->GetStringUtfChars("/data/app/com.sankuai.mhotel-1/base.apk") was called from RX@0x4014d1c3[libmtguard.so]0xd1c3
JNIEnv->ReleaseStringUTFChars("/data/app/com.sankuai.mhotel-1/base.apk") was called from RX@0x4014d763[libmtguard.so]0xd763
pathname: /data/app/com.sankuai.mhotel-1/base.apk