blob: e9b330d4d4b79e67f0286e4224e2c9b263ad125f [file] [log] [blame]
#!/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