Browse Source

Add back 64-bit Trichrome

tags/91.0.4472.114-2^0 91.0.4472.114-2-webview
wchen342 3 months ago
parent
commit
699d9c6c59
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
7 changed files with 49 additions and 14 deletions
  1. +2
    -1
      .build_config
  2. +6
    -0
      CHANGELOG.md
  3. +3
    -3
      build.sh
  4. +10
    -4
      bundle_generate_apk.sh
  5. +2
    -2
      patches/ungoogled-chromium-android/Add-always-desktop-option.patch
  6. +2
    -2
      patches/ungoogled-chromium-android/Add-force-tablet-ui-option.patch
  7. +24
    -2
      patches/ungoogled-chromium-android/Add_trichrome_apk.patch

+ 2
- 1
.build_config View File

@ -2,6 +2,7 @@
chrome_modern_target=chrome_modern_public_bundle
trichrome_chrome_apk_target=trichrome_chrome_apk
trichrome_chrome_64_apk_target=trichrome_chrome_64_apk
trichrome_chrome_bundle_target=trichrome_chrome_bundle
trichrome_chrome_64_bundle_target=trichrome_chrome_64_bundle
webview_target=system_webview_apk
@ -10,6 +11,6 @@ trichrome_webview_64_target=trichrome_webview_64_apk
all=all
chromium_version=91.0.4472.114
ungoogled_chromium_version=91.0.4472.101
ungoogled_chromium_version=91.0.4472.114
ungoogled_chromium_revision=1
ungoogled_chromium_android_revision=1

+ 6
- 0
CHANGELOG.md View File

@ -1,3 +1,9 @@
# 91.0.4472.114-2
* Add back 64-bit Trichrome
# 91.0.4472.114-1
* Upstream security fixes
# 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.


+ 3
- 3
build.sh View File

@ -84,9 +84,9 @@ fi
# 64-bit TriChrome
if [[ "$ARCH" == "arm64" ]]; then
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}
TARGET_EXPANDED=${trichrome_chrome_64_apk_target}
elif [[ "$TARGET" == "trichrome_webview_target" ]]; then
TARGET_EXPANDED=${trichrome_webview_64_target}
else
TARGET_EXPANDED=${!TARGET}
fi


+ 10
- 4
bundle_generate_apk.sh View File

