# Copyright (C) 2021 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.
readme() { echo'''
Add images listed in INPUT_CSV to Android SDK dir. So you can use them by Android Studio AVD manager. e.g.
./batch_add_avd_image.sh ./resource/avd_img_list.csv '''
}
MY_NAME=$0
SCRIPT_NAME="${MY_NAME##*/}"
SCRIPT_DIR="${MY_NAME%/$SCRIPT_NAME}" echo Running from $SCRIPT_DIR
INPUT_CSV=$1 if [[ -z "${INPUT_CSV}" ]]; then
INPUT_CSV="$SCRIPT_DIR/resource/avd_img_list.csv" fi
echo"Process ${INPUT_CSV}"
header=0
avdCount=0 while IFS=',' read -r name api zip others || [ -n "${name}" ]; do if [[ "${name}" == "name" ]]; then # skip header
header="${name},${api},${zip}" else
addAvdImgCmd="VARIANT=${name} API_LEVEL=${api} OEM_AVD_ZIP=${zip} ${SCRIPT_DIR}/add_avd_img.sh" echo"${addAvdImgCmd}" eval"${addAvdImgCmd}"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.