frida-gum | platform instrumentation and introspection library | iOS library
kandi X-RAY | frida-gum Summary
kandi X-RAY | frida-gum Summary
Cross-platform instrumentation and introspection library written in C
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of frida-gum
frida-gum Key Features
frida-gum Examples and Code Snippets
Community Discussions
Trending Discussions on frida-gum
QUESTION
I want to change behaviour of onClick method by hooking with frida. The code I used is
...ANSWER
Answered 2020-Feb-15 at 12:56You are trying to hook the wrong class - most likely because you are using Jadx for decompiling the wrong settings and no knowledge on Java classes.
If you are using Jadx for decompiling the APK file make sure to disable the setting Inline anonymous classes to see the real class name a method belongs to.
The Method onClick()
belongs to the anonymous inner class created by new DialogInterface.OnClickListener()
and not to sg.vantagepoint.uncrackable1.MainActivity
- hence you are trying to hook the wrong class. The method a(String)
it is used in is totally irrelevant for hooking. Anonymous inner classes have their own class name based on the outer class appended by $
and a number.
Therefore the correct class name may be sg.vantagepoint.uncrackable1.MainActivity$1
or sg.vantagepoint.uncrackable1.MainActivity$2
, depending on how many other anonymous inner classes are present.
Additionally something like mClass.a.onClick
is not possible, as there is no method inside a method (a
is a method and onClick
is a method).
In the end you may end up with the following frida code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install frida-gum
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page