blob: e9b330d4d4b79e67f0286e4224e2c9b263ad125f [file] [log] [blame]
Alexander Martinz5b07d252024-07-26 12:12:30 +02001#!/bin/bash
2
3SCRIPTPATH="$(
4 cd -- "$(dirname "$0")" >/dev/null 2>&1 || {
5 echo "Could not check script path"
6 exit 1
7 }
8 pwd -P
9)"
10
11IMAGES=(
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
32for 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
39done
40
41for image in "${IMAGES[@]}"; do
42 IMAGE_PATH="${SCRIPTPATH}/radio/${image}.img"
43 fastboot flash "${image}" "${IMAGE_PATH}"
44done