- Set up a local clone of frida-java-bridge:
$ git clone https://github.com/frida/frida-java-bridge.git
$ cd frida-java-bridge
$ npm install
$ npm link
- Make a directory someplace outside frida-java-bridge and save the two
attached files as
package.json
andagent/index.js
:
$ mkdir frida-java-playground
$ cd frida-java-playground
$ # create the two files
$ npm install
$ npm link frida-java-bridge
- Run this in a separate terminal to continuously recompile the code:
$ npm run watch
- Load the generated
_agent.js
using the Frida REPL:
$ frida -U com.google.android.apps.maps --runtime=v8 -l _agent.js
Enter run()
in the REPL to call the function defined in agent/index.js
.
It is recommended to put your code in a function as exceptions thrown during
script load might get swallowed by the REPL (something that should be fixed
in the REPL).
- Edit your local
frida-java-bridge
and have fun!
Note you need to install
frida-compile
for that:https://github.com/frida/frida-compile