mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-23 16:39:17 +01:00
Add slashes if directory for cp and mv commands
- also some changes for windows idevicere(re)store
This commit is contained in:
parent
f8c2bfcf11
commit
32d0987883
@ -132,7 +132,7 @@ SaveExternal() {
|
||||
SaveFile $Link $Name.zip $SHA1
|
||||
cd ../resources
|
||||
unzip -q ../tmp/$Name.zip -d .
|
||||
mv $Name* $Name
|
||||
mv $Name*/ $Name/
|
||||
cd ..
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ InstallDepends() {
|
||||
|
||||
mkdir resources/lib tmp 2>/dev/null
|
||||
cd resources
|
||||
cp lib/*.so.1.1 ../tmp 2>/dev/null
|
||||
cp lib/*.so.1.1 ../tmp/ 2>/dev/null
|
||||
rm -rf lib/*
|
||||
cp ../tmp/*.so.1.1 lib/ 2>/dev/null
|
||||
cd ../tmp
|
||||
|
@ -349,7 +349,7 @@ PatchiBSS() {
|
||||
Log "Downloading iBSS..."
|
||||
$partialzip "$(cat $Firmware/$iBSSBuildVer/url)" Firmware/dfu/$iBSS.dfu $iBSS.dfu
|
||||
mkdir -p saved/$ProductType 2>/dev/null
|
||||
mv $iBSS.dfu saved/$ProductType
|
||||
mv $iBSS.dfu saved/$ProductType/
|
||||
fi
|
||||
|
||||
if [[ ! -e saved/$ProductType/$iBSS.dfu ]]; then
|
||||
@ -464,7 +464,7 @@ Remove4DL() {
|
||||
$partialzip $Link Firmware/dfu/$1.${HWModel}ap.RELEASE.dfu $1
|
||||
mkdir -p saved/$ProductType 2>/dev/null
|
||||
cp $1 saved/$ProductType/$1_p
|
||||
mv $1 tmp
|
||||
mv $1 tmp/
|
||||
else
|
||||
cp saved/$ProductType/$1_p tmp/$1
|
||||
fi
|
||||
@ -529,7 +529,7 @@ Ramdisk4() {
|
||||
curl -L $JailbreakLink/support_files/7.1.2/Ramdisk/$file -o $file
|
||||
done
|
||||
cd ..
|
||||
cp -rf ramdisk ../resources
|
||||
cp -rf ramdisk/ ../resources/
|
||||
cd ..
|
||||
fi
|
||||
|
||||
|
@ -5,7 +5,7 @@ FRBaseband() {
|
||||
|
||||
if [[ $DeviceProc == 7 ]]; then
|
||||
mkdir -p saved/baseband 2>/dev/null
|
||||
cp -f $IPSWRestore/Firmware/$Baseband saved/baseband
|
||||
cp -f $IPSWRestore/Firmware/$Baseband saved/baseband/
|
||||
fi
|
||||
|
||||
if [[ ! -e saved/baseband/$Baseband ]]; then
|
||||
@ -13,8 +13,8 @@ FRBaseband() {
|
||||
$partialzip $BasebandURL Firmware/$Baseband $Baseband
|
||||
$partialzip $BasebandURL BuildManifest.plist BuildManifest.plist
|
||||
mkdir -p saved/$ProductType saved/baseband 2>/dev/null
|
||||
mv $Baseband saved/baseband
|
||||
mv BuildManifest.plist saved/$ProductType
|
||||
mv $Baseband saved/baseband/
|
||||
mv BuildManifest.plist saved/$ProductType/
|
||||
BuildManifest="saved/$ProductType/BuildManifest.plist"
|
||||
elif [[ $DeviceProc != 7 ]]; then
|
||||
BuildManifest="saved/$ProductType/BuildManifest.plist"
|
||||
@ -123,7 +123,7 @@ DowngradeOther() {
|
||||
if [[ $NoMove == 1 ]]; then
|
||||
rm $FWKeys/index.html
|
||||
elif [[ -s tmp/index.html ]]; then
|
||||
mv tmp/index.html $FWKeys
|
||||
mv tmp/index.html $FWKeys/
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -140,18 +140,22 @@ iDeviceRestore() {
|
||||
ExtraArgs="-e -w"
|
||||
if [[ $1 == "latest" ]]; then
|
||||
ExtraArgs="-e"
|
||||
elif [[ $Baseband == 0 ]]; then
|
||||
Log "Device $ProductType has no baseband/disabled baseband update"
|
||||
elif [[ $platform == "win" && $ProductType != "iPhone3"* ]]; then
|
||||
ExtraArgs="-r"
|
||||
idevicerestore="$idevicererestore"
|
||||
if [[ $Baseband == 0 ]]; then
|
||||
Log "Device $ProductType has no baseband/disabled baseband update"
|
||||
else
|
||||
re="re"
|
||||
FRBaseband
|
||||
cp saved/baseband/$Baseband tmp/bbfw.tmp
|
||||
cp $BuildManifest tmp/BuildManifest.plist
|
||||
cp $BuildManifest tmp/
|
||||
BasebandSHA1L=$($sha1sum tmp/bbfw.tmp | awk '{print $1}')
|
||||
if [[ $BasebandSHA1L != $BasebandSHA1 ]]; then
|
||||
rm -f saved/baseband/$Baseband saved/$ProductType/BuildManifest.plist
|
||||
Error "Downloading/verifying baseband failed. Please run the script again"
|
||||
fi
|
||||
fi
|
||||
Log "Running idevicerestore with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\""
|
||||
Log "Running idevicere${re}store with command: $idevicerestore $ExtraArgs \"$IPSWRestore.ipsw\""
|
||||
$idevicerestore $ExtraArgs "$IPSWRestore.ipsw"
|
||||
echo
|
||||
Log "Restoring done! Read the message below if any error has occurred:"
|
||||
|
@ -124,7 +124,7 @@ JailbreakFiles() {
|
||||
fi
|
||||
cd tmp
|
||||
SaveFile $1 $2 $3
|
||||
mv $2 ../resources/jailbreak
|
||||
mv $2 ../resources/jailbreak/
|
||||
cd ..
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ IPSWFindVerify() {
|
||||
Echo "* The script will now proceed to download it for you. If you want to download it yourself, here is the link: $(cat $Firmware/$BuildVerDL/url)"
|
||||
Log "Downloading IPSW... (Press Ctrl+C to cancel)"
|
||||
curl -L $(cat $Firmware/$BuildVerDL/url) -o tmp/$IPSWDL.ipsw
|
||||
mv tmp/$IPSWDL.ipsw .
|
||||
mv tmp/$IPSWDL.ipsw ./
|
||||
fi
|
||||
|
||||
Log "Verifying $IPSWDL.ipsw..."
|
||||
@ -241,9 +241,9 @@ IPSW32() {
|
||||
Log "Preparing custom IPSW..."
|
||||
cd tmp
|
||||
if [[ $JBDaibutsu == 1 ]]; then
|
||||
cp -R ../resources/firmware/${WinBundles}JailbreakBundles FirmwareBundles
|
||||
cp -R ../resources/firmware/${WinBundles}JailbreakBundles/ FirmwareBundles/
|
||||
else
|
||||
cp -R ../resources/firmware/${WinBundles}FirmwareBundles FirmwareBundles
|
||||
cp -R ../resources/firmware/${WinBundles}FirmwareBundles/ ./
|
||||
fi
|
||||
$ipsw ./../$IPSW.ipsw ./../$IPSWCustom.ipsw $ExtraArgs $BBUpdate $JBMemory ${JBFiles[@]}
|
||||
cd ..
|
||||
@ -299,7 +299,7 @@ IPSW4() {
|
||||
cd tmp
|
||||
if [[ $OSVer == "7.1.2" && ! -e $IPSWCustom.ipsw ]]; then
|
||||
Log "Preparing custom IPSW..."
|
||||
cp -rf ../resources/firmware/FirmwareBundles .
|
||||
cp -rf ../resources/firmware/FirmwareBundles/ ./
|
||||
$ipsw ../$IPSW.ipsw ../$IPSWCustom.ipsw $JBMemory -S 50 ${JBFiles[@]}
|
||||
elif [[ ! -e $IPSWCustom.ipsw ]]; then
|
||||
echo
|
||||
@ -315,8 +315,8 @@ IPSW4() {
|
||||
fi
|
||||
|
||||
Log "Preparing custom IPSW with powdersn0w..."
|
||||
cp -rf ../resources/firmware/powdersn0wBundles ./FirmwareBundles
|
||||
cp -rf ../resources/firmware/src .
|
||||
cp -rf ../resources/firmware/powdersn0wBundles/ ./FirmwareBundles/
|
||||
cp -rf ../resources/firmware/src/ ./
|
||||
if [[ $Jailbreak == 1 && $OSVer == "6."* ]]; then
|
||||
JBFiles=()
|
||||
rm FirmwareBundles/${config}.plist
|
||||
@ -389,9 +389,9 @@ IPSW4Cherry() {
|
||||
|
||||
cd tmp
|
||||
Log "Preparing custom IPSW with ch3rryflower..."
|
||||
cp -rf ../$cherrymac/FirmwareBundles ../$cherrymac/src .
|
||||
cp -rf ../$cherrymac/FirmwareBundles/ ../$cherrymac/src/ ./
|
||||
unzip -j ../$IPSW.ipsw Firmware/all_flash/all_flash.${HWModel}ap.production/iBoot*
|
||||
mv iBoot.${HWModel}ap.RELEASE.img3 tmp
|
||||
mv iBoot.${HWModel}ap.RELEASE.img3 tmp/
|
||||
$xpwntool tmp ibot.dec -iv $IV -k $Key
|
||||
../$cherry/bin/iBoot32Patcher ibot.dec ibot.pwned --rsa --boot-partition --boot-ramdisk $ExtraArgs
|
||||
$xpwntool ibot.pwned iBoot -t tmp
|
||||
@ -434,7 +434,7 @@ IPSW4Powder() {
|
||||
|
||||
powderdir="../resources/powdersn0w/macosx_x86_64"
|
||||
cd tmp
|
||||
cp -rf $powderdir/FirmwareBundles $powderdir/src .
|
||||
cp -rf $powderdir/FirmwareBundles/ $powderdir/src/ ./
|
||||
powdersn0w="$powderdir/ipsw"
|
||||
|
||||
if [[ $platform != "macos" ]]; then
|
||||
@ -477,12 +477,12 @@ IPSW64() {
|
||||
Log "Preparing custom IPSW..."
|
||||
$bspatch $IPSW/Firmware/dfu/$iBSS.im4p $iBSS.im4p resources/patches/$iBSS.patch
|
||||
$bspatch $IPSW/Firmware/dfu/$iBEC.im4p $iBEC.im4p resources/patches/$iBEC.patch
|
||||
mv -f $iBSS.im4p $iBEC.im4p $IPSW/Firmware/dfu/
|
||||
if [[ $ProductType == "iPad4"* ]]; then
|
||||
$bspatch $IPSW/Firmware/dfu/$iBSSb.im4p $iBSSb.im4p resources/patches/$iBSSb.patch
|
||||
$bspatch $IPSW/Firmware/dfu/$iBECb.im4p $iBECb.im4p resources/patches/$iBECb.patch
|
||||
mv -f $iBSSb.im4p $iBECb.im4p $IPSW/Firmware/dfu
|
||||
mv -f $iBSSb.im4p $iBECb.im4p $IPSW/Firmware/dfu/
|
||||
fi
|
||||
mv -f $iBSS.im4p $iBEC.im4p $IPSW/Firmware/dfu
|
||||
cd $IPSW
|
||||
zip -rq0 ../$IPSWCustom.ipsw *
|
||||
cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user