What's new

HOW TO: Backup Your Cydia Tweaks, Settings and Sources

willerz2

Super Moderator
Staff member
Joined
Aug 15, 2012
Messages
7,663
Reaction score
655
Location
New York
This guide is rarely applicable as the only time you would really use this is if you restore your jailbroken device, which is not something you'd want to do on an A5+ device since you can't downgrade. But, if you're planning to upgrade from a jailbroken state to the latest iOS that is jailbreakable, assuming all of your tweaks and settings are transferable to the latest iOS, you can use this to retain all tweaks and MOST of their settings.

This will work for any and all device assuming after your restore, your device is jailbreakable, meaning all iPod Touch, iPad and iPhone generations above iOS 2.0.

If the above was a little confusing, here's a list of possible scenarios that you may find this guide useful
  • Upgrading from iOS 5.X to iOS 6.X on an iPhone 3GS or iPhone 4 (assuming you have valid blobs and APTickets for the iPhone 4)
  • Upgrading from iOS 6.X to iOS 6.X on an iPhone 3GS or iPhone 4 (assuming you have valid blobs and APTickets for the iPhone 4)
  • Upgrading from iOS 7.X to iOS 7.Y on an iPhone 4 or newer (assuming 7.Y is jailbreakable as well and is the latest iOS being signed)
  • Upgrading from pre-iOS 5.1.1 to iOS 5.1.1 on an iPad 1

The reason this list is fairly short is because not every tweak you have installed on the previous version may be usable on the iOS threshold above it, i.e. not all iOS 6 tweaks work on iOS 7 as they may not have received an update yet, or there's an iOS 7 exclusive version of the tweak, so using this method in a case like that is not the best of moves as you'll end up with a bit of a headache to fix. But within a threshold of upgrade, this guide will work to allow you to "transfer" your tweaks and Settings over after the restore. This is a free method as opposed to using tweaks such as PKGBackup or xBackup which runs you several dollars in the Cydia store, and essentially, it does 90-95% of the same thing that they do.

What You'll Need:
  • OpenSSH
  • MobileTerminal or an SSH Client on your computer (PuTTy for Windows, CyberDuck or Terminal for Mac OSX)
  • SSH FTP client on your computer (WinSCP for Windows, CyberDuck for MacOSX)
  • Computer

Step 1: Establish an SSH prompt connection to your device by logging in with your SSH credentials if you're using a computer, note that we're referring the an SSH command line, not the FTP client such as WinSCP. If you're using MobileTerminal, run the command 'su root' without the apostrophes, then enter your SSH password.

gqLNWKk.png


Step 2: Run the command 'dpkg --get-selections> installed-pkgs.txt' without the apostrophes. Note that you can rename the 'installed-pkgs' portion with anything, it's just a name for the text file. This contains the list of installed packages including dependencies.

8ga0LtL.png


Step 3: Navigate to /var/mobile/ using iFile or an FTP client such as WinSCP or CyberDuck, and transfer/copy your created .txt file over to your computer.

LOcQRCI.png


Step 4: Navigate to /etc/apt/sources.list.d/, and transfer/copy Cydia.list to your computer. Do not rename this file as this is your list of sources that you have in Cydia.

sj6KEpV.png


Step 5: Backup your device using iTunes, and restore your device. Your backup will retain 90-95% of your tweak settings (not all tweak settings are transferable as they're dynamically stored rather than statically stored)

Step 6: Re-jailbreak your device using the appropriate utility.

Step 7: Reinstall OpenSSH and MobileTerminal. If you want to use your computer to SSH, you don't need to install MobileTerminal and will only need OpenSSH. Also reinstall APT 0.7

Step 8: Open your SSH FTP client, establish a connection again, and navigate back to /var/mobile/ and place your .txt file back in the directory.

LOcQRCI.png


Step 9: Navigate back to /etc/apt/sources.list.d/ and place Cydia.list back into the directory.

sj6KEpV.png


Step 10: Open up your SSH command terminal on your computer and re-establish a connection again. If you're running MobileTerminal, again, run the command 'su root' and enter your SSH password.

Step 11: Run the command 'dpkg --set-selections< installed-pkgs.txt' or whatever your text file's name is without the apostrophe.

Step 12: Run the command 'apt-get dselect-upgrade' without the apostrophe. Note that in this example on my iPod, I only had 2 upgrades available because I only have 2 packages that needs updating. On a freshly restored device, the number of newly installed will most likely match that of your installed packages previously. Some packages may not install and will appear as "Not Upgraded" because you may not have that source in your Cydia.list as you removed it from the source list prior to performing this.

hd1kHXX.png


Step 13: Reboot your device.

Upon a reboot, you may have to fidget around with some setting still as not all settings are backed up using iTunes. The majority (90-95%) of all tweaks in the entire Cydia store can be backed up, so the 90-95% does not mean 90-95 of your specific list of tweaks, it means 90-95% of all tweaks available in the entire Cydia store.

[FIN]
 
Last edited:
Not all the APT's are installed. You have to install them before running the command to restore the cydia tweaks.


EDITED:

Here is what I get from an OSX terminal"

apt-get dselect-upgrade
-sh: apt-get: command not found

I go back into Cydia and install the "APT 0.6 Transitional" library which also installs all the remaining APT libraries. After that everything works fine.

You may want to consider adding that to your tutorial.

Thanks
 
Last edited:
I get the same error but I am not finding the APT 0.6 transitional in cydia. Where is it?
 
I figured out how to find it. You have to change your setting in cydia to developer. To do this:
- Open cydia
- click on manage at the bottom
- click setting at the top
- select developer

Once you do this you an search for APT 0.6 Transitional just like a normal package.
 
I figured out how to find it. You have to change your setting in cydia to developer. To do this:
- Open cydia
- click on manage at the bottom
- click setting at the top
- select developer

Once you do this you an search for APT 0.6 Transitional just like a normal package.

Good one I did not realize that. Ya I setup as developer. All I know is you cannot run the apt-get command until those libraries are updated.


@Willerz2,

Well now you know this is not just me saying its a step needed in this post and back on your other thread, it is confirmed by another user. Can you update your tutorial to reflect this change. All I know is once you install the transitional library all the others get installed. I am guessing alternatively you could install each of the remaining APT's individually if one does not see the transitional library because they may not have set the developer option during the initial setup stages of Cydia.

Thanks
 
Last edited:
Top