Backing up your contacts on FirefoxOS

25 July, 2013 § 21 Comments

I’ve been helping beta test B2G and subsequently FirefoxOS since October 2012.  Once in a while I’ve come across a bug that requires me to reset the phone back to its factory state. Unfortunately at this early stage there isn’t a built-in way to back up your data from a FirefoxOS phone. I’m sure it’s on a roadmap, but as with all v1 products you have to make some tough calls when it comes to feature prioritization.

This tutorial provides a step-by-step walk through of how to backup and restore your contacts on a B2G or FirefoxOS phone. It’s not supported so it may stop working in the future, but for now it works 🙂

To complete this tutorial you’ll need a B2G/FirefoxOS phone, a USB cable to connect your phone to your computer, and the Android Debug Bridge installed (referred to as `adb` later in the tutorial).

1. Start up your FirefoxOS phone and go to Settings.

step1

2. Go to Device Information

step2

3. Go to More Information

step3

4. Go to Developer

step4

5. Enable “Remote Debugging”. This will allow you to use ADB to pull data off of the phone.

step5

6. Connect your phone to the computer using the USB cable.

7. In your console, type `adb devices` to check that the phone has connected properly. You should see your phone listed as an attached device. At this point you can now use `adb shell` to browse through the system files on the phone.

8. Type `adb pull /data/local/indexedDB/chrome/3406066227csotncta.sqlite .` This will pull the contacts IndexedDB database off of your phone and in to your local working directory. If you are curious about the contents of the database, you can install the IndexedDB Browser add-on for Firefox which will let you open up the database.

2013-07-23_2109

And you are now done with backing up your contacts. If you need to reset your phone in the future, you can just follow these steps again but replace step 8 with the following: `adb push 3406066227csotncta.sqlite /data/local/indexedDB/chrome/3406066227csotncta.sqlite`. This will push your backed-up contacts database back on to the device.

Tagged: , , ,

§ 21 Responses to Backing up your contacts on FirefoxOS

  • suncool says:

    Hey Jaws, Kudos on contacts message backup! By any chance can you share how did you discover the sqlite db path. I am trying to do the same for other native apps like phone, mail, etc.

    In the interest of this blog pls share you details to my id vimcool(at)k.st

  • Thanks a lot for the information. Is there a similar or any other way to backup SMS messages as well?

    • msujaws says:

      I believe there is a similar database file for SMS, but this blog post is about a now-outdated version of FirefoxOS.

  • Yo says:

    Man: you have now contacts2xml and xml2contacts which are a lot easier now !

Leave a comment

What’s this?

You are currently reading Backing up your contacts on FirefoxOS at JAWS.

meta