68 lines
1.5 KiB
Shell
Executable file
68 lines
1.5 KiB
Shell
Executable file
#!/bin/bash
|
|
|
|
if [ -f xperable ]; then
|
|
echo "Xperable found!"
|
|
else
|
|
echo "Xperable is not installed!"
|
|
echo "Please install by run setup.sh"
|
|
exit 1
|
|
fi
|
|
|
|
relockbl() {
|
|
echo "Exploting..."
|
|
fastboot getvar secure
|
|
fastboot reboot bootloader
|
|
fastboot -w
|
|
fastboot reboot bootloader
|
|
sleep 5
|
|
./xperable -v -V -B -U -s 0xb40f90 -5
|
|
echo "Trying to relock the bootloader..."
|
|
./xperable -c "oem unlock X" -1 -c "reboot" -1
|
|
echo "Now go to fastboot again"
|
|
sleep 5
|
|
fastboot getvar secure
|
|
}
|
|
|
|
unlockbl() {
|
|
fastboot getvar Rooting-status
|
|
echo "Exploiting..."
|
|
fastboot getvar secure
|
|
fastboot reboot bootloader
|
|
sleep 5
|
|
fastboot reboot bootloader
|
|
sleep 5
|
|
./xperable -v -V -B -U -s 0x40af90 -5
|
|
echo "Trying to unlock the bootloader..."
|
|
./xperable -v -V -c "oem unlock Y" -1 -c "reboot" -1
|
|
echo "Now go to fastboot again!!!!"
|
|
sleep 5
|
|
fastboot getvar secure
|
|
fastboot -w
|
|
}
|
|
|
|
eraseuserdata() {
|
|
fastboot -w
|
|
fastboot reboot bootloader
|
|
}
|
|
|
|
checkcurrent() {
|
|
echo "Enter FlashMode for more details"
|
|
fastboot getvar secure
|
|
}
|
|
|
|
echo "Unofficial Bootloader unlock/relocking tool for Xperia TAMA devices"
|
|
|
|
echo "NOTE : You need to do the attempt multiple times to make it works"
|
|
|
|
PS3='Please select options to continue : '
|
|
select opt in 'Unlock the bootloader' 'Relock the bootloader' 'Erase userdata & Reboot' 'Check current status' 'Exit'
|
|
do
|
|
case "$opt" in
|
|
'Relock the bootloader' ) relockbl ;;
|
|
'Unlock the bootloader' ) unlockbl ;;
|
|
'Erase userdata & Reboot' ) eraseuserdata ;;
|
|
'Check current status' ) checkcurrent ;;
|
|
'Exit' ) exit ;;
|
|
esac
|
|
done
|
|
|