{"id":51628499,"url":"https://github.com/yui0/luna-tl","last_synced_at":"2026-07-13T04:02:15.404Z","repository":{"id":369858889,"uuid":"1291666547","full_name":"yui0/luna-tl","owner":"yui0","description":"Translation layer for iOS/Android","archived":false,"fork":false,"pushed_at":"2026-07-07T07:19:29.000Z","size":13284,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-07T09:11:33.041Z","etag":null,"topics":["android","emu","ios","layer","linux","mac","translation","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yui0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-07T02:07:43.000Z","updated_at":"2026-07-07T08:49:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yui0/luna-tl","commit_stats":null,"previous_names":["yui0/luna-tl"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yui0/luna-tl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yui0%2Fluna-tl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yui0%2Fluna-tl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yui0%2Fluna-tl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yui0%2Fluna-tl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yui0","download_url":"https://codeload.github.com/yui0/luna-tl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yui0%2Fluna-tl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35409469,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-13T02:00:06.543Z","response_time":119,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","emu","ios","layer","linux","mac","translation","windows"],"created_at":"2026-07-13T04:02:14.668Z","updated_at":"2026-07-13T04:02:15.388Z","avatar_url":"https://github.com/yui0.png","language":"C++","funding_links":["https://github.com/sponsors/yui0"],"categories":[],"sub_categories":[],"readme":"**Lunaria — Translation layer for iOS/Android** 🎮🐧\n\n**Run Android ARM/x86_64 JNI libraries (especially Unity's `libunity.so`) on Linux** using **dynarmic JIT** emulation! 🚀\n\n[![Sponsor](https://img.shields.io/badge/Sponsor%20this%20project-%E2%9D%A4%EF%B8%8F-white?logo=githubsponsors\u0026logoColor=EA4AAA\u0026labelColor=EA4AAA)](https://github.com/sponsors/yui0)\n\n---\n\n### ✨ Features\n- **Full ARM32 emulation** with dynarmic JIT\n- **Unity \u0026 Mono** game support (tested with Unity 4.x/5.x)\n- **Cooperative threading** (guest threads run smoothly)\n- **AssetManager bridge** — reads assets directly from APK\n- **OpenGL/ES + EGL** passthrough to host\n- **Headless support** via Xvfb\n- **Memory-efficient** flat 4GB guest address space\n\n### 🛠️ Build Instructions\n\n```bash\nmake dynarmic-build     # Build dynarmic A32 JIT (requires cmake, libboost-dev)\nmake                    # Build Lunaria + runtime/*.so\n```\n\n```bash\nmake fetch-libunity     # Download test APK and extract ARM libs\nmake fetch-btw\n```\n\n**Required packages (Ubuntu/Debian):**\n```bash\nsudo apt install libglfw3-dev libegl1-mesa-dev libgles2-mesa-dev \\\n                 libbsd-dev libunwind-dev libboost-dev zlib1g-dev\n```\n\n### 🚀 How to Run\n\n```bash\nmake test\n\n# Run with APK (recommended)\nbash lunaria-apk.sh UnitySampleGame.apk\nbash lunaria-apk.sh test/dfu-mono-32bit.apk\nbash lunaria-apk.sh test/btw-android.apk\n\n# Direct library run\n# LD_LIBRARY_PATH=.:runtime ANDROID_PACKAGE_CODE_PATH=$PWD/test/dfu-mono-32bit.apk ./lunaria test/libunity.so\n```\n\n**Headless mode:**\n```bash\nXvfb :99 \u0026 DISPLAY=:99 ./lunaria ...\n```\n\n### ⚙️ Environment Variables\n\n| Variable                    | Default     | Description |\n|----------------------------|-------------|-----------|\n| `LUNARIA_CALL_TICKS`       | 2G          | Tick limit per JNI call |\n| `LUNARIA_ONLOAD_TICKS`     | 5G          | Tick limit for `JNI_OnLoad` |\n| `LUNARIA_THREAD_TICKS`     | 200M        | Tick slice per guest thread |\n| `LUNARIA_TRACE_SVC`        | off         | Log SVC calls (first 1000) |\n| `LUNARIA_TRACE_BLOCKS`     | 0           | Log JIT block execution |\n| `LUNARIA_DUMP_LAST_SVC`    | off         | Dump last 64 SVCs on exit |\n| `LUNARIA_TRACE_FUTEX`      | off         | Log futex wait/wake |\n| `LUNARIA_TRACE_JITINIT`    | off         | Trace `mono_jit_init_version` |\n| `GC_DONT_GC`               | 1           | Disable Boehm GC (set by loader) |\n\n**Tip:** You can use `K`/`M`/`G` suffixes: `LUNARIA_ONLOAD_TICKS=5G`\n\n### 🏗️ Architecture Overview\n\n- **Flat 4GB Memory** — Entire guest 32-bit address space is one big `mmap` (with fastmem)\n- **SVC Trampolines** — All native calls (`libc`, `EGL`, `GLES2`, `JNI`, etc.) are routed through `SVC #n`\n- **Cooperative Threads** — Guest `pthread_create` runs on auxiliary JIT with round-robin scheduling\n- **Relocations** — Full support for `R_ARM_RELATIVE`, cross-library symbols, non-zero base\n- **Asset Bridge** — `getAssets().open()` reads directly from APK (DEFLATE + STORE)\n- **Safety Guards** — Prevents wild jumps, infinite JIT growth, and memory corruption\n\n### 📁 Project Structure (Key Files)\n\n- `arm_exec.cpp` — Core ARM emulation engine\n- `lunaria-apk.sh` — APK launcher script\n- `runtime/` — Host-side shared libraries\n- `test/` — Sample APKs and libraries\n- `jvm/` — JNI/JVM bridge\n\n### 🎯 Supported Games / Use Cases\n\n- Unity 4.x / 5.x games (Mono + IL2CPP)\n- Android ARM32 libraries on Linux x86_64\n- Headless server execution\n- Game modding \u0026 reverse engineering\n\n### 🎯 Screenshots\n\n![Screenshot 01](screenshot_01.jpg)\n\n### 🔧 Troubleshooting\n\n- **Black screen?** Try `LUNARIA_TRACE_EXC=1` or `LUNARIA_TRACE_MONO=1`\n- **Slow?** Increase tick limits or check GPU passthrough\n- **Crashes?** Enable `LUNARIA_DUMP_LAST_SVC=1` and report the log\n\n**Made with ❤️ for the retro Android gaming \u0026 emulation community**\n\nEnjoy running your favorite Android Unity games natively on Linux! 🎉\n\n---\n\n*Project Lunaria © 2026 Yuichiro Nakada*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyui0%2Fluna-tl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyui0%2Fluna-tl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyui0%2Fluna-tl/lists"}