Alexander Martinz | 5b07d25 | 2024-07-26 12:12:30 +0200 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | SCRIPTPATH="$( |
| 4 | cd -- "$(dirname "$0")" >/dev/null 2>&1 || { |
| 5 | echo "Could not check script path" |
| 6 | exit 1 |
| 7 | } |
| 8 | pwd -P |
| 9 | )" |
| 10 | |
| 11 | IMAGES=( |
| 12 | abl |
| 13 | aop |
| 14 | bluetooth |
| 15 | cpucp |
| 16 | devcfg |
| 17 | dsp |
| 18 | featenabler |
| 19 | hyp |
| 20 | imagefv |
| 21 | keymaster |
| 22 | modem |
| 23 | multiimgoem |
| 24 | qupfw |
| 25 | shrm |
| 26 | tz |
| 27 | uefisecapp |
| 28 | xbl |
| 29 | xbl_config |
| 30 | ) |
| 31 | |
| 32 | for image in "${IMAGES[@]}"; do |
| 33 | IMAGE_PATH="${SCRIPTPATH}/radio/${image}.img" |
| 34 | if [ ! -f "${IMAGE_PATH}" ]; then |
| 35 | echo "ERROR: ${IMAGE_PATH} does not exist!" |
| 36 | echo "Aborting flash procedure" |
| 37 | exit 1 |
| 38 | fi |
| 39 | done |
| 40 | |
| 41 | for image in "${IMAGES[@]}"; do |
| 42 | IMAGE_PATH="${SCRIPTPATH}/radio/${image}.img" |
| 43 | fastboot flash "${image}" "${IMAGE_PATH}" |
| 44 | done |