androidemu


Nameandroidemu JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryAllows you to partly emulate an Android native library.
upload_time2024-10-16 16:55:10
maintainerNone
docs_urlNone
authorNone
requires_python<3.12,>=3.7
licenseGPLv3
keywords emulation android
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AndroidNativeEmu

[![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)
[![PyPI](https://img.shields.io/pypi/v/androidemu?style=for-the-badge)](https://pypi.org/project/androidemu/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/androidemu?style=for-the-badge)

Allows you to partly emulate an Android native library.

This is an educational project to learn more about the ELF file format and [Unicorn](https://github.com/unicorn-engine/unicorn).

> Read me for chinese readers [中文README](README_cn.md)

## Features

- 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.
- 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

- [Unicorn CPU emulator framework](https://github.com/unicorn-engine/unicorn)
- [Keystone assembler framework](https://github.com/keystone-engine/keystone)

## 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)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "androidemu",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.7",
    "maintainer_email": null,
    "keywords": "emulation, android",
    "author": null,
    "author_email": "AeonLucid <aeonlucid@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/83/28/e8277ca6341979126cb071262fd05201190b2c5def84afa0ba9a77a15891/androidemu-0.0.3.tar.gz",
    "platform": null,
    "description": "# 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> Read me for chinese readers [\u4e2d\u6587README](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",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Allows you to partly emulate an Android native library.",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/AeonLucid/AndroidNativeEmu/issues",
        "Repository": "https://github.com/AeonLucid/AndroidNativeEmu"
    },
    "split_keywords": [
        "emulation",
        " android"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c007f1ae42c4671cfbfee6c706456a2d73bfee467c1f5ee19bc0c78eaa6cf7b",
                "md5": "e4815e87a39d1d3e1c4be40be554dcf9",
                "sha256": "c20a8ca5392c02fc3704684e7bd8b5241dfec5acf464fc5d4a75218d1c3592fb"
            },
            "downloads": -1,
            "filename": "androidemu-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e4815e87a39d1d3e1c4be40be554dcf9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.7",
            "size": 60883,
            "upload_time": "2024-10-16T16:55:08",
            "upload_time_iso_8601": "2024-10-16T16:55:08.093836Z",
            "url": "https://files.pythonhosted.org/packages/3c/00/7f1ae42c4671cfbfee6c706456a2d73bfee467c1f5ee19bc0c78eaa6cf7b/androidemu-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8328e8277ca6341979126cb071262fd05201190b2c5def84afa0ba9a77a15891",
                "md5": "b3964b07502c25d41463e76f206b3c67",
                "sha256": "fd52bd51f58da606b18fe64a6a74211cdbf93a7bd1614e0c2e8b3cbe6c0659d3"
            },
            "downloads": -1,
            "filename": "androidemu-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b3964b07502c25d41463e76f206b3c67",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.7",
            "size": 50282,
            "upload_time": "2024-10-16T16:55:10",
            "upload_time_iso_8601": "2024-10-16T16:55:10.529107Z",
            "url": "https://files.pythonhosted.org/packages/83/28/e8277ca6341979126cb071262fd05201190b2c5def84afa0ba9a77a15891/androidemu-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 16:55:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AeonLucid",
    "github_project": "AndroidNativeEmu",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "androidemu"
}
        
Elapsed time: 0.41109s