mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-23 18:49:48 +02:00
add start from recovery
This commit is contained in:
1 file changed
+5
-5
+5
-5
@@ -21,7 +21,7 @@ ERR_HANDLER () {
|
||||
[ $? -eq 0 ] && exit
|
||||
echo "[-] An error occurred"
|
||||
if [ "$os" = 'Darwin' ]; then
|
||||
if [ ! "$2" = '--dfu' ]; then
|
||||
if [ ! "$2" = '--dfu' ] || [ ! "$2" = '--recovery' ]; then
|
||||
defaults write -g ignore-devices -bool false
|
||||
defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool false
|
||||
killall Finder
|
||||
@@ -66,9 +66,9 @@ echo "Written by Nebula | Some code by Nathan | Patching commands and ramdisk by
|
||||
echo ""
|
||||
|
||||
# Get device's iOS version from ideviceinfo if in normal mode
|
||||
if [ "$2" = '--dfu' ]; then
|
||||
if [ "$2" = '--dfu' ] || [ ! "$2" = '--recovery' ]; then
|
||||
if [ -z "$3" ]; then
|
||||
echo "[-] When using --dfu, please pass the version you're device is on"
|
||||
echo "[-] When using --dfu or --recovery, please pass the version you're device is on"
|
||||
exit
|
||||
else
|
||||
version=$3
|
||||
@@ -105,7 +105,7 @@ else
|
||||
fi
|
||||
|
||||
# Put device into recovery mode, and set auto-boot to true
|
||||
if [ ! "$2" = '--dfu' ]; then
|
||||
if [ ! "$2" = '--dfu' ] || [ ! "$2" = '--recovery' ]; then
|
||||
echo "[*] Switching device into recovery mode..."
|
||||
ideviceenterrecovery $(ideviceinfo | grep "UniqueDeviceID: " | sed 's/UniqueDeviceID: //') > /dev/null
|
||||
if [ "$os" = 'Darwin' ]; then
|
||||
@@ -297,7 +297,7 @@ sleep 1
|
||||
$dir/irecovery -c "bootx"
|
||||
|
||||
if [ "$os" = 'Darwin' ]; then
|
||||
if [ ! "$2" = '--dfu' ]; then
|
||||
if [ ! "$2" = '--dfu' ] || [ ! "$2" = '--recovery' ]; then
|
||||
defaults write -g ignore-devices -bool false
|
||||
defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool false
|
||||
killall Finder
|
||||
|
||||
Reference in new issue
Block a user