Introduction: Allows you to partly emulate an Android native library.
More: Author   ReportBugs   

中文 README & 教程?

QQ 群:471525564

Allows you to partly emulate an Android native library.

This is an educational project to learn more about the ELF file format and Unicorn.


  • Emulation of the JNI Invocation API so JNI_OnLoad can be called properly.
  • Emulation of native memory for malloc / memcpy.
  • Emulation of syscalls (SVC #0) instruction.
  • Hooking through the symbol table.
  • All JavaVM, JNIEnv and hooked functions are handled by python.
  • Enable VFP support.

My Changes

  • Add init_array support depends on Relocation information.
  • Add support of modify object value by reference id.
  • Implement getcpu() syscall
  • Implement set_byte_array_region
  • Register Function failed would't raise an error(beacuse most jni functions are not used.)
  • samples:添加抖音 X-Gorgen 调用实例
  • 中文 README


In the future this will be possible through pypi.

Make sure you are using python 3.7.

  1. Clone the repository
  2. Run pip install -r requirements.txt
  3. Run python

If you have trouble getting the keystone-engine dependency on Windows (as I did):

  1. Clone their repository
  2. Open a terminal in bindings/python
  3. Run python install (Make sure you are using python 3.7)
  4. Download their Windows - Core engine package here for your python arch.
  5. Put the keystone.dll in C:\location_to_python\Lib\site-packages\keystone\.


  • Improve file descriptors in vfs/ so they are re-useable.
  • Add a way for the VirtualFileSystem to give back dynamic files, such as /proc/self/status, /proc/self/status but also /dev/urandom.
  • Library consumers must be able to easily rebuild the needed Java classes for a native library, which are used by the native library through the JNIEnv.
    • Classes
    • Objects
    • Methods
    • Native methods
    • Fields
    • Types
    • Reflection



All resources used while developing AndroidNativeEmu.

Text sources

Code sources

About Me
Google+: Trinea trinea
GitHub: Trinea