frida-java-bridge 7.0.6 → 7.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/android.js +10 -10
- package/package.json +1 -1
package/lib/android.js
CHANGED
|
@@ -967,14 +967,14 @@ export function getArtClassSpec (vm) {
|
|
|
967
967
|
const fInfo = {
|
|
968
968
|
artArrayLengthSize: 4,
|
|
969
969
|
artArrayEntrySize: fieldSpec.size,
|
|
970
|
-
// java/
|
|
971
|
-
artArrayMax:
|
|
970
|
+
// java/lang/Thread has 36 fields on Android 16.
|
|
971
|
+
artArrayMax: 50
|
|
972
972
|
};
|
|
973
973
|
|
|
974
974
|
const mInfo = {
|
|
975
975
|
artArrayLengthSize: pointerSize,
|
|
976
976
|
artArrayEntrySize: methodSpec.size,
|
|
977
|
-
// java/
|
|
977
|
+
// java/lang/Thread has 79 methods on Android 16.
|
|
978
978
|
artArrayMax: 100
|
|
979
979
|
};
|
|
980
980
|
|
|
@@ -1015,7 +1015,7 @@ export function getArtClassSpec (vm) {
|
|
|
1015
1015
|
return false;
|
|
1016
1016
|
};
|
|
1017
1017
|
|
|
1018
|
-
const clazz = env.findClass('java/
|
|
1018
|
+
const clazz = env.findClass('java/lang/Thread');
|
|
1019
1019
|
const clazzRef = env.newGlobalRef(clazz);
|
|
1020
1020
|
|
|
1021
1021
|
try {
|
|
@@ -1024,8 +1024,8 @@ export function getArtClassSpec (vm) {
|
|
|
1024
1024
|
object = getApi()['art::JavaVMExt::DecodeGlobal'](vm, thread, clazzRef);
|
|
1025
1025
|
});
|
|
1026
1026
|
|
|
1027
|
-
const fieldInstance = env.getFieldId(clazzRef, '
|
|
1028
|
-
const fieldStatic = env.getStaticFieldId(clazzRef, '
|
|
1027
|
+
const fieldInstance = env.getFieldId(clazzRef, 'name', 'Ljava/lang/String;');
|
|
1028
|
+
const fieldStatic = env.getStaticFieldId(clazzRef, 'MAX_PRIORITY', 'I');
|
|
1029
1029
|
|
|
1030
1030
|
let offsetStatic = -1;
|
|
1031
1031
|
let offsetInstance = -1;
|
|
@@ -1038,20 +1038,20 @@ export function getArtClassSpec (vm) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
if (offsetInstance === -1 || offsetStatic === -1) {
|
|
1041
|
-
throw new Error('Unable to find fields in java/
|
|
1041
|
+
throw new Error('Unable to find fields in java/lang/Thread; please file a bug');
|
|
1042
1042
|
}
|
|
1043
1043
|
const sfieldOffset = (offsetInstance !== offsetStatic) ? offsetStatic : 0;
|
|
1044
1044
|
const ifieldOffset = offsetInstance;
|
|
1045
1045
|
|
|
1046
1046
|
let offsetMethods = -1;
|
|
1047
|
-
const methodInstance = env.getMethodId(clazzRef, '
|
|
1047
|
+
const methodInstance = env.getMethodId(clazzRef, 'getName', '()Ljava/lang/String;');
|
|
1048
1048
|
for (let offset = 0; offset !== MAX_OFFSET; offset += 4) {
|
|
1049
1049
|
if (offsetMethods === -1 && hasEntry(object, offset, methodInstance, mInfo)) {
|
|
1050
1050
|
offsetMethods = offset;
|
|
1051
1051
|
}
|
|
1052
1052
|
}
|
|
1053
1053
|
if (offsetMethods === -1) {
|
|
1054
|
-
throw new Error('Unable to find methods in java/
|
|
1054
|
+
throw new Error('Unable to find methods in java/lang/Thread; please file a bug');
|
|
1055
1055
|
}
|
|
1056
1056
|
|
|
1057
1057
|
let offsetCopiedMethods = -1;
|
|
@@ -1064,7 +1064,7 @@ export function getArtClassSpec (vm) {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
if (offsetCopiedMethods === -1) {
|
|
1067
|
-
throw new Error('Unable to find copied methods in java/
|
|
1067
|
+
throw new Error('Unable to find copied methods in java/lang/Thread; please file a bug');
|
|
1068
1068
|
}
|
|
1069
1069
|
|
|
1070
1070
|
spec = {
|