Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

The application freezes after replacing the method implementation

Open
#321 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, javascript
Domain
devtools

Research direction

Start with the provided Java.perform hook for java.lang.StringBuilder.$init and reproduce the freeze using Java 17.0.11 and Frida 16.2.5. Investigate the constructor replacement and its call to this.ctor(arg); done means the application no longer freezes and the constructor argument is logged.

Written by the indexing model from the issue text.

Description

I'm trying to replace the StringBuilder constructor implementation in a desktop Java application, but it freezes immediately.

$ java --version
java 17.0.11 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 17.0.11+7-LTS-207)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.11+7-LTS-207, mixed mode, sharing)
$ frida --version
16.2.5

Script

Java.perform(() => {
    
    const StringBuilder = Java.use('java.lang.StringBuilder');
    // We need to replace .$init() instead of .$new(), since .$new() = .alloc() + .init()
    const ctor = StringBuilder.$init.overload('java.lang.String');
    ctor.implementation = function (arg) {
        console.log(arg); return this.ctor(arg);
    };
    console.log('[+] new StringBuilder(java.lang.String) hooked');
});
Dominant language
JavaScript
Stars
413
Forks
173
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from frida/frida-java-bridge

All issues in frida/frida-java-bridge

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.