2

Many years and several iPhones ago, I took a nice picture with my iPhone and set it as my lock screen wallpaper. That lock screen wallpaper has been propagated as I've gotten new iPhones, but the photo is not in my camera roll. I'd like to retrieve that photo (i.e., as a plain image, not as a screenshot of the lock screen), but I haven't been able to figure out how to do it. In searching for a way to do this, I've come across a few methods, none of which have worked. Does anyone know if there's a way to do this?

I have an iPhone 13 Mini running iOS 16.4.1.

3 Answers 3

2

This is a tough one

I had the same problem, beloved home screen wallpaper and the original nowhere to be found.

I have good news and bad news.

  1. iMazing or iExplorer can back up the phone including the wallpaper files that that iOS uses. I believe both offer modes where you can back up the whole phone and get to the file (which ends with .cpbitmap) for free.
  2. Once you have done that and have that .cpbitmap file there is nothing that I found that worked to convert it back to a format that your Mac, PC, iPhone would understand and display.

There were (I think) Perl scripts that purported to convert the file to a .jpg that I could never get to work. There were websites that said they would convert any format to any other format but choked on that .cpbitmap file.

In the end I found nothing that would convert that file to something usable. Fortunately I eventually found a backup of the original and the .cpbitmap remains on my SSD in the event that someone comes up with something to convert that file to a usable format.

Maybe you can find those scripts that purport to convert a .cpbitmap file and get them to work, but at least you can snag the file and put it in a safe place using iMazing/iExplorer for the time when someone does come up with a converter.

5
  • I have found the following resources that specifically claim to convert .cpbitmap files into PNG: cpbitmap.github.io github.com/sh00tg0a1/cpbitmap_convertor/tree/master/python github.com/hthetiot/cpbitmap-to-png/blob/main/README.md All these seems to be fairly recent. Maybe try these? Commented Apr 23, 2023 at 8:22
  • I think I tried that. But I am not even remotely familiar with developer tools, scripting and the various scripting languages, so it could easily be a me problem, or that GitHub repository may have been updated since I used it. If it doesn't work add that to your question, if it does answer your own question with the details on what you did. Good luck! Commented Apr 23, 2023 at 19:02
  • I tried using iMazing to make a backup of my iPhone but I don't see any files with the .cpbitmap suffix. I don't see any backup options that look like they would need to be enabled to save the wallpaper. When did you do this originally? I wonder if they changed the way the wallpaper appears in the backup. Commented Apr 23, 2023 at 19:50
  • Weird, Apple probably made more changes to the iOS file system and I don't see that file either. Sorry, I thought that file would still be readily available. There may be other ways to access the root filesystem but I am not aware of them cough ... jailbreak ...cough (maybe?) Commented Apr 24, 2023 at 14:42
  • I was in the process of writing up the procedure I used to do this (after seeing a comment from @Thinkr) and found that it no longer worked. I'm not sure if this is because I have the free version of iPhone Backup Extractor or if there's something else wrong. My procedure was adapted from gist.github.com/sillygwailo/6631402, but since it isn't working for me anymore, I don't think I should post it here. Commented Apr 24, 2023 at 15:42
1

It should be possible to manually extract the wallpaper. I haven't actually tested whether this works, so proceed with caution.

  1. Take an non-encrypted backup of your iPhone using the official software (iTunes, or Finder on MacOS).

  2. Open Manifest.db in the backup directory as an SQLite database. You can use the official sqlite command line tool, or any other software that can work on SQLite databases.

  3. Execute the following SQL:

    SELECT fileID, domain, relativePath FROM Files WHERE domain = 'HomeDomain' AND relativePath LIKE 'Library/SpringBoard/%.cpbitmap';
    

    This should give you a list of potential files. For one of my backups, I have these values:

    86736007d0166a18c646c567279b75093fc066fe HomeDomain  Library/SpringBoard/LockBackground.cpbitmap
    0c371b8c5e4b666e1f09053b29c3a2d434b2e2d9 HomeDomain  Library/SpringBoard/OriginalLockBackground.cpbitmap
    

    (The relation between domain, relative path and file ID is deterministic, so even for backups of other phones, the file Library/SpringBoard/LockBackground.cpbitmap in HomeDomain will have the same file ID 86736007d0166a18c646c567279b75093fc066fe.)

  4. Take the fileID of a record, find the corresponding file. It will be located at <backup dir>/<first 2 characters of fileID>/<fileID>. For example, LockBackground.cpbitmap would be located at <backup dir>/86/86736007d0166a18c646c567279b75093fc066fe

  5. Convert the file to a more convenient format. https://cpbitmap.github.io/ is an online to that claims to convert such cpbitmap files. Some other resources: https://github.com/sh00tg0a1/cpbitmap_convertor/tree/master/python https://github.com/hthetiot/cpbitmap-to-png/blob/main/README.md

If your backup is encrypted, you will need to decrypt Manifest.db, find the file(s), and then decrypt the individual files as well. Here's some resource on decrypting backups: https://github.com/jsharkey13/iphone_backup_decrypt

1
  • I just confirmed that cpbitmap.github.io worked to convert my cpbitmap files into png. Success!
    – Hoby
    Commented May 17, 2023 at 1:12
0

I created iOS Wallpaper Extractor to solve this problem.

You can extract wallpapers with this command:

npx ios-wallpaper-extractor <backup path> <output path>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .