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.
Read me for chinese readers 中文README
Features
- Emulation of the JNI Invocation API so
JNI_OnLoadcan 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.pyso they are re-useable. - Add a way for the VirtualFileSystem to give back dynamic files, such as
/proc/self/status,/proc/self/statusbut 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.
ClassesObjectsMethodsNative methods- Fields
- Types
- Reflection
Dependencies
Resources
All resources used while developing AndroidNativeEmu.
Text sources
- https://greek0.net/elf.html
- https://stackoverflow.com/questions/13908276/loading-elf-file-in-c-in-user-space
- https://programtalk.com/python-examples/pyelftools.elftools.elf.relocation.Relocation/
- http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf
- https://wiki.osdev.org/ELF_Tutorial
- https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/functions.html
- https://android.googlesource.com/platform/dalvik/+/donut-release/vm/Jni.c
Code sources
- https://github.com/lunixbochs/usercorn
- https://github.com/slick1015/pad_unpacker (SVC 0 instruction)
Metadata
Release files for androidemu 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| androidemu-0.0.4.tar.gz | 50.3 kB | Without provenance | Details for androidemu-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| androidemu-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for androidemu-0.0.4-py3-none-any.whl |
Total release size: 111.2 kB
Release files / androidemu-0.0.4.tar.gz
| Download URL | androidemu-0.0.4.tar.gz |
|---|---|
| Size | 50.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ed5d5aa13821698c150f227d55ed65bd3bf61ff127a0565964f1a820f431ec7
|
|
BLAKE2b-256 checksum How to use checksums |
abd97f2e10525ae901c1f47b6ca2324248318936991d0fa9fe6d54cb96f007a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / androidemu-0.0.4-py3-none-any.whl
| Download URL | androidemu-0.0.4-py3-none-any.whl |
|---|---|
| Size | 60.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c6d2e40bddb90afc9395079ebd65e8bd270029527cfe96a911c5bf1c7a5b1b9
|
|
BLAKE2b-256 checksum How to use checksums |
fdb151dbb8c269e2102e7b198bc4672b5d61967f0717409aba95ad9c4dc1504d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Security for androidemu 0.0.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.