Overview
APK Extractor provides a REST API built with Express.js for managing Android devices and extracting APK files. The API runs locally and handles device detection, app extraction, wireless debugging, and more.Base URL
All API endpoints are accessible at:Authentication
No authentication required. The API is designed for local-only access and runs on127.0.0.1.
Response Format
All responses are returned in JSON format:Error Responses
Errors return appropriate HTTP status codes with JSON error messages:200- Success400- Bad request (missing or invalid parameters)404- Resource not found500- Server error (ADB command failure, etc.)
Server-Sent Events (SSE)
Some endpoints use Server-Sent Events for real-time progress updates:/api/config/download- ADB installation progress/api/devices/:serial/apps/:package/compile-xapk- XAPK compilation progress/api/logs/stream- Real-time server logs
Content-Type: text/event-stream and send data in the format:
Complete Endpoint List
Configuration
- GET /api/status - Check ADB configuration status
- DELETE /api/config - Clear ADB configuration
- POST /api/config/path - Set ADB executable path
- GET /api/config/download - Download and install ADB (SSE)
Device Management
- GET /api/devices - List all connected devices with details
- GET /api/devices/poll - Quick poll for device serials
- GET /api/devices/:serial/info - Get detailed device information
- GET /api/network/ip - Get local network interfaces
Applications
- GET /api/devices/:serial/apps - List installed apps
- POST /api/devices/:serial/apps/batch-info - Get info for multiple apps
- GET /api/devices/:serial/apps/:package/info - Get detailed app information
- POST /api/devices/:serial/apps/:package/extract - Extract single APK
- GET /api/devices/:serial/apps/:package/compile-xapk - Compile split APK to XAPK (SSE)
- GET /api/devices/:serial/apps/:package/download-xapk - Download compiled XAPK
Wireless Debugging
- POST /api/adb/pair - Pair device via wireless debugging
- POST /api/adb/connect - Connect to device wirelessly
Saved Devices
- GET /api/saved-devices - List saved wireless devices
- POST /api/saved-devices - Save wireless device
- DELETE /api/saved-devices/:id - Remove saved device
Device Names
- GET /api/device-names - Get custom device names
- PUT /api/device-names/:serial - Set custom device name
- DELETE /api/device-names/:serial - Remove custom device name
Utility
GET /api/logs/stream- Stream server logs in real-time (SSE)POST /api/shutdown- Gracefully shutdown the server
The logs and shutdown endpoints are primarily used by the web interface. The logs endpoint streams console output, and the shutdown endpoint is triggered by the “Apagar Servidor” button in the UI.
