Updating iPhone via Linux saving data and nerves

  • Tutorial

This article will tell you how to update iOS and the data on it for Linux users. On this topic, you can google both the manuals and the problems encountered:



But this information is very fragmented. And it does not contain some subtleties, not considering which data can be lost on the phone (again, these articles do not report what data and in which case you can lose). And in a place with data - and a bunch of nerves. All this can make users new to Linux abandon its use for working with iOS.

This manual is a step-by-step guide to happy updating iOS via Linux using VirtualBox without losing data.

Further narration was tested on a bunch:
  1. Ubuntu (12.10)
  2. iPhone4 (iOS 5.0.1 up to iOS 6.0.1)
  3. VirtualBox 4.2.6 (with installed Windows 7 x32).

Although, for sure, the same will be true for the iPad.
Attention, under the cut a lot of pictures!


Step 1. Configuring VirtualBox



After installing VirtualBox, we must configure it correctly. The first thing we will do is make a virtual machine friends with USB 2.0. This is necessary for the correct recognition and correct operation of the virtual machine with the iPhone. To do this, download and install VirtualBox Extension Pack from this page .

Check that it is installed. Go to File-> Settings . You should see something like:


Do not forget to check that the current user (under whom you are logged in to Linux) is included in the vboxusers group :

$ groups shanker
shanker : shanker adm cdrom sudo dip plugdev lpadmin sambashare vboxusers


If this is not the case, add the user. For example, this is how I added myself:

sudo gpasswd --add shanker vboxusers


Adding USB Filters


We will need the next step to automatically mount the iPhone in a virtual machine. First, I will say why this is needed. The fact is that in the process of updating the iPhone several times reconnects via USB, with different VID and PID. Because of this, the mounted iPhone does not automatically cling to the virtual machine and starts opening in Ubuntu. If you spend the whole time updating the iPhone from your computer and carefully monitoring the process, you have about a minute to fix it: just hook it back to the iPhone’s virtual machine through Device- > USB Device .
And if you don’t have time ... you can observe this picture:


or this one:


but this one may appear on the device itself:


Moreover, the device does not want to turn off by the shutdown button (even if you hold it for a very long time). Helps holding 2 buttons: off and the Home button.

Select the created virtual machine, go to Configure-> USB and create a new filter. In the Manufacturer box, type Apple Inc. .


After creating this filter, the iPhone after reconnecting will again cling to the virtual machine.

Create a shared folder

In the process of synchronizing the device with the virtual machine and saving backup copies on the device itself, the virtual machine begins to inflate excessively. Moreover, VirtualBox I discovered one unpleasant feature. If the disk space with virtualka runs out - the config file is beating. This makes it impossible to return to the saved state until the config file is repaired . And to do this can be very difficult. Those. there is such a twofold feeling: you realize that you have not lost the data. But returning to a state with this data is not so simple.

So, go to Configure-> Shared Folders , select the folder on Ubuntu, where data from the iPhone will be saved. We specify auto connection in the parameters and allow the virtual machine full access to the folder:



Step 2. Configuring the Windows 7 virtual machine



I will not describe the installation of iTunes. I mean that the reader knows this. If not, Google can easily tell you. Let’s better think about this. Do you want to constantly copy device data from the virtual machine after synchronization to the shared folder that we created manually, each time you update and synchronize? Think it over! You feel how laziness appears that makes you say: “no, I don’t want to! Never!". So my laziness is in solidarity with yours. And if so, then let us automate this. Fortunately, this is done indecently simply! Create a symbolic link to the shared folder created just above. Run the command line from the administrator and enter the command:
mklink /D %appdata%\"Apple Computer" "your_share_folder"


Here your_share_folder is the path from the virtual machine to your shared folder with it. I have this drive Z.
It is advisable to do this procedure BEFORE installing it into iTunes. Otherwise, the Apple Computer folder will already be created in the system and you will have to copy its contents, delete the folder itself and paste the contents into the created symbolic link.

Step 3. Backup and sync iPhone


Well, now is the time to do what we did all this for. Connect your iPhone to your computer. Make sure that the virtual machine picked it up automatically. Back up and sync data. Make sure that this data is in the shared folder. The backups will be in the shared folder in the MobileSync \ Backup directory . Now start installing the new software on the iPhone and updating iOS.

When and what data can be lost

Because I didn’t get smarter right away, but I stuffed myself with cones on my forehead to understand what and how to do, but nevertheless the punishment touched me and I lost some data. Now I can share with readers when this can happen and which data will be lost and which will be saved.

I made a backup. At the same time, I did not synchronize the iPhone with the virtual machine. Because I did not add USB filters and did not have the opportunity to reconnect the iPhone in time , then I saw all those scary pictures that I cited above. Here I confess to the reader that I have googled these pictures on the Internet. As you might guess, I was not in the best psychological state at that time and I had no desire to take any screenshots.


The natural CPU loaded 100% of my two hemisphere cores in one process: "how to save data on the phone ????"
my_mind$ top
 PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND 
2325 shanker   20   0 1382m 467m  43m R   200 12,6  28:26.58 how_restore_my_data_on_iPhone?      

Trying to fix the situation, I connected the iPhone with a new VID and PID. iTunes saw him and gave me another message, without adding optimism to an already ruined day:


There was nothing to do, and I agreed. As a result, iOS after 20 minutes was updated and I was asked to recover some data. And the list showed exactly the backup that I did before updating the system.



Well, I agreed. The process went ... It lasted all night. By morning, my data recovered. What have I restored? It will be easier to say what I lost: all the music, sound files downloaded for installation on calls and the arrival of SMS and applications with their data (in Yandex maps there were 3 GB cards downloaded). I did not notice any more losses. Everything else was untouched:
  • Contact Lists
  • SMS
  • Photos and videos shot on camera
  • Notes
  • Reminders
  • Wireless Settings


Moreover, if I understand everything correctly, then even if you forgot to make a backup copy before updating iOS, iTunes will still make it . And in order not to lose data - do not forget to synchronize them with the virtual machine.

PS In this tutorial I did not touch on the issue of synchronizing contacts. Contacts are synchronized in WAB (Windows Address Book) and with the specified configuration steps, I believe, they will remain in the virtual machine, and not on the shared folder in Ubuntu.

Only registered users can participate in the survey. Please come in.

Using or planning to use VirtualBox to upgrade your iOS?

  • 8% Yes, already doing so 21
  • 8.4% I have n’t done it yet, but after the article I thought 22
  • 1.1% Yes, but I use another virtualization tool 3
  • 43.4% No, I will continue to update on real Windows or Mac 113
  • 11.1% I don’t update iOS at all and do not sync 29
  • 5% I do not update iOS, but I synchronize through means other than iTunes 13
  • 22.6% I update iOS through the iPhone \ iPad itself, I use iCloud 59 for backups

Also popular now: