Skip to content

Instantly share code, notes, and snippets.

@TwizzyIndy
Last active October 7, 2016 14:53
Show Gist options
  • Save TwizzyIndy/9db9d4a40fb4aeb18141 to your computer and use it in GitHub Desktop.
Save TwizzyIndy/9db9d4a40fb4aeb18141 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Written by TwizzyIndy
# Jan 2 , 2016
echo "#################"
echo "#################"
echo "AppsBackup Script"
echo "TwizzyIndy"
echo "#################"
echo ""
echo "This script will backup all of apps installed on ur jailbroken device and make packages(ipa)."
echo "Please wait patiently until finished, its depend on ur installed apps.."
echo ""
echo "...."
echo ""
echo "** Please Install CoreUtilities from Cydia before running this script **"
echo ""
echo "** Please run this script in root user. **"
echo ""
echo "** e.g : $ su"
echo "** (type your root password here, if u didnt change that your password must be 'alpine' **"
echo "** # ./BackupApps.sh"
echo ""
echo "...."
echo ""
sleep 1
read -s -n 1 -p "Press any key to continue..."
backupdir=/private/var/mobile/Backups
mkdir $backupdir
ln -s /var/containers/Bundle /var/mobile/Containers/Bundle
checkRoot=`whoami`
if [[ `echo $checkRoot` != `echo root` ]]; then
echo ""
echo Please Run This Script As Root
echo ""
else
for folder in /private/var/mobile/Containers/Bundle/Application/*
do
cd "$folder"
mkdir Payload
appname=`echo *.app`
ipaname=`echo $appname|cut -f 1 -d '.'`
echo ""
echo ""
echo "Backuping" $ipaname " .... "
cp -r "$appname/" Payload/
zip -r "$ipaname".zip Payload iTunesArtwork iTunesMetadata.plist
mv "$ipaname".zip "$backupdir"/"$ipaname".ipa
rm -rf Payload
echo "Done"
done
echo "Your backup-ed ipas will be stored in /var/mobile/Backups"
sleep 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment