├── IDA_JNI_Renamer ├── ReadMe.md ├── ida_jni.py └── jni-api19.h ├── LICENSE ├── StaticFuncsIdentify.idc ├── StaticFuncsIdentify64.idc └── jni.idc /IDA_JNI_Renamer/ReadMe.md: -------------------------------------------------------------------------------- 1 | #IDA JNI调用重命名脚本 2 | >####使用说明: 3 | >先使用ida打开要分析的程序,等ida自动分析完成,使用ALT+F7,执行本脚本,本脚本会根据jni的调用的偏移值在ida中创建两个枚举类型,然后扫描用户的函数,根据汇编指令自动分析jni调用点,添加注释,如果遇到无法识别的指令,可以在**偏移**上面按m键手动设置。支持F5插件,如果未成功自动识别,请按m手动设置。 4 | > 5 | ####运行脚本前 6 | ``` 7 | #.text:00005C0A E1 68 LDR R1, [R4,#(dword_1626C - 0x16260)] 8 | #.text:00005C0C 9B 69 LDR R3, [R3,#0x18] 9 | #.text:00005C0E 98 47 BLX R3 10 | ``` 11 | ####运行脚本后 12 | ``` 13 | #.text:00005C0A E1 68 LDR R1, [R4,#(dword_1626C - 0x16260)] 14 | #.text:00005C0C 9B 69 LDR R3, [R3,#jni_FindClass] ; jclass FindClass (JNIEnv*, const char*); 15 | #.text:00005C0E 98 47 BLX R3 16 | ``` 17 | 18 | 19 | -------------------------------------------------------------------------------- /IDA_JNI_Renamer/ida_jni.py: -------------------------------------------------------------------------------- 1 | #coding=UTF8 2 | # 2014/09/05 11:51 3 | # by trojancyborg 4 | # ida jni调用自动重命名脚本 5 | #例: 6 | # 7 | #.text:00005C0A E1 68 LDR R1, [R4,#(dword_1626C - 0x16260)] 8 | #.text:00005C0C 9B 69 LDR R3, [R3,#0x18] 9 | #.text:00005C0E 98 47 BLX R3 10 | # 11 | #.text:00005C0A E1 68 LDR R1, [R4,#(dword_1626C - 0x16260)] 12 | #.text:00005C0C 9B 69 LDR R3, [R3,#jni_FindClass] ; jclass FindClass (JNIEnv*, const char*); 13 | #.text:00005C0E 98 47 BLX R3 14 | # 15 | 16 | from idautils import * 17 | 18 | #枚举名 19 | Enum_JNI_Name = "JNI_Interface" 20 | 21 | #通用寄存器 22 | COMMON_REG = ['R%d' % i for i in range(0,13)] 23 | 24 | #引用类型----------------------- 25 | #立即数字 26 | OP_Immediate = 5 27 | 28 | #EXP: LDR R3,[R3,#0x10] 29 | OP_Base_Index_Displacement = 4 30 | 31 | #EXP: LDR R3,[R1,R2] 32 | OP_Base_Index = 3 33 | 34 | #------------------------------- 35 | 36 | 37 | 38 | jni_names_list = [ 39 | "jni_GetVersion", 40 | "jni_DefineClass", 41 | "jni_FindClass", 42 | "jni_FromReflectedMethod", 43 | "jni_FromReflectedField", 44 | "jni_ToReflectedMethod", 45 | "jni_GetSuperclass", 46 | "jni_IsAssignableFrom", 47 | "jni_ToReflectedField", 48 | "jni_Throw", 49 | "jni_ThrowNew", 50 | "jni_ExceptionOccurred", 51 | "jni_ExceptionDescribe", 52 | "jni_ExceptionClear", 53 | "jni_FatalError", 54 | "jni_PushLocalFrame", 55 | "jni_PopLocalFrame", 56 | "jni_NewGlobalRef", 57 | "jni_DeleteGlobalRef", 58 | "jni_DeleteLocalRef", 59 | "jni_IsSameObject", 60 | "jni_NewLocalRef", 61 | "jni_EnsureLocalCapacity", 62 | "jni_AllocObject", 63 | "jni_NewObject", 64 | "jni_NewObjectV", 65 | "jni_NewObjectA", 66 | "jni_GetObjectClass", 67 | "jni_IsInstanceOf", 68 | "jni_GetMethodID", 69 | "jni_CallObjectMethod", 70 | "jni_CallObjectMethodV", 71 | "jni_CallObjectMethodA", 72 | "jni_CallBooleanMethod", 73 | "jni_CallBooleanMethodV", 74 | "jni_CallBooleanMethodA", 75 | "jni_CallByteMethod", 76 | "jni_CallByteMethodV", 77 | "jni_CallByteMethodA", 78 | "jni_CallCharMethod", 79 | "jni_CallCharMethodV", 80 | "jni_CallCharMethodA", 81 | "jni_CallShortMethod", 82 | "jni_CallShortMethodV", 83 | "jni_CallShortMethodA", 84 | "jni_CallIntMethod", 85 | "jni_CallIntMethodV", 86 | "jni_CallIntMethodA", 87 | "jni_CallLongMethod", 88 | "jni_CallLongMethodV", 89 | "jni_CallLongMethodA", 90 | "jni_CallFloatMethod", 91 | "jni_CallFloatMethodV", 92 | "jni_CallFloatMethodA", 93 | "jni_CallDoubleMethod", 94 | "jni_CallDoubleMethodV", 95 | "jni_CallDoubleMethodA", 96 | "jni_CallVoidMethod", 97 | "jni_CallVoidMethodV", 98 | "jni_CallVoidMethodA", 99 | "jni_CallNonvirtualObjectMethod", 100 | "jni_CallNonvirtualObjectMethodV", 101 | "jni_CallNonvirtualObjectMethodA", 102 | "jni_CallNonvirtualBooleanMethod", 103 | "jni_CallNonvirtualBooleanMethodV", 104 | "jni_CallNonvirtualBooleanMethodA", 105 | "jni_CallNonvirtualByteMethod", 106 | "jni_CallNonvirtualByteMethodV", 107 | "jni_CallNonvirtualByteMethodA", 108 | "jni_CallNonvirtualCharMethod", 109 | "jni_CallNonvirtualCharMethodV", 110 | "jni_CallNonvirtualCharMethodA", 111 | "jni_CallNonvirtualShortMethod", 112 | "jni_CallNonvirtualShortMethodV", 113 | "jni_CallNonvirtualShortMethodA", 114 | "jni_CallNonvirtualIntMethod", 115 | "jni_CallNonvirtualIntMethodV", 116 | "jni_CallNonvirtualIntMethodA", 117 | "jni_CallNonvirtualLongMethod", 118 | "jni_CallNonvirtualLongMethodV", 119 | "jni_CallNonvirtualLongMethodA", 120 | "jni_CallNonvirtualFloatMethod", 121 | "jni_CallNonvirtualFloatMethodV", 122 | "jni_CallNonvirtualFloatMethodA", 123 | "jni_CallNonvirtualDoubleMethod", 124 | "jni_CallNonvirtualDoubleMethodV", 125 | "jni_CallNonvirtualDoubleMethodA", 126 | "jni_CallNonvirtualVoidMethod", 127 | "jni_CallNonvirtualVoidMethodV", 128 | "jni_CallNonvirtualVoidMethodA", 129 | "jni_GetFieldID", 130 | "jni_GetObjectField", 131 | "jni_GetBooleanField", 132 | "jni_GetByteField", 133 | "jni_GetCharField", 134 | "jni_GetShortField", 135 | "jni_GetIntField", 136 | "jni_GetLongField", 137 | "jni_GetFloatField", 138 | "jni_GetDoubleField", 139 | "jni_SetObjectField", 140 | "jni_SetBooleanField", 141 | "jni_SetByteField", 142 | "jni_SetCharField", 143 | "jni_SetShortField", 144 | "jni_SetIntField", 145 | "jni_SetLongField", 146 | "jni_SetFloatField", 147 | "jni_SetDoubleField", 148 | "jni_GetStaticMethodID", 149 | "jni_CallStaticObjectMethod", 150 | "jni_CallStaticObjectMethodV", 151 | "jni_CallStaticObjectMethodA", 152 | "jni_CallStaticBooleanMethod", 153 | "jni_CallStaticBooleanMethodV", 154 | "jni_CallStaticBooleanMethodA", 155 | "jni_CallStaticByteMethod", 156 | "jni_CallStaticByteMethodV", 157 | "jni_CallStaticByteMethodA", 158 | "jni_CallStaticCharMethod", 159 | "jni_CallStaticCharMethodV", 160 | "jni_CallStaticCharMethodA", 161 | "jni_CallStaticShortMethod", 162 | "jni_CallStaticShortMethodV", 163 | "jni_CallStaticShortMethodA", 164 | "jni_CallStaticIntMethod", 165 | "jni_CallStaticIntMethodV", 166 | "jni_CallStaticIntMethodA", 167 | "jni_CallStaticLongMethod", 168 | "jni_CallStaticLongMethodV", 169 | "jni_CallStaticLongMethodA", 170 | "jni_CallStaticFloatMethod", 171 | "jni_CallStaticFloatMethodV", 172 | "jni_CallStaticFloatMethodA", 173 | "jni_CallStaticDoubleMethod", 174 | "jni_CallStaticDoubleMethodV", 175 | "jni_CallStaticDoubleMethodA", 176 | "jni_CallStaticVoidMethod", 177 | "jni_CallStaticVoidMethodV", 178 | "jni_CallStaticVoidMethodA", 179 | "jni_GetStaticFieldID", 180 | "jni_GetStaticObjectField", 181 | "jni_GetStaticBooleanField", 182 | "jni_GetStaticByteField", 183 | "jni_GetStaticCharField", 184 | "jni_GetStaticShortField", 185 | "jni_GetStaticIntField", 186 | "jni_GetStaticLongField", 187 | "jni_GetStaticFloatField", 188 | "jni_GetStaticDoubleField", 189 | "jni_SetStaticObjectField", 190 | "jni_SetStaticBooleanField", 191 | "jni_SetStaticByteField", 192 | "jni_SetStaticCharField", 193 | "jni_SetStaticShortField", 194 | "jni_SetStaticIntField", 195 | "jni_SetStaticLongField", 196 | "jni_SetStaticFloatField", 197 | "jni_SetStaticDoubleField", 198 | "jni_NewString", 199 | "jni_GetStringLength", 200 | "jni_GetStringChars", 201 | "jni_ReleaseStringChars", 202 | "jni_NewStringUTF", 203 | "jni_GetStringUTFLength", 204 | "jni_GetStringUTFChars", 205 | "jni_ReleaseStringUTFChars", 206 | "jni_GetArrayLength", 207 | "jni_NewObjectArray", 208 | "jni_GetObjectArrayElement", 209 | "jni_SetObjectArrayElement", 210 | "jni_NewBooleanArray", 211 | "jni_NewByteArray", 212 | "jni_NewCharArray", 213 | "jni_NewShortArray", 214 | "jni_NewIntArray", 215 | "jni_NewLongArray", 216 | "jni_NewFloatArray", 217 | "jni_NewDoubleArray", 218 | "jni_GetBooleanArrayElements", 219 | "jni_GetByteArrayElements", 220 | "jni_GetCharArrayElements", 221 | "jni_GetShortArrayElements", 222 | "jni_GetIntArrayElements", 223 | "jni_GetLongArrayElements", 224 | "jni_GetFloatArrayElements", 225 | "jni_GetDoubleArrayElements", 226 | "jni_ReleaseBooleanArrayElements", 227 | "jni_ReleaseByteArrayElements", 228 | "jni_ReleaseCharArrayElements", 229 | "jni_ReleaseShortArrayElements", 230 | "jni_ReleaseIntArrayElements", 231 | "jni_ReleaseLongArrayElements", 232 | "jni_ReleaseFloatArrayElements", 233 | "jni_ReleaseDoubleArrayElements", 234 | "jni_GetBooleanArrayRegion", 235 | "jni_GetByteArrayRegion", 236 | "jni_GetCharArrayRegion", 237 | "jni_GetShortArrayRegion", 238 | "jni_GetIntArrayRegion", 239 | "jni_GetLongArrayRegion", 240 | "jni_GetFloatArrayRegion", 241 | "jni_GetDoubleArrayRegion", 242 | "jni_SetBooleanArrayRegion", 243 | "jni_SetByteArrayRegion", 244 | "jni_SetCharArrayRegion", 245 | "jni_SetShortArrayRegion", 246 | "jni_SetIntArrayRegion", 247 | "jni_SetLongArrayRegion", 248 | "jni_SetFloatArrayRegion", 249 | "jni_SetDoubleArrayRegion", 250 | "jni_RegisterNatives", 251 | "jni_UnregisterNatives", 252 | "jni_MonitorEnter", 253 | "jni_MonitorExit", 254 | "jni_GetJavaVM", 255 | "jni_GetStringRegion", 256 | "jni_GetStringUTFRegion", 257 | "jni_GetPrimitiveArrayCritical", 258 | "jni_ReleasePrimitiveArrayCritical", 259 | "jni_GetStringCritical", 260 | "jni_ReleaseStringCritical", 261 | "jni_NewWeakGlobalRef", 262 | "jni_DeleteWeakGlobalRef", 263 | "jni_ExceptionCheck", 264 | "jni_NewDirectByteBuffer", 265 | "jni_GetDirectBufferAddress", 266 | "jni_GetDirectBufferCapacity", 267 | "jni_GetObjectRefType" ] 268 | 269 | 270 | JNINativeInterface = [ 271 | r"void* reserved0;", 272 | r"void* reserved1;", 273 | r"void* reserved2;", 274 | r"void* reserved3;", 275 | r"jint GetVersion (JNIEnv *);", 276 | r"jclass DefineClass (JNIEnv*, const char*, jobject, const jbyte*, jsize);", 277 | r"jclass FindClass (JNIEnv*, const char*);", 278 | r"jmethodID FromReflectedMethod (JNIEnv*, jobject);", 279 | r"jfieldID FromReflectedField (JNIEnv*, jobject);", 280 | r"jobject ToReflectedMethod (JNIEnv*, jclass, jmethodID, jboolean);", 281 | r"jclass GetSuperclass (JNIEnv*, jclass);", 282 | r"jboolean IsAssignableFrom (JNIEnv*, jclass, jclass);", 283 | r"jobject ToReflectedField (JNIEnv*, jclass, jfieldID, jboolean);", 284 | r"jint Throw (JNIEnv*, jthrowable);", 285 | r"jint ThrowNew (JNIEnv *, jclass, const char *);", 286 | r"jthrowable ExceptionOccurred (JNIEnv*);", 287 | r"void ExceptionDescribe (JNIEnv*);", 288 | r"void ExceptionClear (JNIEnv*);", 289 | r"void FatalError (JNIEnv*, const char*);", 290 | r"jint PushLocalFrame (JNIEnv*, jint);", 291 | r"jobject PopLocalFrame (JNIEnv*, jobject);", 292 | r"jobject NewGlobalRef (JNIEnv*, jobject);", 293 | r"void DeleteGlobalRef (JNIEnv*, jobject);", 294 | r"void DeleteLocalRef (JNIEnv*, jobject);", 295 | r"jboolean IsSameObject (JNIEnv*, jobject, jobject);", 296 | r"jobject NewLocalRef (JNIEnv*, jobject);", 297 | r"jint EnsureLocalCapacity (JNIEnv*, jint);", 298 | r"jobject AllocObject (JNIEnv*, jclass);", 299 | r"jobject NewObject (JNIEnv*, jclass, jmethodID, ...);", 300 | r"jobject NewObjectV (JNIEnv*, jclass, jmethodID, va_list);", 301 | r"jobject NewObjectA (JNIEnv*, jclass, jmethodID, jvalue*);", 302 | r"jclass GetObjectClass (JNIEnv*, jobject);", 303 | r"jboolean IsInstanceOf (JNIEnv*, jobject, jclass);", 304 | r"jmethodID GetMethodID (JNIEnv*, jclass, const char*, const char*);", 305 | r"jobject CallObjectMethod (JNIEnv*, jobject, jmethodID, ...);", 306 | r"jobject CallObjectMethodV (JNIEnv*, jobject, jmethodID, va_list);", 307 | r"jobject CallObjectMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 308 | r"jboolean CallBooleanMethod (JNIEnv*, jobject, jmethodID, ...);", 309 | r"jboolean CallBooleanMethodV (JNIEnv*, jobject, jmethodID, va_list);", 310 | r"jboolean CallBooleanMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 311 | r"jbyte CallByteMethod (JNIEnv*, jobject, jmethodID, ...);", 312 | r"jbyte CallByteMethodV (JNIEnv*, jobject, jmethodID, va_list);", 313 | r"jbyte CallByteMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 314 | r"jchar CallCharMethod (JNIEnv*, jobject, jmethodID, ...);", 315 | r"jchar CallCharMethodV (JNIEnv*, jobject, jmethodID, va_list);", 316 | r"jchar CallCharMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 317 | r"jshort CallShortMethod (JNIEnv*, jobject, jmethodID, ...);", 318 | r"jshort CallShortMethodV (JNIEnv*, jobject, jmethodID, va_list);", 319 | r"jshort CallShortMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 320 | r"jint CallIntMethod (JNIEnv*, jobject, jmethodID, ...);", 321 | r"jint CallIntMethodV (JNIEnv*, jobject, jmethodID, va_list);", 322 | r"jint CallIntMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 323 | r"jlong CallLongMethod (JNIEnv*, jobject, jmethodID, ...);", 324 | r"jlong CallLongMethodV (JNIEnv*, jobject, jmethodID, va_list);", 325 | r"jlong CallLongMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 326 | r"jfloat CallFloatMethod (JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__;", 327 | r"jfloat CallFloatMethodV (JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__;", 328 | r"jfloat CallFloatMethodA (JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__;", 329 | r"jdouble CallDoubleMethod (JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__;", 330 | r"jdouble CallDoubleMethodV (JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__;", 331 | r"jdouble CallDoubleMethodA (JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__;", 332 | r"void CallVoidMethod (JNIEnv*, jobject, jmethodID, ...);", 333 | r"void CallVoidMethodV (JNIEnv*, jobject, jmethodID, va_list);", 334 | r"void CallVoidMethodA (JNIEnv*, jobject, jmethodID, jvalue*);", 335 | r"jobject CallNonvirtualObjectMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 336 | r"jobject CallNonvirtualObjectMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 337 | r"jobject CallNonvirtualObjectMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 338 | r"jboolean CallNonvirtualBooleanMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 339 | r"jboolean CallNonvirtualBooleanMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 340 | r"jboolean CallNonvirtualBooleanMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 341 | r"jbyte CallNonvirtualByteMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 342 | r"jbyte CallNonvirtualByteMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 343 | r"jbyte CallNonvirtualByteMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 344 | r"jchar CallNonvirtualCharMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 345 | r"jchar CallNonvirtualCharMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 346 | r"jchar CallNonvirtualCharMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 347 | r"jshort CallNonvirtualShortMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 348 | r"jshort CallNonvirtualShortMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 349 | r"jshort CallNonvirtualShortMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 350 | r"jint CallNonvirtualIntMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 351 | r"jint CallNonvirtualIntMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 352 | r"jint CallNonvirtualIntMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 353 | r"jlong CallNonvirtualLongMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 354 | r"jlong CallNonvirtualLongMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 355 | r"jlong CallNonvirtualLongMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 356 | r"jfloat CallNonvirtualFloatMethod (JNIEnv*, jobject, jclass, jmethodID, ...) __NDK_FPABI__;", 357 | r"jfloat CallNonvirtualFloatMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list) __NDK_FPABI__;", 358 | r"jfloat CallNonvirtualFloatMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*) __NDK_FPABI__;", 359 | r"jdouble CallNonvirtualDoubleMethod (JNIEnv*, jobject, jclass, jmethodID, ...) __NDK_FPABI__;", 360 | r"jdouble CallNonvirtualDoubleMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list) __NDK_FPABI__;", 361 | r"jdouble CallNonvirtualDoubleMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*) __NDK_FPABI__;", 362 | r"void CallNonvirtualVoidMethod (JNIEnv*, jobject, jclass, jmethodID, ...);", 363 | r"void CallNonvirtualVoidMethodV (JNIEnv*, jobject, jclass, jmethodID, va_list);", 364 | r"void CallNonvirtualVoidMethodA (JNIEnv*, jobject, jclass, jmethodID, jvalue*);", 365 | r"jfieldID GetFieldID (JNIEnv*, jclass, const char*, const char*);", 366 | r"jobject GetObjectField (JNIEnv*, jobject, jfieldID);", 367 | r"jboolean GetBooleanField (JNIEnv*, jobject, jfieldID);", 368 | r"jbyte GetByteField (JNIEnv*, jobject, jfieldID);", 369 | r"jchar GetCharField (JNIEnv*, jobject, jfieldID);", 370 | r"jshort GetShortField (JNIEnv*, jobject, jfieldID);", 371 | r"jint GetIntField (JNIEnv*, jobject, jfieldID);", 372 | r"jlong GetLongField (JNIEnv*, jobject, jfieldID);", 373 | r"jfloat GetFloatField (JNIEnv*, jobject, jfieldID) __NDK_FPABI__;", 374 | r"jdouble GetDoubleField (JNIEnv*, jobject, jfieldID) __NDK_FPABI__;", 375 | r"void SetObjectField (JNIEnv*, jobject, jfieldID, jobject);", 376 | r"void SetBooleanField (JNIEnv*, jobject, jfieldID, jboolean);", 377 | r"void SetByteField (JNIEnv*, jobject, jfieldID, jbyte);", 378 | r"void SetCharField (JNIEnv*, jobject, jfieldID, jchar);", 379 | r"void SetShortField (JNIEnv*, jobject, jfieldID, jshort);", 380 | r"void SetIntField (JNIEnv*, jobject, jfieldID, jint);", 381 | r"void SetLongField (JNIEnv*, jobject, jfieldID, jlong);", 382 | r"void SetFloatField (JNIEnv*, jobject, jfieldID, jfloat) __NDK_FPABI__;", 383 | r"void SetDoubleField (JNIEnv*, jobject, jfieldID, jdouble) __NDK_FPABI__;", 384 | r"jmethodID GetStaticMethodID (JNIEnv*, jclass, const char*, const char*);", 385 | r"jobject CallStaticObjectMethod (JNIEnv*, jclass, jmethodID, ...);", 386 | r"jobject CallStaticObjectMethodV (JNIEnv*, jclass, jmethodID, va_list);", 387 | r"jobject CallStaticObjectMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 388 | r"jboolean CallStaticBooleanMethod (JNIEnv*, jclass, jmethodID, ...);", 389 | r"jboolean CallStaticBooleanMethodV (JNIEnv*, jclass, jmethodID, va_list);", 390 | r"jboolean CallStaticBooleanMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 391 | r"jbyte CallStaticByteMethod (JNIEnv*, jclass, jmethodID, ...);", 392 | r"jbyte CallStaticByteMethodV (JNIEnv*, jclass, jmethodID, va_list);", 393 | r"jbyte CallStaticByteMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 394 | r"jchar CallStaticCharMethod (JNIEnv*, jclass, jmethodID, ...);", 395 | r"jchar CallStaticCharMethodV (JNIEnv*, jclass, jmethodID, va_list);", 396 | r"jchar CallStaticCharMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 397 | r"jshort CallStaticShortMethod (JNIEnv*, jclass, jmethodID, ...);", 398 | r"jshort CallStaticShortMethodV (JNIEnv*, jclass, jmethodID, va_list);", 399 | r"jshort CallStaticShortMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 400 | r"jint CallStaticIntMethod (JNIEnv*, jclass, jmethodID, ...);", 401 | r"jint CallStaticIntMethodV (JNIEnv*, jclass, jmethodID, va_list);", 402 | r"jint CallStaticIntMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 403 | r"jlong CallStaticLongMethod (JNIEnv*, jclass, jmethodID, ...);", 404 | r"jlong CallStaticLongMethodV (JNIEnv*, jclass, jmethodID, va_list);", 405 | r"jlong CallStaticLongMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 406 | r"jfloat CallStaticFloatMethod (JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__;", 407 | r"jfloat CallStaticFloatMethodV (JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__;", 408 | r"jfloat CallStaticFloatMethodA (JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__;", 409 | r"jdouble CallStaticDoubleMethod (JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__;", 410 | r"jdouble CallStaticDoubleMethodV (JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__;", 411 | r"jdouble CallStaticDoubleMethodA (JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__;", 412 | r"void CallStaticVoidMethod (JNIEnv*, jclass, jmethodID, ...);", 413 | r"void CallStaticVoidMethodV (JNIEnv*, jclass, jmethodID, va_list);", 414 | r"void CallStaticVoidMethodA (JNIEnv*, jclass, jmethodID, jvalue*);", 415 | r"jfieldID GetStaticFieldID (JNIEnv*, jclass, const char*, const char*);", 416 | r"jobject GetStaticObjectField (JNIEnv*, jclass, jfieldID);", 417 | r"jboolean GetStaticBooleanField (JNIEnv*, jclass, jfieldID);", 418 | r"jbyte GetStaticByteField (JNIEnv*, jclass, jfieldID);", 419 | r"jchar GetStaticCharField (JNIEnv*, jclass, jfieldID);", 420 | r"jshort GetStaticShortField (JNIEnv*, jclass, jfieldID);", 421 | r"jint GetStaticIntField (JNIEnv*, jclass, jfieldID);", 422 | r"jlong GetStaticLongField (JNIEnv*, jclass, jfieldID);", 423 | r"jfloat GetStaticFloatField (JNIEnv*, jclass, jfieldID) __NDK_FPABI__;", 424 | r"jdouble GetStaticDoubleField (JNIEnv*, jclass, jfieldID) __NDK_FPABI__;", 425 | r"void SetStaticObjectField (JNIEnv*, jclass, jfieldID, jobject);", 426 | r"void SetStaticBooleanField (JNIEnv*, jclass, jfieldID, jboolean);", 427 | r"void SetStaticByteField (JNIEnv*, jclass, jfieldID, jbyte);", 428 | r"void SetStaticCharField (JNIEnv*, jclass, jfieldID, jchar);", 429 | r"void SetStaticShortField (JNIEnv*, jclass, jfieldID, jshort);", 430 | r"void SetStaticIntField (JNIEnv*, jclass, jfieldID, jint);", 431 | r"void SetStaticLongField (JNIEnv*, jclass, jfieldID, jlong);", 432 | r"void SetStaticFloatField (JNIEnv*, jclass, jfieldID, jfloat) __NDK_FPABI__;", 433 | r"void SetStaticDoubleField (JNIEnv*, jclass, jfieldID, jdouble) __NDK_FPABI__;", 434 | r"jstring NewString (JNIEnv*, const jchar*, jsize);", 435 | r"jsize GetStringLength (JNIEnv*, jstring);", 436 | r"const jchar* GetStringChars (JNIEnv*, jstring, jboolean*);", 437 | r"void ReleaseStringChars (JNIEnv*, jstring, const jchar*);", 438 | r"jstring NewStringUTF (JNIEnv*, const char*);", 439 | r"jsize GetStringUTFLength (JNIEnv*, jstring);", 440 | r"const char* GetStringUTFChars (JNIEnv*, jstring, jboolean*);", 441 | r"void ReleaseStringUTFChars (JNIEnv*, jstring, const char*);", 442 | r"jsize GetArrayLength (JNIEnv*, jarray);", 443 | r"jobjectArray NewObjectArray (JNIEnv*, jsize, jclass, jobject);", 444 | r"jobject GetObjectArrayElement (JNIEnv*, jobjectArray, jsize);", 445 | r"void SetObjectArrayElement (JNIEnv*, jobjectArray, jsize, jobject);", 446 | r"jbooleanArray NewBooleanArray (JNIEnv*, jsize);", 447 | r"jbyteArray NewByteArray (JNIEnv*, jsize);", 448 | r"jcharArray NewCharArray (JNIEnv*, jsize);", 449 | r"jshortArray NewShortArray (JNIEnv*, jsize);", 450 | r"jintArray NewIntArray (JNIEnv*, jsize);", 451 | r"jlongArray NewLongArray (JNIEnv*, jsize);", 452 | r"jfloatArray NewFloatArray (JNIEnv*, jsize);", 453 | r"jdoubleArray NewDoubleArray (JNIEnv*, jsize);", 454 | r"jboolean* GetBooleanArrayElements (JNIEnv*, jbooleanArray, jboolean*);", 455 | r"jbyte* GetByteArrayElements (JNIEnv*, jbyteArray, jboolean*);", 456 | r"jchar* GetCharArrayElements (JNIEnv*, jcharArray, jboolean*);", 457 | r"jshort* GetShortArrayElements (JNIEnv*, jshortArray, jboolean*);", 458 | r"jint* GetIntArrayElements (JNIEnv*, jintArray, jboolean*);", 459 | r"jlong* GetLongArrayElements (JNIEnv*, jlongArray, jboolean*);", 460 | r"jfloat* GetFloatArrayElements (JNIEnv*, jfloatArray, jboolean*);", 461 | r"jdouble* GetDoubleArrayElements (JNIEnv*, jdoubleArray, jboolean*);", 462 | r"void ReleaseBooleanArrayElements (JNIEnv*, jbooleanArray, jboolean*, jint);", 463 | r"void ReleaseByteArrayElements (JNIEnv*, jbyteArray, jbyte*, jint);", 464 | r"void ReleaseCharArrayElements (JNIEnv*, jcharArray, jchar*, jint);", 465 | r"void ReleaseShortArrayElements (JNIEnv*, jshortArray, jshort*, jint);", 466 | r"void ReleaseIntArrayElements (JNIEnv*, jintArray, jint*, jint);", 467 | r"void ReleaseLongArrayElements (JNIEnv*, jlongArray, jlong*, jint);", 468 | r"void ReleaseFloatArrayElements (JNIEnv*, jfloatArray, jfloat*, jint);", 469 | r"void ReleaseDoubleArrayElements (JNIEnv*, jdoubleArray, jdouble*, jint);", 470 | r"void GetBooleanArrayRegion (JNIEnv*, jbooleanArray, jsize, jsize, jboolean*);", 471 | r"void GetByteArrayRegion (JNIEnv*, jbyteArray, jsize, jsize, jbyte*);", 472 | r"void GetCharArrayRegion (JNIEnv*, jcharArray, jsize, jsize, jchar*);", 473 | r"void GetShortArrayRegion (JNIEnv*, jshortArray, jsize, jsize, jshort*);", 474 | r"void GetIntArrayRegion (JNIEnv*, jintArray, jsize, jsize, jint*);", 475 | r"void GetLongArrayRegion (JNIEnv*, jlongArray, jsize, jsize, jlong*);", 476 | r"void GetFloatArrayRegion (JNIEnv*, jfloatArray, jsize, jsize, jfloat*);", 477 | r"void GetDoubleArrayRegion (JNIEnv*, jdoubleArray, jsize, jsize, jdouble*);", 478 | r"void SetBooleanArrayRegion (JNIEnv*, jbooleanArray, jsize, jsize, const jboolean*);", 479 | r"void SetByteArrayRegion (JNIEnv*, jbyteArray, jsize, jsize, const jbyte*);", 480 | r"void SetCharArrayRegion (JNIEnv*, jcharArray, jsize, jsize, const jchar*);", 481 | r"void SetShortArrayRegion (JNIEnv*, jshortArray, jsize, jsize, const jshort*);", 482 | r"void SetIntArrayRegion (JNIEnv*, jintArray, jsize, jsize, const jint*);", 483 | r"void SetLongArrayRegion (JNIEnv*, jlongArray, jsize, jsize, const jlong*);", 484 | r"void SetFloatArrayRegion (JNIEnv*, jfloatArray, jsize, jsize, const jfloat*);", 485 | r"void SetDoubleArrayRegion (JNIEnv*, jdoubleArray, jsize, jsize, const jdouble*);", 486 | r"jint RegisterNatives (JNIEnv*, jclass, const JNINativeMethod*, jint);", 487 | r"jint UnregisterNatives (JNIEnv*, jclass);", 488 | r"jint MonitorEnter (JNIEnv*, jobject);", 489 | r"jint MonitorExit (JNIEnv*, jobject);", 490 | r"jint GetJavaVM (JNIEnv*, JavaVM**);", 491 | r"void GetStringRegion (JNIEnv*, jstring, jsize, jsize, jchar*);", 492 | r"void GetStringUTFRegion (JNIEnv*, jstring, jsize, jsize, char*);", 493 | r"void* GetPrimitiveArrayCritical (JNIEnv*, jarray, jboolean*);", 494 | r"void ReleasePrimitiveArrayCritical (JNIEnv*, jarray, void*, jint);", 495 | r"const jchar* GetStringCritical (JNIEnv*, jstring, jboolean*);", 496 | r"void ReleaseStringCritical (JNIEnv*, jstring, const jchar*);", 497 | r"jweak NewWeakGlobalRef (JNIEnv*, jobject);", 498 | r"void DeleteWeakGlobalRef (JNIEnv*, jweak);", 499 | r"jboolean ExceptionCheck (JNIEnv*);", 500 | r"jobject NewDirectByteBuffer (JNIEnv*, void*, jlong);", 501 | r"void* GetDirectBufferAddress (JNIEnv*, jobject);", 502 | r"jlong GetDirectBufferCapacity (JNIEnv*, jobject);", 503 | r"jobjectRefType GetObjectRefType (JNIEnv*, jobject);"] 504 | 505 | JNIInvokeInterface = [ 506 | r'void* reserved0', 507 | r'void* reserved1', 508 | r'void* reserved2', 509 | r'jint (*DestroyJavaVM)(JavaVM*)', 510 | r'jint (*AttachCurrentThread)(JavaVM*, JNIEnv**, void*)', 511 | r'jint (*DetachCurrentThread)(JavaVM*)', 512 | r'jint (*GetEnv)(JavaVM*, void**, jint)', 513 | r'jint (*AttachCurrentThreadAsDaemon)(JavaVM*, JNIEnv**, void*)'] 514 | 515 | jni_jvmInterface = ["jni_DestroyJavaVM", 516 | "jni_AttachCurrentThread", 517 | "jni_DetachCurrentThread", 518 | "jni_GetEnv", 519 | "jni_AttachCurrentThreadAsDaemon"] 520 | 521 | 522 | #筛选出用户自己的函数 523 | def isUserFunc(addr): 524 | functionName = Name(GetFunctionAttr(addr,FUNCATTR_START)) 525 | if functionName.startswith('_'): 526 | return False 527 | return True 528 | 529 | #判断寄存器是否被指定的操作码 和 操作码类型修改 530 | def FirstWriteRegOp( addr,reg,op,Optype = None): 531 | addr = FindCode(addr,SEARCH_NEXT) 532 | while (addr != BADADDR): 533 | #第一个操作数是指定寄存器 534 | if GetOpnd(addr,0) == reg: 535 | #操作码相同 536 | if GetMnem(addr) == op: 537 | if Optype == None: 538 | return addr 539 | elif Optype == GetOpType(addr,1): 540 | return addr 541 | return 0 542 | else: 543 | return 0 544 | addr = FindCode(addr,SEARCH_NEXT) 545 | return 0 546 | 547 | #往上回朔,找到第一次操作指定寄存器的地址 548 | def writeRegAddr(addr ,reg): 549 | addr = FindCode(addr,SEARCH_NEXT) 550 | while (addr != BADADDR): 551 | if GetOpnd(addr,0) == reg: 552 | return addr 553 | addr = FindCode(addr,SEARCH_NEXT) 554 | return 0 555 | 556 | def setComment(addr,offset): 557 | if (offset / 4) < len(JNINativeInterface) and (offset / 4) >= 4: 558 | comment = JNINativeInterface[offset / 4] 559 | MakeRptCmt(addr,comment) 560 | print 'set comment 0x%x' % addr 561 | 562 | def setEnumAndCom(addr): 563 | offset = GetOperandValue(addr,1) 564 | if (offset / 4) < len(JNINativeInterface) and (offset /4) >= 4: 565 | comment = JNINativeInterface[offset / 4] 566 | #添加注释 567 | MakeRptCmt(addr,comment) 568 | #设为枚举类型 569 | OpEnumEx(addr,1,enum_jni_id,0) 570 | print 'set comment and emun 0x%x' % addr 571 | 572 | def find_LDR(addr, reg): 573 | addr = FindCode(addr,SEARCH_NEXT) 574 | while (addr != BADADDR): 575 | 576 | #查找指定LDR LDR REG,[XXXX,XXXX] 577 | if GetMnem(addr) == 'LDR' and GetOpnd(addr,0) == reg: 578 | #print GetOpnd(addr,1),GetOpType(addr,1) 579 | 580 | #右侧的寄存器列表 581 | regs = filter(lambda x: x.startswith('R') , GetOpnd(addr,1)[1:-1].split(',')) 582 | 583 | if len(regs) == 0: 584 | addr = FindCode(addr,SEARCH_NEXT) 585 | continue 586 | 587 | # LDR RX,[RX,#0xXX] 588 | if GetOpType(addr,1) == OP_Base_Index_Displacement: 589 | #可能是通过 Table + offset 调用的 590 | if FirstWriteRegOp( addr, regs[0],'LDR',OP_Base_Index_Displacement): 591 | #第一个寄存器可能是基地址 592 | setEnumAndCom(addr) 593 | return 594 | else: 595 | # [RX,#0xXX] RX 不确定第一个寄存器来源 596 | off = GetOperandValue(addr, 1) 597 | 598 | if len(regs) == 1: 599 | #LDR RX,[RY + 0xXX] 600 | #单个寄存器 601 | wRegaddr = writeRegAddr(addr,regs[0]) 602 | if GetMnem(wRegaddr) == 'ADD' and FirstWriteRegOp(wRegaddr, regs[0],'LDR',OP_Base_Index): 603 | off2 = GetOperandValue(wRegaddr, 1) 604 | offset = off + off2 605 | if off != 0: 606 | setComment( addr , offset) 607 | else: 608 | setEnumAndCom(wRegaddr) 609 | return 610 | print '0x%x Do not support! 0x04' % addr 611 | return 612 | 613 | elif len(regs) > 1 : 614 | #LDR RX,[RY+ RZ +0xXX] 615 | #多个寄存器 616 | print '0x%x Do not support! 0x05' % addr 617 | return 618 | 619 | 620 | #基地址寄存器可能已经包含偏移 621 | print '0x%x Do not support! 0x03' % addr 622 | return 623 | 624 | 625 | #EXP: LDR R3,[R1,R2] 626 | elif GetOpType(addr,1) == OP_Base_Index: 627 | 628 | # 第一个寄存器可能是基地址 629 | if FirstWriteRegOp( addr, regs[0],'LDR', OP_Base_Index_Displacement) > 0: 630 | #第二个寄存器是mov指令直接设定的偏移值 631 | wRegAddr = FirstWriteRegOp( addr ,regs[1],"MOV", OP_Immediate) 632 | if wRegAddr > 0: 633 | setEnumAndCom(wRegAddr) 634 | return 635 | 636 | wRegAddr = FirstWriteRegOp( addr ,regs[1],"LSL", OP_Immediate) 637 | if wRegAddr > 0: 638 | print 'LSL 0x%x' % wRegAddr 639 | #setEnumAndCom(wRegAddr) 640 | return 641 | else: 642 | print '0x%x Do not support! 0x02' % addr 643 | print GetOpnd(addr,1),GetOpType(addr,1) 644 | 645 | 646 | elif GetOpnd(addr,0) == reg: 647 | print '0x%x Do not support! 0x01' % addr 648 | return 649 | addr = FindCode(addr,SEARCH_NEXT) 650 | 651 | 652 | #修改指定地址范围中的JNI调用 653 | def modify_jni_call(start,end): 654 | addr = end 655 | while (addr > start): 656 | #逆向遍历指令 657 | addr = FindCode(addr,SEARCH_NEXT) 658 | #BLX操作 659 | if GetMnem(addr) == "BLX": 660 | #左边第一个操作数 661 | Opnd0 = GetOpnd(addr,0) 662 | if Opnd0 in COMMON_REG: 663 | #print '%x %s %s'% (addr,GetMnem(addr),GetOpnd(addr,0)) 664 | find_LDR(addr, Opnd0) 665 | pass 666 | 667 | pass 668 | 669 | #列出所有函数 670 | def enum_user_function(): 671 | addr = NextFunction( 0 ) 672 | while (addr != BADADDR): 673 | function_start = addr 674 | function_end = GetFunctionAttr(addr,FUNCATTR_END) 675 | #过滤出用户的函数 676 | if isUserFunc(addr): 677 | #尝试校正 678 | modify_jni_call(function_start,function_end) 679 | 680 | addr = NextFunction(addr) 681 | 682 | def init_enum(enum_name, fields_list , offset ,comments): 683 | ret_id = AddEnum(-1,enum_name,0x1100000); 684 | synthesis = list() 685 | 686 | #将枚举成员,原型声明合并 687 | for i in range(len(fields_list)): 688 | synthesis.append((fields_list[i],comments[i],)) 689 | 690 | if ret_id != 0xFFFFFFFF: 691 | for fun,com in synthesis: 692 | AddConstEx( ret_id , fun , offset , -1); 693 | SetConstCmt(GetConstEx(ret_id,offset,0,-1),com ,1); 694 | offset += 4 695 | return ret_id 696 | 697 | #2014/09/10 10:20 698 | #获取枚举 699 | enum_jni_id = GetEnum(Enum_JNI_Name) 700 | 701 | init_enum( 'JNI_JVM_FUNC', jni_jvmInterface, 12,JNIInvokeInterface[3:]) 702 | 703 | if enum_jni_id == 0xFFFFFFFF: 704 | #不存在,则创建 705 | print 'create enum' 706 | enum_jni_id = init_enum(Enum_JNI_Name, jni_names_list,0x10,JNINativeInterface[4:]) 707 | 708 | elif GetEnumSize(enum_jni_id) != len(jni_names_list): 709 | #成员个数不对,重新创建 710 | print 'delete enum %s' % Enum_JNI_Name 711 | DelEnum(enum_jni_id) 712 | enum_jni_id = init_enum(Enum_JNI_Name, jni_names_list,0x10,JNINativeInterface[4:]) 713 | 714 | else: 715 | print 'enum has been created!' 716 | 717 | if (enum_jni_id != 0xFFFFFFFF): 718 | #遍历用户函数 719 | enum_user_function() 720 | print 'Set jni name Finish!!!' 721 | else: 722 | print 'Create enum fail!!!' 723 | 724 | -------------------------------------------------------------------------------- /IDA_JNI_Renamer/jni-api19.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /* 18 | * JNI specification, as defined by Sun: 19 | * http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/jniTOC.html 20 | * 21 | * Everything here is expected to be VM-neutral. 22 | */ 23 | 24 | #ifndef JNI_H_ 25 | #define JNI_H_ 26 | 27 | #include 28 | #include 29 | 30 | /* 31 | * Primitive types that match up with Java equivalents. 32 | */ 33 | #ifdef HAVE_INTTYPES_H 34 | # include /* C99 */ 35 | typedef uint8_t jboolean; /* unsigned 8 bits */ 36 | typedef int8_t jbyte; /* signed 8 bits */ 37 | typedef uint16_t jchar; /* unsigned 16 bits */ 38 | typedef int16_t jshort; /* signed 16 bits */ 39 | typedef int32_t jint; /* signed 32 bits */ 40 | typedef int64_t jlong; /* signed 64 bits */ 41 | typedef float jfloat; /* 32-bit IEEE 754 */ 42 | typedef double jdouble; /* 64-bit IEEE 754 */ 43 | #else 44 | typedef unsigned char jboolean; /* unsigned 8 bits */ 45 | typedef signed char jbyte; /* signed 8 bits */ 46 | typedef unsigned short jchar; /* unsigned 16 bits */ 47 | typedef short jshort; /* signed 16 bits */ 48 | typedef int jint; /* signed 32 bits */ 49 | typedef long long jlong; /* signed 64 bits */ 50 | typedef float jfloat; /* 32-bit IEEE 754 */ 51 | typedef double jdouble; /* 64-bit IEEE 754 */ 52 | #endif 53 | 54 | /* "cardinal indices and sizes" */ 55 | typedef jint jsize; 56 | 57 | #ifdef __cplusplus 58 | /* 59 | * Reference types, in C++ 60 | */ 61 | class _jobject {}; 62 | class _jclass : public _jobject {}; 63 | class _jstring : public _jobject {}; 64 | class _jarray : public _jobject {}; 65 | class _jobjectArray : public _jarray {}; 66 | class _jbooleanArray : public _jarray {}; 67 | class _jbyteArray : public _jarray {}; 68 | class _jcharArray : public _jarray {}; 69 | class _jshortArray : public _jarray {}; 70 | class _jintArray : public _jarray {}; 71 | class _jlongArray : public _jarray {}; 72 | class _jfloatArray : public _jarray {}; 73 | class _jdoubleArray : public _jarray {}; 74 | class _jthrowable : public _jobject {}; 75 | 76 | typedef _jobject* jobject; 77 | typedef _jclass* jclass; 78 | typedef _jstring* jstring; 79 | typedef _jarray* jarray; 80 | typedef _jobjectArray* jobjectArray; 81 | typedef _jbooleanArray* jbooleanArray; 82 | typedef _jbyteArray* jbyteArray; 83 | typedef _jcharArray* jcharArray; 84 | typedef _jshortArray* jshortArray; 85 | typedef _jintArray* jintArray; 86 | typedef _jlongArray* jlongArray; 87 | typedef _jfloatArray* jfloatArray; 88 | typedef _jdoubleArray* jdoubleArray; 89 | typedef _jthrowable* jthrowable; 90 | typedef _jobject* jweak; 91 | 92 | 93 | #else /* not __cplusplus */ 94 | 95 | /* 96 | * Reference types, in C. 97 | */ 98 | typedef void* jobject; 99 | typedef jobject jclass; 100 | typedef jobject jstring; 101 | typedef jobject jarray; 102 | typedef jarray jobjectArray; 103 | typedef jarray jbooleanArray; 104 | typedef jarray jbyteArray; 105 | typedef jarray jcharArray; 106 | typedef jarray jshortArray; 107 | typedef jarray jintArray; 108 | typedef jarray jlongArray; 109 | typedef jarray jfloatArray; 110 | typedef jarray jdoubleArray; 111 | typedef jobject jthrowable; 112 | typedef jobject jweak; 113 | 114 | #endif /* not __cplusplus */ 115 | 116 | struct _jfieldID; /* opaque structure */ 117 | typedef struct _jfieldID* jfieldID; /* field IDs */ 118 | 119 | struct _jmethodID; /* opaque structure */ 120 | typedef struct _jmethodID* jmethodID; /* method IDs */ 121 | 122 | struct JNIInvokeInterface; 123 | 124 | typedef union jvalue { 125 | jboolean z; 126 | jbyte b; 127 | jchar c; 128 | jshort s; 129 | jint i; 130 | jlong j; 131 | jfloat f; 132 | jdouble d; 133 | jobject l; 134 | } jvalue; 135 | 136 | typedef enum jobjectRefType { 137 | JNIInvalidRefType = 0, 138 | JNILocalRefType = 1, 139 | JNIGlobalRefType = 2, 140 | JNIWeakGlobalRefType = 3 141 | } jobjectRefType; 142 | 143 | typedef struct { 144 | const char* name; 145 | const char* signature; 146 | void* fnPtr; 147 | } JNINativeMethod; 148 | 149 | struct _JNIEnv; 150 | struct _JavaVM; 151 | typedef const struct JNINativeInterface* C_JNIEnv; 152 | 153 | #if defined(__cplusplus) 154 | typedef _JNIEnv JNIEnv; 155 | typedef _JavaVM JavaVM; 156 | #else 157 | typedef const struct JNINativeInterface* JNIEnv; 158 | typedef const struct JNIInvokeInterface* JavaVM; 159 | #endif 160 | 161 | /* 162 | * Table of interface function pointers. 163 | */ 164 | struct JNINativeInterface { 165 | void* reserved0; 166 | void* reserved1; 167 | void* reserved2; 168 | void* reserved3; 169 | 170 | jint (*GetVersion)(JNIEnv *); 171 | 172 | jclass (*DefineClass)(JNIEnv*, const char*, jobject, const jbyte*, 173 | jsize); 174 | jclass (*FindClass)(JNIEnv*, const char*); 175 | 176 | jmethodID (*FromReflectedMethod)(JNIEnv*, jobject); 177 | jfieldID (*FromReflectedField)(JNIEnv*, jobject); 178 | /* spec doesn't show jboolean parameter */ 179 | jobject (*ToReflectedMethod)(JNIEnv*, jclass, jmethodID, jboolean); 180 | 181 | jclass (*GetSuperclass)(JNIEnv*, jclass); 182 | jboolean (*IsAssignableFrom)(JNIEnv*, jclass, jclass); 183 | 184 | /* spec doesn't show jboolean parameter */ 185 | jobject (*ToReflectedField)(JNIEnv*, jclass, jfieldID, jboolean); 186 | 187 | jint (*Throw)(JNIEnv*, jthrowable); 188 | jint (*ThrowNew)(JNIEnv *, jclass, const char *); 189 | jthrowable (*ExceptionOccurred)(JNIEnv*); 190 | void (*ExceptionDescribe)(JNIEnv*); 191 | void (*ExceptionClear)(JNIEnv*); 192 | void (*FatalError)(JNIEnv*, const char*); 193 | 194 | jint (*PushLocalFrame)(JNIEnv*, jint); 195 | jobject (*PopLocalFrame)(JNIEnv*, jobject); 196 | 197 | jobject (*NewGlobalRef)(JNIEnv*, jobject); 198 | void (*DeleteGlobalRef)(JNIEnv*, jobject); 199 | void (*DeleteLocalRef)(JNIEnv*, jobject); 200 | jboolean (*IsSameObject)(JNIEnv*, jobject, jobject); 201 | 202 | jobject (*NewLocalRef)(JNIEnv*, jobject); 203 | jint (*EnsureLocalCapacity)(JNIEnv*, jint); 204 | 205 | jobject (*AllocObject)(JNIEnv*, jclass); 206 | jobject (*NewObject)(JNIEnv*, jclass, jmethodID, ...); 207 | jobject (*NewObjectV)(JNIEnv*, jclass, jmethodID, va_list); 208 | jobject (*NewObjectA)(JNIEnv*, jclass, jmethodID, jvalue*); 209 | 210 | jclass (*GetObjectClass)(JNIEnv*, jobject); 211 | jboolean (*IsInstanceOf)(JNIEnv*, jobject, jclass); 212 | jmethodID (*GetMethodID)(JNIEnv*, jclass, const char*, const char*); 213 | 214 | jobject (*CallObjectMethod)(JNIEnv*, jobject, jmethodID, ...); 215 | jobject (*CallObjectMethodV)(JNIEnv*, jobject, jmethodID, va_list); 216 | jobject (*CallObjectMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 217 | jboolean (*CallBooleanMethod)(JNIEnv*, jobject, jmethodID, ...); 218 | jboolean (*CallBooleanMethodV)(JNIEnv*, jobject, jmethodID, va_list); 219 | jboolean (*CallBooleanMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 220 | jbyte (*CallByteMethod)(JNIEnv*, jobject, jmethodID, ...); 221 | jbyte (*CallByteMethodV)(JNIEnv*, jobject, jmethodID, va_list); 222 | jbyte (*CallByteMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 223 | jchar (*CallCharMethod)(JNIEnv*, jobject, jmethodID, ...); 224 | jchar (*CallCharMethodV)(JNIEnv*, jobject, jmethodID, va_list); 225 | jchar (*CallCharMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 226 | jshort (*CallShortMethod)(JNIEnv*, jobject, jmethodID, ...); 227 | jshort (*CallShortMethodV)(JNIEnv*, jobject, jmethodID, va_list); 228 | jshort (*CallShortMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 229 | jint (*CallIntMethod)(JNIEnv*, jobject, jmethodID, ...); 230 | jint (*CallIntMethodV)(JNIEnv*, jobject, jmethodID, va_list); 231 | jint (*CallIntMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 232 | jlong (*CallLongMethod)(JNIEnv*, jobject, jmethodID, ...); 233 | jlong (*CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list); 234 | jlong (*CallLongMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 235 | jfloat (*CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__; 236 | jfloat (*CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__; 237 | jfloat (*CallFloatMethodA)(JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__; 238 | jdouble (*CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...) __NDK_FPABI__; 239 | jdouble (*CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list) __NDK_FPABI__; 240 | jdouble (*CallDoubleMethodA)(JNIEnv*, jobject, jmethodID, jvalue*) __NDK_FPABI__; 241 | void (*CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...); 242 | void (*CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list); 243 | void (*CallVoidMethodA)(JNIEnv*, jobject, jmethodID, jvalue*); 244 | 245 | jobject (*CallNonvirtualObjectMethod)(JNIEnv*, jobject, jclass, 246 | jmethodID, ...); 247 | jobject (*CallNonvirtualObjectMethodV)(JNIEnv*, jobject, jclass, 248 | jmethodID, va_list); 249 | jobject (*CallNonvirtualObjectMethodA)(JNIEnv*, jobject, jclass, 250 | jmethodID, jvalue*); 251 | jboolean (*CallNonvirtualBooleanMethod)(JNIEnv*, jobject, jclass, 252 | jmethodID, ...); 253 | jboolean (*CallNonvirtualBooleanMethodV)(JNIEnv*, jobject, jclass, 254 | jmethodID, va_list); 255 | jboolean (*CallNonvirtualBooleanMethodA)(JNIEnv*, jobject, jclass, 256 | jmethodID, jvalue*); 257 | jbyte (*CallNonvirtualByteMethod)(JNIEnv*, jobject, jclass, 258 | jmethodID, ...); 259 | jbyte (*CallNonvirtualByteMethodV)(JNIEnv*, jobject, jclass, 260 | jmethodID, va_list); 261 | jbyte (*CallNonvirtualByteMethodA)(JNIEnv*, jobject, jclass, 262 | jmethodID, jvalue*); 263 | jchar (*CallNonvirtualCharMethod)(JNIEnv*, jobject, jclass, 264 | jmethodID, ...); 265 | jchar (*CallNonvirtualCharMethodV)(JNIEnv*, jobject, jclass, 266 | jmethodID, va_list); 267 | jchar (*CallNonvirtualCharMethodA)(JNIEnv*, jobject, jclass, 268 | jmethodID, jvalue*); 269 | jshort (*CallNonvirtualShortMethod)(JNIEnv*, jobject, jclass, 270 | jmethodID, ...); 271 | jshort (*CallNonvirtualShortMethodV)(JNIEnv*, jobject, jclass, 272 | jmethodID, va_list); 273 | jshort (*CallNonvirtualShortMethodA)(JNIEnv*, jobject, jclass, 274 | jmethodID, jvalue*); 275 | jint (*CallNonvirtualIntMethod)(JNIEnv*, jobject, jclass, 276 | jmethodID, ...); 277 | jint (*CallNonvirtualIntMethodV)(JNIEnv*, jobject, jclass, 278 | jmethodID, va_list); 279 | jint (*CallNonvirtualIntMethodA)(JNIEnv*, jobject, jclass, 280 | jmethodID, jvalue*); 281 | jlong (*CallNonvirtualLongMethod)(JNIEnv*, jobject, jclass, 282 | jmethodID, ...); 283 | jlong (*CallNonvirtualLongMethodV)(JNIEnv*, jobject, jclass, 284 | jmethodID, va_list); 285 | jlong (*CallNonvirtualLongMethodA)(JNIEnv*, jobject, jclass, 286 | jmethodID, jvalue*); 287 | jfloat (*CallNonvirtualFloatMethod)(JNIEnv*, jobject, jclass, 288 | jmethodID, ...) __NDK_FPABI__; 289 | jfloat (*CallNonvirtualFloatMethodV)(JNIEnv*, jobject, jclass, 290 | jmethodID, va_list) __NDK_FPABI__; 291 | jfloat (*CallNonvirtualFloatMethodA)(JNIEnv*, jobject, jclass, 292 | jmethodID, jvalue*) __NDK_FPABI__; 293 | jdouble (*CallNonvirtualDoubleMethod)(JNIEnv*, jobject, jclass, 294 | jmethodID, ...) __NDK_FPABI__; 295 | jdouble (*CallNonvirtualDoubleMethodV)(JNIEnv*, jobject, jclass, 296 | jmethodID, va_list) __NDK_FPABI__; 297 | jdouble (*CallNonvirtualDoubleMethodA)(JNIEnv*, jobject, jclass, 298 | jmethodID, jvalue*) __NDK_FPABI__; 299 | void (*CallNonvirtualVoidMethod)(JNIEnv*, jobject, jclass, 300 | jmethodID, ...); 301 | void (*CallNonvirtualVoidMethodV)(JNIEnv*, jobject, jclass, 302 | jmethodID, va_list); 303 | void (*CallNonvirtualVoidMethodA)(JNIEnv*, jobject, jclass, 304 | jmethodID, jvalue*); 305 | 306 | jfieldID (*GetFieldID)(JNIEnv*, jclass, const char*, const char*); 307 | 308 | jobject (*GetObjectField)(JNIEnv*, jobject, jfieldID); 309 | jboolean (*GetBooleanField)(JNIEnv*, jobject, jfieldID); 310 | jbyte (*GetByteField)(JNIEnv*, jobject, jfieldID); 311 | jchar (*GetCharField)(JNIEnv*, jobject, jfieldID); 312 | jshort (*GetShortField)(JNIEnv*, jobject, jfieldID); 313 | jint (*GetIntField)(JNIEnv*, jobject, jfieldID); 314 | jlong (*GetLongField)(JNIEnv*, jobject, jfieldID); 315 | jfloat (*GetFloatField)(JNIEnv*, jobject, jfieldID) __NDK_FPABI__; 316 | jdouble (*GetDoubleField)(JNIEnv*, jobject, jfieldID) __NDK_FPABI__; 317 | 318 | void (*SetObjectField)(JNIEnv*, jobject, jfieldID, jobject); 319 | void (*SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean); 320 | void (*SetByteField)(JNIEnv*, jobject, jfieldID, jbyte); 321 | void (*SetCharField)(JNIEnv*, jobject, jfieldID, jchar); 322 | void (*SetShortField)(JNIEnv*, jobject, jfieldID, jshort); 323 | void (*SetIntField)(JNIEnv*, jobject, jfieldID, jint); 324 | void (*SetLongField)(JNIEnv*, jobject, jfieldID, jlong); 325 | void (*SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat) __NDK_FPABI__; 326 | void (*SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble) __NDK_FPABI__; 327 | 328 | jmethodID (*GetStaticMethodID)(JNIEnv*, jclass, const char*, const char*); 329 | 330 | jobject (*CallStaticObjectMethod)(JNIEnv*, jclass, jmethodID, ...); 331 | jobject (*CallStaticObjectMethodV)(JNIEnv*, jclass, jmethodID, va_list); 332 | jobject (*CallStaticObjectMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 333 | jboolean (*CallStaticBooleanMethod)(JNIEnv*, jclass, jmethodID, ...); 334 | jboolean (*CallStaticBooleanMethodV)(JNIEnv*, jclass, jmethodID, 335 | va_list); 336 | jboolean (*CallStaticBooleanMethodA)(JNIEnv*, jclass, jmethodID, 337 | jvalue*); 338 | jbyte (*CallStaticByteMethod)(JNIEnv*, jclass, jmethodID, ...); 339 | jbyte (*CallStaticByteMethodV)(JNIEnv*, jclass, jmethodID, va_list); 340 | jbyte (*CallStaticByteMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 341 | jchar (*CallStaticCharMethod)(JNIEnv*, jclass, jmethodID, ...); 342 | jchar (*CallStaticCharMethodV)(JNIEnv*, jclass, jmethodID, va_list); 343 | jchar (*CallStaticCharMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 344 | jshort (*CallStaticShortMethod)(JNIEnv*, jclass, jmethodID, ...); 345 | jshort (*CallStaticShortMethodV)(JNIEnv*, jclass, jmethodID, va_list); 346 | jshort (*CallStaticShortMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 347 | jint (*CallStaticIntMethod)(JNIEnv*, jclass, jmethodID, ...); 348 | jint (*CallStaticIntMethodV)(JNIEnv*, jclass, jmethodID, va_list); 349 | jint (*CallStaticIntMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 350 | jlong (*CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...); 351 | jlong (*CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list); 352 | jlong (*CallStaticLongMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 353 | jfloat (*CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__; 354 | jfloat (*CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__; 355 | jfloat (*CallStaticFloatMethodA)(JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__; 356 | jdouble (*CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...) __NDK_FPABI__; 357 | jdouble (*CallStaticDoubleMethodV)(JNIEnv*, jclass, jmethodID, va_list) __NDK_FPABI__; 358 | jdouble (*CallStaticDoubleMethodA)(JNIEnv*, jclass, jmethodID, jvalue*) __NDK_FPABI__; 359 | void (*CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...); 360 | void (*CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list); 361 | void (*CallStaticVoidMethodA)(JNIEnv*, jclass, jmethodID, jvalue*); 362 | 363 | jfieldID (*GetStaticFieldID)(JNIEnv*, jclass, const char*, 364 | const char*); 365 | 366 | jobject (*GetStaticObjectField)(JNIEnv*, jclass, jfieldID); 367 | jboolean (*GetStaticBooleanField)(JNIEnv*, jclass, jfieldID); 368 | jbyte (*GetStaticByteField)(JNIEnv*, jclass, jfieldID); 369 | jchar (*GetStaticCharField)(JNIEnv*, jclass, jfieldID); 370 | jshort (*GetStaticShortField)(JNIEnv*, jclass, jfieldID); 371 | jint (*GetStaticIntField)(JNIEnv*, jclass, jfieldID); 372 | jlong (*GetStaticLongField)(JNIEnv*, jclass, jfieldID); 373 | jfloat (*GetStaticFloatField)(JNIEnv*, jclass, jfieldID) __NDK_FPABI__; 374 | jdouble (*GetStaticDoubleField)(JNIEnv*, jclass, jfieldID) __NDK_FPABI__; 375 | 376 | void (*SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject); 377 | void (*SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean); 378 | void (*SetStaticByteField)(JNIEnv*, jclass, jfieldID, jbyte); 379 | void (*SetStaticCharField)(JNIEnv*, jclass, jfieldID, jchar); 380 | void (*SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort); 381 | void (*SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint); 382 | void (*SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong); 383 | void (*SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat) __NDK_FPABI__; 384 | void (*SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble) __NDK_FPABI__; 385 | 386 | jstring (*NewString)(JNIEnv*, const jchar*, jsize); 387 | jsize (*GetStringLength)(JNIEnv*, jstring); 388 | const jchar* (*GetStringChars)(JNIEnv*, jstring, jboolean*); 389 | void (*ReleaseStringChars)(JNIEnv*, jstring, const jchar*); 390 | jstring (*NewStringUTF)(JNIEnv*, const char*); 391 | jsize (*GetStringUTFLength)(JNIEnv*, jstring); 392 | /* JNI spec says this returns const jbyte*, but that's inconsistent */ 393 | const char* (*GetStringUTFChars)(JNIEnv*, jstring, jboolean*); 394 | void (*ReleaseStringUTFChars)(JNIEnv*, jstring, const char*); 395 | jsize (*GetArrayLength)(JNIEnv*, jarray); 396 | jobjectArray (*NewObjectArray)(JNIEnv*, jsize, jclass, jobject); 397 | jobject (*GetObjectArrayElement)(JNIEnv*, jobjectArray, jsize); 398 | void (*SetObjectArrayElement)(JNIEnv*, jobjectArray, jsize, jobject); 399 | 400 | jbooleanArray (*NewBooleanArray)(JNIEnv*, jsize); 401 | jbyteArray (*NewByteArray)(JNIEnv*, jsize); 402 | jcharArray (*NewCharArray)(JNIEnv*, jsize); 403 | jshortArray (*NewShortArray)(JNIEnv*, jsize); 404 | jintArray (*NewIntArray)(JNIEnv*, jsize); 405 | jlongArray (*NewLongArray)(JNIEnv*, jsize); 406 | jfloatArray (*NewFloatArray)(JNIEnv*, jsize); 407 | jdoubleArray (*NewDoubleArray)(JNIEnv*, jsize); 408 | 409 | jboolean* (*GetBooleanArrayElements)(JNIEnv*, jbooleanArray, jboolean*); 410 | jbyte* (*GetByteArrayElements)(JNIEnv*, jbyteArray, jboolean*); 411 | jchar* (*GetCharArrayElements)(JNIEnv*, jcharArray, jboolean*); 412 | jshort* (*GetShortArrayElements)(JNIEnv*, jshortArray, jboolean*); 413 | jint* (*GetIntArrayElements)(JNIEnv*, jintArray, jboolean*); 414 | jlong* (*GetLongArrayElements)(JNIEnv*, jlongArray, jboolean*); 415 | jfloat* (*GetFloatArrayElements)(JNIEnv*, jfloatArray, jboolean*); 416 | jdouble* (*GetDoubleArrayElements)(JNIEnv*, jdoubleArray, jboolean*); 417 | 418 | void (*ReleaseBooleanArrayElements)(JNIEnv*, jbooleanArray, 419 | jboolean*, jint); 420 | void (*ReleaseByteArrayElements)(JNIEnv*, jbyteArray, 421 | jbyte*, jint); 422 | void (*ReleaseCharArrayElements)(JNIEnv*, jcharArray, 423 | jchar*, jint); 424 | void (*ReleaseShortArrayElements)(JNIEnv*, jshortArray, 425 | jshort*, jint); 426 | void (*ReleaseIntArrayElements)(JNIEnv*, jintArray, 427 | jint*, jint); 428 | void (*ReleaseLongArrayElements)(JNIEnv*, jlongArray, 429 | jlong*, jint); 430 | void (*ReleaseFloatArrayElements)(JNIEnv*, jfloatArray, 431 | jfloat*, jint); 432 | void (*ReleaseDoubleArrayElements)(JNIEnv*, jdoubleArray, 433 | jdouble*, jint); 434 | 435 | void (*GetBooleanArrayRegion)(JNIEnv*, jbooleanArray, 436 | jsize, jsize, jboolean*); 437 | void (*GetByteArrayRegion)(JNIEnv*, jbyteArray, 438 | jsize, jsize, jbyte*); 439 | void (*GetCharArrayRegion)(JNIEnv*, jcharArray, 440 | jsize, jsize, jchar*); 441 | void (*GetShortArrayRegion)(JNIEnv*, jshortArray, 442 | jsize, jsize, jshort*); 443 | void (*GetIntArrayRegion)(JNIEnv*, jintArray, 444 | jsize, jsize, jint*); 445 | void (*GetLongArrayRegion)(JNIEnv*, jlongArray, 446 | jsize, jsize, jlong*); 447 | void (*GetFloatArrayRegion)(JNIEnv*, jfloatArray, 448 | jsize, jsize, jfloat*); 449 | void (*GetDoubleArrayRegion)(JNIEnv*, jdoubleArray, 450 | jsize, jsize, jdouble*); 451 | 452 | /* spec shows these without const; some jni.h do, some don't */ 453 | void (*SetBooleanArrayRegion)(JNIEnv*, jbooleanArray, 454 | jsize, jsize, const jboolean*); 455 | void (*SetByteArrayRegion)(JNIEnv*, jbyteArray, 456 | jsize, jsize, const jbyte*); 457 | void (*SetCharArrayRegion)(JNIEnv*, jcharArray, 458 | jsize, jsize, const jchar*); 459 | void (*SetShortArrayRegion)(JNIEnv*, jshortArray, 460 | jsize, jsize, const jshort*); 461 | void (*SetIntArrayRegion)(JNIEnv*, jintArray, 462 | jsize, jsize, const jint*); 463 | void (*SetLongArrayRegion)(JNIEnv*, jlongArray, 464 | jsize, jsize, const jlong*); 465 | void (*SetFloatArrayRegion)(JNIEnv*, jfloatArray, 466 | jsize, jsize, const jfloat*); 467 | void (*SetDoubleArrayRegion)(JNIEnv*, jdoubleArray, 468 | jsize, jsize, const jdouble*); 469 | 470 | jint (*RegisterNatives)(JNIEnv*, jclass, const JNINativeMethod*, 471 | jint); 472 | jint (*UnregisterNatives)(JNIEnv*, jclass); 473 | jint (*MonitorEnter)(JNIEnv*, jobject); 474 | jint (*MonitorExit)(JNIEnv*, jobject); 475 | jint (*GetJavaVM)(JNIEnv*, JavaVM**); 476 | 477 | void (*GetStringRegion)(JNIEnv*, jstring, jsize, jsize, jchar*); 478 | void (*GetStringUTFRegion)(JNIEnv*, jstring, jsize, jsize, char*); 479 | 480 | void* (*GetPrimitiveArrayCritical)(JNIEnv*, jarray, jboolean*); 481 | void (*ReleasePrimitiveArrayCritical)(JNIEnv*, jarray, void*, jint); 482 | 483 | const jchar* (*GetStringCritical)(JNIEnv*, jstring, jboolean*); 484 | void (*ReleaseStringCritical)(JNIEnv*, jstring, const jchar*); 485 | 486 | jweak (*NewWeakGlobalRef)(JNIEnv*, jobject); 487 | void (*DeleteWeakGlobalRef)(JNIEnv*, jweak); 488 | 489 | jboolean (*ExceptionCheck)(JNIEnv*); 490 | 491 | jobject (*NewDirectByteBuffer)(JNIEnv*, void*, jlong); 492 | void* (*GetDirectBufferAddress)(JNIEnv*, jobject); 493 | jlong (*GetDirectBufferCapacity)(JNIEnv*, jobject); 494 | 495 | /* added in JNI 1.6 */ 496 | jobjectRefType (*GetObjectRefType)(JNIEnv*, jobject); 497 | }; 498 | 499 | /* 500 | * C++ object wrapper. 501 | * 502 | * This is usually overlaid on a C struct whose first element is a 503 | * JNINativeInterface*. We rely somewhat on compiler behavior. 504 | */ 505 | struct _JNIEnv { 506 | /* do not rename this; it does not seem to be entirely opaque */ 507 | const struct JNINativeInterface* functions; 508 | 509 | #if defined(__cplusplus) 510 | 511 | jint GetVersion() 512 | { return functions->GetVersion(this); } 513 | 514 | jclass DefineClass(const char *name, jobject loader, const jbyte* buf, 515 | jsize bufLen) 516 | { return functions->DefineClass(this, name, loader, buf, bufLen); } 517 | 518 | jclass FindClass(const char* name) 519 | { return functions->FindClass(this, name); } 520 | 521 | jmethodID FromReflectedMethod(jobject method) 522 | { return functions->FromReflectedMethod(this, method); } 523 | 524 | jfieldID FromReflectedField(jobject field) 525 | { return functions->FromReflectedField(this, field); } 526 | 527 | jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) 528 | { return functions->ToReflectedMethod(this, cls, methodID, isStatic); } 529 | 530 | jclass GetSuperclass(jclass clazz) 531 | { return functions->GetSuperclass(this, clazz); } 532 | 533 | jboolean IsAssignableFrom(jclass clazz1, jclass clazz2) 534 | { return functions->IsAssignableFrom(this, clazz1, clazz2); } 535 | 536 | jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) 537 | { return functions->ToReflectedField(this, cls, fieldID, isStatic); } 538 | 539 | jint Throw(jthrowable obj) 540 | { return functions->Throw(this, obj); } 541 | 542 | jint ThrowNew(jclass clazz, const char* message) 543 | { return functions->ThrowNew(this, clazz, message); } 544 | 545 | jthrowable ExceptionOccurred() 546 | { return functions->ExceptionOccurred(this); } 547 | 548 | void ExceptionDescribe() 549 | { functions->ExceptionDescribe(this); } 550 | 551 | void ExceptionClear() 552 | { functions->ExceptionClear(this); } 553 | 554 | void FatalError(const char* msg) 555 | { functions->FatalError(this, msg); } 556 | 557 | jint PushLocalFrame(jint capacity) 558 | { return functions->PushLocalFrame(this, capacity); } 559 | 560 | jobject PopLocalFrame(jobject result) 561 | { return functions->PopLocalFrame(this, result); } 562 | 563 | jobject NewGlobalRef(jobject obj) 564 | { return functions->NewGlobalRef(this, obj); } 565 | 566 | void DeleteGlobalRef(jobject globalRef) 567 | { functions->DeleteGlobalRef(this, globalRef); } 568 | 569 | void DeleteLocalRef(jobject localRef) 570 | { functions->DeleteLocalRef(this, localRef); } 571 | 572 | jboolean IsSameObject(jobject ref1, jobject ref2) 573 | { return functions->IsSameObject(this, ref1, ref2); } 574 | 575 | jobject NewLocalRef(jobject ref) 576 | { return functions->NewLocalRef(this, ref); } 577 | 578 | jint EnsureLocalCapacity(jint capacity) 579 | { return functions->EnsureLocalCapacity(this, capacity); } 580 | 581 | jobject AllocObject(jclass clazz) 582 | { return functions->AllocObject(this, clazz); } 583 | 584 | jobject NewObject(jclass clazz, jmethodID methodID, ...) 585 | { 586 | va_list args; 587 | va_start(args, methodID); 588 | jobject result = functions->NewObjectV(this, clazz, methodID, args); 589 | va_end(args); 590 | return result; 591 | } 592 | 593 | jobject NewObjectV(jclass clazz, jmethodID methodID, va_list args) 594 | { return functions->NewObjectV(this, clazz, methodID, args); } 595 | 596 | jobject NewObjectA(jclass clazz, jmethodID methodID, jvalue* args) 597 | { return functions->NewObjectA(this, clazz, methodID, args); } 598 | 599 | jclass GetObjectClass(jobject obj) 600 | { return functions->GetObjectClass(this, obj); } 601 | 602 | jboolean IsInstanceOf(jobject obj, jclass clazz) 603 | { return functions->IsInstanceOf(this, obj, clazz); } 604 | 605 | jmethodID GetMethodID(jclass clazz, const char* name, const char* sig) 606 | { return functions->GetMethodID(this, clazz, name, sig); } 607 | 608 | #define CALL_TYPE_METHOD(_jtype, _jname) \ 609 | __NDK_FPABI__ \ 610 | _jtype Call##_jname##Method(jobject obj, jmethodID methodID, ...) \ 611 | { \ 612 | _jtype result; \ 613 | va_list args; \ 614 | va_start(args, methodID); \ 615 | result = functions->Call##_jname##MethodV(this, obj, methodID, \ 616 | args); \ 617 | va_end(args); \ 618 | return result; \ 619 | } 620 | #define CALL_TYPE_METHODV(_jtype, _jname) \ 621 | __NDK_FPABI__ \ 622 | _jtype Call##_jname##MethodV(jobject obj, jmethodID methodID, \ 623 | va_list args) \ 624 | { return functions->Call##_jname##MethodV(this, obj, methodID, args); } 625 | #define CALL_TYPE_METHODA(_jtype, _jname) \ 626 | __NDK_FPABI__ \ 627 | _jtype Call##_jname##MethodA(jobject obj, jmethodID methodID, \ 628 | jvalue* args) \ 629 | { return functions->Call##_jname##MethodA(this, obj, methodID, args); } 630 | 631 | #define CALL_TYPE(_jtype, _jname) \ 632 | CALL_TYPE_METHOD(_jtype, _jname) \ 633 | CALL_TYPE_METHODV(_jtype, _jname) \ 634 | CALL_TYPE_METHODA(_jtype, _jname) 635 | 636 | CALL_TYPE(jobject, Object) 637 | CALL_TYPE(jboolean, Boolean) 638 | CALL_TYPE(jbyte, Byte) 639 | CALL_TYPE(jchar, Char) 640 | CALL_TYPE(jshort, Short) 641 | CALL_TYPE(jint, Int) 642 | CALL_TYPE(jlong, Long) 643 | CALL_TYPE(jfloat, Float) 644 | CALL_TYPE(jdouble, Double) 645 | 646 | void CallVoidMethod(jobject obj, jmethodID methodID, ...) 647 | { 648 | va_list args; 649 | va_start(args, methodID); 650 | functions->CallVoidMethodV(this, obj, methodID, args); 651 | va_end(args); 652 | } 653 | void CallVoidMethodV(jobject obj, jmethodID methodID, va_list args) 654 | { functions->CallVoidMethodV(this, obj, methodID, args); } 655 | void CallVoidMethodA(jobject obj, jmethodID methodID, jvalue* args) 656 | { functions->CallVoidMethodA(this, obj, methodID, args); } 657 | 658 | #define CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \ 659 | __NDK_FPABI__ \ 660 | _jtype CallNonvirtual##_jname##Method(jobject obj, jclass clazz, \ 661 | jmethodID methodID, ...) \ 662 | { \ 663 | _jtype result; \ 664 | va_list args; \ 665 | va_start(args, methodID); \ 666 | result = functions->CallNonvirtual##_jname##MethodV(this, obj, \ 667 | clazz, methodID, args); \ 668 | va_end(args); \ 669 | return result; \ 670 | } 671 | #define CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \ 672 | __NDK_FPABI__ \ 673 | _jtype CallNonvirtual##_jname##MethodV(jobject obj, jclass clazz, \ 674 | jmethodID methodID, va_list args) \ 675 | { return functions->CallNonvirtual##_jname##MethodV(this, obj, clazz, \ 676 | methodID, args); } 677 | #define CALL_NONVIRT_TYPE_METHODA(_jtype, _jname) \ 678 | __NDK_FPABI__ \ 679 | _jtype CallNonvirtual##_jname##MethodA(jobject obj, jclass clazz, \ 680 | jmethodID methodID, jvalue* args) \ 681 | { return functions->CallNonvirtual##_jname##MethodA(this, obj, clazz, \ 682 | methodID, args); } 683 | 684 | #define CALL_NONVIRT_TYPE(_jtype, _jname) \ 685 | CALL_NONVIRT_TYPE_METHOD(_jtype, _jname) \ 686 | CALL_NONVIRT_TYPE_METHODV(_jtype, _jname) \ 687 | CALL_NONVIRT_TYPE_METHODA(_jtype, _jname) 688 | 689 | CALL_NONVIRT_TYPE(jobject, Object) 690 | CALL_NONVIRT_TYPE(jboolean, Boolean) 691 | CALL_NONVIRT_TYPE(jbyte, Byte) 692 | CALL_NONVIRT_TYPE(jchar, Char) 693 | CALL_NONVIRT_TYPE(jshort, Short) 694 | CALL_NONVIRT_TYPE(jint, Int) 695 | CALL_NONVIRT_TYPE(jlong, Long) 696 | CALL_NONVIRT_TYPE(jfloat, Float) 697 | CALL_NONVIRT_TYPE(jdouble, Double) 698 | 699 | void CallNonvirtualVoidMethod(jobject obj, jclass clazz, 700 | jmethodID methodID, ...) 701 | { 702 | va_list args; 703 | va_start(args, methodID); 704 | functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args); 705 | va_end(args); 706 | } 707 | void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, 708 | jmethodID methodID, va_list args) 709 | { functions->CallNonvirtualVoidMethodV(this, obj, clazz, methodID, args); } 710 | void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, 711 | jmethodID methodID, jvalue* args) 712 | { functions->CallNonvirtualVoidMethodA(this, obj, clazz, methodID, args); } 713 | 714 | jfieldID GetFieldID(jclass clazz, const char* name, const char* sig) 715 | { return functions->GetFieldID(this, clazz, name, sig); } 716 | 717 | jobject GetObjectField(jobject obj, jfieldID fieldID) 718 | { return functions->GetObjectField(this, obj, fieldID); } 719 | jboolean GetBooleanField(jobject obj, jfieldID fieldID) 720 | { return functions->GetBooleanField(this, obj, fieldID); } 721 | jbyte GetByteField(jobject obj, jfieldID fieldID) 722 | { return functions->GetByteField(this, obj, fieldID); } 723 | jchar GetCharField(jobject obj, jfieldID fieldID) 724 | { return functions->GetCharField(this, obj, fieldID); } 725 | jshort GetShortField(jobject obj, jfieldID fieldID) 726 | { return functions->GetShortField(this, obj, fieldID); } 727 | jint GetIntField(jobject obj, jfieldID fieldID) 728 | { return functions->GetIntField(this, obj, fieldID); } 729 | jlong GetLongField(jobject obj, jfieldID fieldID) 730 | { return functions->GetLongField(this, obj, fieldID); } 731 | __NDK_FPABI__ 732 | jfloat GetFloatField(jobject obj, jfieldID fieldID) 733 | { return functions->GetFloatField(this, obj, fieldID); } 734 | __NDK_FPABI__ 735 | jdouble GetDoubleField(jobject obj, jfieldID fieldID) 736 | { return functions->GetDoubleField(this, obj, fieldID); } 737 | 738 | void SetObjectField(jobject obj, jfieldID fieldID, jobject value) 739 | { functions->SetObjectField(this, obj, fieldID, value); } 740 | void SetBooleanField(jobject obj, jfieldID fieldID, jboolean value) 741 | { functions->SetBooleanField(this, obj, fieldID, value); } 742 | void SetByteField(jobject obj, jfieldID fieldID, jbyte value) 743 | { functions->SetByteField(this, obj, fieldID, value); } 744 | void SetCharField(jobject obj, jfieldID fieldID, jchar value) 745 | { functions->SetCharField(this, obj, fieldID, value); } 746 | void SetShortField(jobject obj, jfieldID fieldID, jshort value) 747 | { functions->SetShortField(this, obj, fieldID, value); } 748 | void SetIntField(jobject obj, jfieldID fieldID, jint value) 749 | { functions->SetIntField(this, obj, fieldID, value); } 750 | void SetLongField(jobject obj, jfieldID fieldID, jlong value) 751 | { functions->SetLongField(this, obj, fieldID, value); } 752 | __NDK_FPABI__ 753 | void SetFloatField(jobject obj, jfieldID fieldID, jfloat value) 754 | { functions->SetFloatField(this, obj, fieldID, value); } 755 | __NDK_FPABI__ 756 | void SetDoubleField(jobject obj, jfieldID fieldID, jdouble value) 757 | { functions->SetDoubleField(this, obj, fieldID, value); } 758 | 759 | jmethodID GetStaticMethodID(jclass clazz, const char* name, const char* sig) 760 | { return functions->GetStaticMethodID(this, clazz, name, sig); } 761 | 762 | #define CALL_STATIC_TYPE_METHOD(_jtype, _jname) \ 763 | __NDK_FPABI__ \ 764 | _jtype CallStatic##_jname##Method(jclass clazz, jmethodID methodID, \ 765 | ...) \ 766 | { \ 767 | _jtype result; \ 768 | va_list args; \ 769 | va_start(args, methodID); \ 770 | result = functions->CallStatic##_jname##MethodV(this, clazz, \ 771 | methodID, args); \ 772 | va_end(args); \ 773 | return result; \ 774 | } 775 | #define CALL_STATIC_TYPE_METHODV(_jtype, _jname) \ 776 | __NDK_FPABI__ \ 777 | _jtype CallStatic##_jname##MethodV(jclass clazz, jmethodID methodID, \ 778 | va_list args) \ 779 | { return functions->CallStatic##_jname##MethodV(this, clazz, methodID, \ 780 | args); } 781 | #define CALL_STATIC_TYPE_METHODA(_jtype, _jname) \ 782 | __NDK_FPABI__ \ 783 | _jtype CallStatic##_jname##MethodA(jclass clazz, jmethodID methodID, \ 784 | jvalue* args) \ 785 | { return functions->CallStatic##_jname##MethodA(this, clazz, methodID, \ 786 | args); } 787 | 788 | #define CALL_STATIC_TYPE(_jtype, _jname) \ 789 | CALL_STATIC_TYPE_METHOD(_jtype, _jname) \ 790 | CALL_STATIC_TYPE_METHODV(_jtype, _jname) \ 791 | CALL_STATIC_TYPE_METHODA(_jtype, _jname) 792 | 793 | CALL_STATIC_TYPE(jobject, Object) 794 | CALL_STATIC_TYPE(jboolean, Boolean) 795 | CALL_STATIC_TYPE(jbyte, Byte) 796 | CALL_STATIC_TYPE(jchar, Char) 797 | CALL_STATIC_TYPE(jshort, Short) 798 | CALL_STATIC_TYPE(jint, Int) 799 | CALL_STATIC_TYPE(jlong, Long) 800 | CALL_STATIC_TYPE(jfloat, Float) 801 | CALL_STATIC_TYPE(jdouble, Double) 802 | 803 | void CallStaticVoidMethod(jclass clazz, jmethodID methodID, ...) 804 | { 805 | va_list args; 806 | va_start(args, methodID); 807 | functions->CallStaticVoidMethodV(this, clazz, methodID, args); 808 | va_end(args); 809 | } 810 | void CallStaticVoidMethodV(jclass clazz, jmethodID methodID, va_list args) 811 | { functions->CallStaticVoidMethodV(this, clazz, methodID, args); } 812 | void CallStaticVoidMethodA(jclass clazz, jmethodID methodID, jvalue* args) 813 | { functions->CallStaticVoidMethodA(this, clazz, methodID, args); } 814 | 815 | jfieldID GetStaticFieldID(jclass clazz, const char* name, const char* sig) 816 | { return functions->GetStaticFieldID(this, clazz, name, sig); } 817 | 818 | jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) 819 | { return functions->GetStaticObjectField(this, clazz, fieldID); } 820 | jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) 821 | { return functions->GetStaticBooleanField(this, clazz, fieldID); } 822 | jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) 823 | { return functions->GetStaticByteField(this, clazz, fieldID); } 824 | jchar GetStaticCharField(jclass clazz, jfieldID fieldID) 825 | { return functions->GetStaticCharField(this, clazz, fieldID); } 826 | jshort GetStaticShortField(jclass clazz, jfieldID fieldID) 827 | { return functions->GetStaticShortField(this, clazz, fieldID); } 828 | jint GetStaticIntField(jclass clazz, jfieldID fieldID) 829 | { return functions->GetStaticIntField(this, clazz, fieldID); } 830 | jlong GetStaticLongField(jclass clazz, jfieldID fieldID) 831 | { return functions->GetStaticLongField(this, clazz, fieldID); } 832 | __NDK_FPABI__ 833 | jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) 834 | { return functions->GetStaticFloatField(this, clazz, fieldID); } 835 | __NDK_FPABI__ 836 | jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) 837 | { return functions->GetStaticDoubleField(this, clazz, fieldID); } 838 | 839 | void SetStaticObjectField(jclass clazz, jfieldID fieldID, jobject value) 840 | { functions->SetStaticObjectField(this, clazz, fieldID, value); } 841 | void SetStaticBooleanField(jclass clazz, jfieldID fieldID, jboolean value) 842 | { functions->SetStaticBooleanField(this, clazz, fieldID, value); } 843 | void SetStaticByteField(jclass clazz, jfieldID fieldID, jbyte value) 844 | { functions->SetStaticByteField(this, clazz, fieldID, value); } 845 | void SetStaticCharField(jclass clazz, jfieldID fieldID, jchar value) 846 | { functions->SetStaticCharField(this, clazz, fieldID, value); } 847 | void SetStaticShortField(jclass clazz, jfieldID fieldID, jshort value) 848 | { functions->SetStaticShortField(this, clazz, fieldID, value); } 849 | void SetStaticIntField(jclass clazz, jfieldID fieldID, jint value) 850 | { functions->SetStaticIntField(this, clazz, fieldID, value); } 851 | void SetStaticLongField(jclass clazz, jfieldID fieldID, jlong value) 852 | { functions->SetStaticLongField(this, clazz, fieldID, value); } 853 | __NDK_FPABI__ 854 | void SetStaticFloatField(jclass clazz, jfieldID fieldID, jfloat value) 855 | { functions->SetStaticFloatField(this, clazz, fieldID, value); } 856 | __NDK_FPABI__ 857 | void SetStaticDoubleField(jclass clazz, jfieldID fieldID, jdouble value) 858 | { functions->SetStaticDoubleField(this, clazz, fieldID, value); } 859 | 860 | jstring NewString(const jchar* unicodeChars, jsize len) 861 | { return functions->NewString(this, unicodeChars, len); } 862 | 863 | jsize GetStringLength(jstring string) 864 | { return functions->GetStringLength(this, string); } 865 | 866 | const jchar* GetStringChars(jstring string, jboolean* isCopy) 867 | { return functions->GetStringChars(this, string, isCopy); } 868 | 869 | void ReleaseStringChars(jstring string, const jchar* chars) 870 | { functions->ReleaseStringChars(this, string, chars); } 871 | 872 | jstring NewStringUTF(const char* bytes) 873 | { return functions->NewStringUTF(this, bytes); } 874 | 875 | jsize GetStringUTFLength(jstring string) 876 | { return functions->GetStringUTFLength(this, string); } 877 | 878 | const char* GetStringUTFChars(jstring string, jboolean* isCopy) 879 | { return functions->GetStringUTFChars(this, string, isCopy); } 880 | 881 | void ReleaseStringUTFChars(jstring string, const char* utf) 882 | { functions->ReleaseStringUTFChars(this, string, utf); } 883 | 884 | jsize GetArrayLength(jarray array) 885 | { return functions->GetArrayLength(this, array); } 886 | 887 | jobjectArray NewObjectArray(jsize length, jclass elementClass, 888 | jobject initialElement) 889 | { return functions->NewObjectArray(this, length, elementClass, 890 | initialElement); } 891 | 892 | jobject GetObjectArrayElement(jobjectArray array, jsize index) 893 | { return functions->GetObjectArrayElement(this, array, index); } 894 | 895 | void SetObjectArrayElement(jobjectArray array, jsize index, jobject value) 896 | { functions->SetObjectArrayElement(this, array, index, value); } 897 | 898 | jbooleanArray NewBooleanArray(jsize length) 899 | { return functions->NewBooleanArray(this, length); } 900 | jbyteArray NewByteArray(jsize length) 901 | { return functions->NewByteArray(this, length); } 902 | jcharArray NewCharArray(jsize length) 903 | { return functions->NewCharArray(this, length); } 904 | jshortArray NewShortArray(jsize length) 905 | { return functions->NewShortArray(this, length); } 906 | jintArray NewIntArray(jsize length) 907 | { return functions->NewIntArray(this, length); } 908 | jlongArray NewLongArray(jsize length) 909 | { return functions->NewLongArray(this, length); } 910 | jfloatArray NewFloatArray(jsize length) 911 | { return functions->NewFloatArray(this, length); } 912 | jdoubleArray NewDoubleArray(jsize length) 913 | { return functions->NewDoubleArray(this, length); } 914 | 915 | jboolean* GetBooleanArrayElements(jbooleanArray array, jboolean* isCopy) 916 | { return functions->GetBooleanArrayElements(this, array, isCopy); } 917 | jbyte* GetByteArrayElements(jbyteArray array, jboolean* isCopy) 918 | { return functions->GetByteArrayElements(this, array, isCopy); } 919 | jchar* GetCharArrayElements(jcharArray array, jboolean* isCopy) 920 | { return functions->GetCharArrayElements(this, array, isCopy); } 921 | jshort* GetShortArrayElements(jshortArray array, jboolean* isCopy) 922 | { return functions->GetShortArrayElements(this, array, isCopy); } 923 | jint* GetIntArrayElements(jintArray array, jboolean* isCopy) 924 | { return functions->GetIntArrayElements(this, array, isCopy); } 925 | jlong* GetLongArrayElements(jlongArray array, jboolean* isCopy) 926 | { return functions->GetLongArrayElements(this, array, isCopy); } 927 | jfloat* GetFloatArrayElements(jfloatArray array, jboolean* isCopy) 928 | { return functions->GetFloatArrayElements(this, array, isCopy); } 929 | jdouble* GetDoubleArrayElements(jdoubleArray array, jboolean* isCopy) 930 | { return functions->GetDoubleArrayElements(this, array, isCopy); } 931 | 932 | void ReleaseBooleanArrayElements(jbooleanArray array, jboolean* elems, 933 | jint mode) 934 | { functions->ReleaseBooleanArrayElements(this, array, elems, mode); } 935 | void ReleaseByteArrayElements(jbyteArray array, jbyte* elems, 936 | jint mode) 937 | { functions->ReleaseByteArrayElements(this, array, elems, mode); } 938 | void ReleaseCharArrayElements(jcharArray array, jchar* elems, 939 | jint mode) 940 | { functions->ReleaseCharArrayElements(this, array, elems, mode); } 941 | void ReleaseShortArrayElements(jshortArray array, jshort* elems, 942 | jint mode) 943 | { functions->ReleaseShortArrayElements(this, array, elems, mode); } 944 | void ReleaseIntArrayElements(jintArray array, jint* elems, 945 | jint mode) 946 | { functions->ReleaseIntArrayElements(this, array, elems, mode); } 947 | void ReleaseLongArrayElements(jlongArray array, jlong* elems, 948 | jint mode) 949 | { functions->ReleaseLongArrayElements(this, array, elems, mode); } 950 | void ReleaseFloatArrayElements(jfloatArray array, jfloat* elems, 951 | jint mode) 952 | { functions->ReleaseFloatArrayElements(this, array, elems, mode); } 953 | void ReleaseDoubleArrayElements(jdoubleArray array, jdouble* elems, 954 | jint mode) 955 | { functions->ReleaseDoubleArrayElements(this, array, elems, mode); } 956 | 957 | void GetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, 958 | jboolean* buf) 959 | { functions->GetBooleanArrayRegion(this, array, start, len, buf); } 960 | void GetByteArrayRegion(jbyteArray array, jsize start, jsize len, 961 | jbyte* buf) 962 | { functions->GetByteArrayRegion(this, array, start, len, buf); } 963 | void GetCharArrayRegion(jcharArray array, jsize start, jsize len, 964 | jchar* buf) 965 | { functions->GetCharArrayRegion(this, array, start, len, buf); } 966 | void GetShortArrayRegion(jshortArray array, jsize start, jsize len, 967 | jshort* buf) 968 | { functions->GetShortArrayRegion(this, array, start, len, buf); } 969 | void GetIntArrayRegion(jintArray array, jsize start, jsize len, 970 | jint* buf) 971 | { functions->GetIntArrayRegion(this, array, start, len, buf); } 972 | void GetLongArrayRegion(jlongArray array, jsize start, jsize len, 973 | jlong* buf) 974 | { functions->GetLongArrayRegion(this, array, start, len, buf); } 975 | void GetFloatArrayRegion(jfloatArray array, jsize start, jsize len, 976 | jfloat* buf) 977 | { functions->GetFloatArrayRegion(this, array, start, len, buf); } 978 | void GetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, 979 | jdouble* buf) 980 | { functions->GetDoubleArrayRegion(this, array, start, len, buf); } 981 | 982 | void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, 983 | const jboolean* buf) 984 | { functions->SetBooleanArrayRegion(this, array, start, len, buf); } 985 | void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, 986 | const jbyte* buf) 987 | { functions->SetByteArrayRegion(this, array, start, len, buf); } 988 | void SetCharArrayRegion(jcharArray array, jsize start, jsize len, 989 | const jchar* buf) 990 | { functions->SetCharArrayRegion(this, array, start, len, buf); } 991 | void SetShortArrayRegion(jshortArray array, jsize start, jsize len, 992 | const jshort* buf) 993 | { functions->SetShortArrayRegion(this, array, start, len, buf); } 994 | void SetIntArrayRegion(jintArray array, jsize start, jsize len, 995 | const jint* buf) 996 | { functions->SetIntArrayRegion(this, array, start, len, buf); } 997 | void SetLongArrayRegion(jlongArray array, jsize start, jsize len, 998 | const jlong* buf) 999 | { functions->SetLongArrayRegion(this, array, start, len, buf); } 1000 | void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, 1001 | const jfloat* buf) 1002 | { functions->SetFloatArrayRegion(this, array, start, len, buf); } 1003 | void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, 1004 | const jdouble* buf) 1005 | { functions->SetDoubleArrayRegion(this, array, start, len, buf); } 1006 | 1007 | jint RegisterNatives(jclass clazz, const JNINativeMethod* methods, 1008 | jint nMethods) 1009 | { return functions->RegisterNatives(this, clazz, methods, nMethods); } 1010 | 1011 | jint UnregisterNatives(jclass clazz) 1012 | { return functions->UnregisterNatives(this, clazz); } 1013 | 1014 | jint MonitorEnter(jobject obj) 1015 | { return functions->MonitorEnter(this, obj); } 1016 | 1017 | jint MonitorExit(jobject obj) 1018 | { return functions->MonitorExit(this, obj); } 1019 | 1020 | jint GetJavaVM(JavaVM** vm) 1021 | { return functions->GetJavaVM(this, vm); } 1022 | 1023 | void GetStringRegion(jstring str, jsize start, jsize len, jchar* buf) 1024 | { functions->GetStringRegion(this, str, start, len, buf); } 1025 | 1026 | void GetStringUTFRegion(jstring str, jsize start, jsize len, char* buf) 1027 | { return functions->GetStringUTFRegion(this, str, start, len, buf); } 1028 | 1029 | void* GetPrimitiveArrayCritical(jarray array, jboolean* isCopy) 1030 | { return functions->GetPrimitiveArrayCritical(this, array, isCopy); } 1031 | 1032 | void ReleasePrimitiveArrayCritical(jarray array, void* carray, jint mode) 1033 | { functions->ReleasePrimitiveArrayCritical(this, array, carray, mode); } 1034 | 1035 | const jchar* GetStringCritical(jstring string, jboolean* isCopy) 1036 | { return functions->GetStringCritical(this, string, isCopy); } 1037 | 1038 | void ReleaseStringCritical(jstring string, const jchar* carray) 1039 | { functions->ReleaseStringCritical(this, string, carray); } 1040 | 1041 | jweak NewWeakGlobalRef(jobject obj) 1042 | { return functions->NewWeakGlobalRef(this, obj); } 1043 | 1044 | void DeleteWeakGlobalRef(jweak obj) 1045 | { functions->DeleteWeakGlobalRef(this, obj); } 1046 | 1047 | jboolean ExceptionCheck() 1048 | { return functions->ExceptionCheck(this); } 1049 | 1050 | jobject NewDirectByteBuffer(void* address, jlong capacity) 1051 | { return functions->NewDirectByteBuffer(this, address, capacity); } 1052 | 1053 | void* GetDirectBufferAddress(jobject buf) 1054 | { return functions->GetDirectBufferAddress(this, buf); } 1055 | 1056 | jlong GetDirectBufferCapacity(jobject buf) 1057 | { return functions->GetDirectBufferCapacity(this, buf); } 1058 | 1059 | /* added in JNI 1.6 */ 1060 | jobjectRefType GetObjectRefType(jobject obj) 1061 | { return functions->GetObjectRefType(this, obj); } 1062 | #endif /*__cplusplus*/ 1063 | }; 1064 | 1065 | 1066 | /* 1067 | * JNI invocation interface. 1068 | */ 1069 | struct JNIInvokeInterface { 1070 | void* reserved0; 1071 | void* reserved1; 1072 | void* reserved2; 1073 | 1074 | jint (*DestroyJavaVM)(JavaVM*); 1075 | jint (*AttachCurrentThread)(JavaVM*, JNIEnv**, void*); 1076 | jint (*DetachCurrentThread)(JavaVM*); 1077 | jint (*GetEnv)(JavaVM*, void**, jint); 1078 | jint (*AttachCurrentThreadAsDaemon)(JavaVM*, JNIEnv**, void*); 1079 | }; 1080 | 1081 | /* 1082 | * C++ version. 1083 | */ 1084 | struct _JavaVM { 1085 | const struct JNIInvokeInterface* functions; 1086 | 1087 | #if defined(__cplusplus) 1088 | jint DestroyJavaVM() 1089 | { return functions->DestroyJavaVM(this); } 1090 | jint AttachCurrentThread(JNIEnv** p_env, void* thr_args) 1091 | { return functions->AttachCurrentThread(this, p_env, thr_args); } 1092 | jint DetachCurrentThread() 1093 | { return functions->DetachCurrentThread(this); } 1094 | jint GetEnv(void** env, jint version) 1095 | { return functions->GetEnv(this, env, version); } 1096 | jint AttachCurrentThreadAsDaemon(JNIEnv** p_env, void* thr_args) 1097 | { return functions->AttachCurrentThreadAsDaemon(this, p_env, thr_args); } 1098 | #endif /*__cplusplus*/ 1099 | }; 1100 | 1101 | struct JavaVMAttachArgs { 1102 | jint version; /* must be >= JNI_VERSION_1_2 */ 1103 | const char* name; /* NULL or name of thread as modified UTF-8 str */ 1104 | jobject group; /* global ref of a ThreadGroup object, or NULL */ 1105 | }; 1106 | typedef struct JavaVMAttachArgs JavaVMAttachArgs; 1107 | 1108 | /* 1109 | * JNI 1.2+ initialization. (As of 1.6, the pre-1.2 structures are no 1110 | * longer supported.) 1111 | */ 1112 | typedef struct JavaVMOption { 1113 | const char* optionString; 1114 | void* extraInfo; 1115 | } JavaVMOption; 1116 | 1117 | typedef struct JavaVMInitArgs { 1118 | jint version; /* use JNI_VERSION_1_2 or later */ 1119 | 1120 | jint nOptions; 1121 | JavaVMOption* options; 1122 | jboolean ignoreUnrecognized; 1123 | } JavaVMInitArgs; 1124 | 1125 | #ifdef __cplusplus 1126 | extern "C" { 1127 | #endif 1128 | /* 1129 | * VM initialization functions. 1130 | * 1131 | * Note these are the only symbols exported for JNI by the VM. 1132 | */ 1133 | #if 0 /* In practice, these are not exported by the NDK so don't declare them */ 1134 | jint JNI_GetDefaultJavaVMInitArgs(void*); 1135 | jint JNI_CreateJavaVM(JavaVM**, JNIEnv**, void*); 1136 | jint JNI_GetCreatedJavaVMs(JavaVM**, jsize, jsize*); 1137 | #endif 1138 | 1139 | #define JNIIMPORT 1140 | #define JNIEXPORT __attribute__ ((visibility ("default"))) 1141 | #define JNICALL __NDK_FPABI__ 1142 | 1143 | /* 1144 | * Prototypes for functions exported by loadable shared libs. These are 1145 | * called by JNI, not provided by JNI. 1146 | */ 1147 | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved); 1148 | JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved); 1149 | 1150 | #ifdef __cplusplus 1151 | } 1152 | #endif 1153 | 1154 | 1155 | /* 1156 | * Manifest constants. 1157 | */ 1158 | #define JNI_FALSE 0 1159 | #define JNI_TRUE 1 1160 | 1161 | #define JNI_VERSION_1_1 0x00010001 1162 | #define JNI_VERSION_1_2 0x00010002 1163 | #define JNI_VERSION_1_4 0x00010004 1164 | #define JNI_VERSION_1_6 0x00010006 1165 | 1166 | #define JNI_OK (0) /* no error */ 1167 | #define JNI_ERR (-1) /* generic error */ 1168 | #define JNI_EDETACHED (-2) /* thread detached from the VM */ 1169 | #define JNI_EVERSION (-3) /* JNI version error */ 1170 | 1171 | #define JNI_COMMIT 1 /* copy content, do not free buffer */ 1172 | #define JNI_ABORT 2 /* free buffer w/o copying back */ 1173 | 1174 | #endif /* JNI_H_ */ 1175 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /StaticFuncsIdentify.idc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parkerpeng/IDA-Script-for-android/7704bacf04f10e1af8fe8666c26d46bd25a14ddb/StaticFuncsIdentify.idc -------------------------------------------------------------------------------- /StaticFuncsIdentify64.idc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/parkerpeng/IDA-Script-for-android/7704bacf04f10e1af8fe8666c26d46bd25a14ddb/StaticFuncsIdentify64.idc -------------------------------------------------------------------------------- /jni.idc: -------------------------------------------------------------------------------- 1 | #define UNLOADED_FILE 1 2 | #include 3 | 4 | static main(void) 5 | { 6 | Enums(); // enumerations 7 | Structures(); // structure types 8 | LowVoids(0xFFC); 9 | HighVoids(0x5218); 10 | } 11 | 12 | //------------------------------------------------------------------------ 13 | // Information about enum types 14 | 15 | static Enums(void) { 16 | auto id; 17 | BeginTypeUpdating(UTP_ENUM); 18 | EndTypeUpdating(UTP_ENUM); 19 | } 20 | 21 | static Structures_0(id) { 22 | auto mid; 23 | 24 | id = AddStrucEx(-1,"JNINativeInterface",0); 25 | id = AddStrucEx(-1,"JNIInvokeInterface",0); 26 | 27 | id = GetStrucIdByName("JNINativeInterface"); 28 | 29 | /* 30 | long AddStrucMember( 31 | long id, 32 | string name, 33 | long offset, 34 | long flag, 35 | long typeid, 36 | long nbytes, 37 | long target, 38 | long tdelta, 39 | long reftype); 40 | */ 41 | mid = AddStrucMember(id,"reserved0", 0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 42 | mid = AddStrucMember(id,"reserved1", 0X4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 43 | mid = AddStrucMember(id,"reserved2", 0X8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 44 | mid = AddStrucMember(id,"reserved3", 0XC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 45 | mid = AddStrucMember(id,"GetVersion", 0X10, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 46 | mid = AddStrucMember(id,"DefineClass", 0X14, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 47 | mid = AddStrucMember(id,"FindClass", 0X18, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 48 | mid = AddStrucMember(id,"FromReflectedMethod", 0X1C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 49 | mid = AddStrucMember(id,"FromReflectedField", 0X20, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 50 | mid = AddStrucMember(id,"ToReflectedMethod", 0X24, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 51 | mid = AddStrucMember(id,"GetSuperclass", 0X28, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 52 | mid = AddStrucMember(id,"IsAssignableFrom", 0X2C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 53 | mid = AddStrucMember(id,"ToReflectedField", 0X30, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 54 | mid = AddStrucMember(id,"Throw", 0X34, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 55 | mid = AddStrucMember(id,"ThrowNew", 0X38, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 56 | mid = AddStrucMember(id,"ExceptionOccurred", 0X3C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 57 | mid = AddStrucMember(id,"ExceptionDescribe", 0X40, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 58 | mid = AddStrucMember(id,"ExceptionClear", 0X44, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 59 | mid = AddStrucMember(id,"FatalError", 0X48, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 60 | mid = AddStrucMember(id,"PushLocalFrame", 0X4C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 61 | mid = AddStrucMember(id,"PopLocalFrame", 0X50, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 62 | mid = AddStrucMember(id,"NewGlobalRef", 0X54, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 63 | mid = AddStrucMember(id,"DeleteGlobalRef", 0X58, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 64 | mid = AddStrucMember(id,"DeleteLocalRef", 0X5C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 65 | mid = AddStrucMember(id,"IsSameObject", 0X60, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 66 | mid = AddStrucMember(id,"NewLocalRef", 0X64, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 67 | mid = AddStrucMember(id,"EnsureLocalCapacity", 0X68, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 68 | mid = AddStrucMember(id,"AllocObject", 0X6C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 69 | mid = AddStrucMember(id,"NewObject", 0X70, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 70 | mid = AddStrucMember(id,"NewObjectV", 0X74, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 71 | mid = AddStrucMember(id,"NewObjectA", 0X78, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 72 | mid = AddStrucMember(id,"GetObjectClass", 0X7C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 73 | mid = AddStrucMember(id,"IsInstanceOf", 0X80, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 74 | mid = AddStrucMember(id,"GetMethodID", 0X84, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 75 | mid = AddStrucMember(id,"CallObjectMethod", 0X88, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 76 | mid = AddStrucMember(id,"CallObjectMethodV", 0X8C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 77 | mid = AddStrucMember(id,"CallObjectMethodA", 0X90, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 78 | mid = AddStrucMember(id,"CallBooleanMethod", 0X94, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 79 | mid = AddStrucMember(id,"CallBooleanMethodV", 0X98, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 80 | mid = AddStrucMember(id,"CallBooleanMethodA", 0X9C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 81 | mid = AddStrucMember(id,"CallByteMethod", 0XA0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 82 | mid = AddStrucMember(id,"CallByteMethodV", 0XA4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 83 | mid = AddStrucMember(id,"CallByteMethodA", 0XA8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 84 | mid = AddStrucMember(id,"CallCharMethod", 0XAC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 85 | mid = AddStrucMember(id,"CallCharMethodV", 0XB0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 86 | mid = AddStrucMember(id,"CallCharMethodA", 0XB4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 87 | mid = AddStrucMember(id,"CallShortMethod", 0XB8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 88 | mid = AddStrucMember(id,"CallShortMethodV", 0XBC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 89 | mid = AddStrucMember(id,"CallShortMethodA", 0XC0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 90 | mid = AddStrucMember(id,"CallIntMethod", 0XC4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 91 | mid = AddStrucMember(id,"CallIntMethodV", 0XC8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 92 | mid = AddStrucMember(id,"CallIntMethodA", 0XCC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 93 | mid = AddStrucMember(id,"CallLongMethod", 0XD0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 94 | mid = AddStrucMember(id,"CallLongMethodV", 0XD4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 95 | mid = AddStrucMember(id,"CallLongMethodA", 0XD8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 96 | mid = AddStrucMember(id,"CallFloatMethod", 0XDC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 97 | mid = AddStrucMember(id,"CallFloatMethodV", 0XE0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 98 | mid = AddStrucMember(id,"CallFloatMethodA", 0XE4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 99 | mid = AddStrucMember(id,"CallDoubleMethod", 0XE8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 100 | mid = AddStrucMember(id,"CallDoubleMethodV", 0XEC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 101 | mid = AddStrucMember(id,"CallDoubleMethodA", 0XF0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 102 | mid = AddStrucMember(id,"CallVoidMethod", 0XF4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 103 | mid = AddStrucMember(id,"CallVoidMethodV", 0XF8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 104 | mid = AddStrucMember(id,"CallVoidMethodA", 0XFC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 105 | mid = AddStrucMember(id,"CallNonvirtualObjectMethod", 0X100, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 106 | mid = AddStrucMember(id,"CallNonvirtualObjectMethodV", 0X104, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 107 | mid = AddStrucMember(id,"CallNonvirtualObjectMethodA", 0X108, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 108 | mid = AddStrucMember(id,"CallNonvirtualBooleanMethod", 0X10C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 109 | mid = AddStrucMember(id,"CallNonvirtualBooleanMethodV", 0X110, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 110 | mid = AddStrucMember(id,"CallNonvirtualBooleanMethodA", 0X114, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 111 | mid = AddStrucMember(id,"CallNonvirtualByteMethod", 0X118, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 112 | mid = AddStrucMember(id,"CallNonvirtualByteMethodV", 0X11C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 113 | mid = AddStrucMember(id,"CallNonvirtualByteMethodA", 0X120, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 114 | mid = AddStrucMember(id,"CallNonvirtualCharMethod", 0X124, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 115 | mid = AddStrucMember(id,"CallNonvirtualCharMethodV", 0X128, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 116 | mid = AddStrucMember(id,"CallNonvirtualCharMethodA", 0X12C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 117 | mid = AddStrucMember(id,"CallNonvirtualShortMethod", 0X130, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 118 | mid = AddStrucMember(id,"CallNonvirtualShortMethodV", 0X134, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 119 | mid = AddStrucMember(id,"CallNonvirtualShortMethodA", 0X138, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 120 | mid = AddStrucMember(id,"CallNonvirtualIntMethod", 0X13C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 121 | mid = AddStrucMember(id,"CallNonvirtualIntMethodV", 0X140, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 122 | mid = AddStrucMember(id,"CallNonvirtualIntMethodA", 0X144, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 123 | mid = AddStrucMember(id,"CallNonvirtualLongMethod", 0X148, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 124 | mid = AddStrucMember(id,"CallNonvirtualLongMethodV", 0X14C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 125 | mid = AddStrucMember(id,"CallNonvirtualLongMethodA", 0X150, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 126 | mid = AddStrucMember(id,"CallNonvirtualFloatMethod", 0X154, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 127 | mid = AddStrucMember(id,"CallNonvirtualFloatMethodV", 0X158, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 128 | mid = AddStrucMember(id,"CallNonvirtualFloatMethodA", 0X15C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 129 | mid = AddStrucMember(id,"CallNonvirtualDoubleMethod", 0X160, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 130 | mid = AddStrucMember(id,"CallNonvirtualDoubleMethodV", 0X164, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 131 | mid = AddStrucMember(id,"CallNonvirtualDoubleMethodA", 0X168, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 132 | mid = AddStrucMember(id,"CallNonvirtualVoidMethod", 0X16C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 133 | mid = AddStrucMember(id,"CallNonvirtualVoidMethodV", 0X170, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 134 | mid = AddStrucMember(id,"CallNonvirtualVoidMethodA", 0X174, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 135 | mid = AddStrucMember(id,"GetFieldID", 0X178, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 136 | mid = AddStrucMember(id,"GetObjectField", 0X17C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 137 | mid = AddStrucMember(id,"GetBooleanField", 0X180, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 138 | mid = AddStrucMember(id,"GetByteField", 0X184, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 139 | mid = AddStrucMember(id,"GetCharField", 0X188, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 140 | mid = AddStrucMember(id,"GetShortField", 0X18C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 141 | mid = AddStrucMember(id,"GetIntField", 0X190, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 142 | mid = AddStrucMember(id,"GetLongField", 0X194, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 143 | mid = AddStrucMember(id,"GetFloatField", 0X198, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 144 | mid = AddStrucMember(id,"GetDoubleField", 0X19C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 145 | mid = AddStrucMember(id,"SetObjectField", 0X1A0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 146 | mid = AddStrucMember(id,"SetBooleanField", 0X1A4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 147 | mid = AddStrucMember(id,"SetByteField", 0X1A8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 148 | mid = AddStrucMember(id,"SetCharField", 0X1AC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 149 | mid = AddStrucMember(id,"SetShortField", 0X1B0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 150 | mid = AddStrucMember(id,"SetIntField", 0X1B4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 151 | mid = AddStrucMember(id,"SetLongField", 0X1B8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 152 | mid = AddStrucMember(id,"SetFloatField", 0X1BC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 153 | mid = AddStrucMember(id,"SetDoubleField", 0X1C0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 154 | mid = AddStrucMember(id,"GetStaticMethodID", 0X1C4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 155 | mid = AddStrucMember(id,"CallStaticObjectMethod", 0X1C8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 156 | mid = AddStrucMember(id,"CallStaticObjectMethodV", 0X1CC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 157 | mid = AddStrucMember(id,"CallStaticObjectMethodA", 0X1D0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 158 | mid = AddStrucMember(id,"CallStaticBooleanMethod", 0X1D4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 159 | mid = AddStrucMember(id,"CallStaticBooleanMethodV", 0X1D8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 160 | mid = AddStrucMember(id,"CallStaticBooleanMethodA", 0X1DC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 161 | mid = AddStrucMember(id,"CallStaticByteMethod", 0X1E0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 162 | mid = AddStrucMember(id,"CallStaticByteMethodV", 0X1E4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 163 | mid = AddStrucMember(id,"CallStaticByteMethodA", 0X1E8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 164 | mid = AddStrucMember(id,"CallStaticCharMethod", 0X1EC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 165 | mid = AddStrucMember(id,"CallStaticCharMethodV", 0X1F0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 166 | mid = AddStrucMember(id,"CallStaticCharMethodA", 0X1F4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 167 | mid = AddStrucMember(id,"CallStaticShortMethod", 0X1F8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 168 | mid = AddStrucMember(id,"CallStaticShortMethodV", 0X1FC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 169 | mid = AddStrucMember(id,"CallStaticShortMethodA", 0X200, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 170 | mid = AddStrucMember(id,"CallStaticIntMethod", 0X204, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 171 | mid = AddStrucMember(id,"CallStaticIntMethodV", 0X208, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 172 | mid = AddStrucMember(id,"CallStaticIntMethodA", 0X20C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 173 | mid = AddStrucMember(id,"CallStaticLongMethod", 0X210, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 174 | mid = AddStrucMember(id,"CallStaticLongMethodV", 0X214, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 175 | mid = AddStrucMember(id,"CallStaticLongMethodA", 0X218, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 176 | mid = AddStrucMember(id,"CallStaticFloatMethod", 0X21C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 177 | mid = AddStrucMember(id,"CallStaticFloatMethodV", 0X220, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 178 | mid = AddStrucMember(id,"CallStaticFloatMethodA", 0X224, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 179 | mid = AddStrucMember(id,"CallStaticDoubleMethod", 0X228, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 180 | mid = AddStrucMember(id,"CallStaticDoubleMethodV", 0X22C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 181 | mid = AddStrucMember(id,"CallStaticDoubleMethodA", 0X230, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 182 | mid = AddStrucMember(id,"CallStaticVoidMethod", 0X234, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 183 | mid = AddStrucMember(id,"CallStaticVoidMethodV", 0X238, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 184 | mid = AddStrucMember(id,"CallStaticVoidMethodA", 0X23C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 185 | mid = AddStrucMember(id,"GetStaticFieldID", 0X240, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 186 | mid = AddStrucMember(id,"GetStaticObjectField", 0X244, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 187 | mid = AddStrucMember(id,"GetStaticBooleanField", 0X248, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 188 | mid = AddStrucMember(id,"GetStaticByteField", 0X24C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 189 | mid = AddStrucMember(id,"GetStaticCharField", 0X250, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 190 | mid = AddStrucMember(id,"GetStaticShortField", 0X254, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 191 | mid = AddStrucMember(id,"GetStaticIntField", 0X258, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 192 | mid = AddStrucMember(id,"GetStaticLongField", 0X25C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 193 | mid = AddStrucMember(id,"GetStaticFloatField", 0X260, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 194 | mid = AddStrucMember(id,"GetStaticDoubleField", 0X264, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 195 | mid = AddStrucMember(id,"SetStaticObjectField", 0X268, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 196 | mid = AddStrucMember(id,"SetStaticBooleanField", 0X26C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 197 | mid = AddStrucMember(id,"SetStaticByteField", 0X270, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 198 | mid = AddStrucMember(id,"SetStaticCharField", 0X274, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 199 | mid = AddStrucMember(id,"SetStaticShortField", 0X278, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 200 | mid = AddStrucMember(id,"SetStaticIntField", 0X27C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 201 | mid = AddStrucMember(id,"SetStaticLongField", 0X280, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 202 | mid = AddStrucMember(id,"SetStaticFloatField", 0X284, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 203 | mid = AddStrucMember(id,"SetStaticDoubleField", 0X288, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 204 | mid = AddStrucMember(id,"NewString", 0X28C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 205 | mid = AddStrucMember(id,"GetStringLength", 0X290, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 206 | mid = AddStrucMember(id,"GetStringChars", 0X294, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 207 | mid = AddStrucMember(id,"ReleaseStringChars", 0X298, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 208 | mid = AddStrucMember(id,"NewStringUTF", 0X29C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 209 | mid = AddStrucMember(id,"GetStringUTFLength", 0X2A0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 210 | mid = AddStrucMember(id,"GetStringUTFChars", 0X2A4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 211 | mid = AddStrucMember(id,"ReleaseStringUTFChars", 0X2A8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 212 | mid = AddStrucMember(id,"GetArrayLength", 0X2AC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 213 | mid = AddStrucMember(id,"NewObjectArray", 0X2B0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 214 | mid = AddStrucMember(id,"GetObjectArrayElement", 0X2B4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 215 | mid = AddStrucMember(id,"SetObjectArrayElement", 0X2B8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 216 | mid = AddStrucMember(id,"NewBooleanArray", 0X2BC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 217 | mid = AddStrucMember(id,"NewByteArray", 0X2C0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 218 | mid = AddStrucMember(id,"NewCharArray", 0X2C4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 219 | mid = AddStrucMember(id,"NewShortArray", 0X2C8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 220 | mid = AddStrucMember(id,"NewIntArray", 0X2CC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 221 | mid = AddStrucMember(id,"NewLongArray", 0X2D0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 222 | mid = AddStrucMember(id,"NewFloatArray", 0X2D4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 223 | mid = AddStrucMember(id,"NewDoubleArray", 0X2D8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 224 | mid = AddStrucMember(id,"GetBooleanArrayElements", 0X2DC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 225 | mid = AddStrucMember(id,"GetByteArrayElements", 0X2E0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 226 | mid = AddStrucMember(id,"GetCharArrayElements", 0X2E4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 227 | mid = AddStrucMember(id,"GetShortArrayElements", 0X2E8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 228 | mid = AddStrucMember(id,"GetIntArrayElements", 0X2EC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 229 | mid = AddStrucMember(id,"GetLongArrayElements", 0X2F0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 230 | mid = AddStrucMember(id,"GetFloatArrayElements", 0X2F4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 231 | mid = AddStrucMember(id,"GetDoubleArrayElements", 0X2F8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 232 | mid = AddStrucMember(id,"ReleaseBooleanArrayElements", 0X2FC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 233 | mid = AddStrucMember(id,"ReleaseByteArrayElements", 0X300, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 234 | mid = AddStrucMember(id,"ReleaseCharArrayElements", 0X304, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 235 | mid = AddStrucMember(id,"ReleaseShortArrayElements", 0X308, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 236 | mid = AddStrucMember(id,"ReleaseIntArrayElements", 0X30C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 237 | mid = AddStrucMember(id,"ReleaseLongArrayElements", 0X310, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 238 | mid = AddStrucMember(id,"ReleaseFloatArrayElements", 0X314, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 239 | mid = AddStrucMember(id,"ReleaseDoubleArrayElements", 0X318, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 240 | mid = AddStrucMember(id,"GetBooleanArrayRegion", 0X31C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 241 | mid = AddStrucMember(id,"GetByteArrayRegion", 0X320, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 242 | mid = AddStrucMember(id,"GetCharArrayRegion", 0X324, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 243 | mid = AddStrucMember(id,"GetShortArrayRegion", 0X328, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 244 | mid = AddStrucMember(id,"GetIntArrayRegion", 0X32C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 245 | mid = AddStrucMember(id,"GetLongArrayRegion", 0X330, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 246 | mid = AddStrucMember(id,"GetFloatArrayRegion", 0X334, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 247 | mid = AddStrucMember(id,"GetDoubleArrayRegion", 0X338, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 248 | mid = AddStrucMember(id,"SetBooleanArrayRegion", 0X33C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 249 | mid = AddStrucMember(id,"SetByteArrayRegion", 0X340, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 250 | mid = AddStrucMember(id,"SetCharArrayRegion", 0X344, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 251 | mid = AddStrucMember(id,"SetShortArrayRegion", 0X348, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 252 | mid = AddStrucMember(id,"SetIntArrayRegion", 0X34C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 253 | mid = AddStrucMember(id,"SetLongArrayRegion", 0X350, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 254 | mid = AddStrucMember(id,"SetFloatArrayRegion", 0X354, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 255 | mid = AddStrucMember(id,"SetDoubleArrayRegion", 0X358, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 256 | mid = AddStrucMember(id,"RegisterNatives", 0X35C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 257 | mid = AddStrucMember(id,"UnregisterNatives", 0X360, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 258 | mid = AddStrucMember(id,"MonitorEnter", 0X364, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 259 | mid = AddStrucMember(id,"MonitorExit", 0X368, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 260 | mid = AddStrucMember(id,"GetJavaVM", 0X36C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 261 | mid = AddStrucMember(id,"GetStringRegion", 0X370, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 262 | mid = AddStrucMember(id,"GetStringUTFRegion", 0X374, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 263 | mid = AddStrucMember(id,"GetPrimitiveArrayCritical", 0X378, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 264 | mid = AddStrucMember(id,"ReleasePrimitiveArrayCritical",0X37C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 265 | mid = AddStrucMember(id,"GetStringCritical", 0X380, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 266 | mid = AddStrucMember(id,"ReleaseStringCritical", 0X384, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 267 | mid = AddStrucMember(id,"NewWeakGlobalRef", 0X388, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 268 | mid = AddStrucMember(id,"DeleteWeakGlobalRef", 0X38C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 269 | mid = AddStrucMember(id,"ExceptionCheck", 0X390, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 270 | mid = AddStrucMember(id,"NewDirectByteBuffer", 0X394, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 271 | mid = AddStrucMember(id,"GetDirectBufferAddress", 0X398, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 272 | mid = AddStrucMember(id,"GetDirectBufferCapacity", 0X39C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 273 | 274 | id = GetStrucIdByName("JNIInvokeInterface"); 275 | mid = AddStrucMember(id,"reserved0", 0, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 276 | mid = AddStrucMember(id,"reserved1", 0X4, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 277 | mid = AddStrucMember(id,"reserved2", 0X8, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 278 | mid = AddStrucMember(id,"DestroyJavaVM", 0XC, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 279 | mid = AddStrucMember(id,"AttachCurrentThread", 0X10, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 280 | mid = AddStrucMember(id,"DetachCurrentThread", 0X14, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 281 | mid = AddStrucMember(id,"GetEnv", 0X18, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 282 | mid = AddStrucMember(id,"AttachCurrentThreadAsDaemon", 0X1C, 0x25500400, 0XFFFFFFFF, 4, 0XFFFFFFFF, 0, 0x000002); 283 | return id; 284 | } 285 | 286 | //------------------------------------------------------------------------ 287 | // Information about structure types 288 | 289 | static Structures(void) { 290 | auto id; 291 | BeginTypeUpdating(UTP_STRUCT); 292 | id = Structures_0(id); 293 | EndTypeUpdating(UTP_STRUCT); 294 | } 295 | 296 | // End of file. 297 | --------------------------------------------------------------------------------