Adds a CLI (Command-Line Interface) to KitchenSink.

Examples:

$ alias ks_cmd='adb shell dumpsys activity com.google.android.car.kitchensink/.KitchenSinkActivity cmd'

$ ks_cmd help
TASK 1010085:com.google.android.car.kitchensink id=1000039 userId=10
  ACTIVITY com.google.android.car.kitchensink/.KitchenSinkActivity d39dc7c pid=10541
KitchenSink Command-Line Interface. Available commands:

  help:
    Shows this help message.

  get-delegated-scopes:
    Lists delegated scopes set by the device admin.

  is-uninstall-blocked <PKG>:
    Checks whether uninstalling the given app is blocked.

  set-uninstall-blocked <PKG> <true|false>:
    Blocks / unblocks uninstalling the given app.

  generate-device-attestation-key-pair <ALIAS> [FLAGS]:
    Generates a device attestation key.

$ ks_cmd get-delegated-scopes
TASK 1010085:com.google.android.car.kitchensink id=1000039 userId=10
  ACTIVITY com.google.android.car.kitchensink/.KitchenSinkActivity d39dc7c pid=10541
3 delegated scopes:
  delegation-block-uninstall
  delegation-package-access
  delegation-cert-install

Test: see above
Bug: 213388897

Change-Id: I58623f5c1a1d60af7743f5a815a491ebbad9b9fe
2 files changed
tree: 668116dc63670fcd9e0c4b551573ff558a46c0f5
  1. car-admin-ui-lib/
  2. car-internal-lib/
  3. car-lib/
  4. car-maps-placeholder/
  5. car-systemtest-lib/
  6. car-test-lib/
  7. car-usb-handler/
  8. car_product/
  9. cpp/
  10. data/
  11. experimental/
  12. FrameworkPackageStubs/
  13. obd2-lib/
  14. packages/
  15. procfs-inspector/
  16. service/
  17. tests/
  18. tools/
  19. user/
  20. vehicle-hal-support-lib/
  21. .clang-format
  22. .gitignore
  23. Android.mk
  24. CleanSpec.mk
  25. CPPLINT.cfg
  26. OWNERS
  27. PREUPLOAD.cfg
  28. README.md
  29. TEST_MAPPING
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.