Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

285 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—ฟ rosetta-frida

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.

CI Docs License

What it is

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.

Usage

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.

Install

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-frida
import { 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 build

See the installation guide for requirements and details.

Documentation

Full docs are published to GitHub Pages (source under docs/):

License

MIT

About

A tool and library which instruments your Frida scripts to work seamlessly with any app version. ๐Ÿ” 

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages