Write Frida hooks against real Java class and method names โ a per-version translation layer handles the obfuscated names that actually exist at runtime. Write once, hook many versions.
Every minor release of a large obfuscated Android app rotates the class and method names that Frida hooks reference, so a hook that worked yesterday breaks today. rosetta-frida decouples what you want to hook (the real name) from how it is spelled today (the obfuscated name) by loading a per-version JSON map at attach time. You write one hook against real names; ship a new map per release, and the same script keeps working โ no static-analysis-and-repatch cycle every version.
import { rosetta } from 'rosetta-frida';
import map from './maps/com.example.app/30405.json' with { type: 'json' };
Java.perform(() => {
rosetta.session({ map });
rosetta.hook('com.example.app.IRemoteService$Stub.requestTicket', function (bundle, callback) {
console.log('requestTicket:', bundle.keySet());
return rosetta.proceed(bundle, callback);
});
});Same source, any version that has a map. The rotation problem disappears. Full walkthrough in the quick start.
Availability: the npm package lands with the first tagged release (
v*). Until then, build from source (below) โ that is the working path today.
Once the first release is published (publishing is tag-driven: a
v* version tag triggers the release workflow, which rebuilds, re-runs
the 100% coverage gate, and publishes with npm provenance โ so a release
can only ship a green build), install it from npm:
npm install rosetta-fridaimport { rosetta } from 'rosetta-frida';This gives you the runtime library and the rosetta CLI (run it with
npx rosetta <command>).
Today, build from source:
git clone https://github.com/Xiddoc/rosetta-frida
cd rosetta-frida
npm install
npm run buildSee the installation guide for requirements and details.
Full docs are published to GitHub Pages
(source under docs/):
- Getting started โ install, quick start, concepts
- API reference โ the three-tier hook API + session
- Map format & authoring โ schema 3,
version_code, authoring - CLI reference โ
init,pull,validate,convert,patch,extract,inspect - Recipes โ common hook patterns
- Design and Roadmap โ architecture and what's next
- Contributing โ dev setup, the verify pipeline, conventions