From 258d1c225bf4f08a4b8ec92591a193fe1e458e86 Mon Sep 17 00:00:00 2001 From: Mathis Hesse Date: Wed, 2 Nov 2022 13:54:36 +0100 Subject: [PATCH 1/3] Change callMethodName of constructors in Frida action --- jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java b/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java index 6bfd6705152..6686978886b 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java @@ -79,12 +79,11 @@ private String generateMethodSnippet(JMethod jMth) { JavaMethod javaMethod = jMth.getJavaMethod(); MethodInfo methodInfo = javaMethod.getMethodNode().getMethodInfo(); String methodName = StringEscapeUtils.escapeEcmaScript(methodInfo.getName()); - String callMethodName = methodName; - + if (methodInfo.isConstructor()) { methodName = "$init"; - callMethodName = "$new"; } + String callMethodName = methodName; String shortClassName = javaMethod.getDeclaringClass().getName(); String functionUntilImplementation; From f97e220ce558afc0fd3125c4199dc6c9a2b77871 Mon Sep 17 00:00:00 2001 From: Mathis Hesse Date: Wed, 2 Nov 2022 14:11:51 +0100 Subject: [PATCH 2/3] Fix format violation in FridaAction --- jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java b/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java index 6686978886b..ee7cd36c30e 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java @@ -83,6 +83,7 @@ private String generateMethodSnippet(JMethod jMth) { if (methodInfo.isConstructor()) { methodName = "$init"; } + String callMethodName = methodName; String shortClassName = javaMethod.getDeclaringClass().getName(); From 4c51dadf4a12993e7f01461f15c20a7b889916df Mon Sep 17 00:00:00 2001 From: Mathis Hesse Date: Wed, 2 Nov 2022 14:22:38 +0100 Subject: [PATCH 3/3] Fix format violation in FridaAction --- jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java b/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java index ee7cd36c30e..79808f4079f 100644 --- a/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java +++ b/jadx-gui/src/main/java/jadx/gui/ui/codearea/FridaAction.java @@ -79,11 +79,11 @@ private String generateMethodSnippet(JMethod jMth) { JavaMethod javaMethod = jMth.getJavaMethod(); MethodInfo methodInfo = javaMethod.getMethodNode().getMethodInfo(); String methodName = StringEscapeUtils.escapeEcmaScript(methodInfo.getName()); - + if (methodInfo.isConstructor()) { methodName = "$init"; } - + String callMethodName = methodName; String shortClassName = javaMethod.getDeclaringClass().getName();