Browse Source

Update to 81.0.4044.138

master 81.0.4044.138-1
wchen342 2 years ago
parent
commit
d03b833674
Signed by untrusted user: wchen342 GPG Key ID: 720B70365E800508
  1. 4
      CHANGELOG.md
  2. 9
      README.md
  3. 15
      build.sh
  4. 4
      misc/android_studio_setup.sh
  5. 66
      patches/Kiwi/gn.patch
  6. 73
      patches/Kiwi/src.patch
  7. 14
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch

4
CHANGELOG.md

@ -1,3 +1,7 @@
# 81.0.4044.138-1
* Fix a crash with incognito tab
* Minor fix for extension patches. From next release, `chrome`/`arm` target will include a beta version with extension support.
# 81.0.4044.129-1
* Fix a bug with bookmark add new folder activity.
* Add new fix of [#9](https://github.com/wchen342/ungoogled-chromium-android/issues/9).

9
README.md

@ -66,19 +66,14 @@ I have set up an experimental f-droid repository. Because of the limitation of i
You can use f-Droid client and add [this repository](https://www.droidware.info/fdroid/repo).
## TODO List
- [x] Remove dependencies on SDK tools and extras
- [x] Domain substitution in java files
- [x] Prune binaries (*Note: haven't found a way to build desugar-runtime.jar without bazel. Please let me know if you know how.*)
- [x] Remove Play Services
- [ ] Java patches
## Credits
* [The Chromium Project](//www.chromium.org/)
* [ungoogled-chromium](//github.com/Eloston/ungoogled-chromium)
* [xsmile's fork](//github.com/xsmile/ungoogled-chromium/tree/android)
* [Bromite](//github.com/bromite/bromite)
* [Kiwi Browser](//github.com/kiwibrowser)
* [dvalter's patches](//github.com/dvalter/chromium-android-ext-dev)
## Related Projects

15
build.sh

@ -8,7 +8,7 @@ chrome_target=chrome_public_apk
mono_target=monochrome_public_apk
webview_target=system_webview_apk
chromium_version=81.0.4044.129
chromium_version=81.0.4044.138
ungoogled_chromium_revision=1
# Argument parser from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash/29754866#29754866
@ -131,12 +131,7 @@ git fetch --depth 1 --no-tags origin "${fontconfig_commit}"
git reset --hard FETCH_HEAD
popd
## Hooks
python src/build/util/lastchange.py -o src/build/util/LASTCHANGE
python src/tools/download_cros_provided_profile.py --newest_state=src/chrome/android/profiles/newest.txt --local_state=src/chrome/android/profiles/local.txt --output_name=src/chrome/android/profiles/afdo.prof --gs_url_base=chromeos-prebuilt/afdo-job/llvm
python src/build/util/lastchange.py -m GPU_LISTS_VERSION --revision-id-only --header src/gpu/config/gpu_lists_version.h
python src/build/util/lastchange.py -m SKIA_COMMIT_HASH -s src/third_party/skia --header src/skia/ext/skia_commit_hash.h
# New binary dependency: node, caused by webui
# New binary dependency: node
mkdir -p src/third_party/node/linux/node-linux-x64/bin
ln -s /usr/bin/node src/third_party/node/linux/node-linux-x64/bin/
src/third_party/node/update_npm_deps
@ -152,6 +147,12 @@ ln -s /usr/bin/javap src/third_party/jdk/current/bin/
mkdir -p src/third_party/jdk/extras/java_8
ln -s /usr/lib/jvm/java-8-openjdk/jre src/third_party/jdk/extras/java_8
## Hooks
python src/build/util/lastchange.py -o src/build/util/LASTCHANGE
python src/tools/download_cros_provided_profile.py --newest_state=src/chrome/android/profiles/newest.txt --local_state=src/chrome/android/profiles/local.txt --output_name=src/chrome/android/profiles/afdo.prof --gs_url_base=chromeos-prebuilt/afdo-job/llvm
python src/build/util/lastchange.py -m GPU_LISTS_VERSION --revision-id-only --header src/gpu/config/gpu_lists_version.h
python src/build/util/lastchange.py -m SKIA_COMMIT_HASH -s src/third_party/skia --header src/skia/ext/skia_commit_hash.h
## Run ungoogled-chromium scripts
# Patch prune list and domain substitution

4
misc/android_studio_setup.sh

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=81.0.4044.129
chromium_version=81.0.4044.138
chrome_target=chrome_public_apk
monochrome_target=monochrome_public_apk
webview_target=system_webview_apk
@ -33,7 +33,7 @@ cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
gn gen ${output_folder} --fail-on-unused-args
# Compile apk
/usr/bin/ninja -C ${output_folder} ${monochrome_target}
ninja -C ${output_folder} ${monochrome_target}
popd
###

66
patches/Kiwi/gn.patch

@ -1180,69 +1180,3 @@
deps += [ "//chrome/browser/resources:dev_ui_paks" ]
}
--- a/tools/json_schema_compiler/feature_compiler.py
+++ b/tools/json_schema_compiler/feature_compiler.py
@@ -48,7 +48,7 @@ CC_FILE_BEGIN = """
// %(source_files)s
// DO NOT EDIT.
-#include "%(header_file_path)s"
+#include "%(header_file_root_path)s/%(header_file_path)s"
#include "extensions/common/features/complex_feature.h"
#include "extensions/common/features/feature_provider.h"
@@ -636,13 +636,14 @@ class FeatureCompiler(object):
"""A compiler to load, parse, and generate C++ code for a number of
features.json files."""
def __init__(self, chrome_root, source_files, feature_type,
- method_name, out_root, out_base_filename):
+ method_name, out_root, root_build_dir, out_base_filename):
# See __main__'s ArgumentParser for documentation on these properties.
self._chrome_root = chrome_root
self._source_files = source_files
self._feature_type = feature_type
self._method_name = method_name
self._out_root = out_root
+ self._root_build_dir = root_build_dir
self._out_base_filename = out_base_filename
# The json value for the feature files.
@@ -784,9 +785,11 @@ class FeatureCompiler(object):
if include_file_root.startswith(GEN_DIR_PREFIX):
include_file_root = include_file_root[len(GEN_DIR_PREFIX):]
header_file_path = '%s/%s' % (include_file_root, header_file)
+ header_file_root_path = self._root_build_dir.replace("//", "")
cc_file_path = '%s/%s' % (include_file_root, cc_file)
substitutions = ({
'header_file_path': header_file_path,
+ 'header_file_root_path': header_file_root_path,
'header_guard': (header_file_path.replace('/', '_').
replace('.', '_').upper()),
'method_name': self._method_name,
@@ -825,6 +828,8 @@ if __name__ == '__main__':
help='The name of the method to populate the provider')
parser.add_argument('out_root', type=str,
help='The root directory to generate the C++ files into')
+ parser.add_argument('root_build_dir', type=str,
+ help='The base path of the build directory')
parser.add_argument(
'out_base_filename', type=str,
help='The base filename for the C++ files (.h and .cc will be appended)')
@@ -835,6 +840,7 @@ if __name__ == '__main__':
raise NameError('Unknown feature type: %s' % args.feature_type)
c = FeatureCompiler(args.chrome_root, args.source_files, args.feature_type,
args.method_name, args.out_root,
+ args.root_build_dir,
args.out_base_filename)
c.Load()
c.Compile()
--- a/tools/json_schema_compiler/json_features.gni
+++ b/tools/json_schema_compiler/json_features.gni
@@ -42,6 +42,7 @@ template("json_features") {
"$feature_type",
"$method_name",
rebase_path(target_gen_dir, root_build_dir),
+ "$root_build_dir",
"$base_filename",
] + rebased

73
patches/Kiwi/src.patch

@ -32,6 +32,7 @@
chrome/browser/first_run/upgrade_util.h | 2
chrome/browser/hid/hid_chooser_context.cc | 5
chrome/browser/lifetime/application_lifetime.cc | 22
chrome/browser/lifetime/application_lifetime.h | 4
chrome/browser/lifetime/browser_shutdown.cc | 6
chrome/browser/lifetime/browser_shutdown.h | 4
chrome/browser/media/router/media_router.h | 4
@ -76,7 +77,6 @@
chrome/browser/search/local_ntp_source.h | 2
chrome/browser/search/most_visited_iframe_source.h | 2
chrome/browser/sessions/session_restore.cc | 25
chrome/browser/sessions/session_restore_android.cc | 27
chrome/browser/sharing/shared_clipboard/feature_flags.cc | 2
chrome/browser/sharing/shared_clipboard/feature_flags.h | 2
chrome/browser/storage/storage_notification_service_impl.cc | 2
@ -193,6 +193,7 @@
ui/base/dragdrop/os_exchange_data_provider_factory.cc | 4
ui/events/event.h | 1
ui/native_theme/native_theme_android.cc | 3
ui/native_theme/native_theme_android.h | 2
ui/views/controls/menu/menu_controller.h | 1
ui/views/controls/menu/menu_host.cc | 8
ui/views/controls/menu/menu_host.h | 2
@ -213,7 +214,7 @@
ui/views/widget/widget.cc | 6
weblayer/browser/browser_context_impl.cc | 2
weblayer/browser/browser_context_impl.h | 2
214 files changed, 3129 insertions(+), 625 deletions(-)
215 files changed, 3132 insertions(+), 601 deletions(-)
--- /dev/null
+++ b/chrome/browser/web_applications/components/web_app_shortcut_android.cc
@ -2006,6 +2007,21 @@
}
#endif
--- a/ui/native_theme/native_theme_android.h
+++ b/ui/native_theme/native_theme_android.h
@@ -20,11 +20,11 @@ class NativeThemeAndroid : public Native
const ExtraParams& extra) const override;
SkColor GetSystemColor(ColorId color_id,
ColorScheme color_scheme) const override;
+ static NativeThemeAndroid* instance();
protected:
friend class NativeTheme;
friend class base::NoDestructor<NativeThemeAndroid>;
- static NativeThemeAndroid* instance();
// NativeThemeBase:
void AdjustCheckboxRadioRectForPadding(SkRect* rect) const override;
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -50,7 +50,7 @@
@ -4742,39 +4758,6 @@
bool SessionRestore::IsRestoring(const Profile* profile) {
if (active_session_restorers == nullptr)
return false;
--- a/chrome/browser/sessions/session_restore_android.cc
+++ b/chrome/browser/sessions/session_restore_android.cc
@@ -61,30 +61,3 @@ std::vector<Browser*> SessionRestore::Re
NOTREACHED();
return std::vector<Browser*>();
}
-
-// static
-void SessionRestore::AddObserver(SessionRestoreObserver* observer) {
- observers()->AddObserver(observer);
-}
-
-// static
-void SessionRestore::RemoveObserver(SessionRestoreObserver* observer) {
- observers()->RemoveObserver(observer);
-}
-
-// static
-bool SessionRestore::IsRestoring(const Profile* profile) {
- return false;
-}
-
-// static
-Browser* SessionRestore::RestoreSession(
- Profile* profile, Browser* browser,
- SessionRestore::BehaviorBitmask behavior,
- const std::vector<GURL>& urls_to_open) {
- return nullptr;
-}
-
-// static
-base::ObserverList<SessionRestoreObserver>::Unchecked*
- SessionRestore::observers_ = nullptr;
--- /dev/null
+++ b/chrome/browser/obsolete_system/obsolete_system_android.cc
@@ -0,0 +1,25 @@
@ -6829,3 +6812,23 @@
base::FilePath GetPath() override;
bool IsOffTheRecord() override;
content::ResourceContext* GetResourceContext() override;
--- a/chrome/browser/lifetime/application_lifetime.h
+++ b/chrome/browser/lifetime/application_lifetime.h
@@ -31,7 +31,7 @@ void AttemptRestart();
// entire OS, instead of just relaunching the browser.
void AttemptRelaunch();
-#if !defined(OS_ANDROID)
+#if defined(OS_ANDROID)
// Starts an administrator-initiated relaunch process. On platforms other than
// Chrome OS, this relaunches the browser and restores the user's session. On
// Chrome OS, this restarts the entire OS. This differs from AttemptRelaunch in
@@ -62,7 +62,7 @@ void ExitIgnoreUnloadHandlers();
bool IsAttemptingShutdown();
#endif
-#if !defined(OS_ANDROID)
+#if defined(OS_ANDROID)
// Closes all browsers and if successful, quits.
void CloseAllBrowsersAndQuit();

14
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch

@ -8,11 +8,11 @@ Subject: Remove dependency on com.google.android.gms.auth
components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountIdProvider.java | 7 -
components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 12 --
content/public/android/BUILD.gn | 1
content/public/android/java/src/org/chromium/content/browser/sms/SmsReceiver.java | 40 ---------
content/public/android/java/src/org/chromium/content/browser/sms/SmsReceiver.java | 38 --------
content/public/android/java/src/org/chromium/content/browser/sms/Wrappers.java | 10 --
third_party/android_deps/BUILD.gn | 44 ----------
third_party/robolectric/BUILD.gn | 1
9 files changed, 4 insertions(+), 113 deletions(-)
9 files changed, 4 insertions(+), 111 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@ -95,17 +95,15 @@ Subject: Remove dependency on com.google.android.gms.auth
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.annotations.CalledByNative;
@@ -51,9 +46,6 @@ public class SmsReceiver extends Broadca
// If this broadcast receiver becomes more heavyweight, we should make
@@ -52,7 +47,6 @@ public class SmsReceiver extends Broadca
// this registration expire after the SMS message is received.
if (DEBUG) Log.d(TAG, "Registering intent filters.");
- IntentFilter filter = new IntentFilter();
IntentFilter filter = new IntentFilter();
- filter.addAction(SmsRetriever.SMS_RETRIEVED_ACTION);
- mContext.registerReceiver(this, filter);
mContext.registerReceiver(this, filter);
}
@CalledByNative
@@ -77,49 +69,19 @@ public class SmsReceiver extends Broadca
@@ -77,49 +71,19 @@ public class SmsReceiver extends Broadca
return;
}

Loading…
Cancel
Save