1#!/bin/sh 2# Copyright (C) 2020 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17## script to install mediav2 test files manually 18 19adbOptions=" " 20resLabel=CtsMediaV2TestCases-1.14 21srcDir="/tmp/$resLabel" 22tgtDir="/sdcard/test" 23usage="Usage: $0 [-h] [-s serial]" 24 25if [ $# -gt 0 ]; then 26 if [ "$1" = "-h" ]; then 27 echo $usage 28 exit 1 29 elif [ "$1" = "-s" -a "$2" != "" ] ; then 30 adbOptions=""$1" "$2"" 31 else 32 echo "bad options" 33 echo $usage 34 exit 1 35 fi 36fi 37 38## download resources if not already done 39if [ ! -f "/tmp/$resLabel.zip" ]; then 40 wget "https://storage.googleapis.com/android_media/cts/tests/media/$resLabel.zip" -O /tmp/$resLabel.zip 41fi 42unzip -qo "/tmp/$resLabel" -d $srcDir 43 44## install on target device 45echo "adb $adbOptions push $srcDir $tgtDir" 46adb $adbOptions shell mkdir -p $tgtDir 47adb $adbOptions push $srcDir/. $tgtDir 48