{"id":24537617,"url":"https://github.com/aeonlucid/androidnativeemu","last_synced_at":"2025-05-14T01:08:52.027Z","repository":{"id":37733329,"uuid":"140299555","full_name":"AeonLucid/AndroidNativeEmu","owner":"AeonLucid","description":"Allows you to partly emulate an Android native library.","archived":false,"fork":false,"pushed_at":"2025-02-13T23:10:05.000Z","size":1279,"stargazers_count":1437,"open_issues_count":11,"forks_count":414,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-04-03T02:04:42.363Z","etag":null,"topics":["android","android-native-library","arm","emulator","unicorn"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AeonLucid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-09T14:44:28.000Z","updated_at":"2025-04-02T23:19:45.000Z","dependencies_parsed_at":"2022-09-16T06:12:57.622Z","dependency_job_id":"f7aa26b3-eaba-410f-b953-394620f7555e","html_url":"https://github.com/AeonLucid/AndroidNativeEmu","commit_stats":{"total_commits":80,"total_committers":7,"mean_commits":"11.428571428571429","dds":0.55,"last_synced_commit":"10da9bb9b6f7a12641f87ab09c08fdc045bacbc7"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeonLucid%2FAndroidNativeEmu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeonLucid%2FAndroidNativeEmu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeonLucid%2FAndroidNativeEmu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AeonLucid%2FAndroidNativeEmu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AeonLucid","download_url":"https://codeload.github.com/AeonLucid/AndroidNativeEmu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161239,"owners_count":21057552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-native-library","arm","emulator","unicorn"],"created_at":"2025-01-22T14:13:23.564Z","updated_at":"2025-04-10T04:47:50.835Z","avatar_url":"https://github.com/AeonLucid.png","language":"Python","readme":"# AndroidNativeEmu\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/AeonLucid/AndroidNativeEmu/main.yml?style=for-the-badge)](https://github.com/AeonLucid/AndroidNativeEmu/actions)\n[![PyPI](https://img.shields.io/pypi/v/androidemu?style=for-the-badge)](https://pypi.org/project/androidemu/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/androidemu?style=for-the-badge)\n\nAllows you to partly emulate an Android native library.\n\nThis is an educational project to learn more about the ELF file format and [Unicorn](https://github.com/unicorn-engine/unicorn).\n\n\u003e Read me for chinese readers [中文README](README_cn.md)\n\n## Features\n\n- Emulation of the [JNI Invocation API](https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html) so `JNI_OnLoad` can be called properly.\n- Emulation of native memory for malloc / memcpy.\n- Emulation of syscalls (SVC #0) instruction.\n- Hooking through the symbol table.\n- All JavaVM, JNIEnv and hooked functions are handled by python.\n- Enable VFP support.\n\n## Installation\n\nYou can install AndroidNativeEmu with pip.\n\n```\npip install androidemu\n```\n\n## TODO\n\n- Improve file descriptors in `vfs/file_system.py` so they are re-useable.\n- Add a way for the VirtualFileSystem to give back dynamic files, such as `/proc/self/status`, `/proc/self/status` but also `/dev/urandom`.\n- 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.\n  - ~~Classes~~\n  - ~~Objects~~\n  - ~~Methods~~\n  - ~~Native methods~~\n  - Fields\n  - Types\n  - Reflection\n\n## Dependencies\n\n- [Unicorn CPU emulator framework](https://github.com/unicorn-engine/unicorn)\n- [Keystone assembler framework](https://github.com/keystone-engine/keystone)\n\n## Resources\n\nAll resources used while developing AndroidNativeEmu.\n\n### Text sources\n- https://greek0.net/elf.html\n- https://stackoverflow.com/questions/13908276/loading-elf-file-in-c-in-user-space\n- https://programtalk.com/python-examples/pyelftools.elftools.elf.relocation.Relocation/\n- http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044f/IHI0044F_aaelf.pdf\n- https://wiki.osdev.org/ELF_Tutorial\n- https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/functions.html\n- https://android.googlesource.com/platform/dalvik/+/donut-release/vm/Jni.c\n\n### Code sources\n- https://github.com/lunixbochs/usercorn\n- https://github.com/slick1015/pad_unpacker (SVC 0 instruction)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeonlucid%2Fandroidnativeemu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeonlucid%2Fandroidnativeemu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeonlucid%2Fandroidnativeemu/lists"}