Frida 17 JavaScript API compatibility checker and fixer. Use when writing, reviewing, or fixing Frida scripts, especially when migrating from older Frida versions. Detects deprecated APIs removed in Frida 17 (May 2025) and provides correct replacements. Covers Module, Memory, Process APIs and common naming conflicts.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Frida 17 JavaScript API compatibility checker and fixer. Use when writing, reviewing, or fixing Frida scripts, especially when migrating from older Frida versions. Detects deprecated APIs removed in Frida 17 (May 2025) and provides correct replacements. Covers Module, Memory, Process APIs and common naming conflicts.
Frida 17 Scripting Guide
This skill helps write and fix Frida scripts compatible with Frida 17.0.0 (released May 2025).
Breaking Changes in Frida 17
1. Static Module Methods - REMOVED
// OLD - No longer works in Frida 17Module.findBaseAddress('libriver.so')
Module.getBaseAddress('libriver.so')
Module.findExportByName(null, 'open')
Module.findExportByName('libc.so', 'open')
Module.getExportByName(null, 'open')
Module.ensureInitialized('libc.so')
Module.enumerateExports('libc.so')
Module.enumerateSymbols('libc.so')
// NEW - Use Process and instance methods insteadvar lib = Process.findModuleByName('libriver.so'); // returns Module or nullvar lib = Process.getModuleByName('libriver.so'); // throws if not found
lib.base// module base address
lib.findExportByName('open') // returns address or null
lib.getExportByName('open') // throws if not found
lib.enumerateExports() // returns array
lib.enumerateSymbols() // returns array
2. Static Memory Methods - REMOVED
// OLD - No longer worksMemory.readU32(ptr)
Memory.writeU32(ptr, value)
// NEW - Use NativePointer instance methods
ptr.readU32()
ptr.writeU32(value)
3. Legacy Enumeration APIs - REMOVED
// OLD - Callback style removedProcess.enumerateModules({ onMatch: fn, onComplete: fn })
Process.enumerateModulesSync()
// NEW - Returns array directlyProcess.enumerateModules()
4. Reserved Function Names - DO NOT OVERRIDE
The following are built-in Frida functions. Defining custom functions with these names causes:
TypeError: cannot define variable 'hexdump'
Reserved names:
hexdump - Use dumpHex instead for custom hex dump functions
ptr - pointer constructor shorthand
NULL - null pointer constant
// BAD - conflicts with built-infunctionhexdump(ptr, len) { ... }
// GOOD - use different namefunctiondumpHex(ptr, len) { ... }
NativePointer Methods (Valid in Frida 17)
Conversion:
toInt32() - cast to signed 32-bit integer
toNumber() - convert to JavaScript number
toString([radix]) - convert to string
NOT available:
toUInt32() - DOES NOT EXIST, use toInt32() for sizes < 2^31
Memory reading:
readU8(), readS8(), readU16(), readS16()
readU32(), readS32(), readU64(), readS64()
readByteArray(length) - returns ArrayBuffer
readPointer(), readCString(), readUtf8String()
Memory writing:
writeU8(value), writeS8(value), etc.
writeByteArray(bytes) - bytes must be ArrayBuffer or JS array
writePointer(ptr), writeUtf8String(str)
Pointer arithmetic:
add(rhs), sub(rhs), and(rhs), or(rhs), xor(rhs)
shr(n), shl(n), not()
isNull(), equals(rhs), compare(rhs)
Java Bridge API (Unchanged in Frida 17)
Java.perform(function() {
varMyClass = Java.use('com.example.MyClass');
// Hook with overloadMyClass.myMethod.overload('int', 'java.lang.String').implementation = function(a, b) {
console.log('Called with: ' + a + ', ' + b);
// Call originalreturnthis.myMethod.overload('int', 'java.lang.String').call(this, a, b);
};
// Hook all overloadsMyClass.myMethod.overloads.forEach(function(overload) {
overload.implementation = function() {
return overload.apply(this, arguments);
};
});
});
Java byte[] handling:
Java byte arrays cannot be passed directly to Memory.alloc().writeByteArray().
Convert manually:
// BAD - throws "expected a buffer-like object"var hex = dumpHex(Memory.alloc(javaByteArray.length).writeByteArray(javaByteArray), len);
// GOOD - iterate and convertvar hex = "";
for (var i = 0; i < javaByteArray.length; i++) {
hex += ("0" + (javaByteArray[i] & 0xff).toString(16)).slice(-2);
}
Common Patterns for Frida 17
Waiting for a library to load
functionwaitForLibrary(libName, callback) {
var lib = Process.findModuleByName(libName);
if (lib) {
callback(lib.base);
return;
}
var pollInterval = setInterval(function() {
var lib = Process.findModuleByName(libName);
if (lib) {
clearInterval(pollInterval);
callback(lib.base);
}
}, 500);
}
Hooking libc functions
var libc = Process.findModuleByName('libc.so');
var open = libc ? libc.findExportByName('open') : null;
if (open) {
Interceptor.attach(open, {
onEnter: function(args) {
console.log('open(' + args[0].readCString() + ')');
}
});
}
Custom hex dump function
functiondumpHex(ptr, len) {
if (!ptr || ptr.isNull()) return'null';
try {
var bytes = ptr.readByteArray(len);
if (!bytes) return'null';
var arr = newUint8Array(bytes);
var hex = '';
for (var i = 0; i < arr.length; i++) {
hex += ('0' + arr[i].toString(16)).slice(-2);
}
return hex;
} catch (e) {
return'error: ' + e;
}
}