HookLib | functions interception library written on pure C | User Interface library
kandi X-RAY | HookLib Summary
kandi X-RAY | HookLib Summary
HookLib is a C library typically used in User Interface applications. HookLib has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.
The functions interception library written on pure C and NativeAPI with UserMode and KernelMode support
The functions interception library written on pure C and NativeAPI with UserMode and KernelMode support
Support
Quality
Security
License
Reuse
Support
HookLib has a low active ecosystem.
It has 589 star(s) with 138 fork(s). There are 21 watchers for this library.
It had no major release in the last 6 months.
There are 0 open issues and 15 have been closed. On average issues are closed in 113 days. There are 2 open pull requests and 0 closed requests.
It has a neutral sentiment in the developer community.
The latest version of HookLib is current.
Quality
HookLib has 0 bugs and 0 code smells.
Security
HookLib has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
HookLib code analysis shows 0 unresolved vulnerabilities.
There are 0 security hotspots that need review.
License
HookLib is licensed under the MIT License. This license is Permissive.
Permissive licenses have the least restrictions, and you can use them in most projects.
Reuse
HookLib releases are not available. You will need to build from source code and install.
Installation instructions are not available. Examples and code snippets are available.
Top functions reviewed by kandi - BETA
kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HookLib
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of HookLib
HookLib Key Features
No Key Features are available at this moment for HookLib.
HookLib Examples and Code Snippets
No Code Snippets are available at this moment for HookLib.
Community Discussions
Trending Discussions on HookLib
QUESTION
I want to hook context.startActivity by using cglib, but got an exception
Asked 2017-Apr-06 at 12:47
private void cghookMInstrumentation() throws Exception {
//get mInstrumentation
Class activityThreadClass = Class.forName("android.app.ActivityThread");
Method currentActivityThread = activityThreadClass.getDeclaredMethod("currentActivityThread");
currentActivityThread.setAccessible(true);
Object sCurrentActivityThread = currentActivityThread.invoke(null);//ActivityThread instance
Method getInstrumentation = activityThreadClass.getDeclaredMethod("getInstrumentation");
getInstrumentation.setAccessible(true);
Instrumentation instrumentation = (Instrumentation) getInstrumentation.invoke(sCurrentActivityThread);//Instrumentation
Field mInstrumentationField = activityThreadClass.getDeclaredField("mInstrumentation");
mInstrumentationField.setAccessible(true);
Enhancer enHancer = new Enhancer();
CglibProxy cglibProxy = new CglibProxy();
enHancer.setSuperclass(instrumentation.getClass());
enHancer.setCallback(cglibProxy);
Instrumentation mInstrumentation = (Instrumentation) enHancer.create();
//replace Instrumentation
mInstrumentationField.set(instrumentation, mInstrumentation);
}
...ANSWER
Answered 2017-Apr-06 at 12:47Cglib does not work on Android. What you are trying to do is impossible. You can try Byte Buddy as an alternative which includes a class loading strategy for Android which makes proxy creation on Android possible.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install HookLib
You can download it from GitHub.
Support
For any new features, suggestions and bugs create an issue on GitHub.
If you have any questions check and ask questions on community page Stack Overflow .
Find more information at:
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