2025-12-12 14:16:19 -03:00
# BotDevice - Android, HarmonyOS & IoT powered by General Bots
2025-12-12 13:32:55 -03:00
2025-12-12 14:16:19 -03:00
**BotDevice** transforms any Android, HarmonyOS, or embedded device into a dedicated General Bots system, removing all manufacturer bloatware (Samsung, Huawei, Xiaomi, Honor, etc) and replacing it with the GB interface.
2025-12-12 13:34:40 -03:00
2025-12-12 13:40:39 -03:00
## Supported Platforms
2025-12-12 13:34:40 -03:00
2025-12-12 13:36:29 -03:00
### Mobile
2025-12-12 13:34:40 -03:00
- **Android** (AOSP, Samsung One UI, Xiaomi MIUI, etc)
- **HarmonyOS** (Huawei, Honor)
2025-12-12 13:32:55 -03:00
2025-12-12 13:36:29 -03:00
### Embedded / IoT
2025-12-12 13:40:39 -03:00
- **Raspberry Pi** (Zero, 3, 4, 5) - Linux with LCD/HDMI display
2025-12-12 14:16:19 -03:00
- **Orange Pi** - Budget Raspberry alternative with NPU
2025-12-12 13:40:39 -03:00
- **Banana Pi** - ARM boards with display
2025-12-12 13:36:29 -03:00
- **BeagleBone** - Industrial IoT
2025-12-12 13:40:39 -03:00
- **Arduino** (with ESP32/ESP8266) - OLED/LCD display + WiFi
- **ESP32** - TFT/OLED displays
- **Rock Pi** - RK3399/RK3588 boards
- **NVIDIA Jetson** - Edge AI with display
2025-12-12 13:36:29 -03:00
- **LattePanda** - x86 embedded
2025-12-12 13:40:39 -03:00
- **ODROID** - Hardkernel boards
2025-12-12 13:36:29 -03:00
2025-12-12 13:40:39 -03:00
### Supported Displays
2025-12-12 13:36:29 -03:00
- LCD Character (16x2, 20x4)
- OLED (128x64, 128x32)
- TFT/IPS (320x240, 480x320, 800x480)
- E-ink/E-paper
2025-12-12 13:40:39 -03:00
- HDMI (any resolution)
2025-12-12 13:36:29 -03:00
2025-12-12 13:40:39 -03:00
## Installation Levels
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
| Level | Requirements | What it does |
|-------|-------------|--------------|
2025-12-12 14:16:19 -03:00
| **1** | ADB only | Removes bloatware, installs BotDevice as app |
| **2** | Root + Magisk | GB boot animation, BotDevice as system app |
| **3** | Unlocked bootloader | Replaces entire Android with BotDevice |
2025-12-12 13:32:55 -03:00
## Quick Start
```bash
2025-12-12 14:16:19 -03:00
cd botdevice/rom
2025-12-12 13:32:55 -03:00
./install.sh
```
2025-12-12 13:40:39 -03:00
The installer automatically detects the device and shows available options.
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
## Architecture
2025-12-12 13:32:55 -03:00
```
┌─────────────────────────────────────────────────────────────────────────────┐
2025-12-12 13:40:39 -03:00
│ LEVEL 3: GSI │
2025-12-12 13:32:55 -03:00
│ ┌─────────────────────────────────────────────────────────────────────────┐│
2025-12-12 13:40:39 -03:00
│ │ Custom Android AOSP - Zero manufacturer apps ││
│ │ GB boot animation from startup ││
2025-12-12 14:16:19 -03:00
│ │ BotDevice integrated as single launcher ││
2025-12-12 13:32:55 -03:00
│ └─────────────────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────────────────┤
2025-12-12 13:40:39 -03:00
│ LEVEL 2: MAGISK MODULE │
2025-12-12 13:32:55 -03:00
│ ┌─────────────────────────────────────────────────────────────────────────┐│
2025-12-12 13:40:39 -03:00
│ │ Original Android + Magisk ││
│ │ Bloatware removed via overlay ││
│ │ GB boot animation ││
2025-12-12 14:16:19 -03:00
│ │ BotDevice as privileged system app ││
2025-12-12 13:32:55 -03:00
│ └─────────────────────────────────────────────────────────────────────────┘│
├─────────────────────────────────────────────────────────────────────────────┤
2025-12-12 13:40:39 -03:00
│ LEVEL 1: DEBLOAT + APP │
2025-12-12 13:32:55 -03:00
│ ┌─────────────────────────────────────────────────────────────────────────┐│
2025-12-12 13:40:39 -03:00
│ │ Original Android (Samsung/Huawei/Xiaomi/etc) ││
│ │ Bloatware removed via ADB (no root) ││
2025-12-12 14:16:19 -03:00
│ │ BotDevice installed as normal app ││
2025-12-12 13:40:39 -03:00
│ │ Can be set as default launcher ││
2025-12-12 13:32:55 -03:00
│ └─────────────────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
2025-12-12 14:16:19 -03:00
│ BotDevice App (Tauri) │
2025-12-12 13:32:55 -03:00
├─────────────────────────────────────────────────────────────────────────────┤
│ botui/ui/suite │ Tauri Android │ src/lib.rs (Rust) │
2025-12-12 13:40:39 -03:00
│ (Web Interface) │ (WebView + NDK) │ (Backend + Hardware) │
2025-12-12 13:32:55 -03:00
└─────────────────────────────────────────────────────────────────────────────┘
```
2025-12-12 13:40:39 -03:00
## Project Structure
2025-12-12 13:32:55 -03:00
```
2025-12-12 14:16:19 -03:00
botdevice/
2025-12-12 13:40:39 -03:00
├── Cargo.toml # Rust/Tauri dependencies
├── tauri.conf.json # Tauri config → botui/ui/suite
2025-12-12 13:32:55 -03:00
├── build.rs # Build script
2025-12-12 13:40:39 -03:00
├── src/lib.rs # Android entry point
2025-12-12 13:32:55 -03:00
│
├── icons/
2025-12-12 13:40:39 -03:00
│ ├── gb-bot.svg # Source icon
│ ├── icon.png (512x512) # Main icon
│ └── */ic_launcher.png # Icons by density
2025-12-12 13:32:55 -03:00
│
├── scripts/
2025-12-12 13:40:39 -03:00
│ ├── generate-icons.sh # Generate PNGs from SVG
│ └── create-bootanimation.sh # Generate boot animation
2025-12-12 13:32:55 -03:00
│
├── capabilities/
2025-12-12 13:40:39 -03:00
│ └── default.json # Tauri permissions
2025-12-12 13:32:55 -03:00
│
2025-12-12 13:40:39 -03:00
├── gen/android/ # Generated Android project
2025-12-12 13:32:55 -03:00
│ └── app/src/main/
│ ├── AndroidManifest.xml # HOME intent (launcher)
2025-12-12 13:40:39 -03:00
│ └── res/values/themes.xml # GB dark theme
2025-12-12 13:32:55 -03:00
│
2025-12-12 13:40:39 -03:00
└── rom/ # Installation tools
├── install.sh # Interactive installer
2025-12-12 13:32:55 -03:00
├── scripts/
2025-12-12 13:40:39 -03:00
│ ├── debloat.sh # Remove bloatware (no root)
│ └── build-magisk-module.sh # Generate Magisk module
2025-12-12 13:32:55 -03:00
└── gsi/
2025-12-12 13:40:39 -03:00
├── README.md # GSI/AOSP instructions
2025-12-12 14:16:19 -03:00
└── device/pragmatismo/botdevice/ # AOSP device tree
2025-12-12 13:32:55 -03:00
```
2025-12-12 13:40:39 -03:00
## Prerequisites
2025-12-12 13:32:55 -03:00
2025-12-12 14:16:19 -03:00
### To compile BotDevice App
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 13:40:39 -03:00
# Rust and Android targets
2025-12-12 13:32:55 -03:00
rustup target add aarch64-linux-android armv7-linux-androideabi
2025-12-12 13:40:39 -03:00
# Android SDK and NDK
2025-12-12 13:32:55 -03:00
export ANDROID_HOME=$HOME/Android/Sdk
export NDK_HOME=$ANDROID_HOME/ndk/25.2.9519653
# Tauri CLI
cargo install tauri-cli
```
2025-12-12 13:40:39 -03:00
### To install on devices
2025-12-12 13:32:55 -03:00
```bash
# ADB
sudo apt install adb
2025-12-12 13:40:39 -03:00
# To generate icons/boot animation
2025-12-12 13:32:55 -03:00
sudo apt install librsvg2-bin imagemagick
```
2025-12-12 13:40:39 -03:00
## Building
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 14:16:19 -03:00
cd botdevice
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
# Generate icons
2025-12-12 13:32:55 -03:00
./scripts/generate-icons.sh
2025-12-12 13:40:39 -03:00
# Initialize Android project
2025-12-12 13:32:55 -03:00
cargo tauri android init
# Build APK
cargo tauri android build --release
```
2025-12-12 13:40:39 -03:00
## Installation
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
### Quick Method (Interactive)
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 14:16:19 -03:00
cd botdevice/rom
2025-12-12 13:32:55 -03:00
chmod +x install.sh
./install.sh
```
2025-12-12 13:40:39 -03:00
### Manual Method
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
#### Level 1: Debloat + App (No Root)
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 13:40:39 -03:00
# Connect device via USB (debug enabled)
2025-12-12 14:16:19 -03:00
cd botdevice/rom/scripts
2025-12-12 13:32:55 -03:00
./debloat.sh
2025-12-12 13:40:39 -03:00
# Install APK
2025-12-12 13:32:55 -03:00
adb install ../gen/android/app/build/outputs/apk/release/app-release.apk
2025-12-12 14:16:19 -03:00
# Set as launcher: Home → BotDevice → Always
2025-12-12 13:32:55 -03:00
```
2025-12-12 13:40:39 -03:00
#### Level 2: Magisk Module (With Root)
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 13:40:39 -03:00
# Generate module
2025-12-12 14:16:19 -03:00
cd botdevice/rom/scripts
2025-12-12 13:32:55 -03:00
./build-magisk-module.sh
2025-12-12 13:40:39 -03:00
# Copy to device
2025-12-12 14:16:19 -03:00
adb push botdevice-magisk-v1.0.zip /sdcard/
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
# On phone: Magisk → Modules → + → Select ZIP → Reboot
2025-12-12 13:32:55 -03:00
```
2025-12-12 13:40:39 -03:00
#### Level 3: GSI (Unlocked Bootloader)
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
See detailed instructions in `rom/gsi/README.md` .
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
## Bloatware Removed
2025-12-12 13:32:55 -03:00
2025-12-12 13:40:39 -03:00
The debloat automatically removes:
2025-12-12 13:32:55 -03:00
**Samsung One UI:**
- Bixby, Samsung Pay, Samsung Pass
2025-12-12 13:40:39 -03:00
- Duplicate apps (Email, Calendar, Browser)
2025-12-12 13:32:55 -03:00
- AR Zone, Game Launcher
2025-12-12 13:34:40 -03:00
**Huawei EMUI/HarmonyOS:**
2025-12-12 13:32:55 -03:00
- AppGallery, HiCloud, HiCar
- Huawei Browser, Music, Video
2025-12-12 13:34:40 -03:00
- Petal Maps, Petal Search
- AI Life, HiSuite
**Honor MagicOS:**
- Honor Store, MagicRing
- Honor Browser, Music
2025-12-12 13:32:55 -03:00
**Xiaomi MIUI:**
- MSA (analytics), Mi Apps
- GetApps, Mi Cloud
2025-12-12 13:40:39 -03:00
**Universal (all):**
- Pre-installed Facebook, Instagram
- Pre-installed Netflix, Spotify
- Games like Candy Crush
2025-12-12 13:32:55 -03:00
## Boot Animation
2025-12-12 13:40:39 -03:00
To customize the boot animation (requires root):
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 13:40:39 -03:00
# Generate animation
2025-12-12 13:32:55 -03:00
./scripts/create-bootanimation.sh
2025-12-12 13:40:39 -03:00
# Install (root)
2025-12-12 13:32:55 -03:00
adb root
adb remount
adb push bootanimation.zip /system/media/
adb reboot
```
2025-12-12 13:40:39 -03:00
## Development
2025-12-12 13:32:55 -03:00
```bash
2025-12-12 13:40:39 -03:00
# Dev mode (connects to device)
2025-12-12 13:32:55 -03:00
cargo tauri android dev
# Logs
2025-12-12 14:16:19 -03:00
adb logcat -s BotDevice:*
2025-12-12 13:32:55 -03:00
```
2025-12-12 13:40:39 -03:00
## Embedded Interface (LCD/Keyboard)
2025-12-12 13:36:29 -03:00
2025-12-12 13:40:39 -03:00
For devices with limited resources, use the embedded interface at `botui/ui/embedded/` :
2025-12-12 13:36:29 -03:00
```bash
2025-12-12 13:40:39 -03:00
# Raspberry Pi with LCD display
2025-12-12 13:36:29 -03:00
chromium-browser --kiosk --app=http://localhost:8088/embedded/
2025-12-12 13:40:39 -03:00
# ESP32 with TFT display (via WebView)
# Configure BOTSERVER_URL in firmware
2025-12-12 13:36:29 -03:00
2025-12-12 13:40:39 -03:00
# Character terminal mode
# Use botui/ui/embedded/ with CONFIG.maxMsgLen adjusted
2025-12-12 13:36:29 -03:00
```
2025-12-12 13:40:39 -03:00
### Embedded Interface Features
- Optimized for displays 320x240 down to 16x2 characters
- High contrast (green/black, e-ink)
- Low memory usage (max 10 messages)
- Keyboard navigation (Enter sends, Esc clears)
- Auto reconnection
## Features
- 🏠 **Launcher Mode** : Replaces home screen
- 🤖 **Chat Interface** : botui/ui/suite
- 🦀 **Rust Backend** : Via Tauri
- 📍 **GPS** : Location access
- 📷 **Camera** : Via Tauri plugins
- 🔔 **Notifications** : Push notifications
- 🌐 **Internet** : Communication with botserver
- 🎨 **Boot Animation** : Customizable with gb-bot.svg
## License
2025-12-12 13:32:55 -03:00
AGPL-3.0