• Home
Name Date Size #Lines LOC

..--

RotaryIME/03-May-2024-643459

RotaryPlayground/03-May-2024-4,0552,600

TestMediaApp/03-May-2024-6,2895,187

gradle/wrapper/03-May-2024-76

tools/03-May-2024-447320

.gitignoreD03-May-202462 87

build.gradleD03-May-20241.1 KiB4236

gradle.propertiesD03-May-202425 21

gradlewD03-May-20245.2 KiB173128

readme.mdD03-May-20243.4 KiB10678

settings.gradleD03-May-2024888 2421

readme.md

1# Car test apps
2
3This repository is only for car test applications. They can be unbundled from Android devices.
4
5## Prerequisites
6
7* You need to build or have a [car-ui-lib](https://cs.android.com/android/platform/superproject/+/android-10.0.0_r30:packages/apps/Car/libs/car-ui-lib/)
8aar ready first if to build test apps on Android Studio.
9* android-10.0.0_r30 is a release tag placeholder in this doc, you should replace the one you need.
10
11## Building
12
131. There are 3 ways to get the source. Pick one works better for you.
14  * A: Download [tgz](https://android.googlesource.com/platform/packages/apps/Car/tests/+archive/refs/tags/android-10.0.0_r30.tar.gz)
15from the source if no plan to contribue.
16  * B: Repo workflow, see [workstation setup](#workstation-setup).
17  * C: Git workflow, e.g.
18```
19git clone -b $BRANCH https://android.googlesource.com/platform/packages/apps/Car/tests
20cd tests
21f=`git rev-parse --git-dir`/hooks/commit-msg ; mkdir -p $(dirname $f) ; curl -Lo $f https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x $f
22```
23
24* To learn more, checkout [Basic Gerrit Walkthrough](https://gerrit-review.googlesource.com/Documentation/intro-gerrit-walkthrough-github.html).
25* See tools/git_clone_projects.sh as an example to get both Car/libs and tests projects.
26
272. Install [Android Studio](https://developer.android.com/studio), open the `tests`
28project by Android Studio and do your magic.
29  * You will need to build car-ui-lib by Android Studio first.
30
31### TestMediaApp
32
33TestMediaApp should be one of the run configurations. The green Run button should build and install
34the app on your phone.
35
36To see TestMediaApp in Android Auto Projected:
37
381. Open Android Auto on phone
392. Click hamburger icon at top left -> Settings
403. Scroll to Version at bottom and tap ~10 times to unlock Developer Mode
414. Click kebab icon at top right -> Developer settings
425. Scroll to bottom and enable "Unknown sources"
436. Exit and re-open Android Auto
447. TestMediaApp should now be visible (click headphones icon in phone app to see app picker)
45
46### RotaryPlayground
47
48RotaryPlayground is a test and reference application for the AAOS Rotary framework to use with an
49external rotary input device.
50
51Beside building in Android Studio, you can also build and install RotaryPlayground into an AAOS
52device:
53
54```
55$ make RotaryPlayground
56$ adb install -r -g out/target/[path]/system/app/RotaryPlayground/RotaryPlayground.apk
57```
58
59* See tools/go_rotary.sh for an example build, install and run the test app in an Android tree.
60
61
62### RotaryIME
63
64RotaryIME is a sample input method for rotary controllers.
65
66To build and install RotaryIME onto an AAOS device:
67```
68$ make RotaryIME
69$ adb install -r -g out/target/[path]/system/app/RotaryIME/RotaryIME.apk
70```
71
72## Contributing
73
74### Workstation setup
75
76Install [repo](https://source.android.com/setup/build/downloading#installing-repo) command line
77tool. Then run:
78
79```
80sudo apt-get install gitk
81sudo apt-get install git-gui
82mkdir WORKING_DIRECTORY_FOR_GIT_REPO
83cd WORKING_DIRECTORY_FOR_GIT_REPO
84repo init -u https://android.googlesource.com/platform/manifest -b $BRANCH -g name:platform/tools/repohooks,name:platform/packages/apps/Car/tests --depth=1
85repo sync
86```
87
88### Making a change
89#### Repo workflow
90
91```
92repo start BRANCH_NAME .
93# Make some changes
94git gui &
95# Use GUI to create a CL. Check amend box to update a work-in-progress CL
96repo upload .
97```
98
99#### Git workflow
100```
101# Make some changes
102git add .
103git commit
104git push origin HEAD:refs/for/$BRANCH
105```
106