How droidrun/droidrun-portal works
Project type and purpose
• Droidrun Portal is a single‐module Android application implementing an AccessibilityService.
File structure
• Top‐level directories:
• app/ – Android application module (build.gradle.kts, source code, resources)
• scripts/ – shell helpers (dump_view.sh)
• static/ – images used in README display
• .github/workflows/build-and-release.yml – CI/CD pipeline for building and releasing the APK
• app/src/main/java/com/droidrun/portal:
• DroidrunPortalService.kt – your AccessibilityService entry point
• MainActivity.kt – settings UI (to enable service, permissions)
• OverlayManager.kt – handles WindowManager overlay drawing
• ElementNode.kt – data model for UI element properties
• app/src/main/res/xml: config files (accessibility_service_config, data_extraction_rules, backup_rules)
• scripts/dump_view.sh – wraps ADB commands to trigger broadcasts and capture JSON
README for additional insights
• The service listens for broadcast intents (EXIT, GET_ELEMENTS, TOGGLE_OVERLAY, etc.).
• JSON export happens via ADB logs and external storage.
• Key technologies: Kotlin, Android AccessibilityService API, WindowManager overlays, GitHub Actions CI.
Elements
• OS → AccessibilityService (AccessibilityEvents)
• Host → Service (broadcast intents)
• Service → Host (logcat, file writes)
• GitHub Actions → Apk artifact → Device
• Host/CI in another
Final advice
• Be meticulous: label every broadcast action, config file, and data flow.
• Don’t omit the ADB command channel—this is the primary integration point for users.
• Overlay pipeline distinctly from the data export pipeline.