• Home
Name Date Size #Lines LOC

..--

FrameworkPackageStubs/03-May-2024-1,5091,241

apex_car_framework/03-May-2024-243222

car-admin-ui-lib/03-May-2024-2,205721

car-builtin-lib/03-May-2024-6,7673,981

car-evs-helper-lib/03-May-2024-826542

car-helper-lib/03-May-2024-484260

car-lib/03-May-2024-98,53953,427

car-lib-module/03-May-2024-4,0453,595

car-maps-placeholder/03-May-2024-2,108637

car-test-lib/03-May-2024-6,9134,270

car-usb-handler/03-May-2024-5,5093,385

car_product/03-May-2024-62,13334,025

cpp/03-May-2024-116,28075,835

data/etc/03-May-2024-1,575884

experimental/03-May-2024-6,8743,517

obd2-lib/03-May-2024-1,6121,020

packages/03-May-2024-17,02310,880

procfs-inspector/03-May-2024-737422

service/03-May-2024-135,158101,739

service-builtin/03-May-2024-5,4053,382

tests/03-May-2024-272,356199,839

tools/03-May-2024-41,92138,335

vehicle-hal-support-lib/03-May-2024-1,185841

.clang-formatD03-May-20241.5 KiB4645

.gitignoreD03-May-202470 1110

Android.mkD03-May-2024883 265

CPPLINT.cfgD03-May-2024307 109

CleanSpec.mkD03-May-20243.4 KiB6612

OWNERSD03-May-2024247 109

OWNERS_networkingD03-May-2024103 55

PREUPLOAD.cfgD03-May-20241.2 KiB1613

README.mdD03-May-20243 KiB10670

TEST_MAPPINGD03-May-2024508 2928

README.md

1<!--
2  Copyright (C) 2021 The Android Open Source Project
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License
15  -->
16
17# AAOS
18
19Source code for [Android Automotive OS](https://source.android.com/devices/automotive).
20
21## Structure
22
23```
24car_product/           - AAOS product
25car-builtin-lib/       - A helper library for CarService to access hidden
26                         framework APIs
27car-lib/               - Car API
28car-lib-module/        - Car API module
29cpp/                   - Native services
30experimental/          - Experimental Car API and services
31packages/              - Apps and services for cars
32service/               - Car service module
33service-builint        - Platform builtin component that runs CarService module
34tests/                 - Tests and sample apps
35tools/                 - Helper scripts
36```
37
38## C++
39
40Native (C++) code format is required to be compatible with .clang-format file. The formatter is
41already integrated to `repo` tool. To run manually, use:
42
43```
44git clang-format --style=file --extension='h,cpp,cc' HEAD~
45```
46
47Note that clang-format is *not* desirable for Android java files. Therefore
48the  command line above is limited to specific extensions.
49
50## Debugging CarService
51
52Dumpsys and car shell can be useful when debugging CarService integration issues.
53
54### dumpsys
55
56```
57adb shell dumpsys car_service # to dump all car service information
58adb shell dumpsys car_service --services [service name] # to dump a specific service information
59adb shell dumpsys car_service --list # get list of available services
60```
61
62Dumpsys for CarService includes the following (more information is availble in dumpsys, below are just highlights):
63- Enabled features
64- Current power policy and list of registered power policies
65- Power state of componens of power policy
66- Silent mode status
67- Garage mode status
68- I/O stats
69- List of available vehicle properties
70
71### car shell
72
73```
74adb shell cmd car_service
75```
76
77CarService supports commands via car shell:\
78(list is not complete, run adb shell cmd car_service -h for more details)
79- Injection of vhal events
80- Toggling garage mode on/off
81- Toggling of suspend/hibernation/resume
82- Injection of input events
83- User managemnet/switching
84- Power policy control/manipulation
85
86### Helpful command for Garage mode
87
88Start Garage mode
89```
90adb shell cmd car_service garage-mode on
91```
92
93Finish Garage mode
94```
95adb shell cmd car_service garage-mode on
96```
97
98Get Garage mode status
99```
100adb shell cmd car_service garage-mode query
101```
102
103Change Garage mode max duration (only eng and debug builds)
104```
105adb shell setprop android.car.garagemodeduration <seconds>
106```