Experimental Clash of Clans server on top of libg.so
Find a file
2025-03-28 20:58:57 +03:00
.cargo Hi 2025-03-28 20:58:57 +03:00
libserver Hi 2025-03-28 20:58:57 +03:00
.gitignore Hi 2025-03-28 20:58:57 +03:00
Cargo.lock Hi 2025-03-28 20:58:57 +03:00
Cargo.toml Hi 2025-03-28 20:58:57 +03:00
README.md Hi 2025-03-28 20:58:57 +03:00
screenshot.jpg Hi 2025-03-28 20:58:57 +03:00

magic-rs

Experimental Clash of Clans server emulator on top of libg.so (v8.67.8) Screenshot

Why?

Supercell's games have their game logic implementation included in both client and server, for independent execution (the Logic* family of classes is shared). However, to implement a feature-complete server emulator, you should rewrite the logic entirely. This experimental way is to use logic that is retained in the game, basically turning client into a server.

Current features

  • Full home state emulation
  • NPC attacks
  • Player progress saving

Implementation

Server side code is written in Rust. We provide idiomatic bindings for the structures/functions from libg.so. Player data is being saved inside application data in form of SQLite database (for sake of simplicity).

Getting started

NOTE: you have to use a device with support of armeabi-v7a binaries

a) Using pre-built apk files

Navigate to the Releases page and download both Server and Client APK files (by default, they're targeted to the 127.0.0.1:9339 endpoint). Next, install both of them. Open the server application first (it should stay with black screen), then leave it running in the background. Open the client and play!

b) Building from sources

Requirements:

Preparing the toolchain

  • Install android armv7 target via rustup:
rustup target add armv7-linux-androideabi
  • Install cargo-ndk extension:
cargo install cargo-ndk
NOTE: make sure you have configured the ANDROID_NDK_HOME environment variable before invoking build command.

Compiling server library

git clone https://git.xeondev.com/Supercell/Magic
cd Magic
cargo ndk -t armeabi-v7a build --release

Community

Our Discord Server is open for everyone who's interested in our projects!

Support

Your support for this project is greatly appreciated! If you'd like to contribute, feel free to send a tip via Boosty!