Skip to content

Termux: RUN_COMMAND-Berechtigung hinzufügen und RunCommandService gezielt ansprechen#98

Closed
Android-PowerUser wants to merge 1 commit into
create-virtual-desktop-and-emulate-android-15from
test-termux-command-function-in-screen-operator
Closed

Termux: RUN_COMMAND-Berechtigung hinzufügen und RunCommandService gezielt ansprechen#98
Android-PowerUser wants to merge 1 commit into
create-virtual-desktop-and-emulate-android-15from
test-termux-command-function-in-screen-operator

Conversation

@Android-PowerUser
Copy link
Copy Markdown
Owner

Motivation

  • Sicherstellen, dass die App externe Termux-Befehle zuverlässig ausführen kann, indem die benötigte Berechtigung und ein expliziter Service-Ziel-Intent gesetzt werden.
  • Verbesserung der Robustheit bei der praktischen Ausführung von Termux("...")-Befehlen im Accessibility-Service.

Description

  • Fügt com.termux.permission.RUN_COMMAND in app/src/main/AndroidManifest.xml hinzu.
  • Setzt im executeTermuxCommand-Intent in app/src/main/kotlin/com/google/ai/sample/ScreenOperatorAccessibilityService.kt die Zielklasse auf com.termux.app.RunCommandService.
  • Fügt das Extra com.termux.RUN_COMMAND_SESSION_ACTION mit dem Integer-Wert 0 hinzu, um eine neue Termux-Session zu erzwingen und die Ausführungszuverlässigkeit zu verbessern.

Testing

  • Ausgeführt: ./gradlew :app:testDebugUnitTest.
  • Ergebnis: Das Projekt kompiliert, aber :app:testDebugUnitTest schlägt fehl, da 6 Unit-Tests in CommandParserTest fehlschlagen (vorhandene/ungeänderte Tests).

Codex Task

Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR successfully adds the necessary Termux integration improvements for reliable command execution. The changes include:

  • Added com.termux.permission.RUN_COMMAND permission in the manifest
  • Explicitly targeted com.termux.app.RunCommandService using setClassName()
  • Added RUN_COMMAND_SESSION_ACTION extra to force new session creation

The implementation follows proper Android patterns for inter-app communication and service invocation. The changes are focused and address the stated goal of ensuring reliable Termux command execution from the Accessibility Service.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@Android-PowerUser Android-PowerUser deleted the branch create-virtual-desktop-and-emulate-android-15 May 11, 2026 18:20
@Android-PowerUser Android-PowerUser deleted the test-termux-command-function-in-screen-operator branch May 11, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant