Changes for February 2023, syncing up to 20230131

This commit is contained in:
Andy CrossGate Yan
2023-02-19 02:08:43 +00:00
parent 800e1a579a
commit 4ce6305950
90 changed files with 116551 additions and 113413 deletions

View File

@@ -1,7 +1,7 @@
From 9d5a7fac46a27db0efe27f902933ded495102458 Mon Sep 17 00:00:00 2001
From 5e1a02d51745e80b32a720c907ad335e7273cb52 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 27 Oct 2021 14:39:29 -0400
Subject: [PATCH 1/2] Disable vndklite handling
Subject: [PATCH 1/3] Disable vndklite handling
Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
---
@@ -9,7 +9,7 @@ Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
1 file changed, 5 deletions(-)
diff --git a/linker/linker.cpp b/linker/linker.cpp
index c6588d2cd..545426fd9 100644
index 5df379936..ceaba7d95 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -93,7 +93,6 @@ static uint64_t g_module_unload_counter = 0;
@@ -20,7 +20,7 @@ index c6588d2cd..545426fd9 100644
static const char* const kLdGeneratedConfigFilePath = "/linkerconfig/ld.config.txt";
@@ -3365,10 +3364,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
@@ -3436,10 +3435,6 @@ static std::string get_ld_config_file_apex_path(const char* executable_path) {
}
static std::string get_ld_config_file_vndk_path() {

View File

@@ -1,7 +1,7 @@
From fe04ccfd62f79856ffcfe3a10d905f12362c1094 Mon Sep 17 00:00:00 2001
From 86e0672d6cac30d38a9f0a7260e6a6f265dcc866 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 19 Feb 2022 08:20:25 -0500
Subject: [PATCH 2/2] Add new mechanism to fake vendor props on a per-process
Subject: [PATCH 2/3] Add new mechanism to fake vendor props on a per-process
basis
This reads debug.phh.props.<process name>. If its value is "vendor",

View File

@@ -0,0 +1,145 @@
From 4daa38527f099ce9826ced79afbd84cab2e0f6c7 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 19 Jan 2023 16:44:01 -0500
Subject: [PATCH 3/3] Rework property overriding
- Support property read with callback in addition to previous
constant-size property_get
- Add another class of redirect "keymaster", to redirect to AOSP/GSI
props + SPL based on boot.img
---
libc/system_properties/system_properties.cpp | 77 +++++++++++++++-----
1 file changed, 58 insertions(+), 19 deletions(-)
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
index d6e7e3e68..40ff48bad 100644
--- a/libc/system_properties/system_properties.cpp
+++ b/libc/system_properties/system_properties.cpp
@@ -35,6 +35,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include <fcntl.h>
#include <new>
@@ -60,23 +61,70 @@ static void read_self() {
if(self_ok) return;
self_ok = true;
- int fd = open("/proc/self/comm", O_RDONLY);
+ char cmdline[128];
+ int fd = open("/proc/self/cmdline", O_RDONLY);
if(fd<0) return;
- read(fd, comm, sizeof(comm)-1);
- for(unsigned i=0; i<sizeof(comm); i++)
- if(comm[i] == '\n')
- comm[i] = 0;
+ read(fd, cmdline, sizeof(cmdline)-1);
+ for(unsigned i=0; i<sizeof(cmdline); i++)
+ if(cmdline[i] == '\n')
+ cmdline[i] = 0;
close(fd);
+ // Truncate to last /, we don't want `/` in the prop
+ const char *c = strrchr(cmdline, '/');
+ if (c != nullptr) {
+ c = c+1;
+ } else {
+ c = cmdline;
+ }
+ // Take only the last 16 bytes (prop names max is 32)
+ if(strlen(c) < 15) {
+ strcpy(comm, c);
+ } else {
+ strcpy(comm, c + strlen(c) - 15);
+ }
+
+
//That's calling ourselves but that's fine because we already have self_ok = true
char propName[PROP_NAME_MAX];
memset(propName, 0, PROP_NAME_MAX);
strncpy(propName, "debug.phh.props.", PROP_NAME_MAX - 1);
- strncat(propName, comm, PROP_NAME_MAX - 1);
+ strncat(propName, comm, PROP_NAME_MAX - strlen(propName) - 1);
+ //async_safe_format_log(ANDROID_LOG_WARN, "libc", "Reading debug prop %s", propName);
__system_property_get(propName, comm_override);
}
+static const char* redirectToProp(const char *name) {
+ read_self();
+ /*if(strstr(name, "ro.keymaster") != nullptr || strstr(name, "security_patch") != nullptr || strstr(name, "release") != nullptr) {
+ async_safe_format_log(ANDROID_LOG_WARN, "libc", "Process/comm %s/%s is reading %s", comm, comm_override, name);
+ }*/
+ if(strcmp(comm_override, "vendor") == 0) {
+ if(strcmp(name, "ro.product.device") == 0) {
+ return "ro.product.vendor.device";
+ }
+ if(strcmp(name, "ro.product.manufacturer") == 0) {
+ return "ro.product.vendor.manufacturer";
+ }
+ }
+ if(strcmp(comm_override, "keymaster") == 0) {
+ if(strcmp(name, "ro.product.model") == 0) {
+ return "ro.keymaster.mod";
+ }
+ if(strcmp(name, "ro.product.brand") == 0) {
+ return "ro.keymaster.brn";
+ }
+ if(strcmp(name, "ro.build.version.release") == 0) {
+ return "ro.keymaster.xxx.release";
+ }
+ if(strcmp(name, "ro.build.version.security_patch") == 0) {
+ return "ro.keymaster.xxx.security_patch";
+ }
+ }
+ return name;
+}
+
static bool is_dir(const char* pathname) {
struct stat info;
if (stat(pathname, &info) == -1) {
@@ -150,17 +198,19 @@ uint32_t SystemProperties::AreaSerial() {
}
const prop_info* SystemProperties::Find(const char* name) {
+ const char* newName = redirectToProp(name);
+
if (!initialized_) {
return nullptr;
}
- prop_area* pa = contexts_->GetPropAreaForName(name);
+ prop_area* pa = contexts_->GetPropAreaForName(newName);
if (!pa) {
async_safe_format_log(ANDROID_LOG_WARN, "libc", "Access denied finding property \"%s\"", name);
return nullptr;
}
- return pa->find(name);
+ return pa->find(newName);
}
static bool is_read_only(const char* name) {
@@ -243,17 +293,6 @@ void SystemProperties::ReadCallback(const prop_info* pi,
}
int SystemProperties::Get(const char* name, char* value) {
- read_self();
- if(strcmp(comm_override, "vendor") == 0) {
- if(strcmp(name, "ro.product.device") == 0) {
- int r = Get("ro.product.vendor.device", value);
- if(r>0) return r;
- }
- if(strcmp(name, "ro.product.manufacturer") == 0) {
- int r = Get("ro.product.vendor.manufacturer", value);
- if(r>0) return r;
- }
- }
const prop_info* pi = Find(name);
if (pi != nullptr) {
--
2.25.1

View File

@@ -1,4 +1,4 @@
From f8173b19f4197fc7858d5d968cebd198855a14a1 Mon Sep 17 00:00:00 2001
From 2330b72eb800da35252c67dd77743b800afda581 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 5 Oct 2021 17:59:16 -0400
Subject: [PATCH 01/35] Fallback to stupid autobrightness if brightness values

View File

@@ -1,4 +1,4 @@
From 943fd5f9ad41ea7c389a7fb66bd99527870bd834 Mon Sep 17 00:00:00 2001
From c884f4408bfa11bb74c4e45be03ad779fc1fc367 Mon Sep 17 00:00:00 2001
From: Raphael Mounier <mounierr07@gmail.com>
Date: Sat, 6 Aug 2022 18:08:36 +0200
Subject: [PATCH 02/35] Fix env empty string - ANDROID_STORAGE

View File

@@ -1,4 +1,4 @@
From 7a8367b927b9763fb048d708805ae23dd5032fbc Mon Sep 17 00:00:00 2001
From 1c5e8be3e95808111d4dcd609ecbdc87cafdb21a Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 28 Nov 2017 18:28:04 +0100
Subject: [PATCH 03/35] Relax requirement for visible flag to sdcards

View File

@@ -1,7 +1,7 @@
From 6ed0e4c93d9ed801924a2f7c34d05cfdf3397013 Mon Sep 17 00:00:00 2001
From d0bc6f39e045548dfa57a5721fd1c804924cf560 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 17 May 2018 20:28:35 +0200
Subject: [PATCH 05/35] Don't crash if there is IR HAL is not declared
Subject: [PATCH 04/35] Don't crash if there is IR HAL is not declared
Change-Id: I3afded27441bbee8244d5fda544b3e6d1238dc1b
---

View File

@@ -1,7 +1,7 @@
From a9638d5d5e81d220ab0a49a0d4f1c53eb8901f9e Mon Sep 17 00:00:00 2001
From fc7659b79e984f11d276f068792325b79c98be91 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 1 Jun 2022 16:56:20 -0400
Subject: [PATCH 06/35] Implement a persistent property to override the default
Subject: [PATCH 05/35] Implement a persistent property to override the default
primary camera (0)
Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b

View File

@@ -1,7 +1,7 @@
From d5ebcae00b09c3ee45ef9a5ad44da456d3ad1db6 Mon Sep 17 00:00:00 2001
From 88e9191c8c4c75d9b2decfe56fede580b0c887bf Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 6 Aug 2018 12:49:00 +0200
Subject: [PATCH 07/35] Show APN Settings for CDMA carriers
Subject: [PATCH 06/35] Show APN Settings for CDMA carriers
---
telephony/java/android/telephony/CarrierConfigManager.java | 2 +-

View File

@@ -1,7 +1,7 @@
From 5266fe30bf9b7a19220d68bd4a0998d2464fc0d2 Mon Sep 17 00:00:00 2001
From 61b0cf3fa2c541af9789e544c480c2cc1e22fcc9 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 8 Nov 2018 23:04:03 +0100
Subject: [PATCH 08/35] Re-order services so that it works even without qtaguid
Subject: [PATCH 07/35] Re-order services so that it works even without qtaguid
Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df
---

View File

@@ -1,7 +1,7 @@
From 285af2fd4f0f782390cbbd24485d3645c22a1cbb Mon Sep 17 00:00:00 2001
From d293c5c287d31e0db28cc29d8b2e01d9e22e2e26 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 24 Mar 2019 23:05:14 +0100
Subject: [PATCH 09/35] Support samsung Pie and Q light hal
Subject: [PATCH 08/35] Support samsung Pie and Q light hal
Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6
---

View File

@@ -1,7 +1,7 @@
From 6f95d47885a2d4a8586bf9c3b56bbc9f9b4814df Mon Sep 17 00:00:00 2001
From 14efbe6b41852fea066064f71673b57fbadb32a3 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 12 Aug 2019 23:08:26 +0200
Subject: [PATCH 10/35] Add support for samsung touch, physical and hover
Subject: [PATCH 09/35] Add support for samsung touch, physical and hover
proximity sensor as fallback to real proximity sensor
Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865

View File

@@ -1,7 +1,7 @@
From 5ae82f9e13a66acdbcaee9aa9ce7190d94c16fd8 Mon Sep 17 00:00:00 2001
From b04d51fd445cbe8a4004b87b7f95846328897e60 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 5 Apr 2020 16:32:46 +0200
Subject: [PATCH 11/35] Always allow overriding the number of work profiles
Subject: [PATCH 10/35] Always allow overriding the number of work profiles
Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a
---

View File

@@ -1,7 +1,7 @@
From 895f6b5d236f65142b2fa2224ed1970656da0389 Mon Sep 17 00:00:00 2001
From 4cc199d4054257bbb429d4ab52bb27083bad67b6 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 6 Jun 2020 18:21:56 +0200
Subject: [PATCH 12/35] HOME deserves to wake-up devices just as well as back
Subject: [PATCH 11/35] HOME deserves to wake-up devices just as well as back
and menu
Change-Id: Ia562bafd8c620d00c17e8eb338e4701c6c4a3c3a

View File

@@ -1,7 +1,7 @@
From 9f2b4ccb9c3192e58c4294a59a2b9ea07984e357 Mon Sep 17 00:00:00 2001
From 20a9d35770482af853a9c64e99e1190be6867011 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 29 Sep 2020 22:39:47 +0200
Subject: [PATCH 13/35] Some devices have proximity sensor reporting NaN as max
Subject: [PATCH 12/35] Some devices have proximity sensor reporting NaN as max
range for some reason. Make them behave standard way by setting 5 cm
Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612

View File

@@ -1,7 +1,7 @@
From 8a1150fa5061085d2ebd9fef09ac6e37c2f95c09 Mon Sep 17 00:00:00 2001
From 6d4ba0b134dfe1113505224fcf48dc8119a1e952 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 29 Sep 2020 22:40:10 +0200
Subject: [PATCH 14/35] Fix brightness range not being complete on Samsung
Subject: [PATCH 13/35] Fix brightness range not being complete on Samsung
devices
On some devices, minimum brightness is 0, which totally messes with

View File

@@ -1,7 +1,7 @@
From 816006c568ab3008e1d7a88d4d15dd082dbcc7f7 Mon Sep 17 00:00:00 2001
From c8ec111caa612f539f3e1b0983759f83e6861d1f Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 25 Oct 2020 23:57:26 +0100
Subject: [PATCH 15/35] Re-implement fnmatch-like behaviour for RRO java-side
Subject: [PATCH 14/35] Re-implement fnmatch-like behaviour for RRO java-side
T: Also apply to FrameworkParsingPackageUtils (@PeterCxy)

View File

@@ -1,7 +1,7 @@
From b82b1a7a33beb82bf1a7d4bb9ab5014e7120e1e7 Mon Sep 17 00:00:00 2001
From 1b2a59d087aa6a2fcb3562b57695c829a1a1b5de Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 6 Dec 2020 12:20:08 +0100
Subject: [PATCH 16/35] Make rounded corners padding overridable with
Subject: [PATCH 15/35] Make rounded corners padding overridable with
persist.sys.phh.rounded_corners_padding
Change-Id: I481c1c8849b2f22a7cdfb2896a6d3c2e7e3b44d9

View File

@@ -1,7 +1,7 @@
From 8f63e465b1ddaa84bab57b824d61c2ec6986819b Mon Sep 17 00:00:00 2001
From e39dbb92a052a6bccc3d8f118d8c476533917bd0 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 11 Dec 2020 14:41:09 +0100
Subject: [PATCH 17/35] Remove useless notification about "console" service
Subject: [PATCH 16/35] Remove useless notification about "console" service
being running
---
@@ -9,10 +9,10 @@ Subject: [PATCH 17/35] Remove useless notification about "console" service
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index df5113b16f49..5740e7e23723 100644
index 968ff933ed74..652545d047c0 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5169,7 +5169,7 @@ public class ActivityManagerService extends IActivityManager.Stub
@@ -5172,7 +5172,7 @@ public class ActivityManagerService extends IActivityManager.Stub
}
private void showConsoleNotificationIfActive() {

View File

@@ -1,7 +1,7 @@
From 2d14422205d961a92711afa56ead9b2ea2d6c4cb Mon Sep 17 00:00:00 2001
From 96c21322cf5dd1081f01d619d89cc811ca2ead58 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 16 Dec 2020 21:24:12 +0800
Subject: [PATCH 18/35] Revert "Remove unused SystemProperties.set"
Subject: [PATCH 17/35] Revert "Remove unused SystemProperties.set"
This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f.

View File

@@ -1,7 +1,7 @@
From 24238287f42ac9c03c521e155c05a06556284d2e Mon Sep 17 00:00:00 2001
From d509cc6f47e8f6dbf4d2d1900410620a9b01afbb Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 16 Dec 2020 13:46:15 +0800
Subject: [PATCH 19/35] TelephonyManager: bring back getNetworkClass()
Subject: [PATCH 18/35] TelephonyManager: bring back getNetworkClass()
This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf.

View File

@@ -1,7 +1,7 @@
From 8a6def47510623a545ef3682dac7c6d434351b53 Mon Sep 17 00:00:00 2001
From 561aafa1108f69107b462061106f6346d540bfba Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 16 Dec 2020 21:26:45 +0800
Subject: [PATCH 20/35] TelephonyManager: add API annotations for
Subject: [PATCH 19/35] TelephonyManager: add API annotations for
setTelephonyProperty
* This method was added back by reverting commit

View File

@@ -1,7 +1,7 @@
From 95c0d229e1c77a7011bb0a75525b3d52ebd95f8d Mon Sep 17 00:00:00 2001
From 43fbc94d133165e33c6e81f1526951841ff59564 Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Tue, 2 Feb 2021 10:20:51 +0000
Subject: [PATCH 21/35] Fix Wakelock issue
Subject: [PATCH 20/35] Fix Wakelock issue
Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only releasing a wakelock that was not already released
---

View File

@@ -1,7 +1,7 @@
From df9f9f61c1f7c8e454a90ba0d8b15f8d3217983a Mon Sep 17 00:00:00 2001
From a588cdbf51f8086b17b860227232ef49659439b2 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 20 Mar 2021 14:31:01 +0100
Subject: [PATCH 22/35] Automatically detect pick up sensor, so that an overlay
Subject: [PATCH 21/35] Automatically detect pick up sensor, so that an overlay
is required for the sole purpose of enabling pulse doze on pick up sensor
---

View File

@@ -1,7 +1,7 @@
From 1e88b787a1b40f2258ba06dc9cade02b6ff39ace Mon Sep 17 00:00:00 2001
From fa43a8201a8b4f512da418fe95d5d40f5f424f7e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 23 Mar 2021 19:43:26 +0100
Subject: [PATCH 23/35] Catch broken mainBuiltInDisplayCutoutRectApproximation
Subject: [PATCH 22/35] Catch broken mainBuiltInDisplayCutoutRectApproximation
Some devices (Redmi Note 9T) have:
mainBuiltInDisplayCutoutRectApproximation = @android:mainBuiltInDisplayCutout

View File

@@ -1,7 +1,7 @@
From abf8e674797c3115ac588d730294498a1c967389 Mon Sep 17 00:00:00 2001
From a8e8cbc3faa7960d7442089108a4785e7de6a423 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 24 Mar 2018 08:01:48 +0100
Subject: [PATCH 24/35] backlight: Fix backlight control on Galaxy S9(+)
Subject: [PATCH 23/35] backlight: Fix backlight control on Galaxy S9(+)
Change-Id: I1fbbb47939c377597ef8ad6b88b2acea5f4acaa6

View File

@@ -1,7 +1,7 @@
From 5708ccd78a837211c184808a83fdb5728620d716 Mon Sep 17 00:00:00 2001
From 2a123e2e0dbd76d9c39c9990de8bc94bcbde0007 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 4 Sep 2021 08:26:30 +0000
Subject: [PATCH 25/35] Revert "Switch long-press power behavior in AOSP."
Subject: [PATCH 24/35] Revert "Switch long-press power behavior in AOSP."
This reverts commit 803c77a0a24624111944832098c6f65158051dc4.
---

View File

@@ -1,7 +1,7 @@
From 8e6b31e1dc663e67e5b37b3f648e9833ae5a0ed1 Mon Sep 17 00:00:00 2001
From a081e548874a62da042d24e5da4450de6386bf69 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 27 Dec 2021 17:57:11 -0500
Subject: [PATCH 26/35] Once we integrate Samsung Power hal in libpowermanager,
Subject: [PATCH 25/35] Once we integrate Samsung Power hal in libpowermanager,
libpowermanager and its deps require linking against
vendor.samsung.hardware.miscpower@2.0

View File

@@ -1,7 +1,7 @@
From 00242c1479803645f0b4ee6983dc435e6c56dd69 Mon Sep 17 00:00:00 2001
From 2d1281984c28e05e9e646d7c6e225ae36f9b7677 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 2 Apr 2022 18:04:01 -0400
Subject: [PATCH 27/35] Allow disabling of fingerprint cleanups, needed on some
Subject: [PATCH 26/35] Allow disabling of fingerprint cleanups, needed on some
Realme devices that cant enumerate
---

View File

@@ -1,7 +1,7 @@
From f22c8359d376992a55fcfd366268ec42ffc5cbdf Mon Sep 17 00:00:00 2001
From 465b5ea6e0e6e229f0a126d947e08be4e308fa47 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Fri, 17 Dec 2021 17:16:14 -0500
Subject: [PATCH 28/35] Reduce the size of udfps enroll progress bar. Some
Subject: [PATCH 27/35] Reduce the size of udfps enroll progress bar. Some
devices have their udfps pretty low, and the progress bar would make the icon
at the wrong place

View File

@@ -1,7 +1,7 @@
From 347ac13d5fcd6c7249212827c2cd403fdc238eb3 Mon Sep 17 00:00:00 2001
From 5cb358f01b28245377a8f00b5ed670eec3817024 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 20 Dec 2021 15:01:41 -0500
Subject: [PATCH 29/35] Dynamically resize boot animation to match screen size
Subject: [PATCH 28/35] Dynamically resize boot animation to match screen size
Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205
---
@@ -9,10 +9,10 @@ Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205
1 file changed, 20 insertions(+)
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 50c8e933d25f..cb1818729157 100644
index 9fb8b696b978..ab662611b64d 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -583,6 +583,26 @@ status_t BootAnimation::readyToRun() {
@@ -600,6 +600,26 @@ status_t BootAnimation::readyToRun() {
mFlingerSurface = s;
mTargetInset = -1;

View File

@@ -1,7 +1,7 @@
From 26c09ef28bc48c592cb5ae6e4804b0e8b8e39911 Mon Sep 17 00:00:00 2001
From 4d6edeb45040d2443723ff7933db7ee86d332679 Mon Sep 17 00:00:00 2001
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
Date: Sat, 15 Oct 2022 09:33:56 +0000
Subject: [PATCH 30/35] Revert "Remove more FDE methods from StorageManager"
Subject: [PATCH 29/35] Revert "Remove more FDE methods from StorageManager"
This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676.
---

View File

@@ -1,7 +1,7 @@
From 3e2cd958145b810f17b334208c6a01fbaa7e57a6 Mon Sep 17 00:00:00 2001
From 3d8a59fa4c6cb7230e3fa0391384016602fe88e3 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sat, 3 Dec 2022 17:13:24 -0500
Subject: [PATCH 31/35] Set old fingerprint sensors to security "strong"
Subject: [PATCH 30/35] Set old fingerprint sensors to security "strong"
This allows removing config_biometric_sensors from overlays, which led
to Pixels not booting, because they are using AIDL biometric sensor, and

View File

@@ -1,7 +1,7 @@
From efddf3d701ed0d2ae648c9cfed33550a08fcb529 Mon Sep 17 00:00:00 2001
From 81a9631cd24aeb44d261f7f862db7e30b058e690 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Wed, 14 Dec 2022 17:21:00 -0500
Subject: [PATCH 32/35] Call Samsung's ISehSysInputDev to report screen state
Subject: [PATCH 31/35] Call Samsung's ISehSysInputDev to report screen state
to touchscreen driver
This fixes touchscreen not waking up on Galaxy F23

View File

@@ -1,7 +1,7 @@
From df69b89ddbbd4b66ef07e6e3abbef9a0dedcd4c9 Mon Sep 17 00:00:00 2001
From 10f0cde830ba4ed97a7a486ee03bd64b4671432e Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Thu, 15 Dec 2022 15:54:50 -0500
Subject: [PATCH 33/35] Fixup of c50777 -- original commit only cares about R
Subject: [PATCH 32/35] Fixup of c50777 -- original commit only cares about R
vendors, but not about older ones. Apply that on older ones as well
---

View File

@@ -1,7 +1,7 @@
From 96856d788adcfdf9b49b93b05509e816890dcfe7 Mon Sep 17 00:00:00 2001
From a56d88a596e6419fd180c9c12a8e5d02633618ea Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 18 Dec 2022 18:20:40 -0500
Subject: [PATCH 34/35] FOD support for Asus ZF8 and Samsung devices
Subject: [PATCH 33/35] FOD support for Asus ZF8 and Samsung devices
Thanks Asus for providing a free device to make this support
And thanks @davigamer987 for donating enough to get a Samsung FOD device

View File

@@ -1,7 +1,7 @@
From 43a802cfe0f99bb7735ae2280e3bc522a68c3442 Mon Sep 17 00:00:00 2001
From e7b80f4e36a6bcd7d09e87c3a1dd8e8a66369f15 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Tue, 3 Jan 2023 17:59:00 -0500
Subject: [PATCH 35/35] Always add HIDL fingerprint config (Galaxy A53 is
Subject: [PATCH 34/35] Always add HIDL fingerprint config (Galaxy A53 is
missing it on A12 vendor) -- but first enumerate AIDL
---

View File

@@ -0,0 +1,38 @@
From 6f1f5fffb19c27bbbc3ca1498a4c3a001a2839af Mon Sep 17 00:00:00 2001
From: ItsLynix <71310187+ItsLynix@users.noreply.github.com>
Date: Sat, 28 Jan 2023 10:25:16 +0100
Subject: [PATCH 35/35] SystemUI: Implement alternate brightness path for FOD
---
.../com/android/systemui/biometrics/UdfpsView.kt | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
index d591cc809129..d2e98c181260 100644
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
@@ -222,8 +222,19 @@ Log.d("PHH", "Surface destroyed!")
mySurfaceView.setVisibility(VISIBLE)
Log.d("PHH", "setting surface visible!")
- val brightness = File("/sys/class/backlight/panel0-backlight/brightness").readText().toDouble()
- val maxBrightness = File("/sys/class/backlight/panel0-backlight/max_brightness").readText().toDouble()
+ val brightnessFile = File("/sys/class/backlight/panel/brightness")
+ val maxBrightnessFile = File("/sys/class/backlight/panel/max_brightness")
+
+ var brightness: Double = 0.0
+ var maxBrightness: Double = 0.0
+
+ if (brightnessFile.exists() && maxBrightnessFile.exists()) {
+ brightness = brightnessFile.readText().toDouble()
+ maxBrightness = maxBrightnessFile.readText().toDouble()
+ } else {
+ brightness = File("/sys/class/backlight/panel0-backlight/brightness").readText().toDouble()
+ maxBrightness = File("/sys/class/backlight/panel0-backlight/max_brightness").readText().toDouble()
+ }
// Assume HBM is max brightness
val dim = 1.0 - Math.pow( (brightness / maxBrightness), 1/2.3);
--
2.25.1

View File

@@ -1,57 +0,0 @@
From dcad1b16c4352152f9dc1a552c61d9e40dc556ae Mon Sep 17 00:00:00 2001
From: "tzu-hsien.huang" <tzu-hsien.huang@mediatek.com>
Date: Wed, 20 Jul 2022 15:12:01 +0800
Subject: [PATCH 1/6] Additionally check le_set_event_mask command resturn
status with UNSUPPORTED_LMP_OR_LL_PARAMETER
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In GD BT stack, stack will check each return status of HCI Commands. E.g. reset , le_set_event_mask, set_event_mask …etc.
In BT spec 5.2, SIG add some parameters for le_set_event_mask for le audio, like LE Terminate BIG Complete event: Supported.
However, some legacy chips do not support LE Audio feature, and controller will return Status: Unsupported LMP Parameter Value when it receives this HCI Command
When it checks the return value and find the status is not SUCCESS, it will cause FAIL and cannot be compatible with old legacy chip.
After brushing GSI, Bluetooth will turn off automatically when it is turned on.
So all CTS test will always fail.
Check le_set_event_mask command return status with SUCCESS or UNSUPPORTED_LMP_OR_LL_PARAMETER
Bug: 239662211
Test: CtsBluetoothTestCases
Change-Id: I2b0cede7f47eecd2124a386e958773289eb6f11c
---
system/gd/hci/controller.cc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc
index 3827f83a91..221cd88883 100644
--- a/system/gd/hci/controller.cc
+++ b/system/gd/hci/controller.cc
@@ -540,7 +540,7 @@ struct Controller::impl {
void le_set_event_mask(uint64_t le_event_mask) {
std::unique_ptr<LeSetEventMaskBuilder> packet = LeSetEventMaskBuilder::Create(le_event_mask);
hci_->EnqueueCommand(std::move(packet), module_.GetHandler()->BindOnceOn(
- this, &Controller::impl::check_status<LeSetEventMaskCompleteView>));
+ this, &Controller::impl::check_event_mask_status<LeSetEventMaskCompleteView>));
}
template <class T>
@@ -551,6 +551,15 @@ struct Controller::impl {
ASSERT(status_view.GetStatus() == ErrorCode::SUCCESS);
}
+ template <class T>
+ void check_event_mask_status(CommandCompleteView view) {
+ ASSERT(view.IsValid());
+ auto status_view = T::Create(view);
+ ASSERT(status_view.IsValid());
+ ASSERT(status_view.GetStatus() == ErrorCode::SUCCESS ||
+ status_view.GetStatus() == ErrorCode::UNSUPPORTED_LMP_OR_LL_PARAMETER);
+ }
+
#define OP_CODE_MAPPING(name) \
case OpCode::name: { \
uint16_t index = (uint16_t)OpCodeIndex::name; \
--
2.25.1

View File

@@ -1,7 +1,7 @@
From 6edbbb2571aaca0bb647c2c7675458e831030859 Mon Sep 17 00:00:00 2001
From 167d1cb02b7f5a350d630bcc85ef0e2953d0db89 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 24 Aug 2022 15:45:18 -0400
Subject: [PATCH 3/6] audio_hal_interface: Optionally use sysbta HAL
Subject: [PATCH 1/4] audio_hal_interface: Optionally use sysbta HAL
Required to support sysbta, our system-side bt audio implementation.

View File

@@ -1,7 +1,7 @@
From b6a2f8949f5be232b779d77bf36de950f7363340 Mon Sep 17 00:00:00 2001
From cc0c1e63f020b11244bea29508619c3f382d5f69 Mon Sep 17 00:00:00 2001
From: Alberto Ponces <ponces26@gmail.com>
Date: Thu, 17 Jun 2021 15:48:53 +0100
Subject: [PATCH 4/6] Add option to change eSCO Transport Unit Size
Subject: [PATCH 2/4] Add option to change eSCO Transport Unit Size
Fixes Bluetooth calls on some Samsung devices if set to 16.

View File

@@ -1,43 +0,0 @@
From 3d5a4947f5dfb9e976edad36f871ea736976e0b8 Mon Sep 17 00:00:00 2001
From: Peter Cai <peter@typeblog.net>
Date: Wed, 24 Aug 2022 10:41:29 -0400
Subject: [PATCH 2/6] gd: hci: Ignore unexpected status events
For some reason, on some old devices, the controller will report a
remote to support SNIFF_SUBRATING even when it does not. Just ignore the
error here (the status event comes from the failure response).
Change-Id: Ifb9a65fd77f21d15a8dc1ced9240194d38218ef6
---
system/gd/hci/hci_layer.cc | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/system/gd/hci/hci_layer.cc b/system/gd/hci/hci_layer.cc
index bc7f8979ba..4090cfb36e 100644
--- a/system/gd/hci/hci_layer.cc
+++ b/system/gd/hci/hci_layer.cc
@@ -195,14 +195,13 @@ struct HciLayer::impl {
EventView::Create(PacketView<kLittleEndian>(std::make_shared<std::vector<uint8_t>>(std::vector<uint8_t>()))));
command_queue_.front().GetCallback<CommandCompleteView>()->Invoke(move(command_complete_view));
} else {
- ASSERT_LOG(
- command_queue_.front().waiting_for_status_ == is_status,
- "0x%02hx (%s) was not expecting %s event",
- op_code,
- OpCodeText(op_code).c_str(),
- logging_id.c_str());
-
- command_queue_.front().GetCallback<TResponse>()->Invoke(move(response_view));
+ if (command_queue_.front().waiting_for_status_ == is_status) {
+ command_queue_.front().GetCallback<TResponse>()->Invoke(move(response_view));
+ } else {
+ CommandCompleteView command_complete_view = CommandCompleteView::Create(
+ EventView::Create(PacketView<kLittleEndian>(std::make_shared<std::vector<uint8_t>>(std::vector<uint8_t>()))));
+ command_queue_.front().GetCallback<CommandCompleteView>()->Invoke(move(command_complete_view));
+ }
}
command_queue_.pop_front();
--
2.25.1

View File

@@ -1,7 +1,7 @@
From 62ef4e9e0f4cd9351548d3f9cbbcc481a2e63fb1 Mon Sep 17 00:00:00 2001
From 4caae29b750758de788974e6d2e315123624af1c Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 17 Oct 2021 17:17:13 -0400
Subject: [PATCH 5/6] Don't abort when failing to get real-time priority
Subject: [PATCH 3/4] Don't abort when failing to get real-time priority
On some devices (like OP6), for unknown reason, trying to go to realtime
fails with EPERM.

View File

@@ -1,7 +1,7 @@
From f5e0fe3541a56963e5cdaeb4d1f969a6c49f11b2 Mon Sep 17 00:00:00 2001
From 304b0cb0b164950c63ecd4e1e4f80d4d0a3f7a3d Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Sat, 12 Nov 2022 00:35:46 +0000
Subject: [PATCH 6/6] On Samsung devices, we need to tell Audio HAL if we're
Subject: [PATCH 4/4] On Samsung devices, we need to tell Audio HAL if we're
running narrow band or wide band
Ported to Android 13.