# Project R.I.S.E private server — recon notes (2026-10-10)

Target: `com.supercell.slash` 0.3.299225 (arm64, Android 8+, apkm from APKMirror, uploaded to chat-uploads).

## Architecture

- **Engine:** Unreal Engine 5 (`libUnreal.so` 210 MB), project path `Slash/Slash.uproject`, game codename **"board"** (`supercell_id_config.json` → `"Game": "board"`). CH = Clash Heroes lineage.
- **Shell:** Flutter (`libapp.so`, Supercell ID login UI) + Java DEX wrappers. EOS SDK (`libEOSSDK.so`), Wwise audio.
- **Game data:** `split_obbassets.apk` → `assets/main.obb.png` is a stored zip (981 MB) containing UE paks (`Slash-Android_ASTC.ucas/utoc/pak`) + `Slash/Content/res/` with **full csv_logic tables** (characters, board_waves, game_modes, leagues, alliances, chests, billing_packages...). Server-authoritative design like CR/BS.

## Networking (confirmed)

- Titan protocol stack: `CH/Plugins/SupercellServices/Source/SupercellGameClient/titan/client/src/Messaging.cpp`, `game/network/ServerConnection.cpp`. UE side routes via `SlashGF/Private/TitanProxy/SupercellServiceProxy.cpp` (`TitanService`, `TitanCallMessage`, `RouteMessageFromTitan`).
- **Crypto:** `RC4Encrypter` + `LoginMessage/LoginOkMessage/ClientHelloMessage/EncryptionRequest` class names present → classic Supercell Titan wire format (same family as CR/BS emulators know it).
- Full message class set present in the binary (login/account, alliance/clan+streams, chat, profile, billing, battle, matchmaking: `CancelMatchmakeMessage`, `BattleStateCheckRspMessage`, etc.).
- Env classifier in code compares configured host against hardcoded list:
  - `game.beta.prod.slash.supercelltest.com` ← **the host this beta build uses (resolves on AWS, live)**
  - also `beta.slash.supercelltest.com` (web/config host), sandbox2/integration2/intqa2/playable2/intext/intperf/review/stage.boardtest, and dev bypasses `127.0.0.1`, `10.70.128.25`, `10.70.128.15` — **127.0.0.1 is a valid env**.
- Telemetry/inventory: `https://report.mtech.supercell.com/v1/track`, `https://inventory.mtech.supercell.com/v1/serve`. SCID (Flutter): `id.supercell.com`, `accounts.supercell.com` (guest login exists: `id.supercell.com/guest`).
- Port not found statically (not a `movz #9339`); empirically catch with adb reverse on common ports.

## What was built here

- `server/server.ts` — Bun TCP catcher (hexdump + Titan frame decode guess). Deployed as public TCP service `rise-server` → **ts12.zocomputer.io:10522** (local 9440; 9339 is taken by the user's BSL.v69 BS server).
- `tools/patch_apk.py` — patches all 9 `game.*` host strings in `libUnreal.so` → `127.0.0.1` (in-place, length-preserving), re-zips base.apk, zipalign + apksigner with `tools/debug.keystore`, re-signs obb split unchanged, bundles SAI-installable zip → `dist/RISE-private-server-patch.zip`.

## Test procedure (phone)

1. Sideload `dist/RISE-private-server-patch.zip` with SAI (both splits share the new `rise-private` signature).
2. PC with adb: `adb reverse tcp:443 tcp:443`, `adb reverse tcp:9339 tcp:9339`, `adb reverse tcp:9330 tcp:9330` (+ more if needed), then socat-forward each to ts12.zocomputer.io:10522 (`tools/forwarder.sh`).
3. Launch game, attempt login → check `rise-server` logs (`/dev/shm/rise-server.log`) for first bytes → identify port + whether TLS (ClientHello) or raw Titan.

## Known unknowns / next steps

- Exact wire port + TLS vs raw TCP (empirical, step above).
- Where the client gets its server host (env classifier implies configurable; SCID game-config or staged-build ini, which is empty/BOM-only in the OBB).
- SCID login gating: game may require a beta-whitelisted Supercell ID before dialing the game server; SCID itself stays on real Supercell infra (pinned).
- If TLS+pinned: patch pin checks in libUnreal.so, MITM via mitmproxy.
- Message ID map: extract by disassembling `LogicBoardMessageFactory` registration (capstone script pattern in this convo, xrefs around 0x892d980-0x8271xxx used for env classifier).
- Full logic emulation needs csv_logic decode (Pelle-style SC CSV parser) — tables are in the OBB res/ folder, extracted under /tmp/rise/obbx (volatile; re-extract from dist if needed).
