Skip to content

[Feature]: Support arbitrary ADB commands #491

@mikef-dk

Description

@mikef-dk

What do you want to see in Flocon?

Flocon already leverages ADB to power certain features. I am curious to hear your thoughts on adding a dedicated "ADB" section that would allow users to execute arbitrary ADB commands and save them for future use.

I would be happy to help implement such a feature, but I wanted to gather feedback first to ensure this aligns with Flocon's vision.

Note: Following was written in parts by AI to make a convincing case. 🙈


🚀 Motivation

Flocon is already a powerful companion for inspecting network, databases, and analytics. However, developers often encounter scenarios where they need to modify the device state to test specific edge cases (e.g., "What happens if I turn off WiFi now?" or "I need to clear the app data to test the onboarding flow").

Currently, this requires context-switching:

  • Alt-Tab away from Flocon.
  • Open a Terminal
  • Type adb shell ... commands manually.
  • Alt-Tab back to Flocon/Emulator.

💡 The Proposal

Adding a dedicated ADB Section (or "Commander") to the Flocon desktop client. This interface would allow users to:

  • Execute arbitrary ADB commands directly from Flocon.
  • Save frequently used commands for one-click execution.

🛠 Proposed Features & UI

  1. The Command Runner
    A simple input field to type a command (e.g., input keyevent 4) with a "Run" button. It should display the stdout/stderr output in a console-like window below.
  2. "Quick Actions" / Saved Library
    A grid of saved buttons. Users can create a button, name it (e.g., "Reset App"), and assign a command to it.

⚡ Use Cases & Examples

🔬 State & Connectivity Testing

  • Network Toggling: Rapidly switch network states to test offline-first apps.
    • svc wifi enable / svc wifi disable
    • svc data enable / svc data disable
  • Airplane Mode:
    • settings put global airplane_mode_on 1 (requires broadcast)

🧹 Application Management

  • Fresh Install Simulation:
    • pm clear <package_name> (Clear Data/Cache)
    • pm uninstall <package_name>
  • Permissions:
    • pm grant <package_name> android.permission.CAMERA
    • pm revoke <package_name> android.permission.RECORD_AUDIO

⌨️ TV & UI Interaction (Huge for Android TV/FireTV)
Typing on a TV remote is painful.

  • Text Injection:
    • input text "super_long_test_password_123"
  • Key Events:
    • input keyevent 3 (Home)

📐 UI Debugging

  • Accessibility:
    • settings put system font_scale 1.3
  • Show Taps:
    • settings put system show_touches 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions