Categories

Meta

Tag: iPhone

As promised here’s a copy of my iPhone to Android script. Just a quick and dirty python script that reads in a backup from itunes and converts it to a bit of XML able to be read in by SMS Backup and Restore on the android platform

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

from sqlite3 import *

from sqlite3 import *

from xml.sax.saxutils import escape

import codecs

import re

f=codecs.open('sms.xml','w','utf-8')

f.write('''

''')

# This is 31bb7ba8914766d4ba40d6dfb6113c8b614be442.mddata or 31bb7ba8914766d4ba40d6dfb6113c8b614be442.mdbackup usally

c=connect('sms.db')

curs=c.cursor()

curs.execute('''SELECT address,date,text,flags FROM message WHERE flags &lt;5 ORDER BY date asc''')