1.0.4 • Published 4 months ago
adb-rest-api v1.0.4
ADB REST API
A REST API server that provides HTTP endpoints to interact with Android Debug Bridge (ADB). This tool allows you to control Android devices over HTTP, making it easier to integrate ADB functionality into your applications or automation workflows.
Features
- 🚀 RESTful API endpoints for ADB commands
- 📱 Device management and control
- 📚 Interactive Swagger/OpenAPI documentation
- ⚡ Fast and lightweight
- 🔒 CORS enabled
- 📝 Pretty JSON responses
Installation
You can run this tool directly using npx:
npx adb-rest-api
Or install it globally:
npm install -g adb-rest-api
adb-rest-api
Prerequisites
- Node.js 18 or higher
- ADB (Android Debug Bridge) installed and accessible in your system PATH
- At least one Android device connected or emulator running
API Documentation
Once the server is running, you can access the interactive API documentation at:
http://localhost:3000/docs
The OpenAPI schema is available at:
http://localhost:3000/api/openapi.json
Available Endpoints
The API provides endpoints for:
- List connected devices
- Execute shell commands
- Install/uninstall apps
- Push/pull files
- And more...
Check the Swagger documentation for the complete list of endpoints and their usage.
Development
If you want to contribute or run the project locally:
- Clone the repository:
git clone https://github.com/yourusername/adb-rest-api.git
cd adb-rest-api
- Install dependencies:
npm install
- Start development server:
npm run dev
- Build for production:
npm run build
Environment Variables
PORT
: Server port (default: 3000)
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
open http://localhost:3000