Skip to content

Commit

Permalink
1.2: Add mfastboot and fix logo flash
Browse files Browse the repository at this point in the history
  • Loading branch information
rabih committed Aug 30, 2014
1 parent ec7e8fe commit 5d8e690
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 10 deletions.
29 changes: 28 additions & 1 deletion EasyRecovery.bat
Expand Up @@ -5,7 +5,7 @@ color 0A
echo.
echo.
echo Easy Recovery for Peregine variants
echo V1.1
echo V1.2
echo By somcom3x
echo.
echo.
Expand Down Expand Up @@ -79,6 +79,30 @@ echo.
pause
goto :EOF
:FoundFastboot
cls
@rem *** Find mFastboot.EXE or abort *********************************************
set BatchFileDir=%~dp0
set mFastboot=%BatchFileDir%/Files/tools/mfastboot.exe
if exist "%mFastboot%" goto FoundmFastboot
set Fastboot=%CD%\/Files/tools/mfastboot.exe
if exist "%mFastboot%" goto FoundmFastboot
set mFastboot=
for %%f in ("mFastboot") do set mFastboot=%%~$PATH:f
if not "%mFastboot%" == "" FoundmFastboot
echo ERROR: Could not find "mFastboot.EXE" (have you installed it?)
echo.
echo To find mFastboot.EXE required for this script:
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo (1) Look in the same directory as the batch file ("%BatchFileDir%)
echo.
echo (2) Look in the current directory (%CD%)
echo.
echo (3) Look in the PATH, that is one of the following directories: %PATH%
echo.
pause
goto :EOF
:FoundmFastboot
cls
echo USING FASTBOOT: "%Fastboot%"
echo.
echo.
Expand Down Expand Up @@ -345,6 +369,9 @@ if "%cont%"=="n" goto :EOF
:LOGO2
cls
echo.
echo when your device is in the bootloader screen, press enter.
%AbdExe% reboot bootloader
pause
echo.
%Fastboot% flash logo Files/logo/peregrine_logo_mod.bin
echo.
Expand Down
35 changes: 28 additions & 7 deletions EasyRecovery.sh
Expand Up @@ -3,19 +3,25 @@
platform=`uname`;
ADB=$PWD"/Files/tools/adb";
FASTBOOT=$PWD"/Files/tools/fastboot";
MFASTBOOT=$PWD"/Files/tools/mfastboot";
cd "$(dirname "$0")"
if [ -z $(which adb) ]; then
ADB=$PWD"/Files/tools/adb";
FASTBOOT=$PWD"/Files/tools/fastboot";
MFASTBOOT=$PWD"/Files/tools/mfastboot";
if [ "$platform" == 'Darwin' ]; then
ADB=$PWD"/Files/tools/adb.osx"
FASTBOOT=$PWD"/Files/tools/fastboot.osx"
MFASTBOOT=$PWD"/Files/tools/mfastboot.osx";

fi
fi
chmod +x $ADB
chmod +x $FASTBOOT
chmod +x $MFASTBOOT

CLS='printf "\033c"'
# End section, thanks Firon!
# End section, thanks Firon (LEGACY)!

f_ROOT () {
$CLS
Expand Down Expand Up @@ -64,7 +70,7 @@ case $choice in
2) RECOVERY=TWRP && f_FLASH ;;
esac
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo " All in One Root and Recovery v1.0"
echo " All in One Root and Recovery v1.2"
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo
echo
Expand Down Expand Up @@ -155,8 +161,9 @@ echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo
echo " Warning"
echo " Warning"
echo " THIS WILL WIPE ALL OF YOUR APPS, CONTACTS GAMESAVES ETC EVERYTHING"
echo " INCLUDING YOUR SD CARD"
echo " THIS WILL WIPE ALL OF YOUR APPS, CONTACTS, GAMESAVES, etc..; EVERYTHING"
echo " INCLUDING YOUR INTERNAL SD CARD"
echo " This will void whatever warranty is present on this device"
echo " Warning"
echo " Warning"; clear
echo
Expand Down Expand Up @@ -190,6 +197,16 @@ f_BOOTMENU () {
unset choice
while :
do
echo " Peregrine EasyRecovery v1.2"
echo " by somcom3x @ XDA"
echo
echo
echo
echo
echo
echo
sleep 5
$CLS
echo
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "Please Read Carefully"
Expand All @@ -198,7 +215,7 @@ echo
echo
echo "Menu:"
echo
echo "1) This is a stock bootloader locked phone"
echo "1) Unlock the bootloader"
echo "2) This phone has its bootloader unlocked but no root/recovery"
echo "3) Just need root? (recovery required)"
echo "4) Tired of having an unlocked bootloader? Lock it here."
Expand Down Expand Up @@ -303,10 +320,14 @@ sleep 2
echo
echo
$CLS
$ADB reboot bootloader
sleep 6
$CLS
echo
echo
$FASTBOOT flash logo Files/logo/peregrine_logo_mod.bin
echo "flashing logo"
$FASTBOOT flash logo Files/logo/peregrine_logo_mod.bin
sleep 3
echo "flashed logo!"
sleep 6
echo " Enjoy!"
sleep 5
Expand Down
Binary file added Files/tools/mfastboot
Binary file not shown.
Binary file added Files/tools/mfastboot.exe
Binary file not shown.
Binary file added Files/tools/mfastboot.osx
Binary file not shown.
13 changes: 11 additions & 2 deletions readme
@@ -1,13 +1,20 @@
Extract the zip

On linux, execute the bash script in terminal. ./EasyRecovery.sh
On linux/OS X, execute the bash script in terminal. ./EasyRecovery.sh
On Windows, double click the .bat file

Changelog:

v1.2
Added mfastboot support (currently unused in any flashing)
Fix an issue with boot logo flashing
Rewrote some instructions/warnings.

v1.1
Bootlogo flash support
Bootloader locking
Bootloader unlocking
TWRP added as an option
TWRP added as an option for recovery

v1.0
Initial release
Expand All @@ -24,3 +31,5 @@ Rodderick
Nubecoder
and many more :)
Included in this script is koush's universal adb driver.

Darkshado

0 comments on commit 5d8e690

Please sign in to comment.