Browse Source

Add Trichrome apk target; other minor fixes

tags/91.0.4472.77-1^0 91.0.4472.77-1
wchen342 3 weeks ago
parent
commit
179e9672c1
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
10 changed files with 461 additions and 216 deletions
  1. +1
    -1
      .build_config
  2. +2
    -1
      CHANGELOG.md
  3. +7
    -7
      build.sh
  4. +335
    -193
      domain_sub_2.list
  5. +2
    -1
      patches/series
  6. +1
    -1
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  7. +2
    -2
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  8. +53
    -0
      patches/ungoogled-chromium-android/Add_trichrome_apk.patch
  9. +58
    -10
      patches/ungoogled-chromium-android/Remove-UI-elements.patch
  10. +0
    -0
      patches/ungoogled-chromium-android/Tricrhome-webview-64.patch

+ 1
- 1
.build_config View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash
chrome_modern_target=chrome_modern_public_bundle
trichrome_chrome_apk_target=trichrome_chrome_apk
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_64_bundle_target=trichrome_chrome_64_bundle
trichrome_chrome_apk_target=trichrome_library_apk
webview_target=system_webview_apk
trichrome_webview_target=trichrome_webview_apk
trichrome_webview_64_target=trichrome_webview_64_apk


+ 2
- 1
CHANGELOG.md View File

