|
@@ -0,0 +1,39 @@
|
|
|
+From: uazo <uazo@users.noreply.github.com>
|
|
|
+Date: Thu, 3 Feb 2022 19:48:49 +0000
|
|
|
+Subject: Fix Samsung Note 9 startup crash
|
|
|
+
|
|
|
+---
|
|
|
+ .../base/library_loader/LibraryLoader.java | 18 ++++++++++++++++++
|
|
|
+ 1 file changed, 18 insertions(+)
|
|
|
+
|
|
|
+diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
|
|
|
+--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
|
|
|
++++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
|
|
|
+@@ -505,6 +505,24 @@ public class LibraryLoader {
|
|
|
+ // Note: This cannot be done in the build configuration, as otherwise chrome_public_apk cannot
|
|
|
+ // both be used as the basis to ship on L, and the default APK used by developers on 10+.
|
|
|
+ private boolean forceSystemLinker() {
|
|
|
++ // Check from Samsung Galaxy Note 9 (Android 8.1) - Model SM-N960F
|
|
|
++ // crashes on startup due to crazylinker not compatible with that device
|
|
|
++ // it doesn't support RELRO for that device. we lose relocation sharing
|
|
|
++ // but it starts up.
|
|
|
++ // see also https://groups.google.com/a/chromium.org/g/chromium-dev/c/iAb7QUiNPLw
|
|
|
++ // https://bugs.chromium.org/p/chromium/issues/detail?id=980304
|
|
|
++ String manufacturer = Build.MANUFACTURER.toLowerCase(Locale.US);
|
|
|
++ if (manufacturer.equals("samsung")
|
|
|
++ && Build.MODEL != null
|
|
|
++ && Build.MODEL.equals("SM-N960F")) {
|
|
|
++ Log.i(TAG, "Configuration: force use System Linker (workaround)");
|
|
|
++ // Use system linker without loading crazylinker
|
|
|
++ // the attempt with the system linker also happens normally as fallback,
|
|
|
++ // but in this case we bypass the load of creazylinker because
|
|
|
++ // it messes up the memory causing meaningless crashes
|
|
|
++ // at base::MessagePumpForUI::MessagePumpForUI()
|
|
|
++ return true;
|
|
|
++ }
|
|
|
+ return mUseChromiumLinker && !mUseModernLinker
|
|
|
+ && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q;
|
|
|
+ }
|
|
|
+--
|
|
|
+2.20.1
|
|
|
+
|