InflatableDonkey icon indicating copy to clipboard operation
InflatableDonkey copied to clipboard

download icloud photo library

Open nirlandau opened this issue 8 years ago • 18 comments

As most of you probably know, since iOS 8.3, Apple added the iCloud Photo Library feature, that makes all your photos and movies synced and updated automatically on all your devices. Sadly, if this feature is turned on, the photos and movies are no longer saved in the "regular" iCloud backup. InflatableDonkey is an amazing piece of work for downloading iCloud backups, and I was wondering if it is possible to add the feature of downloading the photo library as well? Or is it something completely different protocol wise?

nirlandau avatar Jan 04 '17 18:01 nirlandau

There are hacked versions of InflatableDonkey that do download iCloud photos and things like WhatsApp data, although the chats are now encrypted. It's all based on the iCloud protocol which InflatableDonkey and I understand.

I've not released additional iCloud projects as I'm struggling to find the spare time.

horrorho avatar Jan 04 '17 19:01 horrorho

Whatsapp data we already have unencrypted in the backup files so no reason to find it elsewhere. Can you refer me to a hacked version? Although I would like to have an official one made by the guru @horrorho (whenever you find the time)

nirlandau avatar Jan 04 '17 20:01 nirlandau

The WhatsApp documents backup may available when there is no iCloud phone backup. It's an additional forensic option which is why I suspect WhatsApp encrypted them. Some data it still retrievable but I won't discuss it in detail otherwise they'll just patch it.

The hacked InflatableDonkey derivatives are not in the public domain. They're experimental versions that also contain some concept methods that could be abused quite heavily. If I get I time, I'll try and re-factor one of those derivatives to remove the offending code and release a jar only tool. Ideally I would try and add in the functionality to InflatableDonkey. Again, it's a time issue above all.

horrorho avatar Jan 04 '17 23:01 horrorho

A weird question: I installed a new iCloud account on my phone. The iCloud Photo Library feature was OFF. I did a backup. Then I downloaded the backup using InflatableDonkey and no pictures were there? Is that normal?

nirlandau avatar Jan 06 '17 05:01 nirlandau

Hi. It doesn't sound quite right. I don't have any iOS devices to play with so it's difficult to test and help. I can only suggest you make another backup attempt. It's possible there's a partial backup that's stuck in the system.

horrorho avatar Jan 06 '17 17:01 horrorho

Hi @horrorho! Is this something you are working on? Or do you already have an approximate release date? It would be a very handy feature for those who keep our Camera Roll separated from the backup. Thanks!

Aliasr avatar Mar 11 '17 23:03 Aliasr

@Aliasr Sorry it's been on a low priority list. Maybe next month if I have time?

horrorho avatar Mar 12 '17 20:03 horrorho

Update. I have started working on a new project that should address multiple concerns. It will be able to download photos and WhatsApp archives too. Unfortunately I'm away for May and it won't be ready before then.

horrorho avatar Apr 21 '17 00:04 horrorho

Welcome back @horrorho! Looking forward to your new project!

Aliasr avatar Jun 09 '17 23:06 Aliasr

@Aliasr Hi. I haven't forgotten! It's finding the spare time issue. :crying_cat_face:

horrorho avatar Jun 10 '17 00:06 horrorho

Ok. I've been giving this some serious thought. As I've stated above and re-iterated here I need to be mindful on not releasing a monster. In view of that, even with a massively restricted code base, I don't think I can deliver an open source solution that will not be hackable into a wider exploit tool. Sorry.

horrorho avatar Jul 03 '17 19:07 horrorho

Hi @horrorho! We're very sorry to hear you are not going to release your longed-for new project, albeit we must understand the reasons and implications for not doing so.

Nevertheless, I decided to create my own private iCloud Photo Library recovery tool, so a couple of weeks ago I started digging into how CloudKit works. Eventually I hope I will be able to code my own solution.

It would be of great help if you could briefly explain if there are important differences between recovering an iOS backup and other data such as iCloud photos or Whatsapp archives.

Thanks!

Aliasr avatar Jul 16 '17 18:07 Aliasr

@Aliasr Modified versions use additional classes or a new advanced CloudKit layer as discussed here.

Due to behind the scenes turmoil, I've recently clarified that InflatableDonkey is for users accessing their own backups. Apple already provides tools for downloading iCloud photos. WhatsApp also provide functionality to recover chats.

horrorho avatar Jul 16 '17 20:07 horrorho

Thank you @horrorho. I'm sorry if I didn't explain myself properly, but that's not quite my case. I'm creating this tool for my personal use on my own backups / data.

I just needed to know if other apps (not only iCloud Photos or Whatsapp) use the same approach as backups do (protobufs, encryption, chunks, etc.), but I understand if you can't reveal such information.

I do not want to be misunderstood, your help and disposition have always been appreciated.

Aliasr avatar Jul 16 '17 22:07 Aliasr

Developers use the official CloudKit API. I would start there. Unmodified InflatableDonkey uses a very basic CloudKit layer that was reversed in a few days without having any previous knowledge of CloudKit. It works, but it's pretty naive. It only offers a couple of calls and without modification will not manage iCloud photos etc.

I've since gone on to write a private CloudKit layer that emulates the official API. This is a monster, not only in terms of capability but also the undocumented internal API it exposes. However, as it ignores certain security mechanisms and exposes hidden calls, it's open to abuse. There's also the expectation that it will be supported and if you've been following this repository you'll know that CloudKit is a moving target.

Essentially I use my CloudKit layer in the way an app developer would use the official CloudKit API, although I do have the option of doing certain things they cannot.

I understand this post is wonderfully vague and I've largely left you to your own devices. However, unless you really want the challenge, I would use the official tools to retrieve your iCloud photos and WhatsApp chats. That being said, if I can manage to reverse and code a CloudKit layer then there's little reason you cannot also.

P.S. As stated above, CloudKit WhatsApp chat databases have been encrypted for a while now. Photos/ documents/ videos are not. I haven't looked into the key retrieval mechanism. As a side note, thumbnails are not always deleted which exposes a minor flaw but I'm sure it will be patched at some point.

horrorho avatar Jul 17 '17 02:07 horrorho

Great! That's what I was looking for. Thanks @horrorho!

Aliasr avatar Jul 18 '17 03:07 Aliasr

@horrorho hi, thanks for the info. i want the private cloudkit tool, and i'd like to make some donations to you for this project. is it possible? i want the cloudkit tool to download photos, videos, whatsapp etc

marksims avatar Aug 14 '17 05:08 marksims

@marksims, It's not a donation/financial issue for her but rather an ethical one. Also, it isn't that hard really, a lot of the work is done but you need to implement some new protobuf types for iCloud. For example you'll probably want to start with CKDFetchRecordChangesOperation (213)

DerrickMartinez avatar Oct 05 '17 16:10 DerrickMartinez