πŸ–Ό Downloading photos from the iCloudΒΆ

Note

There are many different types of photo content stored on the iCloud: in iCloud backups of iOS devices, in Apple’s PhotoStream service, and in the iCloud Photo Library. In this tutorial, we are obtaining photos stored in an iOS device backup.

This tutorial demonstrates how one can download photos from an iOS device backup using the Open Source ricloud sample client implementation.

Getting startedΒΆ

Install the Python library with the following command:

pip install ricloud

Using the libraryΒΆ

The sample client’s test script can be accessed directly from the command line:

python -m ricloud <ICLOUD_ACCOUNT>

Users can also optionally specify --password=<password> or --timeout=<timeout>. ricloud will list the names of the services available for the key it is configured with:

Authorized services:
        0: iCloud
        1: Google
        2: Skype
        3: Instagram

Select 0 at the prompt for iCloud.

Users will then be prompted for the built-in sample API client application to use. iCloud may be selected with 0 at the prompt:

Available sample applications:
        0: Sample iCloud Application

If the password was not specified on the command line, users will be prompted for it. The API client will proceed to login and list the available devices for this account.

Performing login...

Login Successful
Fetching device list...


Available devices:
    0: Bob iP7 iOS10 Black (1 iPhone 7 running iOS 10.0)
    1: Alice SE Grey 9.3.2 (#121211 iPhone SE running iOS 9.3.2)
    2: Steve iP6 iOS9.0.2 white (#e1e4e3 iPhone 6 running iOS 9.0.2)
    3: Renate’s iPhone (1 iPhone 7 Plus running iOS 10.0.1)
    4: Carol's iPad (#e1e4e3 iPad Pro running iOS 9.1)
Please select a device index:

In the above example we have a choice of several devices. We select the first one: 0.

The client will then list the available data feeds.

Available Data:
Please select what data to fetch
    0:  All
    1:  sms
    2:  photos
    3:  call_history
    4:  location
    5:  whatsapp_messages
    6:  skype_messages
    7:  facebook_messages
    8:  contacts
    9:  installed_apps
    10: file_list
    11: healthkit
    12: healthkit_steps
    13: browser_history
    14: app_usage
    15: web_devices
    16: kik_messages
    17: snapchat_messages
    18: web_browser_history
    19: calendar_appointments

Note

If using the trial token, users will be unable to access the content of the feeds: the outputs will be replaced by the message “Contact enterprise@reincubate.com for access to this data.”

We select the photos feed: 2.

Performing fetch data task...

Data Fetch Successful. Output file: 4e06861f-4105-401c-b491-0636e88ca4a9.json

The API will send back a list of photos stored in the device’s backup in JSON format. It will be saved in a local file by the client. The JSON output will be similar to that described in the photos sections of the icloud documentation.

The client will then automatically request the download of all files simultaneously.

Downloading 24 files...
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0004.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0003.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0008.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0016.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0014.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0013.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0012.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0010.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0005.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0014.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0011.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0007.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0006.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0011.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0016.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0015.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0015.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0002.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0001.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0002.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0001.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0012.MOV
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0009.JPG
 ricloud/output/files/Bob iP7 iOS10 Black/Media/DCIM/100APPLE/IMG_0013.MOV
All tasks completed.

The files will be downloaded to the “output” folder, as specified in the output_directory setting in the default ~/.ricloud.ini configuration file.