Skip to main content

Transferring SMS from iPhone to Android (for developers)

I recently bought a Nexus 4 to replace my old iPhone 3GS. The transition has been smooth except for the transfer of the SMS from iPhone to Android which led me to write some code and this post.

The most interesting article I found on this subject was iPhone SMS to Android Converter. Considering iSMS2droid has not been updated since October 2011 and does not seem to be compatible with iOS 6, if you choose this solution, you will have to upload your messages on Jan Grewe server. You decide for yourself if you are OK with sending your SMS database to his server.

I chose to follow another path. After failing to find iSMS2droid or SMS Backup & Restore source code I started coding my own SMS transfer application.

Limitations

  • Only works with iOS 6 SMS
  • Only works with Android having the sms:// content provider
  • Does not handle attachments yet
  • Requires Android SDK to build the Android app

Step 1: Find your iPhone SMS database

In short:
  1. Backup your iPhone with iTunes
  2. Search for the 3d0d7e5fb2ce288813306e4d4636395e047a3d28 file
  3. Copy this file on your Desktop
  4. Rename the copy to sms.sqlite
The detailed procedure is described here.

Step 2: Change the journal_mode of your SMS database

I had some problem working with the iPhone SMS database in the Android app due to its journal_mode set to WAL. Everything worked fine after changing it to DELETE.

Unfortunately, I did not succeed implementing this step in the Android application. If you know how to do it, please tell me.

If you have sqlite3 installed on your computer, you can execute the following command lines in a terminal:
$ sqlite3 path_to_desktop/sms.sqlite
sqlite> PRAGMA journal_mode=DELETE;
Otherwise, you can use SQLite Manager, a Firefox plugin. 

Step 3: Import your messages to Android

  1. Copy the sms.sqlite file on you Android phone, if possible in /sdcard/
  2. Download import-ios6-sms source code from GitHub
  3. Build the application and install it on your Android phone
  4. Launch the application
  5. Press the "Test" button
  6. If the test succeeded, press the "Import iOS 6 SMS" button
  7. Open your SMS inbox to see the progress

Note for rooted Androids

If your are root on your Android, you can directly play with your SMS database. You can get some ideas on how to do this by looking at the source of Andoid-SMS-DB-importer.

Comments

Popular posts from this blog

About Estimation

Recycling an article I wrote in French in 2010 . Following endless estimation sessions in the project I am working on, I have come to ask myself some questions about this practice. Why do we estimate? I think an estimation session should have two purposes. To share a common understanding of upcoming stories. To estimate upcoming work in order to plan the next steps and monitor the evolution of the project. Who should attend the estimation session? Anyone who can clarify upcoming stories and anyone who will carry these stories to completion. To improve your estimation session, you can try the following: divide the estimation session into two stages . Understanding upcoming stories. Estimating the work to be done. Understanding upcoming stories through discussion among project participants is the highlight of an estimation session . The shared vision emerging from these exchanges will facilitate future communications. Estimating should be more relevant and should be d...

Accessing a Docker container running in a Docker-Machine on localhost

On Linux you can access your running Docker container on localhost or remotely by publishing the desired port. On macOS it will only give you access to the Docker container from the Docker-Machine it is running on, i.e. from docker-machine ip <machine_name> . To access it on localhost, you can use ssh port forwarding: docker-machine ssh <machine_name> -fNTL <local_port> :localhost:<machine_port> You can now access your Docker container on localhost:<local_port> . Bonus: Accessing your Docker container from a remote computer. By default, with ssh -L , the local port is bound for local use only. You can use the bind _address option to make your Docker container available publicly: docker-machine ssh <machine_name> -fNTL \*:<local_port>:<localhost>:<machine_port> You can now access your Docker container on <your_ip>:<local_port> .