This is probably the most complicated part of moving from iPhone to Android and it’s the last task I’ve attempted although I did get the file off the phone at a first pass because I wanted to make sure everything was off the phone before re-cycling it.
In iTunes, right click on your iPhone and select backup. This will create a file on your PC that contains all of your messages.
The file can be found under:-
Users\<username>\Library\Application Support\MobileSync\Backup\.
In this directory, there should be one folder with a long hexadecimal name, if you have multiple devices, there may be more than one so you will need to check the modified date of the directory.
In this directory, locate the file:-
Copy this file to another location for ease of use.
As this file is a SQL Lite database, you need a SQLLite app and I used MesaSQLLite to open mine. On launching the program change the fields as shown below and this should search all entries:-
- Now export the data into a CSV file, File -> Export -> Table Contents – Comma Delimited, the table to export is message
- Click on okay and then enter a name for the file and click save, ensure both check boxes are selected for Escaping special characters and including field names as first record.
- Click okay.
- Open the CSV file using MS Excel
- Create an extra column to the right of “date”. Make sure the original date column is in “Text” format (not “number” format) by right clicking the column and choosing >Format cells>Number>Text.
- Copy the formula =C2&”000″ in the column to the right. This changes the date to the correct format for android (Epoch including milliseconds).
- Create six columns to the right of the “text” column. iPhone stores certain characters that confuse the XML parser (ampersands, quotes, apostrophes, greater than signs and line breaks etc). Make sure the format of the column with the body of the SMS in is “text” format (otherwise it misses characters and makes you unhappy). In each of the successive columns, use the formulae:-
-
=SUBSTITUTE(E2,CHAR(38),CHAR(38)&"amp;")
-
=SUBSTITUTE(F2,CHAR(60),CHAR(38)&"lt;")
-
=SUBSTITUTE(G2,CHAR(62),CHAR(38)&"gt;")
-
=SUBSTITUTE(H2,CHAR(34),CHAR(38)&"quot;")
-
=SUBSTITUTE(I2,CHAR(39),CHAR(38)&"apos;")
- =SUBSTITUTE(J2,CHAR(13),CHAR(38)&”#13;”)
-
- Create an extra column to the right of “flags”. This column will tell your device if the text is received or sent. The iPhone uses received as “2” and sent as “3”, but these need to be “1” and “2” respectively for Android. Use =L2-1 to change this down the column.
- In a new column, use the following formula:-
=” <sms protocol=”&CHAR(34)&”0″&CHAR(34)&” address=”&CHAR(34)&B2&CHAR(34)&” date=”&CHAR(34)&D2&CHAR(34)&” type=”&CHAR(34)&M2&CHAR(34)&” subject=”&CHAR(34)&”null”&CHAR(34)&” body=”&CHAR(34)&K2&CHAR(34)&” toa=”&CHAR(34)&”null”&CHAR(34)&” sc_toa=”&CHAR(34)&”null”&CHAR(34)&” service_center=”&CHAR(34)&”null”&CHAR(34)&” read=”&CHAR(34)&”1″&CHAR(34)&” status=”&CHAR(34)&”-1″&CHAR(34)&”
Transfer the messages to the phone
- Download the application SMS backup and restore by Ritesh Sahu
- Ensure you have at least one text in your Android Phone (either sent or received)
- Launch the app and do a Backup
- Connect your phone to the computer and download the file saved by SMS Backup
- Using TextEdit, add the text created in the last column of your excel document to the XML file source. It should look something like:
<?xml version=’1.0′ encoding=’UTF-8′ standalone=’yes’ ?<smses> <sms protocol=”0″ address=”NHS” date=”1272018455000″ type=”2″ subject=”null” body=”Medical Student Teaching Reminder” toa=”208″ sc_toa=”0″ service_center=”+447782000800″ read=”1″ status=”-1″ /><sms protocol=”…” etc /></smses>
- Rename the file to message-iphone.csv and load this file back onto your SD card in the SMSBackupRestore Folder.
- Do a restore.