Files
rr3-apk/README.md
Daniel Elliott ad15ecb2d7 Add Complete Server Browser UI System
MAJOR UPDATE - In-game server management without rebuilding APK!

SERVER BROWSER UI:
- Beautiful WebView-based interface
- Add/edit/delete unlimited servers
- Real-time online/offline status
- One-click server switching
- Favorites system
- Connection testing before save
- Professional UX with racing theme

HTML ASSETS:
+ assets/community_servers_list.html
  - Main server browser interface
  - Server cards with status indicators
  - Connect/Edit/Delete actions
  - Empty state and loading states

+ assets/community_server_edit.html
  - Add/edit server form
  - URL validation and testing
  - Favorite marking
  - Professional form design

INSTALLATION TOOL:
+ RR3-Server-Browser-Installer.ps1
  - Automated installation script
  - Decompiles APK with apktool
  - Injects HTML assets
  - Updates AndroidManifest.xml
  - Rebuilds and signs APK
  - Pre-configure default servers
  - Full error handling

DOCUMENTATION:
+ docs/SERVER_BROWSER_GUIDE.md
  - Complete user guide
  - Adding/editing/deleting servers
  - Connection flow
  - Troubleshooting
  - Developer integration

+ docs/SMALI_REFERENCE.md
  - Java bridge code reference
  - CommunityServerManager class
  - WebView activity hosts
  - Smali conversion guide
  - Testing & debugging tips

UPDATED README:
* Comprehensive overview
* Quick start examples
* Feature highlights
* Use cases (players/owners/devs)
* Architecture explanation
* Screenshots in ASCII art

ARCHITECTURE:
- HTML/CSS/JS UI layer (assets/)
- JavascriptInterface bridge (smali)
- SharedPreferences storage
- SynergyEnvironmentImpl patch
- WebView activities for hosting

USER FLOW:
1. Open Server Browser from game
2. Add server (name + URL)
3. Test connection
4. Save server
5. Tap Connect
6. Restart game -> Active!

BENEFITS:
✓ One APK for unlimited servers
✓ No rebuild needed to change servers
✓ Users can add servers themselves
✓ Server owners can share one APK
✓ Professional UI experience
✓ Local + LAN + public servers
✓ Favorites and status tracking

TECHNICAL DETAILS:
- Data stored in SharedPreferences
- JavaScript <-> Android bridge
- Async server pinging
- URL validation
- Toast notifications
- File:// asset loading

This enables true community server ecosystem!
Users can maintain their own server list
without technical knowledge or APK rebuilding.

Perfect companion to rr3-server project!

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-17 22:29:22 -08:00

186 lines
6.7 KiB
Markdown

# 🏎️ RR3 APK Modification Tools + Server Browser
![License: Educational](https://img.shields.io/badge/license-Educational-blue.svg)
![Platform: Windows](https://img.shields.io/badge/platform-Windows-lightgrey.svg)
![Language: PowerShell](https://img.shields.io/badge/language-PowerShell-blue.svg)
## 🎮 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
```powershell
# Simple URL redirect (old method)
.\RR3-Community-Mod.ps1 -ServerUrl "http://your-server-ip:5001"
```
### Server Browser Installation (NEW!)
```powershell
# 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`:
```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:
1. **HTML/CSS/JS** interfaces stored in APK assets
2. **Smali bridge code** (CommunityServerManager) with JavascriptInterface
3. **SharedPreferences storage** for server configs
4. **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
1. **apktool** - For decompiling/rebuilding APKs
2. **uber-apk-signer** - For signing APKs (optional)
3. **Real Racing 3 APK** - Original game file
### Installation
```powershell
# Install apktool (Windows)
choco install apktool
# Download uber-apk-signer
# https://github.com/patrickfav/uber-apk-signer
```
See [docs/SERVER_BROWSER_GUIDE.md](docs/SERVER_BROWSER_GUIDE.md) for complete instructions!
## 🌐 Need a Server?
Check out **[rr3-server](https://github.com/ssfdre38/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](docs/SERVER_BROWSER_GUIDE.md)** - 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.*