Git Product home page Git Product logo

simplejni's Introduction

simpleJNI

介绍

为了简化native层的编程:方便C++代码调用Java方法、Hack代码。
这个项目目的是用于安全方面,所以设计之初并未在兼容性方面多做考虑,但保证在一定范围内保持稳定。
这个项目的代码只保证在Android4.X上运行良好。

本项目将源码编译成了工具(so、a、jar),看过使用说明后可以直接使用。

功能

libJNIJava

  • 获得JNIEvn。
  • C++代码封装JNI调用,在native层以Java的习惯调用Java系统方法。如C++类"JFile",对应Java层File类的用法。

libHack

  • native层对Java的Hook。
  • native层对C/C++的Hook。

目录介绍

include: 头文件。
lib: 动态库、静态库、jar包。
examples: 例子。
src: C/C++源码、Java源码。

工具的使用

如果无法链接libJNIJava.a库,那么Application.mk请写成如下内容:

APP_STL := gnustl_static
NDK_TOOLCHAIN_VERSION=4.6
APP_CPPFLAGS := -frtti -fexceptions -std=gnu++11

libJNIJava.a

需要在Android.mk中链接动态库libandroid_runtime_arm。

libHack.a

需要链接动态库libdvm_arm。

simplejni's People

Contributors

zylc369 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.