A web-based tool to automate and simplify retrieving logcat logs from an Android device using Node.js, Express, React and ADBKit.
- Retrieve Logcat Logs: Fetch real-time logcat logs from an Android device.
- Filtering: Filter logs by priority, tag, process ID (PID), keywords, or time range.
- Web API: RESTful endpoints for fetching logs.
- Easy ADB Integration: Uses ADBKit to interact with the Android Debug Bridge (ADB).
- Web UI: A React-based frontend for easier log viewing and filtering.
- Node.js – Backend runtime
- Express.js – Web framework
- ADBKit – ADB client library for Node.js
- React.js – Frontend library for building UI
- Tailwind CSS – Styling framework
- Postman – API testing
git clone https://github.com/your-username/logcat-retrieval.git
cd logcat-retrievalnpm installnode server.jscd client
npm install
npm startMake sure you have ADB installed and running:
adb start-serverGET /logcat/:idGET http://localhost:5000/logcat/emulator-5554| Parameter | Description |
|---|---|
level |
Log priority (e.g., error, warn, info) |
tag |
Filter logs by tag |
pid |
Process ID filter |
search |
Search for keywords in logs |
startTime |
Start time (ISO 8601 format) |
endTime |
End time (ISO 8601 format) |
Get logs for "MyApp" tagged logs with priority error:
GET http://localhost:5000/logcat/emulator-5554?level=error&tag=MyApp- Connect to a device – Connect to a device via UI. (In works)
- Advanced Filtering – Easily apply filters using UI controls. (In works)
- Copy & Export Logs – Download logs in
.txtor.jsonformat. (In works)
- The Express server initializes an ADB client (
adb.createClient()). - When a request is made to
/logcat/:id, the server opens a logcat stream. - Logs are filtered based on query parameters.
- The processed logs are returned as a JSON response.
- The React client fetches the logs and displays them in a structured format.
- Log Storage – Save logs for later analysis.
- WebSocket Integration – Enable real-time push updates.
- User Authentication – Secure access to logs.
This project is available under the MIT License.
