Overview
APK Extractor automatically detects Android devices connected via USB or WiFi, extracting detailed device information including brand, model, and Android version. The system monitors devices in real-time and supports mDNS auto-connection for wireless debugging.Detection Methods
USB Device Detection
When you connect an Android device via USB with debugging enabled, APK Extractor instantly detects it using ADB’s device listing:R58N123456A).
WiFi Device Detection
Devices connected wirelessly appear with their IP address and port:- Manual connection:
192.168.1.100:5555 - mDNS auto-connection:
adb-R58N123456A._adb-tls-connect._tcp
Android 11+ supports wireless debugging with automatic mDNS broadcasting. APK Extractor detects these devices automatically without manual pairing.
mDNS Support
For devices using wireless debugging with mDNS (Android 11+), APK Extractor:- Detects the mDNS service name format:
adb-*._adb-tls-connect._tcp - Resolves the device’s IP address using ADB shell commands
- Extracts device information (brand/model)
- Auto-saves the device for quick reconnection
Real-Time Monitoring
The web interface polls for device changes every 4 seconds using an optimized lightweight endpoint:The polling endpoint only returns serial numbers for performance. Full device info loads when you select a device.
Device Information Extraction
APK Extractor extracts comprehensive device details using ADB’sgetprop command:
Properties Collected
| Property | ADB Command | Example Value |
|---|---|---|
| Brand | getprop ro.product.manufacturer | Samsung |
| Model | getprop ro.product.model | Galaxy S21 |
| Android Version | getprop ro.build.version.release | 13 |
| SDK Level | getprop ro.build.version.sdk | 33 |
| Device Codename | getprop ro.product.device | SM-G991B |
Parallel Processing
All connected devices are processed in parallel for maximum performance:How It Works
Technical Flow
Technical Flow
-
Poll Detection (every 4s)
- Execute
adb devicescommand - Parse output for device serials
- Compare with previous state
- Notify UI of changes
- Execute
-
Device Selection
- User clicks on a device
- Fetch detailed info using
getpropcommands - Extract brand, model, Android version
- Display in device panel
-
Wireless IP Resolution
- For WiFi devices, parse serial for IP
- For mDNS devices, run
shell ip route - Extract source IP from route table
- Auto-update saved devices database
-
Auto-Save WiFi Devices
- Detect wireless connection
- Extract device label
- Save to
devices.json - Enable one-click reconnection
Device Display
Devices appear in the interface with:- Brand and Model (e.g., “Samsung Galaxy S21”)
- Serial Number (for USB) or IP Address (for WiFi)
- Connection Type indicator (USB/WiFi icon)
- Custom Name (if assigned)
Performance Optimization
Caching Strategy
- Device list cached in memory
- Polling only fetches serial numbers
- Full device info loaded on demand
- 5-second timeout for responsiveness
