FORUMS
Remove All Ads from XDA

[APP][4.0+][Snapdragon][CAF]Code Aurora SWE Browser (Unofficial)(Stock)(adblock)

339 posts
Thanks Meter: 396
 
By mattnin, Senior Member on 21st December 2016, 03:46 PM
Post Reply Email Thread
This is the fully stock and unchanged Code Aurora Snapdragon Optimized Browser version m56. 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 m56:

Requirements:
Ubuntu 64 bit, preferabely 12.04 or 14.04
8GB RAM, 8GB Swap, 100GB Free Space

1) First, run
Code:
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 m56 and not Oracles JDK. Run the following code if your machine does not have OpenJDK 8 installed.
Code:
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
Code:
solutions = [
            {   "name"        : "src",
                "url"         : "git://codeaurora.org/quic/chrome4sdp/chromium/src.git@refs/remotes/origin/m56",
                "deps_file"   : "DEPS",
                "managed"     : False,
                "safesync_url": "",
            },
        ]
        target_os = ["android"]
4) Change directory to src, run
Code:
cd src
git clean -f -d
git reset --hard HEAD
GYP_CHROMIUM_NO_ACTION=1 gclient sync -v -r refs/remotes/origin/m56
./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 @ArslanTheGreat for all the help.
Code:
nano chrome/java/res/raw/web_refiner_conf
Modify the code in web_refiner_conf to,

Code:
{
  "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
Code:
git apply swebld56ver0001.patch
7) (a.) Optional: If you want to create logs of the build for error checking, then
Code:
mkdir logs
nano build/makeswebrowser.sh
and add the following code
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,
Code:
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
Code:
ninja -C out/Default swe_browser_apk
*Updated 04/16/2017*
Or download the APK version 57.2987.2765780 here,
https://www.androidfilehost.com/?fid=673368273298947802
md5 a8519adb5159135ef47b94b62a4608b9
Or get m56 stable here,
https://www.androidfilehost.com/?fid=745425885120712751
md5 9f7107a54e9aca1ac538919d518717e6
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170115-074113.png
Views:	8002
Size:	158.2 KB
ID:	4004253  
Attached Files
File Type: patch swebld56ver0001.patch - [Click for QR Code] (20.7 KB, 278 views)
File Type: patch swebld57ver0002.patch - [Click for QR Code] (23.1 KB, 104 views)
File Type: patch swebld57ver0003.patch - [Click for QR Code] (20.8 KB, 142 views)
The Following 73 Users Say Thank You to mattnin For This Useful Post: [ View ] Gift mattnin Ad-Free
 
 
21st December 2016, 04:52 PM |#2  
OP Senior Member
Flag Grand Junction, CO
Thanks Meter: 396
 
More
*Changelog*

Why build another CAF browser?
I am building this because I wanted a nicely developed and secure open source browser for my own personal use and for my family. I appreciate the offerings on f-droid and the open source chromium build, but I wanted the snapdragon optimized version and there is none to be found that are entirely open source and not making changes to the original Code Aurora source code! I am also somewhat concerned that some of the browsers on F-Droid may possibly have security vulnerabilities despite their respective developers best intentions.

Is this browser fast?
Yes! After optimizations posted in the build guide, the SWE Browser is faster than Chrome in every which way.

Will you be keeping this browser up to date?
Well, I do plan on keeping this up to date as long as there is no official Code Aurora browser being published. Would someone please complain to Code Aurora and ask why they are not building it and publishing it? My Ubuntu 14.04 machine runs all day and while I'm gone at work, why not have it build this browser and other things I'd like to have?

Will you add new features to this browser?
No, I will not. I plan on keeping these builds completely stock as it would come from Code Aurora themselves. There are however hidden features that may be enabled. I am looking into it.

I have a bug, can you fix it?
No I will not fix it. This is a beta build, m55. It probably does have some bugs! If there is a problem with the build, it's up to Code Aurora to fix and not me.

Hey, want to try a new compiler to optimize this build?
Sure! Or if you happen to know of other ways we can compile SWE_Browser and have suggestions for other compilers or libraries we can use to tune this build, please post them here! Let's gather a master list of ways we can all compile this APK ourselves!
*edit 12/23/2016*
After careful consideration, I decided not to try new compilers. I decided I am going to follow Code Aurora's build environment exactly as recommended on their own website. After all, I think they probably know what's best for their own software they created.

Can I post benchmarks in this thread?
Sure, please do! I ran several benchmarks and they are all over the place. The SWE Browser is faster than Chrome but runs about the same speed as other CAF based browsers.

If you have any suggestions at all about the browser or the build environment, please post!

--Helpful References--
https://github.com/scweeny/CAF/
https://forum.xda-developers.com/gen...ragon-t3255475
https://github.com/gwindlord/caf_chromium_build
https://source.codeaurora.org/quic/chrome4sdp/
Import Bookmarks from Chrome
The Following 19 Users Say Thank You to mattnin For This Useful Post: [ View ] Gift mattnin Ad-Free
25th December 2016, 01:00 AM |#3  
Junior Member
Thanks Meter: 0
 
More
Thank you for the guide and i'm looking forward to the complete version, i been missing with this for pass few day and i still cant figure it out, also could you include how to customize it to add google sync and patches and stuff.
25th December 2016, 04:58 AM |#4  
Member
Thanks Meter: 20
 
