mirror of
https://github.com/QM4RS/FridaBox.git
synced 2026-09-14 05:02:07 +02:00
Integrate Frida Gadget into BlackBox guest startup, add the host workflow and controller tooling, and validate the complete sample hook flow on ARM64 Android 16.
29 lines
814 B
JavaScript
29 lines
814 B
JavaScript
'use strict';
|
|
|
|
import Java from 'frida-java-bridge';
|
|
|
|
Java.performNow(function () {
|
|
try {
|
|
const name = 'top.niunaijun.blackbox.instrumentation.GuestRuntimeRegistry';
|
|
let Registry = null;
|
|
try {
|
|
Registry = Java.use(name);
|
|
} catch (_) {
|
|
Java.enumerateClassLoaders({
|
|
onMatch(loader) {
|
|
if (Registry !== null) return;
|
|
try {
|
|
loader.loadClass(name);
|
|
Registry = Java.ClassFactory.get(loader).use(name);
|
|
} catch (_) {}
|
|
},
|
|
onComplete() {}
|
|
});
|
|
}
|
|
if (Registry === null) throw new Error('GuestRuntimeRegistry ClassLoader was not found');
|
|
send({kind: 'fridabox-registry', value: Registry.describe()});
|
|
} catch (error) {
|
|
send({kind: 'fridabox-error', value: String(error.stack || error)});
|
|
}
|
|
});
|