Created
February 2, 2024 17:46
-
-
Save Giovix92/41143c7f16934c99c26b45006ccdb23f to your computer and use it in GitHub Desktop.
Brickproof denniz bash script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "[i] Bulletproof denniz script, Giovix92" | |
echo "[i] Checking for adb connection..." | |
if adb get-state &> /dev/null; then | |
echo "[i] Device is connected, rebooting in fastboot" | |
adb reboot fastboot | |
else | |
if fastboot devices | grep -qw "fastboot"; then | |
echo "[i] Device is connected in bootloader mode, rebooting in fastboot" | |
fastboot reboot fastboot &> /dev/null | |
elif fastboot devices | grep -qw "fastbootd"; then | |
echo "[!] Device is already in fastbootd mode" | |
else | |
echo "[!] Device is not connected, please connect the device and try again" | |
exit 1 | |
fi | |
fi | |
echo "[i] Flashing C.01 preloader" | |
fastboot flash sda preloader_ufs_c01.img &> /dev/null || echo "[!] Failed to flash sda!" | |
fastboot flash sdb preloader_ufs_c01.img &> /dev/null || echo "[!] Failed to flash sdb!" | |
echo "[i] Flashing A.20 bootloader" | |
fastboot flash lk lk_a20.bin &> /dev/null || echo "[!] Failed to flash lk!" | |
fastboot flash lk2 lk2_a20.bin &> /dev/null || echo "[!] Failed to flash lk2!" | |
echo "[i] Rebooting..." | |
fastboot reboot &> /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment