Skip to main content

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:
http://localhost:3000

Authentication

No authentication required. The API is designed for local-only access and runs on 127.0.0.1.

Response Format

All responses are returned in JSON format:
{
  "ok": true,
  "data": {...}
}

Error Responses

Errors return appropriate HTTP status codes with JSON error messages:
{
  "error": "Error message description"
}
Common HTTP status codes:
  • 200 - Success
  • 400 - Bad request (missing or invalid parameters)
  • 404 - Resource not found
  • 500 - 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
SSE responses have Content-Type: text/event-stream and send data in the format:
data: {"msg": "Progress message", "progress": 50}

Complete Endpoint List

Configuration

Device Management

Applications

Wireless Debugging

Saved Devices

Device Names

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.

Rate Limiting

No rate limiting is enforced as this is a local API.

ADB Dependency

Most endpoints require Android Debug Bridge (ADB) to be configured. Use the Configuration endpoints to set up ADB before making device or app requests.

Build docs developers (and LLMs) love