CRITICAL FILES - JavaScript ↔ Android Bridge: + smali-patches/CommunityServerManager.smali - Core bridge between HTML UI and Android - JavascriptInterface methods - SharedPreferences management - Server CRUD operations (add/edit/delete) - Active server URL storage - Toast notifications - 10KB of complete smali bytecode + smali-patches/CommunityServersActivity.smali - WebView activity for server list - Loads community_servers_list.html - JavaScript interface binding - Lifecycle management - 3.5KB smali code + smali-patches/ServerEditActivity.smali - WebView activity for server editing - Loads community_server_edit.html - Add/edit server forms - Same interface pattern - 3.5KB smali code + smali-patches/SynergyEnvironmentImpl.patch - CRITICAL: Game integration patch - Modifies getSynergyDirectorServerUrl() - Checks SharedPreferences for community URL - Falls back to EA if none set - Complete patch instructions + smali-patches/README.md - Installation guide (auto & manual) - Testing procedures - Troubleshooting - Smali reference - Chrome DevTools debugging ARCHITECTURE: HTML UI ↔ JavascriptInterface ↔ Smali Bridge ↔ SharedPreferences ↔ Game DATA FLOW: 1. User adds server in HTML UI 2. JavaScript: AndroidInterface.addServer(json) 3. Smali: Saves to SharedPreferences 4. User taps Connect 5. Smali: Sets active_server_url 6. User restarts game 7. PATCHED getSynergyDirectorServerUrl() reads URL 8. Game connects to community server! ✅ METHODS AVAILABLE: - getServers() → JSON array - addServer(json) → Save - setActiveServer(id) → Activate - deleteServer(id) → Remove - showToast(msg) → Android toast - getActiveServerUrl() → Current URL - Plus 10+ more methods TESTING: adb shell am start -n com.ea.games.r3_row/com.community.CommunityServersActivity INSTALLER INTEGRATION: RR3-Server-Browser-Installer.ps1 will: - Copy smali files to smali/com/community/ - Apply SynergyEnvironmentImpl patch - Update AndroidManifest.xml - Rebuild & sign APK STATUS: ✅ Smali code complete ✅ All methods implemented ✅ SharedPreferences storage ✅ Game integration patch ✅ Documentation complete The missing link is NOW COMPLETE! Server browser is fully functional! 🎮✨ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🏎️ RR3 APK Modification Tools + Server Browser
🎮 Real Racing 3 - Community Server APK Modifier
This repository contains tools to modify the Real Racing 3 APK to connect to community-hosted servers instead of EA's official servers. Perfect for game preservation, private servers, and offline play.
✨ NEW: Server Browser UI
No more rebuilding APKs! The new Server Browser feature lets users manage multiple community servers from within the game:
- 🌐 Multiple Servers - Save unlimited server profiles
- 🎨 Beautiful UI - WebView-based interface with real-time status
- ⚡ One-Click Connect - Switch servers instantly
- 🔄 No Reinstalls - One APK for all servers
- ⭐ Favorites - Mark frequently used servers
- 🔍 Connection Testing - Verify before saving
⚡ Quick Start
Basic APK Modification
# Simple URL redirect (old method)
.\RR3-Community-Mod.ps1 -ServerUrl "http://your-server-ip:5001"
Server Browser Installation (NEW!)
# Add server browser UI to APK
.\RR3-Server-Browser-Installer.ps1 -ApkPath "realracing3.apk"
# With pre-configured server
.\RR3-Server-Browser-Installer.ps1 `
-ApkPath "realracing3.apk" `
-DefaultServerUrl "http://localhost:5001" `
-DefaultServerName "My Local Server"
📦 What's Included
Core Tools
- RR3-Community-Mod.ps1 - Simple APK URL redirect script
- RR3-Server-Browser-Installer.ps1 - NEW! Adds server browser UI
Server Browser UI (NEW!)
- assets/community_servers_list.html - Server browser interface
- assets/community_server_edit.html - Add/edit server form
- smali-patches/ - Android bridge code (JavascriptInterface)
Documentation
- APK_MODIFICATION_GUIDE.md - Complete guide (14,000 words)
- APK_MODIFICATION_SUMMARY.md - Quick reference (12,000 words)
- NETWORK_COMMUNICATION_ANALYSIS.md - Protocol docs (13,000 words)
- docs/SERVER_BROWSER_GUIDE.md - NEW! Server browser user guide
Reference Files
- reference/ - Original APK analysis (Java decompiled code)
🔍 How It Works
Method 1: Simple URL Redirect (Original)
Real Racing 3 has built-in support for custom servers! Just change the configuration in AndroidManifest.xml:
<meta-data android:name="com.ea.nimble.configuration" android:value="custom" />
<meta-data android:name="NimbleCustomizedSynergyServerEndpointUrl" android:value="http://your-server:5001" />
Method 2: Server Browser (NEW!)
Adds a complete UI for managing servers:
- HTML/CSS/JS interfaces stored in APK assets
- Smali bridge code (CommunityServerManager) with JavascriptInterface
- SharedPreferences storage for server configs
- Patched game code to read active server URL at runtime
Result: One APK that can connect to any number of community servers!
🎯 Use Cases
For Players
- ✅ Keep one APK, switch between servers
- ✅ Test multiple servers easily
- ✅ Manage LAN + public servers
- ✅ Favorites for frequently used servers
For Server Owners
- ✅ Share one APK with all users
- ✅ No need to distribute custom builds
- ✅ Users can add your server themselves
- ✅ Professional UI experience
For Developers
- ✅ Test against multiple server instances
- ✅ Quick switching between local/staging/production
- ✅ Beautiful UI example code
📱 Server Browser Screenshots
┌─────────────────────────────────────────┐
│ 🌐 Community Servers │
├─────────────────────────────────────────┤
│ ┌─────────────────────────────────┐ │
│ │ 🏠 My Local Server │ │
│ │ http://localhost:5001 │ │
│ │ Status: 🟢 Online [Connect] │ │
│ └─────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────┐ │
│ │ 🌍 RR3 Community #1 (Active) │ │
│ │ https://rr3-community.com │ │
│ │ Status: 🟢 Online │ │
│ └─────────────────────────────────┘ │
│ │
│ [+ Add New Server] │
└─────────────────────────────────────────┘
🚀 Getting Started
Prerequisites
- apktool - For decompiling/rebuilding APKs
- uber-apk-signer - For signing APKs (optional)
- Real Racing 3 APK - Original game file
Installation
# Install apktool (Windows)
choco install apktool
# Download uber-apk-signer
# https://github.com/patrickfav/uber-apk-signer
See docs/SERVER_BROWSER_GUIDE.md for complete instructions!
🌐 Need a Server?
Check out rr3-server - ASP.NET Core 8 community server with:
- ✅ Web admin panel
- ✅ Daily rewards system
- ✅ Time trials
- ✅ Car ownership & upgrades
- ✅ Career progression
- ✅ Player leveling
Together, these projects create a complete community-run RR3 experience!
📚 Documentation
- Server Browser Guide - User guide for server browser UI
- APK_MODIFICATION_GUIDE.md - Technical APK modding details
- NETWORK_COMMUNICATION_ANALYSIS.md - RR3 protocol documentation
🤝 Contributing
Contributions welcome! Areas for improvement:
- Auto-generate smali code
- Server discovery/public list
- Import/export server configs
- Server statistics (ping, uptime)
- QR code sharing
⚠️ Legal Disclaimer
This project is for educational and game preservation purposes only.
- Real Racing 3 © Electronic Arts Inc.
- Use at your own risk
- Do not distribute EA's assets
- Respect intellectual property rights
🎖️ Credits
- RR3 Community - Keeping the game alive
- apktool - APK toolkit
- EA/Firemonkeys - Original developers
Made with ❤️ for game preservation 🏎️💨
One APK. Unlimited Servers. Endless Racing.