Author Topic: Transferring texts and contacts to Android  (Read 2396 times)

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Transferring texts and contacts to Android
« on: November 20, 2019, 02:16:30 pm »
I have an N900 as my daily driver. It has SMS and MMS history from quite a long period. I can export the SMSes in CSV format easily (it's just an sqlite database).

What's the best method to transfer these to Android (preferably without some paid app).

I found this https://github.com/teleshoes/Android-SMS-DB-importer but not much else.

Same applies for contacts. I can always export them to the SIM card of course and import back in, but SIM card only allows you to have one phone number per contact and not ancillary info (company, etc). I can export them as VCFs from the N900.

I'd prefer to avoid syncing them via a Google account. In fact, I hope to run my Android with minimal interactions with google, except for Play store.

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Transferring texts and contacts to Android
« Reply #1 on: November 20, 2019, 09:12:50 pm »
Quote from: Zarhan
I have an N900 as my daily driver. It has SMS and MMS history from quite a long period. I can export the SMSes in CSV format easily (it's just an sqlite database).

What's the best method to transfer these to Android (preferably without some paid app).

I found this https://github.com/teleshoes/Android-SMS-DB-importer but not much else.

Same applies for contacts. I can always export them to the SIM card of course and import back in, but SIM card only allows you to have one phone number per contact and not ancillary info (company, etc). I can export them as VCFs from the N900.

I'd prefer to avoid syncing them via a Google account. In fact, I hope to run my Android with minimal interactions with google, except for Play store.

1) I went from sailfish to android, and just used scp (termux) to copy the file. Your N900 probably has an ssh server, so this should work fine. Make sure both devices are connected to the same WiFi AP.
2) Alternatively, on the N900 (I am assuming you have standard shell access). (install python and) Run the built in python web server with:

python -m http.server

or the correct library for your python version. This creates a web server at port 8000. Simply navigate to that page on the android and download the file.

3) bluetooth transfer
4) insert a USB stick in the OTG port of the n900, copy the file to the USB, then transfer to the android (I'm just trying to remember if the n900 had OTG.....)
5) (for proper pencil heads only) You can use USB networking, but that really is no different to using wifi, just faster. For a small file like the VCF, it won't make a difference.

I used method 1

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Transferring texts and contacts to Android
« Reply #2 on: November 21, 2019, 02:54:49 pm »
Quote from: vader
1) I went from sailfish to android, and just used scp (termux) to copy the file.

"Just copy the file"? Are you saying that Android uses same sqlite db structure that Maemo used? What file?

To clarify - I know how to get files off N900 (scp is easiest) - I was interested in the best method for getting the information converted into Android's messaging DB format. Just to be clear

vader

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Transferring texts and contacts to Android
« Reply #3 on: November 22, 2019, 07:42:26 am »
Quote from: Zarhan
Quote from: vader
1) I went from sailfish to android, and just used scp (termux) to copy the file.

"Just copy the file"? Are you saying that Android uses same sqlite db structure that Maemo used? What file?

To clarify - I know how to get files off N900 (scp is easiest) - I was interested in the best method for getting the information converted into Android's messaging DB format. Just to be clear

Apologies. I should have realised that - n900 users are hard core

I exported my contacts as a VCF file, which imported straight into the android contacts app. It will also accept csv and a few other formats. On sailfish, a simple backup creates a tar file which contains all.vcf (which I copied across). Sailfish is maemo based, so maybe you could do the same thing. If it uses the same mechanism, back up the phone, tar tvf/xvf the backup file and look for all.vcf. Transfer that file to android. A bonus is that vcf keeps any image stored with contacts. You don't need to convert the information - the import process does that. Open contacts, press the hamburger menu (top left), go to settings, then scroll down and select import.

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Transferring texts and contacts to Android
« Reply #4 on: November 23, 2019, 02:32:03 am »
Quote from: vader
I exported my contacts as a VCF file, which imported straight into the android contacts app. It will also accept csv and a few other formats. On sailfish, a simple backup creates a tar file which contains all.vcf (which I copied across). Sailfish is maemo based, so maybe you could do the same thing. If it uses the same mechanism, back up the phone, tar tvf/xvf the backup file and look for all.vcf. Transfer that file to android. A bonus is that vcf keeps any image stored with contacts. You don't need to convert the information - the import process does that. Open contacts, press the hamburger menu (top left), go to settings, then scroll down and select import.

That actually does seem to be the easiest option for contacts. I can just tell it to export to VCFs and get the VCFs off the phone.

Now hopefully there's a good solution for getting the texts in..Well, there seem to be stuff like http://www.veryandroid.com/how-to-restore-...roid-phone.html available if I just google "import csv to android sms" but most of these seem be commercial software products, which I kind of find odd.

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Transferring texts and contacts to Android
« Reply #5 on: February 01, 2020, 09:11:37 am »
Just in case anyone else is interested, my operation was

- Export contacts as VCFs from N900 and import using native importer as part of contacts
- Copy the SMS database from N900 (el-v1.db). Then I just exported to CSV with sqlite as follows:

Code: [Select]
.mode csv
.output n900smses.csv
select outgoing,remote_uid,start_time*1000,free_text from events where event_type_id ='7' order by id;

Then I wrote a small python script that converts this result to XML format supported by Synctech's backup&restore application.
https://synctech.com.au/sms-backup-restore/

Their website has full info on the XML format, at https://synctech.com.au/sms-backup-restore/...l-backup-files/ including examples.

The application in question is adware, but since I'm only going to run it once, not a real problem.
« Last Edit: February 01, 2020, 09:14:15 am by Zarhan »