| #!/bin/bash |
| |
| SCRIPTPATH="$( |
| cd -- "$(dirname "$0")" >/dev/null 2>&1 || { |
| echo "Could not check script path" |
| exit 1 |
| } |
| pwd -P |
| )" |
| |
| IMAGES=( |
| abl |
| aop |
| bluetooth |
| cpucp |
| devcfg |
| dsp |
| featenabler |
| hyp |
| imagefv |
| keymaster |
| modem |
| multiimgoem |
| qupfw |
| shrm |
| tz |
| uefisecapp |
| xbl |
| xbl_config |
| ) |
| |
| for image in "${IMAGES[@]}"; do |
| IMAGE_PATH="${SCRIPTPATH}/radio/${image}.img" |
| if [ ! -f "${IMAGE_PATH}" ]; then |
| echo "ERROR: ${IMAGE_PATH} does not exist!" |
| echo "Aborting flash procedure" |
| exit 1 |
| fi |
| done |
| |
| for image in "${IMAGES[@]}"; do |
| IMAGE_PATH="${SCRIPTPATH}/radio/${image}.img" |
| fastboot flash "${image}" "${IMAGE_PATH}" |
| done |