About
Emulite is an emulation framework for Android native libraries, inspired by Unidbg. iOS support is planned.
[!WARNING] Emulite is an early release. Breaking API changes may occur in future releases, and bugs should be expected.
Requirements
- Python 3.10+
- Unicorn 2.1.4+
- Capstone 5+
- LIEF 0.14+
- Cryptography 42+
Project Status
Supported Platforms
| Platform | ARM32 | ARM64 |
|---|---|---|
| Android | ✅ AndroidEmulator32 | ✅ AndroidEmulator64 |
| iOS | — | ⏳ |
Supported Engines
| Backend Engine | Status |
|---|---|
| Unicorn | ✅ |
| Dynarmic | — |
| Apple Silicon Hypervisor | — |
| Linux KVM Hypervisor | — |
✅ Supported · ⏳ Planned · — Not planned
Examples
See the examples directory. To run them from a source checkout:
python -m pip install -e .
python examples/apps/reddit_example.py
Android Usage
Use AndroidEmulator32 or AndroidEmulator64 based on the target architecture. A default Android rootfs is included. Pass a path as the first argument to use a custom rootfs.
from emulite import AndroidEmulator64, HookStatus, LogCategory, JniHandler
class CustomJniHandler(JniHandler):
# Unhandled methods raise `NotImplementedError`.
def call_static_method(self, method, args):
if method.java_class.name == "com/example/Device" and method.name == "getValue":
return "value"
return super().call_static_method(method, args)
def before_malloc(emu):
print("malloc size:", emu.arg(0))
def after_malloc(emu):
print("malloc returned:", hex(emu.ret))
def before_time(emu):
replacement_value = 150000
# emu.set_arg(0, replacement_value) # Store result in r0/x0
emu.finish(replacement_value)
return HookStatus.SKIP_ORIGINAL # Skip the original call
def on_instruction(emu, info):
print(info.format())
with AndroidEmulator64(jni_handler=CustomJniHandler(), log=LogCategory.NONE) as emu:
# Load the target ELF and its dependencies
module = emu.load("path/to/libnative.so")
# Hook malloc import
malloc_hook = emu.hook_symbol(
"malloc",
before_malloc,
after_malloc,
module_name=module.name, # Module name is optional
)
# Replace time() result
time_hook = emu.hook_symbol(
"time",
before_time,
module_name=module.name, # Module name is optional
)
# Run JNI_OnLoad
emu.call_jni_onload(module)
# Call JNI function
native = emu.java_class("com/example/Native")
result = native.call("getValue", "(I)I", 123)
# Trace executed instructions within the target module
trace = emu.trace_module(on_instruction, module.name)
result = native.call("getValue", "(I)I", 123)
trace.close()
malloc_hook.close()
time_hook.close()
# Allocate memory
buffer = emu.malloc(32)
buffer.write_cstr("testing")
print(buffer.read_cstr())
emu.free(buffer)
# Call a regular ELF export by name
result = module.call_symbol("exported_symbol", 123)
Contributing
Bug reports and pull requests are welcome.
Resources
Metadata
Release files for emulite 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| emulite-0.1.0.tar.gz | 3.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| emulite-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 MB
Release files / emulite-0.1.0.tar.gz
| Download URL | emulite-0.1.0.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c2b83517f7e393314cb77c926af8c1671e610345ec02b6b65e275d093facefe
|
|
BLAKE2b-256 checksum How to use checksums |
a2a0c6fc6758f8bacf060bb3d494962b54f0a34aea3a75e27efa2164a84d3d9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency logRelease files / emulite-0.1.0-py3-none-any.whl
| Download URL | emulite-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
368139a487aac1be84b385dfd785b6dae41daf6d1e1c9b81383bc36c49d40f0c
|
|
BLAKE2b-256 checksum How to use checksums |
da11a0c4e92f53e611fd043be8357a266d8207bb10caba3597a99eaada177d69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.
Transparency log