Skip to main content

Module android

Module android 

Source
Expand description

Android adb am broadcast transport (bd-17026f).

Delivers crate::wire::InjectionCommands to the live com.harryaskham.omni receiver (android-utils RingModsReceiver) by shelling out to adb shell am broadcast. The receiver consumes:

  • type=text + text(String) -> commitText
  • type=key + keycode(int) meta_state(int) -> sendKeyEvent
  • type=scroll + amount(int) -> DPAD up/down sequence
  • sender_package(String) gated by the receiver allowlist (com.harryaskham.* / com.termux.*).

Semantic key/combo NAMES are mapped to Android keycodes + meta_state HERE (CLI-side), so the wire stays platform-neutral. A combo expands to a sequence of type=key broadcasts carrying the accumulated modifier meta_state — matching the receiver’s “single key+meta, or a sequence of type=key for multi-key chords” contract.

Structs§

AmBroadcast
One resolved am broadcast invocation (its extras).

Constants§

ACTION
Canonical Omni injection action.
LEGACY_ACTION
Legacy ring-mods action, still accepted by the receiver.
SENDER_PACKAGE
Sender package omni-cli declares (omni-cli is a host Rust binary, not an installed Android package); within the receiver allowlist prefix.

Functions§

dispatch
Render (and, when execute, run) the adb broadcasts. Returns the displayable adb ... shell ... command lines (one per broadcast).
keycode
Map a semantic key name (or single letter/digit) to an Android KeyEvent keycode. Returns None for unknown names.
meta_bit
Map a modifier name to its Android meta_state bit, if it is a modifier.
to_am_broadcasts
Expand an InjectionCommand into one or more AmBroadcasts.