Entries tagged with “iPhone”.


Please see the update at the bottom of this post!

As an avid user of the Hipstamatic iPhone app, I soon noticed that it started taking up a lot of disk space.

I had a look around the filesystem (my iPhone is jailbroken, so I can access the whole filesystem) and found that inside the Documents folder for the app, there are 2 folders which hold any photos you take (FilmRoll for the thumbnail images, and HiResPrints for the full sized ones).

When you delete a photo from the film roll, the thumbnail and full size image aren’t removed from these folders, meaning that after you’ve taken a lot of photos, you can end up with the app taking up a huge amount of space and have no way of freeing the space up.

If you’re jailbroken, you can remove old images from the filesystem fairly easily, but you need to take care not to delete ones which havent been deleted from the app.

The file HipstaData.sqlite is a sqlite database holding info about all of the photos which are still in the app, so you could correlate the records in that with what’s in the folders above to decide what to delete, but it’s a pain to do and you need a sqlite browser and basic understanding of the filesystem and databases to do.

Rather than the hassle of having to do this manually, I decided to write a shell script to do it for me. I achieved it by doing the following.

1, Locate the hipstamatic app folder on the device (I believe this is different for all installs, so I made the script find the app itself rather than hardcoding it). On a 3GS, this takes a few seconds.

DIR_NAME=`find /var/mobile/Applications/ -name “Hipstamatic.app” | cut -d \/ -f 5`

2, Kill the running hipstamatic process (this might not be needed, but it’s safer to not have the app running while you’re editing the contents of its Documents folder).

killall -v Hipstamatic

3, Loop through all files in the FilmRoll directory (I assume that every file in this directory will have a corresponding entry in HiResPrints). For each file, query the sqlite database and if the filename exists in the ZRECENTPRINT table then it’s still part of the film roll inside the app so needs to be kept.

The full script is available here (removed). To use it, copy it to your device using something like cyberduck or i-funbox, then make it executable and run it through ssh…

mv hipsta.txt hipsta.sh
chmod +x hipsta.sh
./hipsta.sh

Now a quick disclaimer! This script works for me. I’ve only used it myself on my own iPhone so whilst I think it will work correctly, I can’t guarantee that it won’t brick your device and empty your bank accounts. Please make sure you have a backup (I’d recommend AppBackup or Chronus) before you attempt to use it. Also, I’m not an expert at shell scripting so if anyone who reads this is and notices any issues then please let me know and I’ll fix it as soon as possible. I don’t want anyone to suffer any data loss because of my script!

Update 14th May 2011 – It appears that this problem has been fixed as of Hipstamatic v210, so this script isn’t needed any more!

Just a quick post explaining a problem I found when upgrading my jailbroken (using spirit) 3.1.3 iPhone 3GS to iOS4.

I did the upgrade last night, and noticed this morning that my data network didn’t work at all. WiFi was working fine, but network data wasn’t at all.

After a bit of googling, I came across this post which states that it is due to the jailbreak :(

So, to anyone running 3.1.3 jailbroken, here’s how to upgrade

First, do a restore rather than an upgrade (click restore in itunes and it will basically do a clean install of iOS4 then resync everything) – you won’t lose any data. This should work fine and you won’t have any data issues.

If you did a normal upgrade rather than a restore, you must have a backup pre iOS4 to be able to get it working again. In this instance, simply restore the device and then restore the backup pre iOS4. For more information on how to save multiple backups at any time, check out my earlier blog post.

If you did an ‘upgrade’ and don’t have a backup pre iOS4 any more, it looks like you’re going to have to do a clean restore and not use a backup. You can get some of your data (SMS etc..) back by using the advice in the link above.

Good Luck!

One thing I found slightly irritating about the way iTunes backs up iPhones is the fact that it only keeps the most recent backup. This means that if you accidently delete a text, photo, or something else that’s backed up and only realise after you’ve backed up again, it’s too late.

Also, the fact that iTunes backs up as soon as you plug the phone in is annoying. If you plug in to restore something you’ve removed and aren’t quick enough to ‘slide to cancel’, a new backup will be created and overwrite your old one.

It’s actually fairly easy to keep old backups – it’s not something you can do automatically, but is worth knowing. All you need to do is make a copy of your current back up, and rename it to something else in the filesystem. You can also change the description of it so that it shows a more friendly name when you attempt a restore.

First, browse to the folder containing the most recent backup:

Windows XP:
C:\Documents and Settings\USERNAME\Application Data\Apple Computer\MobileSync\Backup

Windows 7 and Vista:
C:\Users\YOURUSERNAME\AppData\Roaming\Apple Computer\MobileSync\Backup

Mac OSX:
~/Library/Application Support/MobileSync/Backup/

Inside this folder, you will see another folder with a long string of numbers and letters, something like…

To keep this backup, all you need to do is make a copy of the folder, and rename it to something like ’20100311 – 8deabb43……’.

Next, enter this folder, and open the file ‘Info.plist’ in your favourite text editor. To give the backup a meaningful name, you need to find the key ‘Display Name’ and change the <string> tag to anything you want.

Once this is done, open up iTunes and plug your phone in. Now, in the future when you want to restore one of your previously saved backups, just right click the iPhone in iTunes and click ‘Restore from Backup’.
Now you will notice that you have multiple backups to choose from, and can restore back to any of the backups which you’ve saved. Note that the display name I edited above is the one which shows in the drop down list.

Apologies for this last one being a photo rather than a screenshot, but I’m writing this on a macbook pro (running windows 7!) and there’s no print screen key, and when trying to use snipping tool, the drop down box closes when it loses focus.

There you go, that’s all you need to be able to manage multiple backups on an iPhone. I assume this will work for iPods as well but I don’t have one to test it on.

I recently changed from Windows Mobile to an iPhone, after getting tired of Windows Mobiles sluggishness and general lack of innovation.

I don’t like iTunes, and generally prefer to manage my music manually in explorer, and use winamp to play songs/albums. I know of alternatives like SharePod which allow you to manage music on your iPhone or iPod, but you still need to use iTunes for things like backing up etc..

The way I get around this is fairly simple, I still do everything in iTunes but manage my music manually. Firstly, I use a great free app called mp3tag to make sure that the music has the correct id3 tags, album art etc..

Then it’s just a case of putting the music I want on my iPhone into iTunes, and nothing else. First, set iTunes to sync all music with the iPhone, and then simply drag and drop folders or individual songs from explorer into iTunes and sync with the iPhone. To remove music, just delete it from iTunes and sync again.

I find this an easy way to make sure that I don’t have to use iTunes to actually listen to music or manage my collection, but I can keep my phone happy by using iTunes to sync music to it. It’s much easier than having all your music in iTunes and telling it to only sync certain artists/playlists.

I have some friends who either use the ‘selective sync’ option, or just use alternatives like SharePod or Media Monkey to copy music, but after I show them the simplicity of this method, they make the switch. Hopefully a couple of others will find this useful.