Sam Lin | 45416de | 2020-10-25 10:21:28 -0700 | [diff] [blame] | 1 | # [Android Automotive](https://source.android.com/devices/automotive) Developer Tools |
Sam Lin | 5ee1d7c | 2020-10-22 16:09:32 -0700 | [diff] [blame] | 2 | |
Sam Lin | 45416de | 2020-10-25 10:21:28 -0700 | [diff] [blame] | 3 | AADevT contains tools for AA device developers to improve their productivity. |
| 4 | |
Sam Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 5 | * Fully unbundle from Android versions, and use the AOSP trunk based |
| 6 | development model. |
Heemin Seog | b762d6c | 2021-01-12 16:52:21 -0800 | [diff] [blame] | 7 | |
| 8 | * Bridge the app ecosystem for [Android Automotive OS](https://developer.android.com/training/cars) |
| 9 | because device developers are the key producers for the core apps. |
| 10 | |
Sam Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 11 | * Leverage [Android app developer tools](https://developer.android.com/studio/intro) |
| 12 | that a few million developers use. |
Sam Lin | 5ee1d7c | 2020-10-22 16:09:32 -0700 | [diff] [blame] | 13 | |
| 14 | [TOC] |
| 15 | |
Sam Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 16 | ## Dev Tools |
| 17 | This contains tools designed specifically to simplify the AA device development |
| 18 | workflows. |
Sam Lin | 45416de | 2020-10-25 10:21:28 -0700 | [diff] [blame] | 19 | |
Sam Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 20 | * clone_proj.sh to clone a git project for the unbundled development workflows |
| 21 | in instead of the whole Android repo. |
Heemin Seog | b762d6c | 2021-01-12 16:52:21 -0800 | [diff] [blame] | 22 | |
Sam Lin | b6e3a83 | 2021-05-08 17:11:03 -0700 | [diff] [blame] | 23 | ## Change Reports |
| 24 | |
| 25 | ### change_report.py |
| 26 | change_report.py creates a diff statistic CSV file from 2 versions of a codebase. |
| 27 | This is useful when the git commit history is somehow not obtainable. What you |
| 28 | need 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 |
| 31 | there 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 |
| 35 | codebase & 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 | ``` |
| 43 | python3 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) |
| 49 | is 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 Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 57 | |
| 58 | ### sysui_oem_diff.sh |
| 59 | sysui_oem_diff.sh generates a summary of code changes between 2 revisions. |
| 60 | Which 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 |
| 63 | customization with AAOS team. |
Sam Lin | ccd7712 | 2021-04-20 14:05:46 -0700 | [diff] [blame] | 64 | * 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 Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 65 | |
| 66 | ``` |
Sam Lin | b6e3a83 | 2021-05-08 17:11:03 -0700 | [diff] [blame] | 67 | ./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 Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 68 | ``` |
Sam Lin | 45416de | 2020-10-25 10:21:28 -0700 | [diff] [blame] | 69 | |
Sam Lin | 5ee1d7c | 2020-10-22 16:09:32 -0700 | [diff] [blame] | 70 | ## System Performance Tuning |
Sam Lin | a98a264 | 2021-03-17 13:11:47 -0700 | [diff] [blame] | 71 | AAOS system performance turning is hard. Here are the tools to make it a bit |
| 72 | easier for the device developers. |
Sam Lin | 5ee1d7c | 2020-10-22 16:09:32 -0700 | [diff] [blame] | 73 | |
| 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 Lin | ccd7712 | 2021-04-20 14:05:46 -0700 | [diff] [blame] | 75 | |
| 76 | ## [Android Virtual Device as a Development Platform](avd/README.md) |