Bug: 162952352

Clone this repo:
  1. e2ee656 [automerger skipped] Merge Android 12 am: 7b74d94e99 -s ours am: e92a427dd3 -s ours am: 7e2c9f9501 -s ours by Xin Li · 3 months ago master
  2. 7e2c9f9 [automerger skipped] Merge Android 12 am: 7b74d94e99 -s ours am: e92a427dd3 -s ours by Xin Li · 3 months ago
  3. e92a427 [automerger skipped] Merge Android 12 am: 7b74d94e99 -s ours by Xin Li · 3 months ago
  4. 7b74d94 Merge Android 12 by Xin Li · 3 months ago android-s-v2-preview-1 android-s-v2-beta-2 android-s-v2-preview-2
  5. dc4f412 [automerger skipped] Merge sc-dev-plus-aosp-without-vendor@7634622 am: 1b05fe17e9 -s ours am: 7495612089 -s ours by Xin Li · 5 months ago

Car rotary service

Building

make CarRotaryController -j64

Enable/disable RotaryService

To enable, run:

adb shell settings put secure enabled_accessibility_services com.android.car.rotary/com.android.car.rotary.RotaryService

To disable, run:

adb shell settings delete secure enabled_accessibility_services

Inject events

Inject RotaryEvent

To rotate the controller counter-clockwise, run:

adb shell cmd car_service inject-rotary

For clockwise, run:

adb shell cmd car_service inject-rotary -c true

To rotate the controller multiple times (100 ms ago and 50 ms ago), run:

adb shell cmd car_service inject-rotary -dt 100 50

Inject KeyEvent

To nudge the controller up, run:

adb shell cmd car_service inject-key 280

Use KeyCode 280 for nudge up, 281 for nudge down,282 for nudge left,283 for nudge right.

To click the controller center button, run:

adb shell cmd car_service inject-key 23