More
hello,
does it support cm 11?
25th December 2016, 05:28 AM |#5  
OP Senior Member
Flag Grand Junction, CO
Thanks Meter: 396
 
More
Quote:
Originally Posted by TheUser123

Thank you for the guide and i'm looking forward to the complete version, i been missing with this for pass few day and i still cant figure it out, also could you include how to customize it to add google sync and patches and stuff.

I just now updated the guide, see above. I am sorry, I don't plan on adding any patches at the moment. You can check gwinlords guide linked above. In it, there are several patches that can be added.

Quote:
Originally Posted by arjuntsgowda

hello,
does it support cm 11?

I'm sorry, it does not. The browser will only run on LP or MM based OS's at this time. I updated the title of this thread to reflect that.
The Following 2 Users Say Thank You to mattnin For This Useful Post: [ View ] Gift mattnin Ad-Free
3rd January 2017, 01:35 PM |#6  
OP Senior Member
Flag Grand Junction, CO
Thanks Meter: 396
 
More
Everyone who uses SWE Browser should always get the latest version. I notice people are still downloading the first build but I encountered several errors during that build. I've gotten much better at setting up the environment since then. I've noticed benchmark improvement on the latest build too, just sayin!
9th January 2017, 10:39 AM |#7  
10goto10's Avatar
Member
Innanets
Thanks Meter: 40
 
More
Why is Web Refiner not part of this build? Otherwise the browser is running fine and is pretty fast even compared to other CAF browsers, good job OP.
The Following User Says Thank You to 10goto10 For This Useful Post: [ View ] Gift 10goto10 Ad-Free
9th January 2017, 12:19 PM |#8  
OP Senior Member
Flag Grand Junction, CO
Thanks Meter: 396
 
More
Quote:
Originally Posted by 10goto10

Why is Web Refiner not part of this build? Otherwise the browser is running fine and is pretty fast even compared to other CAF browsers, good job OP.

Web refiner must not be part of Code Aurora's m55 build. Is it part of other Code Aurora's builds? The SWE Browser is built exactly as recommended per their own sync and build instructions. I can't even use the Qualcomm LLVM even if I wanted to because m55 uses a newer toolchain.

I agree, the browser is pretty fast especially the last build. This is the only browser I use now. I compiled SWE browser last Saturday and the version number did not increment so I did not upload it in case anyone was wondering.
The Following User Says Thank You to mattnin For This Useful Post: [ View ] Gift mattnin Ad-Free
9th January 2017, 07:07 PM |#9  
10goto10's Avatar
Member
Innanets
Thanks Meter: 40
 
More
Quote:
Originally Posted by mattnin

Web refiner must not be part of Code Aurora's m55 build. Is it part of other Code Aurora's builds? The SWE Browser is built exactly as recommended per their own sync and build instructions. I can't even use the Qualcomm LLVM even if I wanted to because m55 uses a newer toolchain.

I agree, the browser is pretty fast especially the last build. This is the only browser I use now. I compiled SWE browser last Saturday and the version number did not increment so I did not upload it in case anyone was wondering.

Yes, I think. It's included in some custom builds: YuBrowser (m54, customized by the Mokee team) and TugaPower Browser (m54, m55, and m56). I like to browse the web without ads
I'm not a dev myself, but maybe these links can help you:
https://wiki.codeaurora.org/xwiki/bi...zation+for+M42
https://source.codeaurora.org/quic/c...66cc2e48512ff5
The Following User Says Thank You to 10goto10 For This Useful Post: [ View ] Gift 10goto10 Ad-Free
9th January 2017, 07:30 PM |#10  
OP Senior Member
Flag Grand Junction, CO
Thanks Meter: 396
 
More
Quote:
Originally Posted by 10goto10

Yes, I think. It's included in some custom builds: YuBrowser (m54, customized by the Mokee team) and TugaPower Browser (m54, m55, and m56). I like to browse the web without ads
I'm not a dev myself, but maybe these links can help you:
https://wiki.codeaurora.org/xwiki/bi...zation+for+M42
https://source.codeaurora.org/quic/c...66cc2e48512ff5

Interesting. Looks like I should be able to enable this feature by including a proper configuration. Thanks for heads up! Once I have that completed, I'll update the download and the guide.
The Following 3 Users Say Thank You to mattnin For This Useful Post: [ View ] Gift mattnin Ad-Free
10th January 2017, 07:16 AM |#11  
OP Senior Member
Flag Grand Junction, CO
Thanks Meter: 396
 
More
Thanks again @10goto10 for the heads up on web refiner. It's working perfectly with the default host files recommended by AdAway.

The browser version number is the same as the previous build but I did sync the repository as of 07 Jan. Updated the guide with new build instructions and androidfilehost with the latest build.


*edit*
Dammit, I had a copy paste error in the adblocking conf file. I didn't have a lot of time tonight to work on the SWE Browser and I must have rushed a bit and didn't notice I used the same URL twice. So the last build's web refiner is only using two host files. Even though it is only using two files and not three, it's still doing a good job according to my tests.

Also, in case anyone is wondering, bookmarks are saved after updating manually.

*edit again*
Ok, fixed the guide and updated the pgl.yoyo.org url. Synced the local repo, didn't see any new changes from Code Aurora. Set it to build. I'll update androidfilehost with the build as soon as it's done!
The Following 4 Users Say Thank You to mattnin For This Useful Post: [ View ] Gift mattnin Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes