{"id":50942797,"url":"https://github.com/radareorg/r2unity","last_synced_at":"2026-06-17T16:45:18.419Z","repository":{"id":357919313,"uuid":"1232072526","full_name":"radareorg/r2unity","owner":"radareorg","description":"Reverse engineer Unity games with radare2","archived":false,"fork":false,"pushed_at":"2026-06-10T14:58:45.000Z","size":330,"stargazers_count":24,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T16:25:32.857Z","etag":null,"topics":["il2cpp","reverse-engineering","unity"],"latest_commit_sha":null,"homepage":"https://www.radare.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/radareorg.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},"funding":{"github":null,"patreon":null,"open_collective":"radareorg","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2026-05-07T15:03:00.000Z","updated_at":"2026-06-10T15:04:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/radareorg/r2unity","commit_stats":null,"previous_names":["radareorg/r2unity"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/radareorg/r2unity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fr2unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fr2unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fr2unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fr2unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radareorg","download_url":"https://codeload.github.com/radareorg/r2unity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radareorg%2Fr2unity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34455962,"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-06-17T02:00:05.408Z","response_time":127,"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":["il2cpp","reverse-engineering","unity"],"created_at":"2026-06-17T16:45:17.752Z","updated_at":"2026-06-17T16:45:18.402Z","avatar_url":"https://github.com/radareorg.png","language":"C","funding_links":["https://opencollective.com/radareorg"],"categories":[],"sub_categories":[],"readme":"# r2unity\n\n[![CI](https://github.com/radareorg/r2unity/actions/workflows/ci.yml/badge.svg)](https://github.com/radareorg/r2unity/actions/workflows/ci.yml)\n\n\u003cimg src=\"r2unity.png\" alt=\"r2unity logo\" width=\"140px\" height=\"140px\" align=\"left\"\u003e\n\n`r2unity` is a command-line tool and radare2 plugin set for inspecting Unity\nIL2CPP builds. It parses `global-metadata.dat`, correlates it with the native\nIL2CPP binary, and exposes managed metadata for reverse engineering.\n\n## Highlights\n\n- Parses IL2CPP metadata wire versions v24.1+ through v35, plus v38/v39\n  metadata used by recent Unity 6 builds.\n- Detects companion files for iOS, Android extracted APKs, macOS, Windows,\n  Linux, and flat fixture layouts.\n- Recovers managed images, assemblies, types, methods, method flags, and `ldstr`\n  string literals.\n- Resolves method pointers through r_bin symbols/CodeRegistration, with\n  r_bin or simple ELF/Mach-O/PE section-scan fallback for stripped binaries.\n- Lists P/Invoke and v29+ reverse-P/Invoke metadata, and emits CycloneDX 1.5\n  SBOMs for managed assemblies.\n- Provides both a core r2 command plugin and an `r_bin` plugin for direct\n  `global-metadata.dat` inspection.\n\n## Build\n\n`r2unity` requires radare2 development files available through `pkg-config`.\n\n```sh\nmake\nmake plugin\nmake user-install\n```\n\nOr with Meson:\n\n```sh\nmeson setup build\nmeson compile -C build\nmeson install -C build\n```\n\nMost users can install it through r2pm:\n\n```sh\nr2pm -ci r2unity\n```\n\n`make` builds the CLI. `make plugin` builds `core_r2unity` and `bin_r2unity`.\n`make user-install` installs both the CLI and plugins for the current user.\nMeson builds the CLI by default, matching `make`. Use `-Dplugins=enabled` to\nbuild the radare2 plugins too, or `-Dr2_plugindir=/path/to/plugins` to override\nthe plugin install directory.\n\n## CLI\n\nThe normal inputs are the native IL2CPP binary and the matching\n`global-metadata.dat`.\n\n```sh\n# detect companion files and platform\n./r2unity -D /path/to/unity-build\n\n# compact metadata summary\n./r2unity -j /path/to/GameAssembly.dll /path/to/global-metadata.dat\n\n# recover method flags/comments as r2 commands\n./r2unity -f /path/to/GameAssembly.dll /path/to/global-metadata.dat \u003e methods.r2\n\n# override a known native registration symbol address\n./r2unity -f -O g_CodeRegistration=0x1234 /path/to/GameAssembly.dll /path/to/global-metadata.dat\n\n# list managed strings, interop metadata, or managed-assembly SBOM data\n./r2unity -z /path/to/global-metadata.dat\n./r2unity -P -j /path/to/GameAssembly.dll /path/to/global-metadata.dat\n./r2unity -R -j /path/to/GameAssembly.dll /path/to/global-metadata.dat\n./r2unity -S /path/to/GameAssembly.dll /path/to/global-metadata.dat \u003e sbom.txt\n./r2unity -S -j /path/to/GameAssembly.dll /path/to/global-metadata.dat \u003e sbom.json\n```\n\n## radare2\n\nAfter installing the plugins, open a Unity binary in r2 and use:\n\n```text\nr2unity?       show help\nr2unity-D      detect and cache companion file paths\nr2unity-i[j]   show metadata summary\nr2unity-s      apply managed method flags/comments\nr2unity-s*     print the r2 commands instead of applying them\nr2unity-z[j]   list managed string literals\nr2unity-P[*j]  list P/Invoke entries\nr2unity-R[*j]  list reverse-P/Invoke entries\nr2unity-S      emit managed-assembly SBOM text summary\nr2unity-Sj     emit managed-assembly CycloneDX JSON\n```\n\nSet `r2unity.metadata` and `r2unity.library` manually when auto-detection is not\nenough. The `bin_r2unity` plugin also lets radare2/rabin2 treat\n`global-metadata.dat` as a binary format, exposing sections, strings, symbols,\nclasses, imports, libraries, and header fields.\n\n## Current Limits\n\n- v24.0 metadata, v36/v37 metadata, and WebAssembly are not supported.\n- Method-pointer recovery needs CodeRegistration symbols/addresses or the\n  section-scan fallback; manual `-a` pointer reads are not implemented yet.\n- P/Invoke and reverse-P/Invoke output is metadata-first and does not fully\n  recover native wrapper addresses or every `DllImportAttribute` detail.\n- SBOM output covers managed assemblies only, not native dependencies or file\n  hashes.\n\nDeep technical notes live in `doc/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradareorg%2Fr2unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradareorg%2Fr2unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradareorg%2Fr2unity/lists"}