mirror of
https://github.com/palera1n/palera1n.git
synced 2026-12-05 07:44:36 +01: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
|
[ $? -eq 0 ] && exit
|
||||||
echo "[-] An error occurred"
|
echo "[-] An error occurred"
|
||||||
if [ "$os" = 'Darwin' ]; then
|
if [ "$os" = 'Darwin' ]; then
|
||||||
if [ ! "$2" = '--dfu' ]; then
|
if [ ! "$2" = '--dfu' ] || [ ! "$2" = '--recovery' ]; then
|
||||||
defaults write -g ignore-devices -bool false
|
defaults write -g ignore-devices -bool false
|
||||||
defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool false
|
defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool false
|
||||||
killall Finder
|
killall Finder
|
||||||
@@ -66,9 +66,9 @@ echo "Written by Nebula | Some code by Nathan | Patching commands and ramdisk by
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Get device's iOS version from ideviceinfo if in normal mode
|
# 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
|
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
|
exit
|
||||||
else
|
else
|
||||||
version=$3
|
version=$3
|
||||||
@@ -105,7 +105,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Put device into recovery mode, and set auto-boot to true
|
# 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..."
|
echo "[*] Switching device into recovery mode..."
|
||||||
ideviceenterrecovery $(ideviceinfo | grep "UniqueDeviceID: " | sed 's/UniqueDeviceID: //') > /dev/null
|
ideviceenterrecovery $(ideviceinfo | grep "UniqueDeviceID: " | sed 's/UniqueDeviceID: //') > /dev/null
|
||||||
if [ "$os" = 'Darwin' ]; then
|
if [ "$os" = 'Darwin' ]; then
|
||||||
@@ -297,7 +297,7 @@ sleep 1
|
|||||||
$dir/irecovery -c "bootx"
|
$dir/irecovery -c "bootx"
|
||||||
|
|
||||||
if [ "$os" = 'Darwin' ]; then
|
if [ "$os" = 'Darwin' ]; then
|
||||||
if [ ! "$2" = '--dfu' ]; then
|
if [ ! "$2" = '--dfu' ] || [ ! "$2" = '--recovery' ]; then
|
||||||
defaults write -g ignore-devices -bool false
|
defaults write -g ignore-devices -bool false
|
||||||
defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool false
|
defaults write com.apple.AMPDevicesAgent dontAutomaticallySyncIPods -bool false
|
||||||
killall Finder
|
killall Finder
|
||||||
|
|||||||
Reference in new issue
Block a user