ExAndroidNativeEmu
An improved version of AndroidNativeEmu,Allow running android elf on PC
Install / Use
/learn @maiyao1988/ExAndroidNativeEmuREADME
ExAndroidNativeEmu
This is a personal improved version of AndroidNativeEmu.Allow running android elf code on pc.
Improvment compare with AndroidNativeEmu
- Rewrite memory mapping module, fully support jemalloc
- More debug utils, pretty printing for instruction and memory.
- Some misc bug fix
- Stop all runing when getting exception instead of just skiping one emulator runing for easily bug detecting...
- Auto Load dependency so.
- Auto generate /proc/[pid]/maps according to current memory map
- Fix R_ARM_ABS32 relocation bug.
- Use program header to load so instead of section header
- Support Java reflection
- Support Arm64
- Support multi-threaded like pthread_create etc.
- Add Function hook feature
TODO
- ~~Simulate linker TLS initialization.~~
- ~~Support well known virtual file like /proc/self/maps...~~
- ~~Get rid of dependency on Section Header when loading ELF~~.
Usage
In the future this will be possible through pypi.
Make sure you are using python 3.7 above.
- Clone the repository
- Run
pip install -r requirements.txt - Run
python example_jni.py
Dependencies
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)
- https://github.com/AeonLucid/AndroidNativeEmu
Disclaimer
- This Project is just for personal educational purposed only.You can modify it for your personal used.But we do not take any resonsibility for issues caused by any modification of this project.
Related Skills
node-connect
352.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
