Leo Hsu | b9fda88 | 2018-07-20 19:10:30 +0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -o errexit |
| 3 | |
| 4 | # Copyright 2018 The Android Open Source Project |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | |
| 18 | if [ -z "${ANDROID_BUILD_TOP}" ] ; then |
| 19 | echo "You need to source and lunch before you can use this script" 1>&2 |
| 20 | exit 1 |
| 21 | fi |
| 22 | |
sqian | 44c9c94 | 2019-10-22 16:34:03 -0700 | [diff] [blame] | 23 | if ! [ -x "$(which aprotoc)" ] ; then |
| 24 | echo "Missing aprotoc, build it with 'm aprotoc'." 1>&2 |
Leo Hsu | b9fda88 | 2018-07-20 19:10:30 +0800 | [diff] [blame] | 25 | exit 1 |
| 26 | fi |
| 27 | |
| 28 | ECC_ROOT=`realpath \`dirname $0\`` |
| 29 | TOOLSET_DIR="${ECC_ROOT}/conversion_toolset_v1" |
| 30 | INPUT_DIR="${ECC_ROOT}/input" |
| 31 | OUTPUT_DIR="${ECC_ROOT}/output" |
| 32 | INTERMEDIATE_DIR="${ECC_ROOT}/.intermediate" |
| 33 | |
| 34 | rm -rf "${INTERMEDIATE_DIR}" "${OUTPUT_DIR}/*" |
| 35 | mkdir -p "${INTERMEDIATE_DIR}" |
| 36 | |
| 37 | source "${TOOLSET_DIR}/gen_eccdata.sh" |
| 38 | echo |
| 39 | |
Leo Hsu | 7dd2abd | 2018-11-13 14:25:57 +0800 | [diff] [blame] | 40 | echo "To verify data compatibility:" |
| 41 | echo " 1. make TeleService" |
| 42 | echo " 2. push TeleService.apk to system/priv-app/TeleService" |
| 43 | echo " 3. reboot device" |
Leo Hsu | 909f925 | 2019-01-22 17:44:25 +0800 | [diff] [blame] | 44 | echo " 4. run 'atest TeleServiceTests:EccDataTest#testEccDataContent'" |