Transferring your Firefox profile


You can use Android’s adb tool to back up application data and restore it on a new phone. But you can only do this if the application allows it. Recently, Firefox for Android’s nightly builds stopped allowing this. If you try to use adb backup org.mozilla.fennec, you’ll get a 41-byte file without anything useful in it.

Here’s the line of code that prevents it. We can follow that link to a changeset and also find out the bug around it. This change was pushed on October 27 2015. The nightly build from that day doesn’t have the change.

You can use adb install -r -d to downgrade your version of Nightly to that build. With that installed, you can use adb backup to copy your profile to your computer. I wouldn’t run Nightly while it’s downgraded, as applications usually don’t support migrating from future data formats. Then, you can install the same APK on another phone and use adb restore to copy your profile to the phone. Finally, you can upgrade to the latest Nightly and start using your profile again.

In the bug, it was stated that “We are expecting some problems if all app data (including accounts) is restored.” That’s why they bothered to disallow backups in the first place. So you’ve been warned.

My last post was about either Relinquishing control with suborigins or A tidier way to make a sandwich. Find out which.