How to change the search provider for Firefox OS phones from Bing to Google

One of the great things about having the source code to your phone’s operating system is that you can change your phone’s behaviour in ways you wouldn’t be able to otherwise.

For example, on my Geeksphone Peak the default search provider in the browser is Bing. I’d like to switch this to Google because I like Google’s search results better. Currently this isn’t a user-configurable option in the phone’s settings (although this might change soon), but it’s possible to change nonetheless.

It turns out to be relatively simple to do this, at least once you’ve got a workflow set up to build Gaia, the Firefox OS user interface. In the source tree for you’ve grabbed from github, find and edit the file gaia/apps/browser/js/browser.js and change:




Then simply build (./ gaia) and flash (./ gaia) Gaia to the phone. After the flash is complete, you should find the default search is now

Firefox OS with Google as Default Search


UBi's picture
UBi on May 16, 2013 - 13:30

Since it’s all HTML/CSS/JS: shouldn’t it suffice to transfer the browser zip file to your desktop computer, unzip it, modify browser.js, re-zip it, and put it back in place? Rebuilding and flashing complete gaia seems like huge overhead to me.

Maiko Engelke's picture
Maiko Engelke on May 20, 2013 - 14:09

Unfortunately, yes and no. The file can be found in

you can adb pull it, change, but you can’t push it back, because it’s a read only system. chmod won’t work either.

Fabrice's picture
Fabrice on May 20, 2013 - 19:42

You have to run |adb remount| before pushing to remount the /system partition in read-write mode.

Mathieu's picture
Mathieu on May 26, 2013 - 12:51

Thanks for posting this. I’m new to FirefoxOS (and the android-ish adb stuff), but the following worked for me:

adb pull /system/b2g/webapps/…

After decompressing the file, the confs are in ./js/browser.js as you mentioned, but it seems to get compiled into ./gaia_build_defer_index.js, so I had to change both.

Then re-zip to push back:

adb remount
adb push /system/b2g/webapps/…
adb reboot

Diclaimer: I am just randomly poking around FirefoxOS, use at your own risk :)

Rui Seabra's picture
Rui Seabra on June 1, 2013 - 10:33

Hey, Mathieu, thank you very much for that helpful hint. Thanks to it I wrote a script to automate those steps and one can fetch it from my blog entry here:…

Add new comment