MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / GetFieldMethod

Function GetFieldMethod

Bcore/src/main/cpp/jnihook/ArtM.cpp:90–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90void *GetFieldMethod(JNIEnv *env, jobject field) {
91 if (ArtMethodEnv.api_level >= __ANDROID_API_Q__) {
92 jclass fieldClass = env->FindClass("java/lang/reflect/Field");
93 jmethodID getArtField = env->GetMethodID(fieldClass, "getArtField", "()J");
94 return reinterpret_cast<void *>(env->CallLongMethod(field, getArtField));
95 } else {
96 return env->FromReflectedField(field);
97 }
98}
99
100__attribute__((section (".mytext"))) JNICALL void native_offset
101 (JNIEnv *env, jclass obj) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected