File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ set -eu
2121# You can find some MSM images here:
2222# https://www.thecustomdroid.com/oneplus-6-6t-unbrick-guide/
2323
24+ # If you have issues in getting Fastboot to work, try a USB 2.0 cable or a USB 2.0 port.
25+
2426# Enable factory reset if doing a clean install!
2527FACTORY_RESET=true
2628FLASH_A=true
@@ -42,6 +44,13 @@ LOG_PATH="${REPO_DIR}/logs/flash_oneplus6_${TIMESTAMP}.txt"
4244
4345echo " Starting OnePlus 6 fastboot flash script." | & tee " ${LOG_PATH} "
4446
47+ if [ -f " ${FASTBOOT} " ]; then
48+ echo " Fastboot found."
49+ else
50+ echo " Fastboot was not found. Please run \" download_tools.sh\" ."
51+ exit 1
52+ fi
53+
4554# Directory checks
4655
4756OTA_DIR=" ${CWD} /OTA"
5968 echo " LineageOS directory was not found. Please put the img files and signatures to the subdirectory \" LineageOS\" ."
6069 exit 1
6170fi
71+ if [ -f " ${LINEAGEOS_DIR} /imgs.sha256" ]; then
72+ echo " LineageOS SHA256 file found."
73+ else
74+ echo " LineageOS SHA256 file was not found. Please create it from the SHA256 checksums on the download website."
75+ exit 1
76+ fi
6277
6378TWRP_DIR=" ${CWD} /TWRP"
6479if [ -d " ${TWRP_DIR} " ]; then
@@ -74,8 +89,7 @@ sha256sum -c "./imgs.sha256"
7489# "${CWD}"
7590
7691cd " ${TWRP_DIR} "
77- TWRP_PATTERN=" ${TWRP_DIR} /*.img"
78- TWRP_FILES=($TWRP_PATTERN )
92+ TWRP_FILES=(" ${TWRP_DIR} " /* .img)
7993TWRP_IMG=" ${TWRP_FILES[0]} "
8094sha256sum -c " ${TWRP_IMG} .sha256"
8195wget " https://eu.dl.twrp.me/public.asc" -O " ${TWRP_DIR} /public.asc"
You can’t perform that action at this time.
0 commit comments