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