Bug: 162952352

Clone this repo:
  1. 17503d0 DO NOT MERGE - Merge Android R QPR1 by Xin Li · 6 weeks ago master
  2. 5b657de Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855 by Xin Li · 9 weeks ago
  3. 7b480f9 Skip ab/6749736 in stage. by Xin Li · 4 months ago
  4. 8ae324a [automerger skipped] Migrate away from deprecated Truth APIs. am: 14c4c9a344 am: aa4b853dff am: 82e38a2c77 am: 98db6bec5c -s ours by Alexander Dorokhine · 4 months ago
  5. 98db6be Migrate away from deprecated Truth APIs. am: 14c4c9a344 am: aa4b853dff am: 82e38a2c77 by Alexander Dorokhine · 4 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