Fair amount of testing
Renames snapshot to original name
Removes jailbreak apps from icon cache
+Clean up `/var`
Works on any jailbreak (hopefully)
return ret;
}
+int clean() {
+ NSArray *extrafiles = @[@"/var/lib", @"/var/cache"];
+ NSError *error = nil;
+ for (NSString *path in extrafiles) {
+ [[NSFileManager defaultManager] removeItemAtPath:path error:&error];
+ }
+ return 0;
+}
+
int main(int argc, char *argv[]) {
if (argc != 3) {
usage(argv[0]);
unregisterPath(app);
}
}
+ printf("Cleaning up /var\n");
+ clean();
printf("Renaming snapshot...\n");
rename(vol, snap);
printf("Restoring %s on %s has succeeded\n", snap, vol);