@ -1,6 +1,7 @@
# 91.0.4472.77-1
* Trichrome is temporarily rolled back to 32-bit. If it works fine 64-bit will be added back next version.
* Trichrome `apk` support can end any time due to Google decided to remove the ability of not using split modules, as well as stripe the ability of building `apk`s directly for some time now. After that, you will have to manually install an `aab` file using `bundletool` and a specific `aapt2` file. I will try to keep fixing it as long as I can but it can stop working any time from now on.
* Adding to their recent move of limiting APIs, I reflect [the call from the Fedora chromium package maintainer](https://src.fedoraproject.org/rpms/chromium/blob/c4e9feabf040cc2f0c4bac40e8d06fbaf8923c33/f/chromium.spec#_178) that at this point, if you really value _free software as in freedom_, you would be better off use something else instead, like `Fennec F-Droid`.
* Adding to their recent move of limiting APIs, I reflect [the call from Fedora chromium package maintainer](https://src.fedoraproject.org/rpms/chromium/blob/c4e9feabf040cc2f0c4bac40e8d06fbaf8923c33/f/chromium.spec#_178) that at this point, if you really value _free software as in freedom_, you would be better off use something else instead, like `Fennec F-Droid`.
# 90.0.4430.212-1
* Upstream security fixes


+ 7
- 7
build.sh View File

@ -76,17 +76,17 @@ if [[ "$ARCH" != "arm64" ]] && [[ "$ARCH" != "arm" ]] && [[ "$ARCH" != "x86" ]];
exit 4
fi
if [[ "$TARGET" != "chrome_modern_target" ]] && [[ "$TARGET" != "trichrome_chrome_bundle_target" ]] && [[ "$TARGET" != "webview_target" ]] && [[ "$TARGET" != "trichrome_webview_target" ]] && [[ "$TARGET" != "all" ]]; then
if [[ "$TARGET" != "chrome_modern_target" ]] && [[ "$TARGET" != "trichrome_chrome_apk_target" ]] && [[ "$TARGET" != "webview_target" ]] && [[ "$TARGET" != "trichrome_webview_target" ]] && [[ "$TARGET" != "all" ]]; then
echo "Wrong target"
exit 5
fi
# 64-bit TriChrome
if [[ "$ARCH" == "arm64" ]]; then
if [[ "$TARGET" == "trichrome_chrome_bundle_target" ]]; then
TARGET_EXPANDED=${trichrome_chrome_64_bundle_target}
elif [[ "$TARGET" == "trichrome_webview_target" ]]; then
TARGET_EXPANDED=${trichrome_webview_64_target}
if [[ "$TARGET" == "trichrome_chrome_apk_target" ]]; then
TARGET_EXPANDED=${trichrome_chrome_apk_target} # TODO: 64-bit trichrome
# elif [[ "$TARGET" == "trichrome_webview_target" ]]; then
# TARGET_EXPANDED=${trichrome_webview_64_target}
else
TARGET_EXPANDED=${!TARGET}
fi
@ -375,8 +375,8 @@ else
# arm64+TriChrome needs to be run separately, otherwise it will fail
if [[ "$ARCH" != "arm64" ]]; then
ninja -C "${output_folder}" "$trichrome_chrome_bundle_target"
../bundle_generate_apk.sh -o "${output_folder}" -a "${ARCH}" -t "$trichrome_chrome_bundle_target"
ninja -C "${output_folder}" "$trichrome_chrome_apk_target"
# ../bundle_generate_apk.sh -o "${output_folder}" -a "${ARCH}" -t "$trichrome_chrome_bundle_target"
find . -iname "*.apk" -exec cp -f {} ../"${apk_out_folder}" \;
fi
fi


+ 335
- 193
domain_sub_2.list
File diff suppressed because it is too large
View File


+ 2
- 1
patches/series View File

@ -43,7 +43,8 @@ ungoogled-chromium-android/Add-save-data-flag.patch
ungoogled-chromium-android/Add-always-desktop-option.patch
ungoogled-chromium-android/Add-force-tablet-ui-option.patch
ungoogled-chromium-android/Disable-tflite.patch
ungoogled-chromium-android/tricrhome-webview-64.patch
ungoogled-chromium-android/Tricrhome-webview-64.patch
ungoogled-chromium-android/Add_trichrome_apk.patch
Bromite/Remove-account-permissions-from-manifest.patch
Bromite/updater-disable-updater-pings.patch
Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch


+ 1
- 1
patches/ungoogled-chromium-android/Add-always-desktop-option.patch View File

@ -43,7 +43,7 @@ author: Wengling Chen <[email protected]>
public static final String FONT_USER_FONT_SCALE_FACTOR = "user_font_scale_factor";
public static final String FONT_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
+ public static final String FLAGS_FORCE_DESKTOP_MODE_ENABLED = "force_desktop_mode_enabled";
+ public static final String FLAGS_FORCE_DESKTOP_MODE_ENABLED = "Chrome.UngoogledChromium.ForceDesktopMode";
+
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";


+ 2
- 2
patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch View File

@ -78,8 +78,8 @@ author: Wengling Chen <[email protected]>
@@ -488,6 +488,7 @@ public final class ChromePreferenceKeys
public static final String FONT_USER_SET_FORCE_ENABLE_ZOOM = "user_set_force_enable_zoom";
public static final String FLAGS_FORCE_DESKTOP_MODE_ENABLED = "force_desktop_mode_enabled";
+ public static final String FLAGS_FORCE_TABLET_UI_ENABLED = "force_tablet_ui_enabled";
public static final String FLAGS_FORCE_DESKTOP_MODE_ENABLED = "Chrome.UngoogledChromium.ForceDesktopMode";
+ public static final String FLAGS_FORCE_TABLET_UI_ENABLED = "Chrome.UngoogledChromium.ForceTabletUi";
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";


+ 53
- 0
patches/ungoogled-chromium-android/Add_trichrome_apk.patch View File

@ -0,0 +1,53 @@
description: Fix trichrome apk build
author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -1968,6 +1968,10 @@ if (current_toolchain == default_toolcha
is_monochrome = true
is_bundle_module = true
}
+ resource_packaging("trichrome_chrome_apk_pak_assets") {
+ is_monochrome = false
+ is_trichrome = true
+ }
resource_packaging("trichrome_chrome_bundle_module_pak_assets") {
is_monochrome = false
is_trichrome = true
@@ -2551,6 +2555,23 @@ android_resources("trichrome_dummy_resou
sources = [ "trichrome/res_dummy/values/strings.xml" ]
}
+monochrome_public_apk_or_module_tmpl("trichrome_chrome_apk") {
+ version_code = trichrome_version_code
+ version_name = chrome_version_name
+ apk_name = "TrichromeChrome"
+ target_type = "android_apk"
+ use_trichrome_library = true
+ static_library_provider = ":trichrome_library_apk"
+ if (trichrome_synchronized_proguard) {
+ resource_ids_provider_dep = "//android_webview:trichrome_webview_apk"
+ }
+
+ if (android_64bit_target_cpu) {
+ is_64_bit_browser = false
+ include_64_bit_webview = true
+ }
+}
+
chrome_public_test_apk_manifest =
"$root_gen_dir/chrome_public_test_apk_manifest/AndroidManifest.xml"
chrome_public_test_vr_apk_manifest =
@@ -3096,6 +3117,8 @@ template("monochrome_or_trichrome_public
!defined(invoker.static_library_synchronized_proguard) ||
!invoker.static_library_synchronized_proguard) {
bundle_target = ":${invoker.target_name}"
+ } else {
+ resource_ids_provider_dep = "//android_webview:trichrome_webview_apk"
}
}

+ 58
- 10
patches/ungoogled-chromium-android/Remove-UI-elements.patch View File

@ -6,8 +6,8 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
chrome/android/features/start_surface/public/java/src/org/chromium/chrome/features/start_surface/StartSurfaceConfiguration.java | 2
chrome/android/java/res/menu/main_menu.xml | 3
chrome/android/java/res/menu/save_password_preferences_action_bar_menu.xml | 6 -
chrome/android/java/res/xml/main_preferences.xml | 15 --
chrome/android/java/res/xml/privacy_preferences.xml | 4
chrome/android/java/res/xml/main_preferences.xml | 20 ---
chrome/android/java/res/xml/privacy_preferences.xml | 9 -
chrome/android/java/src/org/chromium/chrome/browser/KeyboardShortcuts.java | 1
chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java | 10 -
chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataTabsFragment.java | 5
@ -16,7 +16,7 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
chrome/android/java/src/org/chromium/chrome/browser/directactions/MenuDirectActionHandler.java | 2
chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunStatus.java | 2
chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java | 4
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 8 -
chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java | 18 ---
chrome/android/java/src/org/chromium/chrome/browser/settings/MainSettings.java | 55 ----------
chrome/android/java/src/org/chromium/chrome/browser/settings/SettingsActivity.java | 5
chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java | 2
@ -25,7 +25,7 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncAndServicesSettings.java | 3
components/autofill_assistant/browser/features.cc | 10 -
components/feed/core/shared_prefs/pref_names.cc | 4
22 files changed, 12 insertions(+), 141 deletions(-)
22 files changed, 12 insertions(+), 161 deletions(-)
--- a/components/feed/core/shared_prefs/pref_names.cc
+++ b/components/feed/core/shared_prefs/pref_names.cc
@ -94,15 +94,28 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
@Override
--- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
@@ -52,7 +52,6 @@ public class PrivacySettings
@@ -51,8 +51,6 @@ public class PrivacySettings
private static final String PREF_SECURE_DNS = "secure_dns";
private static final String PREF_USAGE_STATS = "usage_stats_reporting";
private static final String PREF_DO_NOT_TRACK = "do_not_track";
private static final String PREF_SAFE_BROWSING = "safe_browsing";
- private static final String PREF_SAFE_BROWSING = "safe_browsing";
- private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link";
private static final String PREF_CLEAR_BROWSING_DATA = "clear_browsing_data";
private static final String PREF_PRIVACY_SANDBOX = "privacy_sandbox";
@@ -105,9 +104,6 @@ public class PrivacySettings
@@ -82,11 +80,6 @@ public class PrivacySettings
getPreferenceScreen().removePreference(findPreference(PREF_PRIVACY_SANDBOX));
}
- Preference safeBrowsingPreference = findPreference(PREF_SAFE_BROWSING);
- safeBrowsingPreference.setOnPreferenceClickListener((preference) -> {
- return false;
- });
-
setHasOptionsMenu(true);
mManagedPreferenceDelegate = createManagedPreferenceDelegate();
@@ -105,9 +98,6 @@ public class PrivacySettings
Preference secureDnsPref = findPreference(PREF_SECURE_DNS);
secureDnsPref.setVisible(SecureDnsSettings.isUiEnabled());
@ -112,7 +125,18 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
updateSummaries();
}
@@ -234,10 +230,6 @@ public class PrivacySettings
@@ -190,10 +180,6 @@ public class PrivacySettings
secureDnsPref.setSummary(SecureDnsSettings.getSummary(getContext()));
}
- Preference safeBrowsingPreference = findPreference(PREF_SAFE_BROWSING);
- if (safeBrowsingPreference != null && safeBrowsingPreference.isVisible()) {
- }
-
Preference usageStatsPref = findPreference(PREF_USAGE_STATS);
if (usageStatsPref != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q
@@ -234,10 +220,6 @@ public class PrivacySettings
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
menu.clear();
@ -185,7 +209,19 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
<!-- manage_sync and google_services replace sync_and_services if MOBILE_IDENTITY_CONSISTENCY
is enabled. -->
<org.chromium.components.browser_ui.settings.ChromeBasePreference
@@ -116,11 +106,6 @@
@@ -76,11 +66,6 @@
android:order="12"
android:title="@string/prefs_privacy_security"/>
<Preference
- android:fragment="org.chromium.chrome.browser.safety_check.SafetyCheckSettingsFragment"
- android:key="safety_check"
- android:order="13"
- android:title="@string/prefs_safety_check"/>
- <Preference
android:fragment="org.chromium.chrome.browser.notifications.settings.NotificationSettings"
android:key="notifications"
android:order="14"
@@ -116,11 +101,6 @@
android:order="20"
android:title="@string/language_settings"/>
<org.chromium.components.browser_ui.settings.ChromeBasePreference
@ -402,7 +438,19 @@ Subject: Remove unused UI elements. Also disables autofill assistant.
return true;
--- a/chrome/android/java/res/xml/privacy_preferences.xml
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
@@ -41,8 +41,4 @@
@@ -11,11 +11,6 @@
android:title="@string/clear_browsing_data_title"
android:summary="@string/clear_browsing_data_summary"
android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment"/>
- <Preference
- android:key="safe_browsing"
- android:title="@string/prefs_safe_browsing_title"
- android:summary="@string/prefs_safe_browsing_summary"
- android:fragment="org.chromium.chrome.browser.safe_browsing.settings.SafeBrowsingSettingsFragment"/>
<org.chromium.components.browser_ui.settings.ChromeSwitchPreference
android:key="can_make_payment"
android:title="@string/can_make_payment_title"
@@ -41,8 +36,4 @@
android:key="privacy_sandbox"
android:title="@string/prefs_privacy_sandbox"
android:fragment="org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment"/>


patches/ungoogled-chromium-android/tricrhome-webview-64.patch → patches/ungoogled-chromium-android/Tricrhome-webview-64.patch View File


Loading…
Cancel
Save