Skip to content

Instantly share code, notes, and snippets.

@YKG
Forked from perplexes/instructions.txt
Created August 27, 2018 09:40
Show Gist options
  • Save YKG/be0e8d6908ee5d8120fe874337928640 to your computer and use it in GitHub Desktop.
Save YKG/be0e8d6908ee5d8120fe874337928640 to your computer and use it in GitHub Desktop.
Move messages from iPhone to Android
# Migrate SMS from iPhone to Android in OSX #
Parts of this taken from http://pastebin.com/d4hNUmTK
1. Make an unencrypted backup of your iPhone to iTunes, not using iCloud.
2. cd /tmp
3. put iphone_sms_* here (found below)
4. Find your ~/Library/Application Support/MobileSync/Backup/*/3d0d7e5fb2ce288813306e4d4636395e047a3d28(.mddata)
5.
> sqlite3 ~/Library/Application Support/MobileSync/Backup/(id)/3d0d7e5fb2ce288813306e4d4636395e047a3d28(.mddata)
.output iphone_sms_content.xml
SELECT ' <sms protocol="0" address="'||address||'" date="'||date||'000" type="'||(flags-1)||'" subject="null" body="'|| REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(text,'&','&amp;'),'<','&lt;'),'>','&gt;'),'"','&quot;'),x'0d0a','#13;')||'" toa="null" sc_toa="null" service_center="null" read="1" status="-1" locked="0" />' FROM message;
.quit
6. > cat iphone_sms_pre.xml iphone_sms_content.xml iphone_sms_post.xml > iphone_sms_backup.xml
7. get SMS Backup & Restore from Google Play store
8. copy iphone_sms_backup.xml to your Android device in the SMS Backup & Restore folder
9. Disconnect the USB (otherwise you can't find the file..?)
10. Open SMS Backup & Restore
11. Click Restore
12. find the iphone_sms_backup.xml file
13. Restore all of it, leave your phone on the charger. If you plug it back into the computer, you'll have to start over.
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<smses>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment