blob: d99abcb249e9c63d4af985a020e6a620d9506ea3 [file] [log] [blame] [view]
Sam Lin45416de2020-10-25 10:21:28 -07001# [Android Automotive](https://source.android.com/devices/automotive) Developer Tools
Sam Lin5ee1d7c2020-10-22 16:09:32 -07002
Sam Lin45416de2020-10-25 10:21:28 -07003AADevT contains tools for AA device developers to improve their productivity.
4
Sam Lina98a2642021-03-17 13:11:47 -07005* Fully unbundle from Android versions, and use the AOSP trunk based
6development model.
Heemin Seogb762d6c2021-01-12 16:52:21 -08007
8* Bridge the app ecosystem for [Android Automotive OS](https://developer.android.com/training/cars)
9because device developers are the key producers for the core apps.
10
Sam Lina98a2642021-03-17 13:11:47 -070011* Leverage [Android app developer tools](https://developer.android.com/studio/intro)
12that a few million developers use.
Sam Lin5ee1d7c2020-10-22 16:09:32 -070013
14[TOC]
15
Sam Lina98a2642021-03-17 13:11:47 -070016## Dev Tools
17This contains tools designed specifically to simplify the AA device development
18workflows.
Sam Lin45416de2020-10-25 10:21:28 -070019
Sam Lina98a2642021-03-17 13:11:47 -070020* clone_proj.sh to clone a git project for the unbundled development workflows
21in instead of the whole Android repo.
Heemin Seogb762d6c2021-01-12 16:52:21 -080022
Sam Linb6e3a832021-05-08 17:11:03 -070023## Change Reports
24
25### change_report.py
26change_report.py creates a diff statistic CSV file from 2 versions of a codebase.
27This is useful when the git commit history is somehow not obtainable. What you
28need is to get 2 versions of a codebase downloaded on your disk first.
29
30* You can compare specific folders of concern for a quick result, or when
31there is a code patch change.
32* This skips all symlinks & ignores common repository metadata folders, e.g.
33.git, etc.
34* It can take a long time & generates a large CSV file for the whole Android
35codebase & especially if they are many changes. For example:
36 * Android 11 QPR1 vs QPR2 takes more than 8 min. & generates a 5MB CSV file.
37 * Android 10 QPR3 vs Android 11 QPR2 takes more than 11 min. & generates a
38 95MB CSV file.
39* To reduce time, you should always remove **out**, the build output folder first.
40* For example, to compare Android 11 QPR1 vs QPR2 AOSP codebases on your disk.
41
42```
43python3 change_report.py --old_dir ~/android/android11-qpr1-release \
44 --new_dir ~/android/android11-qpr2-release \
45 --csv_file ~/change_reports/change_report_android11-qpr1-release_android11-qpr2-release.csv
46```
47
48* An output example: [change_report-new_vs_old_codebase.csv](dev/resource/change_report-new_vs_old_codebase.csv)
49is the change report between **dev/resource/old_codebase** and
50**new_codebase**.
51* The **states** are:
52 * SAME = 0
53 * NEW = 1
54 * REMOVED = 2
55 * MODIFIED = 3
56 * INCOMPARABLE = 4
Sam Lina98a2642021-03-17 13:11:47 -070057
58### sysui_oem_diff.sh
59sysui_oem_diff.sh generates a summary of code changes between 2 revisions.
60Which gives you a rough idea of changes on files and Lines of Code.
61
62* The report is especailly useful to discuss the pain points on sysui/notif
63customization with AAOS team.
Sam Linccd77122021-04-20 14:05:46 -070064* For example, to generate the change report for Android 11 to 10 QPR3: [sysui_gcar_android10-qpr3-release_android11-release.txt](dev/resource/sysui_gcar_android10-qpr3-release_android11-release.txt)
Sam Lina98a2642021-03-17 13:11:47 -070065
66```
Sam Linb6e3a832021-05-08 17:11:03 -070067./sysui_oem_diff.sh ~/Android/android11-release remotes/aosp/android10-qpr3-release remotes/aosp/android11-release > sysui_gcar_android10-qpr3-release_android11-release.txt
Sam Lina98a2642021-03-17 13:11:47 -070068```
Sam Lin45416de2020-10-25 10:21:28 -070069
Sam Lin5ee1d7c2020-10-22 16:09:32 -070070## System Performance Tuning
Sam Lina98a2642021-03-17 13:11:47 -070071AAOS system performance turning is hard. Here are the tools to make it a bit
72easier for the device developers.
Sam Lin5ee1d7c2020-10-22 16:09:32 -070073
74* time_to_init_disp.sh to measure an app's [Time the Initial Display](https://developer.android.com/topic/performance/vitals/launch-time#time-initial)
Sam Linccd77122021-04-20 14:05:46 -070075
76## [Android Virtual Device as a Development Platform](avd/README.md)