Cannot Download Files In Duckduckgo For Android

Getting Started With MojoliciousAdding Remote Shortcuts to Git

Download Mozilla Firefox, a free web browser. Firefox is created by a global non-profit dedicated to putting individuals in control online. Get Firefox for Windows, macOS, Linux, Android and iOS today!

A little while ago, I switched to DuckDuckGo as my primary search engine. However, the default browser on Android only offers me three choices:Bing, Yahoo, and Google. I figured that since the browser component of Android is open source, it shouldn't be too hard to add DuckDuckGo to the mix. So here's howI did it.

NOTE: I did a full backup using Titanium Backup before doing this. I also did this on a phone running CyanogenMod; you should be able to do this with a regularrooted phone, just compile from the Android project source instead of the CyanogenMod source. This worked for me, but I take no responsibility if you brick your phone attemptingto do this!

Download the Android Browser Source

I figured that building the browser APK would be as simple as grabbing the source and running ant.Grabbing the source is easy, as the Android Git repository is hosted at http://android.git.kernel.org/.However, I use the CyanogenMod firmware for my phone, so I figured it'dbe a better idea to build from their Git repository:

I took a look at the files I'd just downloaded, and a build.xml file was nowhere to be found. The onlything close to resembling a build file was the Android.mk file, and some quick searching showed that thatfile was part of the Android build system. No matter, I thought; I'll just generate a build.xml using theandroid utility and use that! I don't want to build the whole Android project; I just want to build a custombrowser!

Well, that was painless!

Unfortunately, that didn't work either; it complained about some missing classes that are apparently only available when buildingthe whole of the Android project.

Building CyanogenMod from Source

Instead of trying to figure out how to compile the browser by itself, I decided to just check out the full sourcefrom Github:

Then, according to the instructions on the CyanogenMod wiki, the next stepis to load a setup script:

For

This makes a few convenience functions available for building the Android source, mainly m, which builds the whole thing.

I ran this to make sure that the browser builds, and sure enough, it did!

Adding DuckDuckGo to the Search Engine List

Now that I have the build environment set up, I can make my modifications. It turns out that the search engine information is stored in two resource files, res/values/all_search_engines.xmland res/values/search_engines.xml. The former stores the localized names, addresses, and search engine patterns for each search engine, and the latter lists the search engines that the browseractually uses. So after a little editing, my res/values/search_engines.xml looked like this:

xE2x80地nd I added the following to the end of my res/values/all_search_engines.xml:

Re-build, and lo and behold, there's a Browser.apk under out/target/product/generic/system/app!

Cannot Download Files In Duckduckgo For Android Computer

UPDATE: For CyanogenMod 7's browser source (and possibly Gingerbread's as well), res/values/search_engines.xml has become res/values/donottranslate-search_engines.xml.

Installing the new Browser.apk

Files

Cannot Download Files In Duckduckgo For Android Mac

Installing the new APK isn't as easy as just opening it in the package manager, since it's located under /system/app, which is read-only by default.You need to plug your phone in, turn on USB debugging, remount the filesystem to make it writable, delete the old Browser.apk, and install the new one.

Cannot Download Files In Duckduckgo For Android Download

I also rebooted for good measure:

And here's the end product running on my phone!

Cannot Download Files In Duckduckgo For Android Iphone

Published on 2011-03-03

Cannot Download Files In Duckduckgo For Android Free

Please enable JavaScript to view the comments powered by Disqus.