The application freezes after replacing the method implementation
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from frida/frida-java-bridge
-
Types is missing `deoptimizeMethod`Possibly taken @Electric1447 claimed this 170 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 65/100
frida/frida-java-bridge#386 ·
-
[v7.0.11+] Process crash on accessing object["<init>"] with JVMTI availablePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
frida/frida-java-bridge#384 · 2 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
frida/frida-java-bridge#409 ·
-
ensureClassInitialized() no longer initializes on ART since 7983e815 — hooks on uninitialized classes install successfully but never dispatchPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
frida/frida-java-bridge#408 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
frida/frida-java-bridge#404 ·
All issues in frida/frida-java-bridge
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
app bug config windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openai/codex#51926 · 2 comments ·
Maintainers usually reply within 1 day
-
clawsweeper:needs-product-decision clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
openclaw/openclaw#166870 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
⚠ needs intervention document structure changed
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
[Package] Widget primitives [Type] Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
WordPress/gutenberg#84204 · 1 comment ·
Maintainers usually reply within 1 day