@ -71,7 +71,8 @@ if [[ "$ARCH" != "arm64" ]] && [[ "$ARCH" != "arm" ]] && [[ "$ARCH" != "x86" ]];
fi
if [[ "$TARGET" != "$chrome_modern_target" ]] && [[ "$TARGET" != "$trichrome_chrome_bundle_target" ]] && [[ "$TARGET" != "$trichrome_chrome_64_bundle_target" ]] \
&& [[ "$TARGET" != "$trichrome_chrome_apk_target" ]] && [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]]; then
&& [[ "$TARGET" != "$trichrome_chrome_apk_target" ]] && [[ "$TARGET" != "$trichrome_chrome_64_apk_target" ]] \
&& [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]]; then
echo "Wrong target"
exit 4
fi
@ -98,6 +99,10 @@ case "$TARGET" in
FILENAME="TrichromeChrome"
FILENAME_OUT="TrichromeChrome"
;;
"$trichrome_chrome_64_apk_target")
FILENAME="TrichromeChrome64"
FILENAME_OUT="TrichromeChrome"
;;
"$trichrome_webview_target")
FILENAME="TrichromeWebView"
FILENAME_OUT="TrichromeWebView"
@ -120,7 +125,8 @@ rm -rf release
mkdir release
cd release
if [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]] && [[ "$TARGET" != "$trichrome_chrome_apk_target" ]]; then
if [[ "$TARGET" != "$trichrome_webview_target" ]] && [[ "$TARGET" != "$trichrome_webview_64_target" ]] \
&& [[ "$TARGET" != "$trichrome_chrome_apk_target" ]] && [[ "$TARGET" != "$trichrome_chrome_64_apk_target" ]]; then
$BUNDLETOOL build-apks --aapt2 $AAPT2 --bundle ../"$FILENAME".aab --output "$FILENAME".apks --mode=universal --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc
unzip "$FILENAME".apks universal.apk
mv universal.apk "${FILENAME_OUT}".apk
@ -134,8 +140,8 @@ if [[ "$TARGET" == "$trichrome_chrome_bundle_target" ]] || [[ "$TARGET" == "$tri
fi
done
fi
if [[ "$TARGET" == "$trichrome_chrome_64_bundle_target" ]] || [[ "$TARGET" == "$trichrome_webview_64_target" ]]; then
for app in TrichromeLibrary TrichromeWebView; do
if [[ "$TARGET" == "$trichrome_chrome_64_bundle_target" ]] || [[ "$TARGET" == "$trichrome_webview_64_target" ]] || [[ "$TARGET" == "$trichrome_chrome_64_apk_target" ]]; then
for app in TrichromeLibrary TrichromeWebView TrichromeChrome; do
if [ -f "../${app}64.apk" ]; then
$APKSIGNER sign --ks $KEYSTORE --ks-pass file:$KEYSTORE_PASS --ks-key-alias uc --in "../${app}64.apk" --out "${app}.apk"
fi


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

@ -39,7 +39,7 @@ author: Wengling Chen <[email protected]>
<message name="IDS_LANGUAGE_SETTINGS" desc="Title for the Languages settings screen that allows users to manage their languages preferences. [CHAR-LIMIT=32]">
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
@@ -487,6 +487,8 @@ public final class ChromePreferenceKeys
@@ -490,6 +490,8 @@ public final class ChromePreferenceKeys
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";
@ -48,7 +48,7 @@ author: Wengling Chen <[email protected]>
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
/** Keys used to save settings related to homepage. */
@@ -1001,6 +1003,7 @@ public final class ChromePreferenceKeys
@@ -1005,6 +1007,7 @@ public final class ChromePreferenceKeys
FIRST_RUN_SKIPPED_BY_POLICY,
FLAGS_CACHED.pattern(),
FLAGS_FIELD_TRIAL_PARAM_CACHED.pattern(),


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

@ -75,7 +75,7 @@ author: Wengling Chen <[email protected]>
}
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
@@ -488,6 +488,7 @@ public final class ChromePreferenceKeys
@@ -491,6 +491,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 = "Chrome.UngoogledChromium.ForceDesktopMode";
@ -83,7 +83,7 @@ author: Wengling Chen <[email protected]>
public static final String HISTORY_SHOW_HISTORY_INFO = "history_home_show_info";
@@ -1004,6 +1005,7 @@ public final class ChromePreferenceKeys
@@ -1008,6 +1009,7 @@ public final class ChromePreferenceKeys
FLAGS_CACHED.pattern(),
FLAGS_FIELD_TRIAL_PARAM_CACHED.pattern(),
FLAGS_FORCE_DESKTOP_MODE_ENABLED,


+ 24
- 2
patches/ungoogled-chromium-android/Add_trichrome_apk.patch View File

@ -2,8 +2,8 @@ description: Fix trichrome apk build
author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
chrome/android/BUILD.gn | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@ -51,3 +51,25 @@ author: Wengling Chen <[email protected]>
}
}
@@ -3314,6 +3337,21 @@ if (android_64bit_target_cpu) {
use_trichrome_library = true
static_library_provider = ":trichrome_library_32_apk"
}
+
+ monochrome_public_apk_or_module_tmpl("trichrome_chrome_64_apk") {
+ version_code = trichrome_version_code
+ version_name = chrome_version_name
+ apk_name = "TrichromeChrome64"
+ target_type = "android_apk"
+ use_trichrome_library = true
+ static_library_provider = ":trichrome_library_64_apk"
+ if (trichrome_synchronized_proguard) {
+ resource_ids_provider_dep = "//android_webview:trichrome_webview_64_apk"
+ }
+
+ is_64_bit_browser = true
+ include_32_bit_webview = false
+ }
}
generate_jni("chrome_jni_headers") {

Loading…
Cancel
Save