Vishal Bhoj | ca1fbcd | 2015-12-16 00:25:24 +0530 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | if [ $# -eq 0 ] |
| 3 | then |
| 4 | echo "Provide the right /dev/ttyUSBX specific to recovery device" |
| 5 | exit |
| 6 | fi |
| 7 | |
| 8 | if [ ! -e $1 ] |
| 9 | then |
| 10 | echo "device: $1 does not exist" |
| 11 | exit |
| 12 | fi |
| 13 | |
| 14 | INSTALLER_DIR="`dirname $0`" |
| 15 | ANDROID_TOP=${INSTALLER_DIR}/../../../../ |
| 16 | python ${INSTALLER_DIR}/hisi-idt.py --img1=${INSTALLER_DIR}/l-loader.bin -d ${1} |
| 17 | fastboot flash ptable ${INSTALLER_DIR}/ptable-aosp.img |
| 18 | fastboot flash fastboot ${INSTALLER_DIR}/fip.bin |
| 19 | fastboot flash nvme ${INSTALLER_DIR}/nvme.img |
| 20 | fastboot flash boot ${ANDROID_TOP}/out/target/product/hikey/boot_fat.uefi.img |
| 21 | fastboot flash system ${ANDROID_TOP}/out/target/product/hikey/system.img |
| 22 | fastboot flash cache ${ANDROID_TOP}/out/target/product/hikey/cache.img |
| 23 | fastboot flash userdata ${ANDROID_TOP}/out/target/product/hikey/userdata.img |