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) ->commitTexttype=key+keycode(int)meta_state(int) ->sendKeyEventtype=scroll+amount(int) -> DPAD up/down sequencesender_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 broadcastinvocation (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 displayableadb ... shell ...command lines (one per broadcast). - keycode
- Map a semantic key name (or single letter/digit) to an Android
KeyEventkeycode. ReturnsNonefor unknown names. - meta_
bit - Map a modifier name to its Android meta_state bit, if it is a modifier.
- to_
am_ broadcasts - Expand an
InjectionCommandinto one or moreAmBroadcasts.