How to delete all photos on jailbroken iPad without iTunes
After jailbreaking iPad, although music and videos are deleted, photos are not. This at first seems to be a good thing as it saves me time transferring the photos again. But after using if for a while, I find it a more problematic than time saving.
With the iPad being jailbroken, I now use 3rd party app to manage my photos instead of the built-in one and these apps require my photos to be in different locations, different album structures, etc. That means I need to delete current photos to preserve space. Unfortunately there is no easy way to delete them without going through the iTunes sync process which I don't want.
After searching on Google, I came across a post showing how to manually copy new photos into the Camera Roll album and from that I figured out a way to delete all photos on the iPad without iTunes. Not a straight forward process but it works for me.
1. A few notes
What I described below will allow you to delete ALL photos but not individual ones. This is because iPad apparently uses some kind of database files to manage photos instead of merely reading them from disk. So in order to delete only certain photos, those DB files need to be modified and this process requires a good understanding of how those DB files work and then write scripts to do that. But in order to delete ALL photos, it's a lot easier, I just...delete them all!
Also, what I show you involves writing some Unix commands like cp, rm, etc.. They are very basic commands but if they make no sense to you then I recommend you ask someone who has some knowledge about Unix to do this otherwise you can easily mess things up.
OK, let's get started.
2. Requirements
You need:
- A jailbroken iPad
- OpenSSH installed on your iPad. If you don't, get it from the Cydia store.
- Know how to connect to your iPad via SSH. The default login details are username:root, password:alpine. I strongly recommend you change this password if you haven't done so.
3. Shut down Photo App
Make sure you shut down the Photo app on your iPad including deleting it from the multitask bar. DO NOT start the app until you are told to do so otherwise you will need to start this process again.
4. Delete synced photos
There are 2 types of photos on iPad. The first one is synced photos: these photos are synced from your Computer via iTunes. You normally need iTunes to delete these photos. They are the targets of this article and I will show you how to delete them in this section.
There are 2 things we need to do: delete the photos themselves and delete the database files that mange these photos.
4.1 Delete photo files
Synced photos are stored at the following directory on your iPad:
/private/var/mobile/Media/Photos
You can either delete this directory completely by running this from SSH:
Or better to rename it just in case anything happens, you can revert it. From SSH:
$ mv Photos old_Photos
Don't worry about recreating an empty "Photos" directory. It's not needed.
4.2 Delete photo database files
Photo and album structures on iPad are managed by 2 SQLite database files:
/private/var/mobile/Media/PhotoData/Photos.sqlite
/private/var/mobile/Media/PhotoData/PhotosAux.sqlite
Similar to the above case, you can either delete them:
$ rm Photos.sqlite
$ rm PhotosAux.sqlite
Or rename them:
$ mv Photos.sqlite old_Photos.sqlite
$ mv PhotosAux.sqlite old_PhotosAux.sqlite
5. Delete Camera roll photos
The second type of photos is Camera Roll photos: these are photos created from applications on your iPad. They are saved in the Camera Roll album and can be easily deleted by using the built-in functionality of the iPad. But if you want, you can also include them in this removal process. Read on to see how to do so, otherwise skip to step 6.
Camera Roll photos are stored at the following directory on your iPad:
/private/var/mobile/Media/DCIM
To delete these photos as well, do this from SSH:
OR rename it:
$ mv DCIM old_DCIM
6. Start Photo App
Now you can start the Photo App on your iPad. This time you should see only the Camera Roll album left on your iPad. If you did step 5 above as well, you will see no photos.
When you first start the app, it will be a bit slow and you will see a message saying "Updating Library". This is normal because it needs to recreate the DB files that you deleted above.
7. Clean up backups
If you chose to rename the files and directories in above steps instead of deleting them, now you can delete those backups and use those specious spaces for your new photos!
What do you think? Did it work for you? Or do you know any other ways? Let me know in the comments.
10 Comments
-
-
Vinh Khoa Nguyen27 Jul 2011, 8:03 AM in reply to Harsh
If you use the default music app then unfortunately no, you need iTunes to delete songs. However, if your iDevice is already jailbroken then you can use some third party app to play music. SMusic is a good alternative. It allows you to play mp3 files directly, like on desktop. The downside is its interface is not as good as the built in app. Plus, it only plays music, no video or podcast.
-
-
Vinh Khoa Nguyen03 Nov 2011, 6:31 PM in reply to Gio
iFile is a great app. I find its built-in video player sometimes can even work better than those specificly designed to play videos. Thanks for sharing.
-
-
Sylviu09 Jan 2012, 1:34 PM
Superb :-) it took me several days to find your post...issue instantly solved
Thank you :-)
Sylviu -
Dan17 Jan 2012, 6:38 PM
Great post! I am a newbie of a jailbroken ipod touch user, and found the application MobileSlideshow did not work well, it can not be deleted as normal application. I googled the solution for this and this post is the only working one.
ps. on my iOS5 device, there is no /private/var/mobile/Media/PhotoData/PhotosAux.sqlite -
George LaBarca5 days ago, 8:24 AM
Great information...Is the procedure for deleting photos from photo album the same for jailbroken iphone as well as ipad? I have some photos in the album I want to delete and I hate itunes...thanks.......
Is there any way to delete music without connecting to itunes