Skip to content

Allows you to partly emulate an Android native library.

License

Notifications You must be signed in to change notification settings

AeonLucid/AndroidNativeEmu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

37de28d · Feb 13, 2025

History

95 Commits
Feb 13, 2025
Mar 13, 2022
Oct 2, 2023
Sep 2, 2021
Mar 13, 2022
Sep 2, 2021
Sep 2, 2021
Oct 16, 2024
Oct 16, 2024
Mar 13, 2022
Feb 13, 2025
Feb 13, 2025

Repository files navigation

AndroidNativeEmu

GitHub Workflow Status PyPI PyPI - Python Version

Allows you to partly emulate an Android native library.

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

Read me for chinese readers 中文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.

Installation

You can install AndroidNativeEmu with pip.

pip install androidemu

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