[Android Apps and Games] mattnin:
This is the fully stock and unchanged Code Aurora Snapdragon Optimized Browser version m60. Everything is open source and I will also answer any questions how I built this APK. I am just a lone wolf with a Ubuntu 14.04 machine and Linux has been my hobby. I am NOT a full fledged developer but I know enough to build source and I am happy to share this here at XDA and help out.

I will gladly have this thread locked if anyone can point me to a vanilla and unchanged CAF Snapdragon Optimized Browser. Why Code Aurora does not build and make available this awesome browser is beyond me. I searched https://codeaurora.org and they do not offer their SWE Browser APK! I've searched here at XDA and elsewhere and most of those offering CAF browsers are not sharing their source code and/or are making changes or adding patches to the original source.

Before I begin, I'd first like to thank Code Aurora for their source code and this guide by ZeroX7C and gwinlord for his guide. I did NONE of the hard work at all. Those who I cited deserve all the thanks for their work. All I did was piece it together, strip out any changes that are non-CAF, build it, and offer it here. You may not donate any money to me as I feel I have done nothing to deserve it.

Just as ZeroX7C says, the documentation on how to build this browser is incomplete. It took me several hours and many curse words to finally get this browser to build. ZeroX7C's guide is also incomplete and gwinlords guide makes changes and adds patches to the original source so here I will help to complete the guide for an original unmodified CAF browser that ZeroX7C started.

Below is a guide to build your own Code Aurora Snapdragon Optimized Browser version m60:

Requirements:

Ubuntu 64 bit, preferabely 12.04 or 14.04

8GB RAM, 8GB Swap, 100GB Free Space

1) First, run

sudo apt-get update

2) Set up your build machine by following the Code Aurora Build Machine Requirements Guide. There will be an error about depot_tools using a deprecated URL. Allow the setup to install newer versions of depot_tools from Google. Do not install the Oracle JDK. Code Aurora uses OpenJDK 8 in build m60 and not Oracles JDK. Run the following code if your machine does not have OpenJDK 8 installed.

sudo apt-get -y install openjdk-8-jre openjdk-8-jdk

3) Create the .gclient file in the same directory where you git cloned depot_tools and build dependencies. Add the following code to .gclient

solutions = [
{ "name" : "src",
"url" : "git://codeaurora.org/quic/chrome4sdp/chromium/src.git@refs/remotes/origin/m60",
"deps_file" : "DEPS",
"managed" : False,
"safesync_url": "",
},
]
target_os = ["android"]

4) Change directory to src, run

cd src
git clean -f -d
git reset --hard HEAD
GYP_CHROMIUM_NO_ACTION=1 gclient sync -v -r refs/remotes/origin/m58
./build/install-build-deps-android.sh
. build/android/envsetup.sh
GYP_CHROMIUM_NO_ACTION=1 gclient runhooks -v
GYP_CHROMIUM_NO_ACTION=1 gn gen out/Default --args='target_os="android" symbol_level=0 is_debug=false optimize_for_size=false remove_webcore_debug_symbols=true proprietary_codecs=true'

5) Add adblocking. Credit goes to AdAway, Adblockplus, ublock origin, and adguard for their recommended adblocking host files and [MENTION=8032808]ArslanTheGreat[/MENTION] for all the help.

nano chrome/java/res/raw/web_refiner_conf

Modify the code in web_refiner_conf to,

{
"version": "1.0",
"update": {},
"subscriptions": [
{
"name" : "Adaway",
"category" : "Hosts",
"format" : "WebRefiner 1.0",
"url" : "https://adaway.org/hosts.txt",
"expiration" : "5 days"
},
{
"name" : "hpHosts’ Ad and tracking servers",
"category" : "Hosts",
"format" : "WebRefiner 1.0",
"url" : "https://hosts-file.net/ad_servers.txt",
"expiration" : "5 days"
},
{
"name" : "Peter Lowe’s hosts file",
"category" : "Hosts",
"format" : "WebRefiner 1.0",
"url" : "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext",
"expiration" : "5 days"
}
]
}

6) To apply all the modifications all at once, download the attached patch and apply using

git apply swebld58ver0004.patch

7) (a.) Optional: If you want to create logs of the build for error checking, then

mkdir logs
nano build/makeswebrowser.sh

and add the following code

#1/bin/bash

set -e
exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>logs/swebuild.log 2>&1
time ninja -C out/Default swe_browser_apk

then run,

chmod +x build/makeswebrowser.sh
build/makeswebrowser.sh

Logs will be in src/logs/swebuild.log

(b.) OR, if you just want to skip making logs, simply run

ninja -C out/Default swe_browser_apk