summaryrefslogtreecommitdiff
path: root/user-manual/build_images.sh
blob: 8c31a14a1402e9bd9b6bdfaa07b3ca5ca3468450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e

SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"

# Enable and configure SystemUI demo mode
adb shell settings put global sysui_demo_allowed 1
adb shell am broadcast -a com.android.systemui.demo -e command enter
adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200
adb shell am broadcast -a com.android.systemui.demo -e command network -e wifi show -e level 4
adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype lte
adb shell am broadcast -a com.android.systemui.demo -e command battery -e level 100 -e plugged false
adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false

pushd "${SCRIPT_PATH}/.."

# Build and install app
./gradlew :app:k9mail:installDebug

# Record screenshots
maestro test ui-flows/screenshots/user_manual_account_setup.yml
maestro test ui-flows/screenshots/user_manual_accounts.yml
maestro test ui-flows/screenshots/user_manual_reading.yml

# Post-process screenshots
user-manual/process_screenshots.sh

popd