Repository navigation
Building From Source
This repository does not include Terraria's binaries or assets (
libil2cpp.so,libunity.so, the game data), Unity's Java classes or the Andy font: they stay out of Git and are integrated locally. The dumps inrefs/are generated locally and never published. Some UI textures (backgrounds, menu icons, example mod covers) are crops of Terraria's art, generated bytools/ui-sprites.pyandtools/mod-art.py.
| Layer | Technology |
|---|---|
| App and launcher | Kotlin + Jetpack Compose |
| Native core | C++20 (NDK + CMake) → libbunny.so
|
| Hooks | ShadowHook (inline, ARM64), with our own chain |
| IL2CPP | the embedding API (il2cpp_*), via dlsym; everything resolved by name |
| Mod runtime | .NET 10 on Mono, with generated proxies of the game's types |
| C# compiler | Roslyn, for mods that ship .cs files |
| Game dump | Il2CppDumper |
app/src/main/
kotlin/dev/bunnyloader/ Android app: the launcher and the GameActivity that boots Unity
cpp/ Native core (libbunny.so); map in docs/nucleo/README.md
csharp/ C# API (BunnyLoader.dll), its proxy generator and the mod compiler
res/ Android resources
samples/ Example mods
docs/ Documentation (guides, core, history)
tools/ PC tools: fast build, dump, tests
refs/ Local game dump (NOT versioned)
Open the folder in Android Studio and let Gradle Sync run: it downloads Gradle and offers to install any missing SDK platform.
- SDK Manager → SDK Tools tab → install NDK (Side by side) and CMake.
- The game runtime (the
.sofiles inapp/src/main/jniLibs/arm64-v8a/and the data interraria1456_assets/) is not in the repository; see the folder's README. Without it the app builds and installs, andGameActivityreports that the runtime is missing. - Unity's classes (
app/libs/unity-classes.jar) and the Andy font (app/src/main/res/font/bunny.ttf) also stay out of Git, since they belong to third parties. Without the jar the game does not boot (app/libs/README.md); without the font the app uses Comic Neue (app/src/fontFallback). - Mods need the .NET 10 SDK on the
PATH(dotnet): the build compilesBunnyLoader.dlland downloads the Mono runtime from nuget.org once. Without the SDK, build with-Pbl.csharp=false(no mods load).
| Shortcut | |
|---|---|
-Pbl.nativeBuild=false |
Launcher only, no NDK or CMake. |
-Pbl.uiOnly=true |
Without the game's assets and .so files: the UI cycle drops to ~6 s (tools/ui.sh). |
-Pbl.csharp=false |
Without mods: no .NET SDK needed, and the APK loses the Mono runtime and the compiler. |
Game dump. tools/dump.sh generates refs/ (the dump.cs with every
class, field and method of the game) from the installed Terraria. See
refs/README.md.
Tests. The tests are mods in tools/tests/, run on the
emulator by tools/tests/run-cs.sh (and
run-mp.sh on two devices); see
tools/README.md. Development happens on MuMu Player (which
runs the game's ARM code through translation, and where hooks work) and is
checked on a real ARM device.
Building an APK to publish, and the key it is signed with, are on Releases and signing.
Bunny Loader wiki ·
Discord ·
Repository ·
BL Editor
Written for Bunny Loader 0.5.5-beta and Terraria Mobile 1.4.5.8.6.
Bunny Loader is not affiliated with Re-Logic or 505 Games.
