Pull request #8: Update Chromium to 94.0.4606.109
Merge in AP/chromiumpatches from oct2021 to master * commit 'd880f95325772ae159878f3c5393445a1816489c': Set default page url to http://myPromethean.com Revise for patch level 94.0.4606.109 Force tablet mode Target arm instead of arm64 Remove the AV1 decoder Turn adblock off by default
This commit is contained in:
commit
ba10a6efa9
6 changed files with 221 additions and 1 deletions
121
README.md
121
README.md
|
@ -1,3 +1,124 @@
|
|||
# Chromium Bromite patches + Promethean additions
|
||||
|
||||
This is a fork of the [Bromite repo on Github](https://github.com/bromite/bromite).
|
||||
|
||||
It contains a number of patches to Chromium that greatly increase
|
||||
security and privacy and fix various annoyances.
|
||||
|
||||
One patch has been removed from the original Bromite distribution:
|
||||
|
||||
- Automated domain substitution
|
||||
|
||||
One patch has been modified:
|
||||
|
||||
- The Bromite adblock engine is disabled by default
|
||||
|
||||
# Build instructions
|
||||
|
||||
## Getting Chromium
|
||||
|
||||
Building requires a [properly set up
|
||||
environment](https://chromium.googlesource.com/chromium/src/+/refs/tags/94.0.4606.109/docs/android_build_instructions.md#System-requirements). The
|
||||
Promethean [builder machine](https://builder.waq.be) has the proper
|
||||
dependencies installed.
|
||||
|
||||
The builder also has an existing Chromium checkout in
|
||||
`/tank/chromium/src` and a checkout of this repo in
|
||||
`/tank/chromium/bromite`. Before starting, you may wish to make a
|
||||
clone of `/tank/chromium`:
|
||||
|
||||
```
|
||||
sudo zfs snapshot tank/chromium@allen
|
||||
sudo zfs clone tank/chromium@allen tank/chromium4allen
|
||||
```
|
||||
|
||||
If you are not using the builder or wish to
|
||||
start from scratch, follow the instructions to [install depot_tools]
|
||||
and [get the code] but stop before the [Install additional build
|
||||
dependencies](https://chromium.googlesource.com/chromium/src/+/refs/tags/94.0.4606.109/docs/android_build_instructions.md#Install-additional-build-dependencies)
|
||||
section. If you're building on the builder box, skip that particular
|
||||
instruction. Apply the patches before continuing.
|
||||
|
||||
## Prepare your environment
|
||||
|
||||
All the operations that follow assume you are in an updated checkout
|
||||
of Chromium. It's advisable to set your `PATH` to where `gclient` is
|
||||
located. For example:
|
||||
|
||||
```
|
||||
export PATH=/tank/chromium4allen/depot_tools/:$PATH
|
||||
cd /tank/chromium4allen/src
|
||||
```
|
||||
|
||||
## Prepare Chromium
|
||||
|
||||
The patches are intended to be applied to the `94.0.4606.109` tag of
|
||||
the Chromium repo. Before continuing, make sure you are on that tag in
|
||||
the Chromium source repo:
|
||||
|
||||
```
|
||||
git fetch origin
|
||||
git checkout -B promethean-94.0.4606.109 94.0.4606.109
|
||||
gclient sync --with_branch_heads --with_tags
|
||||
gclient runhooks
|
||||
```
|
||||
|
||||
Do a quick check to see if there are any new dependencies that might be missing:
|
||||
|
||||
```
|
||||
./build/install-build-deps.sh --quick-check
|
||||
```
|
||||
|
||||
Note: this does not do a comprehensive check for missing
|
||||
dependencies. If you have troubles with the build, you may wish to run
|
||||
`./build/install-build-deps.sh` to make sure dependencies are properly
|
||||
installed.
|
||||
|
||||
## Applying the patches
|
||||
|
||||
Now apply the patches in correct order. Make sure you do this from the
|
||||
`src/` directory of the Chromium checkout and set the `BROMITE_REPO`
|
||||
variable to the location of this checkout:
|
||||
|
||||
```
|
||||
export BROMITE_REPO=/tank/chromium4allen/bromite
|
||||
for patchName in `cat $BROMITE_REPO/build/bromite_patches_list.txt`; do
|
||||
git am $BROMITE_REPO/build/patches/$patchName || break
|
||||
done
|
||||
```
|
||||
|
||||
All patches should apply cleanly. If they did not, make sure you have
|
||||
checked out the proper Chromium tag (94.0.4606.109).
|
||||
|
||||
## Setting the build arguments
|
||||
|
||||
The arguments in `bromite/build/GN_ARGS` must be used as the Chromium
|
||||
build arguments. To do this, run `gn args` with the default args
|
||||
file. You can optionally set your preferred editor. This is done from
|
||||
the Chromium src directory:
|
||||
|
||||
```
|
||||
EDITOR=vi gn args out/Default
|
||||
```
|
||||
|
||||
Replace all the args with the contents of the `build/GN_ARGS` file in this repo.
|
||||
|
||||
## Continuing the build
|
||||
|
||||
This command will build Chromium for the Android API 28 target. This
|
||||
should produce a package with the highest level of optimization for
|
||||
ActivPanel devices:
|
||||
|
||||
```
|
||||
autoninja -C out/Default monochrome_public_apk
|
||||
```
|
||||
|
||||
The resulting APK can be found at
|
||||
`out/Default/apks/MonochromePublic.apk` in the Chromium source
|
||||
directory.
|
||||
|
||||
(Original Bromite README follows)
|
||||
|
||||
# Bromite - Take back your browser
|
||||
|
||||
<img src="https://www.bromite.org/release.svg" alt="current Bromite release" title="current Bromite release" /> <img src="https://www.bromite.org/license.svg" alt="GNU GPL v3" title="GNU VPL v3" />
|
||||
|
|
|
@ -8,7 +8,6 @@ disable_android_lint=true
|
|||
disable_autofill_assistant_dfm=true
|
||||
disable_fieldtrial_testing_config=true
|
||||
disable_tab_ui_dfm=true
|
||||
enable_av1_decoder=true
|
||||
enable_dav1d_decoder=true
|
||||
enable_gvr_services=false
|
||||
enable_hangout_services_extension=false
|
||||
|
@ -33,6 +32,7 @@ rtc_build_examples=false
|
|||
safe_browsing_mode=0
|
||||
symbol_level=1
|
||||
target_os="android"
|
||||
target_cpu="arm"
|
||||
use_debug_fission=true
|
||||
use_errorprone_java_compiler=false
|
||||
use_gnome_keyring=false
|
||||
|
|
|
@ -164,3 +164,6 @@ Add-flag-to-disable-pull-to-refresh-effect.patch
|
|||
Experimental-user-scripts-support.patch
|
||||
Enable-native-Android-autofill.patch
|
||||
Automated-domain-substitution.patch
|
||||
Turn-AdBlock-off-by-default.patch
|
||||
Force-tablet-mode.patch
|
||||
Set-default-page-url.patch
|
||||
|
|
41
build/patches/Force-tablet-mode.patch
Normal file
41
build/patches/Force-tablet-mode.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
From 86c3fe1d857ecffa9c764ff44f140c19a3d7510e Mon Sep 17 00:00:00 2001
|
||||
From: Allen Luce <allen.luce@prometheanworld.com>
|
||||
Date: Fri, 29 Oct 2021 01:05:12 +0000
|
||||
Subject: [PATCH] Force tablet mode
|
||||
|
||||
This ensures that the toolbar will have back/forward/reload buttons
|
||||
and generally gives a better experience on panels.
|
||||
---
|
||||
.../browser/accessibility/settings/AccessibilitySettings.java | 2 +-
|
||||
ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
index 492de97ff714f..bffec8caf6260 100644
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java
|
||||
@@ -86,7 +86,7 @@ public class AccessibilitySettings
|
||||
ChromeBaseCheckBoxPreference forceTabletUiPref =
|
||||
(ChromeBaseCheckBoxPreference) findPreference(PREF_FORCE_TABLET_UI);
|
||||
forceTabletUiPref.setChecked(SharedPreferencesManager.getInstance().readBoolean(
|
||||
- ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false));
|
||||
+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, true));
|
||||
forceTabletUiPref.setOnPreferenceChangeListener(this);
|
||||
|
||||
ChromeBaseCheckBoxPreference mAccessibilityTabSwitcherPref =
|
||||
diff --git a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java b/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java
|
||||
index f9b5e4e5992a2..4717f4c61d438 100644
|
||||
--- a/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java
|
||||
+++ b/ui/android/java/src/org/chromium/ui/base/DeviceFormFactor.java
|
||||
@@ -63,7 +63,7 @@ public class DeviceFormFactor {
|
||||
*/
|
||||
public static boolean isNonMultiDisplayContextOnTablet(Context context) {
|
||||
if (SharedPreferencesManager.getInstance().readBoolean(
|
||||
- ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, false))
|
||||
+ ChromePreferenceKeys.FLAGS_FORCE_TABLET_UI_ENABLED, true))
|
||||
return true;
|
||||
return detectScreenWidthBucket(context) >= SCREEN_BUCKET_TABLET;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
25
build/patches/Set-default-page-url.patch
Normal file
25
build/patches/Set-default-page-url.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From: Yifeng <wuyifeng@nd.com.cn>
|
||||
Date: Mon, 18 Oct 2021 07:01:00 +0000
|
||||
Subject: AP9-2162: Set default page url to http://myPromethean.com.
|
||||
|
||||
The requirement is that it should load to http://myPromethean.com when the following cases:
|
||||
* when Chromium opens.
|
||||
* when the button of home is clicked.
|
||||
* when a new tab is opened.
|
||||
|
||||
---
|
||||
components/embedder_support/android/java/src/org/chromium/components/embedder_support/util/UrlConstants.java | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/util/UrlConstants.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/util/UrlConstants.java
|
||||
--- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/util/UrlConstants.java
|
||||
+++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/util/UrlConstants.java
|
||||
@@ -48,4 +48,4 @@
|
||||
public static final String NTP_HOST = "newtab";
|
||||
- public static final String NTP_URL = "chrome-native://newtab/";
|
||||
- public static final String NTP_NON_NATIVE_URL = "chrome://newtab/";
|
||||
+ public static final String NTP_URL = "http://myPromethean.com/";
|
||||
+ public static final String NTP_NON_NATIVE_URL = "http://myPromethean.com/";
|
||||
public static final String NTP_ABOUT_URL = "about:newtab";
|
||||
--
|
||||
2.17.1
|
30
build/patches/Turn-AdBlock-off-by-default.patch
Normal file
30
build/patches/Turn-AdBlock-off-by-default.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From b4680e3bf5dc20a8a87988a537da575096d9fb69 Mon Sep 17 00:00:00 2001
|
||||
From: Allen Luce <allen.luce@prometheanworld.com>
|
||||
Date: Thu, 13 Feb 2020 17:29:32 +0000
|
||||
Subject: [PATCH] Turn AdBlock off by default
|
||||
|
||||
This disables the Bromite/NoChromo adblocking engine by default. Ad
|
||||
blocking causes some sites to not work properly, either due to
|
||||
ad-blocking detectors or due to broken page handling when ads don't
|
||||
appear.
|
||||
|
||||
Ad blocking can be easily re-enabled via the drop-down hamburger
|
||||
menu. This should help to ensure that only users that know how to
|
||||
disable adblocking end up using it in the first place.
|
||||
---
|
||||
.../content_settings/core/browser/content_settings_registry.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
index 6fff875f9c525..0a32f68f25a82 100644
|
||||
--- a/components/content_settings/core/browser/content_settings_registry.cc
|
||||
+++ b/components/content_settings/core/browser/content_settings_registry.cc
|
||||
@@ -356,7 +356,7 @@ void ContentSettingsRegistry::Init() {
|
||||
ContentSettingsInfo::EXCEPTIONS_ON_SECURE_AND_INSECURE_ORIGINS);
|
||||
|
||||
Register(ContentSettingsType::ADS, "subresource-filter",
|
||||
- CONTENT_SETTING_BLOCK, WebsiteSettingsInfo::UNSYNCABLE,
|
||||
+ CONTENT_SETTING_ALLOW, WebsiteSettingsInfo::UNSYNCABLE,
|
||||
AllowlistedSchemes(),
|
||||
ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK),
|
||||
WebsiteSettingsInfo::SINGLE_ORIGIN_ONLY_SCOPE,
|
Loading…
Add table
Reference in a new issue