Skip to main content

Allows you to partly emulate an Android native library.

Project description

AndroidNativeEmu

Allows you to partly emulate an Android native library.

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

中文README

Features

  • 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.

Usage

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 example.py

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 setup.py 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\.

TODO

  • Improve file descriptors in vfs/file_system.py 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

Dependencies

Resources

All resources used while developing AndroidNativeEmu.

Text sources

Code sources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

androidemu-0.0.2.tar.gz (48.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page