• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3INSTALLER_DIR="`dirname ${0}`"
4
5# for cases that don't run "lunch hikey960-userdebug"
6if [ -z "${ANDROID_BUILD_TOP}" ]; then
7    ANDROID_BUILD_TOP=${INSTALLER_DIR}/../../../../../
8    ANDROID_PRODUCT_OUT="${ANDROID_BUILD_TOP}/out/target/product/hikey960"
9fi
10
11if [ ! -d "${ANDROID_PRODUCT_OUT}" ]; then
12    echo "error in locating out directory, check if it exist"
13    exit
14fi
15
16echo "android out dir:${ANDROID_PRODUCT_OUT}"
17
18fastboot flash ptable "${INSTALLER_DIR}"/ptable.img
19fastboot flash xloader "${INSTALLER_DIR}"/sec_xloader.img
20fastboot flash fastboot "${INSTALLER_DIR}"/fastboot.img
21fastboot flash nvme "${INSTALLER_DIR}"/nvme.img
22fastboot flash fw_lpm3   "${INSTALLER_DIR}"/lpm3.img
23fastboot flash trustfirmware   "${INSTALLER_DIR}"/bl31.bin
24fastboot flash boot "${ANDROID_PRODUCT_OUT}"/boot.img
25fastboot flash dts "${ANDROID_PRODUCT_OUT}"/dt.img
26fastboot flash system "${ANDROID_PRODUCT_OUT}"/system.img
27fastboot flash cache "${ANDROID_PRODUCT_OUT}"/cache.img
28fastboot flash userdata "${ANDROID_PRODUCT_OUT}"/userdata.img
29