-
Notifications
You must be signed in to change notification settings - Fork 0
Injection Architecture
GameMapperMind uses a 3-path touch injection scheme with automatic failover. Each path tries the previous one first. Unlike earlier versions, Path C is never permanently cached — every call retries A then B then C.
| Path | Method | Reliability | Latency | Multi-touch |
|---|---|---|---|---|
| A (primary) | IInputManager AIDL via ServiceManager | Highest | <1ms | Full (multi-pointer) |
| B (fallback) | InputManager class via getSystemService + reflection | High | <1ms | Full (multi-pointer) |
| C (last resort) | input tap shell command | Guaranteed | ~100ms | Single-tap only |
Uses the same AIDL interface as Android internal input binary. Most reliable because it bypasses hidden API restrictions and accepts concurrent injectInputEvent calls for different pointer IDs.
Uses the public InputManager instance instead of raw AIDL proxy. Functionally identical to Path A but goes through one extra layer.
Runs the input tap shell command. Limitations:
- Only supports single-pointer DOWN + UP (no MOVE, no multi-pointer)
- ~100ms latency per call
- Does NOT fire when other pointers are active (v3 fix) — would hijack the active multi-touch session
- Build MotionEvent with ALL active pointers
- Try Path A — if success, return true
- Try Path B — if success, return true
- If pointerCount == 1 AND action is DOWN/UP: Fall back to shell input tap (one-shot, NOT cached)
- Else (multi-pointer or MOVE): Return false (shell cannot handle this)
Key v3 change: activePath is NEVER set to C. Every call retries A then B first. This ensures transient A/B failures do not permanently kill analog movement.
Shizuku runs the TouchDaemonService as shell uid (2000), which:
- Bypasses Android hidden API restrictions (Path A/B reflection works)
- Has INJECT_EVENTS permission (required for injectInputEvent)
- Can execute shell commands (Path C)
Without Shizuku, none of the paths work.
- Multi-Pointer-MotionEvent — How v3 builds correct multi-touch MotionEvents
- Dual-AIDL-Dispatch-Thread — Why stick and button use separate threads