Last active
April 11, 2024 10:07
-
-
Save Lomeli12/73825a287d3cf60414e244aece9b6bdf to your computer and use it in GitHub Desktop.
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 | |
reset | |
set +x | |
echo "------- LE2117 to LE2115 Conversion Bash Script by Lomeli12@xda -------" | |
echo "Please make sure you are in bootloader, your screen should say \"Fastboot Mode\" in red." | |
echo "You should be using the latest Google platform tools from your system's package manager (Apt, Yay, Brew, Scoop, etc)." | |
echo -e "Do not continue if you are unsure. \n" | |
# Make sure the user knows the risk and wants to continue | |
while true; do | |
read -p "Are you SURE you want to continue? Your warranty will be void and there's always the possibility you can soft-brick your phone (Y/N) " yn | |
case $yn in | |
[Yy]* ) | |
break | |
;; | |
[Nn]* ) | |
echo "Conversion canceled" | |
exit | |
;; | |
esac | |
done | |
# Check if fastboot exists. If not, inform the user how to install it | |
if [ -z $(which fastboot) ]; then | |
echo "Something went wrong!" | |
echo "Please install Google Platform tools to get fastboot." | |
echo "Debian/Ubuntu: apt install android-tools-fastboot" | |
echo "macOS: brew install android-platform-tools" | |
echo "Windows: scoop install adb" | |
echo "Arch: AUR android-sdk-platform-tools (yay -S android-sdk-platform-tools)" | |
echo "Conversion canceled" | |
exit | |
fi | |
# Double check we have all the required images | |
files=( *."img" ) | |
if [ ${#files[@]} -lt 34 ]; then | |
echo "Something went wrong!" | |
echo "Your working directory does not contain .img files. Make sure you are executing this script from the payload output directory (where all the .img files are)" | |
echo "Conversion canceled" | |
exit | |
fi | |
# Begin flashing. Cross your fingers nothing goes wrong | |
echo "Flashing... Your device will reboot a few times, don't panic" | |
echo "When reporting errors, make sure to include the output of \"fastboot --version\" and any outputs from this script." | |
set -x | |
fastboot flash dtbo dtbo.img | |
fastboot flash splash splash.img | |
fastboot flash modem modem.img | |
fastboot flash oplusstanvbk oplusstanvbk.img | |
fastboot flash oplus_sec oplus_sec.img | |
fastboot --disable-verity flash vbmeta vbmeta.img | |
fastboot --disable-verity flash vbmeta_system vbmeta_system.img | |
fastboot --disable-verity flash vbmeta_vendor vbmeta_vendor.img | |
fastboot reboot fastboot | |
fastboot flash aop aop.img | |
fastboot flash bluetooth bluetooth.img | |
fastboot flash dsp dsp.img | |
fastboot flash dtbo dtbo.img | |
fastboot flash splash splash.img | |
fastboot flash modem modem.img | |
fastboot flash oplusstanvbk oplusstanvbk.img | |
fastboot flash qupfw qupfw.img | |
fastboot flash oplus_sec oplus_sec.img | |
fastboot flash multiimgoem multiimgoem.img | |
fastboot flash uefisecapp uefisecapp.img | |
fastboot flash abl abl.img | |
fastboot flash bluetooth bluetooth.img | |
fastboot flash cpucp cpucp.img | |
fastboot flash devcfg devcfg.img | |
fastboot flash featenabler featenabler.img | |
fastboot flash hyp hyp.img | |
fastboot flash imagefv imagefv.img | |
fastboot flash keymaster keymaster.img | |
fastboot flash qweslicstore qweslicstore.img | |
fastboot flash shrm shrm.img | |
fastboot flash tz tz.img | |
fastboot flash vendor_boot vendor_boot.img | |
fastboot flash vm-bootsys vm-bootsys.img | |
fastboot flash xbl xbl.img | |
fastboot flash xbl_config xbl_config.img | |
fastboot reboot fastboot | |
fastboot flash product product.img | |
fastboot flash system system.img | |
fastboot flash system_ext system_ext.img | |
fastboot flash vendor vendor.img | |
fastboot flash odm odm.img | |
fastboot reboot bootloader | |
sleep 25 | |
fastboot -w | |
set +x | |
echo -e "Done! \nPlease reboot to recovery via the menus and wipe everything prior to boot" | |
read -p "Press any key to continue..." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment