I'm a beginner with Frida. When I first started using Frida, I encountered an error.
Android version: 11 frida-server version: 17.0.7
└─$ pip list | grep frida
frida 17.0.7
frida-tools 14.0.2
The js files used are as follows:
console.log("frida agent started");
try {
console.log("Process.arch = " + Process.arch);
} catch (e) {
console.log("Process.arch unknown: " + e);
}
console.log("typeof Java = " + typeof Java);
setImmediate(function () {
try {
if (typeof Java !== "undefined" && Java.available) {
console.log("Java.available = true");
Java.perform(function () {
try {
console.log(
"Java.perform OK. Runtime: " + Java.vm.getEnv().getClass()
);
} catch (e) {
console.log("Java.perform inner error: " + e);
}
});
} else {
console.log(
"Java.available = false (no Java VM exposed to this process)"
);
}
} catch (e) {
console.log("probe setImmediate error: " + e);
}
});
Display information:
. . . . Connected to 192.138.101.160:27042 ([email protected]:27042)
Attaching...
frida agent started
Process.arch = arm typeof Java = object Java.available = true
probe setImmediate error: TypeError: cannot set property '_code' of null Error: invalid instruction at value (/frida/runtime/core.js:457) at arm (/frida/bridges/java.js:1) at <anonymous> (/frida/bridges/java.js:1) at _patchCode (native) at value (/frida/runtime/core.js:183) at Ot (/frida/bridges/java.js:1) at <anonymous> (/frida/bridges/java.js:1) at <anonymous> (/frida/bridges/java.js:1) at Ye (/frida/bridges/java.js:1) at <anonymous> (/frida/bridges/java.js:1) at build (/frida/bridges/java.js:1) at _make (/frida/bridges/java.js:8) at use (/frida/bridges/java.js:8) at <anonymous> (/frida/bridges/java.js:8) at <anonymous> (/frida/bridges/java.js:1)
at _performPendingVmOpsWhenReady (/frida/bridges/java.js:8)
at perform (/frida/bridges/java.js:8)
at <anonymous> (/root/frida/hello.js:20) at apply (native)
at <anonymous> (/frida/runtime/core.js:55)
Regarding the version correspondence aspect, I have made the corresponding arrangements according to the following GitHub repository.
https://github.com/thelicato/frida-compatibility-matrix
How should I solve this error?
14.2.18, but this error still occurred. I don't know how to match it with the Android version. Is there a table for the correspondence?setImmediateinstead of directly writing it into the script?