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 details)

Uploaded Source

File details

Details for the file androidemu-0.0.2.tar.gz.

File metadata

  • Download URL: androidemu-0.0.2.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for androidemu-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d7253b4e09d372cb7d08f8da047b6d73d28d9ee52078bb72f6db638d53dd062e
MD5 a1a796e940765b0da882f42314b33283
BLAKE2b-256 d176f90416b8359be502ef9cea1b19ec014da16142b2fd58e0ae3cee6c9d6aaa

See more details on using hashes here.

Provenance

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