<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FirefoxOS &#8211; FU-BAR</title>
	<atom:link href="/category/free-sw/firefox-os/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Fucked Up Beyond All Recognition</description>
	<lastBuildDate>Sat, 01 Jun 2013 16:35:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>/wp-content/uploads/2020/07/cropped-eu-header-20200715-2-32x32.png</url>
	<title>FirefoxOS &#8211; FU-BAR</title>
	<link>/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Fixing the FirefoxOS default search provider</title>
		<link>/2013/06/01/fixing-the-firefoxos-default-search-provider/</link>
					<comments>/2013/06/01/fixing-the-firefoxos-default-search-provider/#comments</comments>
		
		<dc:creator><![CDATA[Rui Seabra]]></dc:creator>
		<pubDate>Sat, 01 Jun 2013 09:29:15 +0000</pubDate>
				<category><![CDATA[FirefoxOS]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Code]]></category>
		<guid isPermaLink="false">/?p=1748</guid>

					<description><![CDATA[WTF? FirefoxOS uses Bing as default search provider? Yuck, I must fix that. Finally after almost a week I have had some time for me and that&#8217;s the first thing I must fix. Thanks to the very helpful comment from Mathieu in this blog post, I wrote a very small shell script that replaces the &#8230; <p class="link-more"><a href="/2013/06/01/fixing-the-firefoxos-default-search-provider/" class="more-link">Continue reading<span class="screen-reader-text"> "Fixing the FirefoxOS default search provider"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>WTF? FirefoxOS uses Bing as default search provider?</p>
<p>Yuck, I must fix that. Finally after almost a week I have had some time for me and that&#8217;s the first thing I <strong>must</strong> fix. Thanks to the very helpful comment from Mathieu <a href="http://ruk.ca/content/how-change-search-provider-firefox-os-phones-bing-google">in this blog post</a>, I wrote a <a href="http://files.1407.org/ffos/fix-ffos-search-provider.sh">very small shell script that replaces the search provider</a> to your favorite one, defaulting to Google.</p>
<p>It uses sudo for the privileged commands but doesn&#8217;t need to completely run as root. Its your choice, run <strong>./fix-ffos-search-provider.sh</strong> or <strong>sudo ./fix-ffos-search-provider.sh</strong> taking as optional arguments (in this order), the Title, the URL and it&#8217;s Favicon url. Miss one and the Google default will be used <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> eg:</p>
<pre>./fix-ffos-search-provider.sh \
  "Duck Duck Go" https://duckduckgo.com/ https://duckduckgo.com/favicon.ico</pre>
<p>First, it sets the options, then starts adb-server and fetches the browser application (note that you need the <strong>android-tools</strong> package in Fedora or the Android SDK):</p>
<pre>#!/bin/sh

TITLE=${1:-Google}
URL=${2:-www.google.com/m}
ICO=${3:-https://www.google.com/favicon.ico}

sudo adb start-server

sudo adb pull \
  /system/b2g/webapps/browser.gaiamobile.org/application.zip
sudo chown $USER:$GROUP application.zip

mkdir application
cd application/
unzip ../application.zip</pre>
<p>Then, it does the magic with the help of Perl:</p>
<pre>perl -pi -e " \
    s|(DEFAULT_SEARCH_PROVIDER_URL: ?)'.*?'|\$1'$URL'|; \
    s|(DEFAULT_SEARCH_PROVIDER_TITLE: ?)'.*?'|\$1'$TITLE'|; \
    s|(DEFAULT_SEARCH_PROVIDER_ICON: ?)'.*?'|\$1'$URL'|; \
    " js/browser.js gaia_build_defer_index.js</pre>
<p>Finally, it rebuilds the browser application and pushes it back to the phone and reboots it (it shouldn&#8217;t need a reboot, maybe there&#8217;s a way to avoid this?):</p>
<pre>zip -fr ../application.zip .
cd ..

sudo adb remount
sudo adb push application.zip \
   /system/b2g/webapps/browser.gaiamobile.org/application.zip
sudo adb reboot</pre>
<p>So, here it is, finally fixed <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Well, temporarily (it will be better fixed following the results of <a href="https://github.com/mozilla-b2g/gaia/pull/9454">https://github.com/mozilla-b2g/gaia/pull/9454</a> and <a href="https://github.com/gasolin/gaia/commit/47072a825d9e7c2859f4f8de4fb200cc7450e10b">https://github.com/gasolin/gaia/commit/47072a825d9e7c2859f4f8de4fb200cc7450e10b</a> or something similar) at least.</p>
<figure id="attachment_1750" aria-describedby="caption-attachment-1750" style="width: 168px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2013/06/2013-06-01-09-58-50.png"><img loading="lazy" class="size-medium wp-image-1750" alt="Screenshot of FirefoxOS browser googling for 'test'" src="/wp-content/uploads/2013/06/2013-06-01-09-58-50-168x300.png" width="168" height="300" srcset="/wp-content/uploads/2013/06/2013-06-01-09-58-50-168x300.png 168w, /wp-content/uploads/2013/06/2013-06-01-09-58-50.png 540w" sizes="(max-width: 168px) 100vw, 168px" /></a><figcaption id="caption-attachment-1750" class="wp-caption-text">Googling for &#8216;test&#8217;</figcaption></figure>
<p><a href="http://creativecommons.org/publicdomain/zero/1.0/" rel="license"><br />
<img loading="lazy" class="alignleft" style="border-style: none;" alt="CC0" src="http://i.creativecommons.org/p/zero/1.0/88x31.png" width="88" height="31" /></a>To the extent possible under law, <a href="/" rel="dct:publisher"><span>Rui Miguel Silva Seabra</span></a> has waived all copyright and related or neighboring rights to <span>Fix FirefoxOS Default Search Provider</span>. This work is published from <span>Portugal</span>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/2013/06/01/fixing-the-firefoxos-default-search-provider/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
