commit | 79c67d8b707d6035316443862e6caab26cf93ee0 | [log] [tgz] |
---|---|---|
author | Sal Savage <salsavage@google.com> | Thu Apr 14 15:49:35 2022 -0700 |
committer | Andrew Cheng <chengandrew@google.com> | Fri Aug 26 19:25:23 2022 +0000 |
tree | 50592d6cd7143e9af232ac51a21c4e37e3847883 | |
parent | d1b86fd2206ea16dbefef39addf8ce83c8050c49 [diff] |
Re-evaluate the key material timeouts and lifecycle This change brings our FastPair Provider more in line with a few important line items in the spec and adds more logging to aid in debugging future issues: - Key 'k' is held for up to 10 seconds while awaiting pairing. Pairing is indicated by the pin code arriving. - Once pairing begins we hold 'k' for 35 seconds to match the stack's pairing timeout, despite the fast pair spec suggesting we can hold it nearly indefinitely - A successful bond with a seeker results in us clearing our failure count now - 10 failed attempts causes a 5 minute timeout on all pairing attempts, per the spec. - Logging has been added to document key and key lifecycle changes. Null checks have been put in place to log encrypt and decrypt attempts that try to use an expired key. Additionally, a few functions have been reworked to return responses instead of using private class members. Functions have also been added to abstract away dealing with keys. Bug: 229271352 Test: atest CarServiceUnitTest Test: atest FastPairGattServerTest Change-Id: Icd81b63c805f9fe8f35620519e6753bc81e33274
Source code for Android Automotive OS.
car_product/ - AAOS product car-builtin-lib/ - A helper library for CarService to access hidden framework APIs car-lib/ - Car API car-lib-module/ - Car API module cpp/ - Native services experimental/ - Experimental Car API and services packages/ - Apps and services for cars service/ - Car service module service-builint - Platform builtin component that runs CarService module tests/ - Tests and sample apps tools/ - Helper scripts
Native (C++) code format is required to be compatible with .clang-format file. The formatter is already integrated to repo
tool. To run manually, use:
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.
Dumpsys and car shell can be useful when debugging CarService integration issues.
adb shell dumpsys car_service # to dump all car service information adb shell dumpsys car_service --services [service name] # to dump a specific service information adb shell dumpsys car_service --list # get list of available services
Dumpsys for CarService includes the following (more information is availble in dumpsys, below are just highlights):
adb shell cmd car_service
CarService supports commands via car shell:
(list is not complete, run adb shell cmd car_service -h for more details)
Start Garage mode
adb shell cmd car_service garage-mode on
Finish Garage mode
adb shell cmd car_service garage-mode on
Get Garage mode status
adb shell cmd car_service garage-mode query
Change Garage mode max duration (only eng and debug builds)
adb shell setprop android.car.garagemodeduration <seconds>