# droidrun-portal **Repository Path**: pplus_open_source/droidrun-portal ## Basic Information - **Project Name**: droidrun-portal - **Description**: Droidrun Portal 是一款 Android 无障碍服务,可为屏幕上的 UI 元素提供实时视觉反馈和数据收集。它创建了一个交互式叠加层,突出显示可点击、可勾选、可编辑、可滚动和可聚焦的元素,使其成为 UI 测试、自动化开发和无障碍评估的宝贵工具。 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 2 - **Created**: 2025-04-18 - **Last Updated**: 2025-11-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![GitHub stars](https://img.shields.io/github/stars/droidrun/droidrun-portal?style=social)](https://github.com/droidrun/droidrun-portal/stargazers) [![Discord](https://img.shields.io/discord/1360219330318696488?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/ZZbKEZZkwK) [![Documentation](https://img.shields.io/badge/Documentation-📕-blue)](https://docs.droidrun.ai) [![Twitter Follow](https://img.shields.io/twitter/follow/droid_run?style=social)](https://x.com/droid_run) ## 👁️ Overview Droidrun Portal is an Android accessibility service that provides real-time visual feedback and data collection for UI elements on the screen. It creates an interactive overlay that highlights clickable, checkable, editable, scrollable, and focusable elements, making it an invaluable tool for UI testing, automation development, and accessibility assessment. ## ✨ Features ### 🔍 Element Detection with Visual Overlay - Identifies all interactive elements (clickable, checkable, editable, scrollable, and focusable) - Handles nested elements and scrollable containers - Assigns unique indices to interactive elements for reference ## 🚀 Usage ### ⚙️ Setup 1. Install the app on your Android device 2. Enable the accessibility service in Android Settings → Accessibility → Droidrun Portal 3. Grant overlay permission when prompted ### 💻 ADB Commands ```bash # Get accessibility tree as JSON adb shell content query --uri content://com.droidrun.portal/a11y_tree # Get phone state as JSON adb shell content query --uri content://com.droidrun.portal/phone_state # Get combined state (accessibility tree + phone state) as JSON adb shell content query --uri content://com.droidrun.portal/state # Test connection (ping) adb shell content query --uri content://com.droidrun.portal/ping # Keyboard text input (base64 encoded) adb shell content insert --uri content://com.droidrun.portal/keyboard/input --bind base64_text:s:"SGVsbG8gV29ybGQ=" # Clear text via keyboard adb shell content insert --uri content://com.droidrun.portal/keyboard/clear # Send key event via keyboard (e.g., Enter key = 66) adb shell content insert --uri content://com.droidrun.portal/keyboard/key --bind key_code:i:66 ``` ### 📤 Data Output Element data is returned in JSON format through the ContentProvider queries. The response includes a status field and the requested data. All responses follow this structure: ```json { "status": "success", "data": "..." } ``` For error responses: ```json { "status": "error", "error": "Error message" } ``` ## 🔧 Technical Details - Minimum Android API level: 30 (Android 11.0) - Uses Android Accessibility Service API - Implements custom drawing overlay using Window Manager - Supports multi-window environments - Built with Kotlin ## 🔄 Continuous Integration This project uses GitHub Actions for automated building and releasing. ### 📦 Automated Builds Every push to the main branch or pull request will trigger the build workflow that: - Builds the Android app - Creates the APK - Uploads the APK as an artifact in the GitHub Actions run