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.
2. Go to Device Information
3. Go to More Information
4. Go to Developer
5. Enable “Remote Debugging”. This will allow you to use ADB to pull data off of the phone.
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.
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.