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

IntelliJ IDEA not starting: Initial heap size set to a larger value than the maximum heap size

IntelliJ IDEA didn't want to start this morning. Got the following error when trying to start it from a shell: Error occurred during initialization of VM Initial heap size set to a larger value than the maximum heap size What happened is that IntelliJ IDEA loaded the JVM Options from the new custom vmoptions file in the config directory. On Windows: %APPDATA%\Roaming\JetBrains\IntelliJIdea2020.1\idea64.exe.vmoptions On macOs: ~/Library/Application Support/JetBrains/IntelliJIdea2020.1/idea.vmoptions This file was not updated properly when I updated IntellIJ IDEA. It contained: -Xms4g -Xmx2048m Fixed the issue by editing this file: -Xms4g -Xmx4g Source: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004701620-idea-vmoptions-not-used-by-default  

VSCode in the Browser: Coder vs Gitpod vs Codespaces

Coder SaaS doesn't seem to be for individuals → "Request Demo". But they have a Setup Guide if you want to give it a try. I didn't as I just want SaaS. N.B.: Differences compared to VSCode? TL;DR: Some extensions might be missing. Gitpod Go to https://gitpod.io/#/https://github.com/<your_repository> and login with your GitHub account. Done! Also works with GitLab. Based on Eclipse Theia which is based on Visual Studio Code . Same as Coder. Some extensions might be missing. Free tier gives you enough to give it a try: 50 hours / months Public Repos Private Repos (30-Day Trial) Codespaces (Preview) Slower setup compared with Gitpod: Register to Microsoft Azure Create a Billing Plan. Timed out the first time Create Codespace Done! Full-fledged Visual Studio Code in the Browser! Freebies : 12 months of popular free services £150 credit to explore Azure for 30 days Azure free account FAQ Pricing. Conclusion I'll try both Gitpod and Codespaces in the upcoming w

Seneca - On the Shortness of Life

It is not that we have a short time to live, but that we waste a lot of it. Life is long if you know how to use it. It is a small part of life we really live [...] all the rest is not life but merely time. People are frugal in guarding their personal property; but as soon as it comes to squandering time they are most wasteful of the one thing in which it is right to be stingy. For suppose you should think that a man had had a long voyage who had been caught in a raging storm as he left harbour, and carried hither and thither and driven round and round in a circle by the rage of opposing winds? He did not have a long voyage, just a long tossing about. Putting things off is the biggest waste of life: it snatches away each day as it comes, and denies us the present by promising the future. [...] You are arranging what lies in Fortune's control, and abandoning what lies in yours. [...] The whole future lies in uncertainty: live immediately. Life&#