Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
Update to 81.0.4044.138
Browse files Browse the repository at this point in the history
  • Loading branch information
wchen342 committed May 22, 2020
1 parent b828ac5 commit d03b833
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 125 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 8 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions misc/android_studio_setup.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

###
Expand Down
66 changes: 0 additions & 66 deletions patches/Kiwi/gn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 38 additions & 35 deletions patches/Kiwi/src.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 @@
Expand Down Expand Up @@ -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 @@
Expand Down Expand Up @@ -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();

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d03b833

Please sign in to comment.