From a1bf91548791dc4d2daa8e57d00a5d13f860f2b9 Mon Sep 17 00:00:00 2001 From: Shashwat Razdan Date: Tue, 5 Mar 2024 23:45:49 -0800 Subject: [PATCH 01/11] Adding android.software.contextualsearch to gs-101 devices. Bug: 326143814 Test: Built and tested on device (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4ff9169f2f92191802e70fadb83810d03d2e9952) Merged-In: Id45a24ec3361caade132836e5e849940efa6ac2c Change-Id: Id45a24ec3361caade132836e5e849940efa6ac2c --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 9edf65e8..4df284d1 100644 --- a/device.mk +++ b/device.mk @@ -239,6 +239,7 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \ frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \ + frameworks/native/data/etc/android.software.contextualsearch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.contextualsearch.xml \ frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \ frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml From b089fb2aab75b1f0e362c62f0a6f10fc1837cfef Mon Sep 17 00:00:00 2001 From: Daniel Chapin Date: Tue, 5 Mar 2024 00:55:40 +0000 Subject: [PATCH 02/11] Revert "Add betterbug mk to gs101" Revert submission 26348985-bb-sepolicy-poc Reason for revert: Droidfood blocking bug: b/327991669 Bug: b/327991669 Reverted changes: /q/submissionid:26348985-bb-sepolicy-poc (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a43fedce4ef60251336a86c470250b2dfb8c9f3e) Merged-In: I88a445da895c373c0a53c8a2f08726582c27be77 Change-Id: I88a445da895c373c0a53c8a2f08726582c27be77 --- device.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/device.mk b/device.mk index 4df284d1..3f642856 100644 --- a/device.mk +++ b/device.mk @@ -36,7 +36,6 @@ include device/google/gs-common/sota_app/factoryota.mk include device/google/gs-common/misc_writer/misc_writer.mk include device/google/gs-common/gyotaku_app/gyotaku.mk include device/google/gs-common/bootctrl/bootctrl_aidl.mk -include device/google/gs-common/betterbug/betterbug.mk ifneq ($(filter oriole raven bluejay, $(TARGET_PRODUCT)),) include device/google/gs-common/bcmbt/dump/dumplog.mk endif From d52185d3619618ed216d5f82f623527adce10e82 Mon Sep 17 00:00:00 2001 From: Jack Wu Date: Fri, 22 Mar 2024 21:00:04 +0800 Subject: [PATCH 03/11] Update health AIDL HAL to V3 Bug: 328332299 Test: TH Test: vts-tradefed run vts -m vts_treble_vintf_vendor_test Signed-off-by: Jack Wu (cherry picked from https://android-review.googlesource.com/q/commit:f143d6803bd64b123306788e4e02670a829c3258) Merged-In: I57ff2ec2758f965a9e13e53f223c735a9d102219 Change-Id: I57ff2ec2758f965a9e13e53f223c735a9d102219 --- health/android.hardware.health-service.gs101.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/health/android.hardware.health-service.gs101.xml b/health/android.hardware.health-service.gs101.xml index 1fe9b8d2..2acaabac 100644 --- a/health/android.hardware.health-service.gs101.xml +++ b/health/android.hardware.health-service.gs101.xml @@ -1,7 +1,7 @@ android.hardware.health - 2 + 3 IHealth/default From f34142e084c4881683fab2f5a4c127a7bd227947 Mon Sep 17 00:00:00 2001 From: Jim Tang Date: Wed, 5 Jun 2024 11:17:57 +0800 Subject: [PATCH 04/11] Make SUPPORT_MULTI_SIM recognizable in bp This commit establishes a soong config variable `sim_count` for easier converting Android.mk to Android.bp when dealing with multiple SIMs. Bug: 343823190 Test: presubmit Change-Id: I8226003df3d9f669df6e2af12310ad73e5786a74 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 3022a347..c50291b4 100644 --- a/device.mk +++ b/device.mk @@ -904,6 +904,7 @@ endif # Exynos RIL and telephony # Multi SIM(DSDS) SIM_COUNT := 2 +$(call soong_config_set,sim,sim_count,$(SIM_COUNT)) SUPPORT_MULTI_SIM := true # Support NR SUPPORT_NR := true From 1b51d6b7987d1e98e680ad603d442c0f41cfb74b Mon Sep 17 00:00:00 2001 From: Dennis Shen Date: Wed, 5 Jun 2024 12:59:23 +0000 Subject: [PATCH 05/11] switch over to use new storage read api instead of server_configurable_flags, this new read api lib will be needed for new codegened aconfig flag lib. Bug: 321077378 Test m and avd Change-Id: Ieab46eb2561f910be2bf016fe4c63062a4e31a66 --- usb/usb/Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/usb/usb/Android.bp b/usb/usb/Android.bp index 5afdcc66..fa7a07f7 100644 --- a/usb/usb/Android.bp +++ b/usb/usb/Android.bp @@ -52,6 +52,7 @@ cc_binary { "libbinder_ndk", "libprotobuf-cpp-lite", "server_configurable_flags", + "libaconfig_storage_read_api_cc", ], static_libs: [ "libpixelusb", From cd0c17add9e97c542b0e4fcaa17aa157cb2c499e Mon Sep 17 00:00:00 2001 From: Utku Utkan Date: Wed, 5 Jun 2024 04:47:33 +0000 Subject: [PATCH 06/11] Remove ACCESS_FINE_LOCATION permission pregrant for PCS on G1 FLAG: EXEMPT Cleanup of obsolete permission pregrant Bug: 345021501 Test: m && flashall Change-Id: I8090d8a87605d2a60d57e14212e07625213a4088 --- default-permissions.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/default-permissions.xml b/default-permissions.xml index 03fdec2d..3ba60117 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -55,7 +55,6 @@ - From 4a42718d8a4f83b0a340f798a06a60dd85173255 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Thu, 23 May 2024 06:40:35 +0000 Subject: [PATCH 07/11] Update IDisplay to V12 Test: trigger test build Bug: 309897479 Change-Id: I338c9d05cd7b202e015288c4bd8e136d30304161 Signed-off-by: Leo Chen --- device_framework_matrix_product.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index de5f3b4c..95c2113a 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -78,7 +78,7 @@ com.google.hardware.pixel.display - 11-12 + 12 IDisplay default From 6f6ad28270d93d31e6722324bcdfd920f1247a38 Mon Sep 17 00:00:00 2001 From: chenkris Date: Mon, 10 Jun 2024 17:24:28 +0000 Subject: [PATCH 08/11] gs101: build fingerprint dump Bug: 346450599 Test: adb bugreport Change-Id: I5a3d508592e9fed10e429d57c6c7068e0ce0d918 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 3df64ff1..8df5b3fe 100644 --- a/device.mk +++ b/device.mk @@ -40,6 +40,7 @@ include device/google/gs-common/betterbug/betterbug.mk ifneq ($(filter oriole raven bluejay, $(TARGET_PRODUCT)),) include device/google/gs-common/bcmbt/dump/dumplog.mk endif +include device/google/gs-common/fingerprint/fingerprint.mk TARGET_BOARD_PLATFORM := gs101 DEVICE_IS_64BIT_ONLY ?= $(if $(filter %_64,$(TARGET_PRODUCT)),true,false) From 4ff69cacdffe20e3fa511020c6aa33102028d7b4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 12 Jun 2024 12:18:48 +0000 Subject: [PATCH 09/11] Enable pkvm based on the relevant sysprop rather than /dev/kvm 1. This is simpler, as it can be triggered by logic in the init.rc 2. The old method of probing /dev/kvm fails if non-protected kvm is enabled: the device will exist, but pkvm is not enable Bug: 346525496 Test: observe that pkvm is enabled after double reboot Change-Id: I2f557ed56f13458a288ede34e672692b511b6bc9 --- pkvm/pkvm_enabler.c | 18 +----------------- pkvm/pkvm_enabler.gs101.rc | 7 ++++++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/pkvm/pkvm_enabler.c b/pkvm/pkvm_enabler.c index cb14ba6f..b927318c 100644 --- a/pkvm/pkvm_enabler.c +++ b/pkvm/pkvm_enabler.c @@ -24,7 +24,6 @@ #include -#define KVM_DEVICE "/dev/kvm" #define MISC_WRITER "/vendor/bin/misc_writer" int main() { @@ -33,22 +32,7 @@ int main() { pid_t pid; int ret, wstatus; - /* Check whether KVM device exists. */ - ret = access(KVM_DEVICE, F_OK); - - /* If KVM device exists, return SUCCESS to continue booting. */ - if (ret == 0) { - exit(EXIT_SUCCESS); - } - - if (ret != -ENOENT) { - ALOGW("Unexpected error from access(): %d", ret); - } - - /* - * If KVM device does not exist, run misc_writer and return FAILURE - * to force a reboot. - */ + /* Run misc_writer and return FAILURE to force a reboot. */ pid = fork(); if (pid == -1) { ALOGE("Could not fork: %d", errno); diff --git a/pkvm/pkvm_enabler.gs101.rc b/pkvm/pkvm_enabler.gs101.rc index 6695d3a3..4e64d4ba 100644 --- a/pkvm/pkvm_enabler.gs101.rc +++ b/pkvm/pkvm_enabler.gs101.rc @@ -2,5 +2,10 @@ service pkvm_enabler /vendor/bin/pkvm_enabler reboot_on_failure reboot,pkvm-not-enabled user root -on early-init +# Old bootloaders do not set the protected_vm sysprop when pkvm is disabled +on early-init && property:ro.boot.hypervisor.protected_vm.supported= + exec_start pkvm_enabler + +# New bootloaders set the protected_vm sysprop to 0 when pkvm is disabled +on early-init && property:ro.boot.hypervisor.protected_vm.supported=0 exec_start pkvm_enabler From 744c86c49a9ff9e29e2193cdc5079b27d5e06ec3 Mon Sep 17 00:00:00 2001 From: Kyle Tso Date: Wed, 12 Jun 2024 17:14:02 +0800 Subject: [PATCH 10/11] usb: Add retry on role switch Bug: 341996696 Change-Id: I8caa65288af1588d24fea4aa6c5768d45d69bbd5 Signed-off-by: Kyle Tso (cherry picked from commit ef5856a4474002cc35a51377adffddd4cb239796) --- usb/usb/Usb.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index b8c5c8ea..39cbceb5 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -593,6 +593,10 @@ ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role fp = fopen(filename.c_str(), "w"); if (fp != NULL) { int ret = fputs(convertRoletoString(in_role).c_str(), fp); + if (ret == EAGAIN) { + std::this_thread::sleep_for(std::chrono::milliseconds(700)); + ret = fputs(convertRoletoString(in_role).c_str(), fp); + } fclose(fp); if ((ret != EOF) && ReadFileToString(filename, &written)) { written = Trim(written); From c5a560160fd82e94870a2252037d394e1e1f9780 Mon Sep 17 00:00:00 2001 From: Kyle Tso Date: Thu, 13 Jun 2024 16:54:37 +0800 Subject: [PATCH 11/11] usb: Log for retry on role switch Add a log for the retry. Also define the sleep time in the header file. Bug: 341996696 Change-Id: Ib3cc0c6ad576e7cda26b7f50cdc61d52e6349c78 Signed-off-by: Kyle Tso (cherry picked from commit d17fdff5f81cff76adaa75d50f26318be8048123) --- usb/usb/Usb.cpp | 3 ++- usb/usb/Usb.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index 39cbceb5..0736f4c4 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -594,7 +594,8 @@ ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role if (fp != NULL) { int ret = fputs(convertRoletoString(in_role).c_str(), fp); if (ret == EAGAIN) { - std::this_thread::sleep_for(std::chrono::milliseconds(700)); + ALOGI("role switch busy, retry in %d ms", ROLE_SWAP_RETRY_MS); + std::this_thread::sleep_for(std::chrono::milliseconds(ROLE_SWAP_RETRY_MS)); ret = fputs(convertRoletoString(in_role).c_str(), fp); } fclose(fp); diff --git a/usb/usb/Usb.h b/usb/usb/Usb.h index facc328e..15348af0 100644 --- a/usb/usb/Usb.h +++ b/usb/usb/Usb.h @@ -55,6 +55,8 @@ constexpr char kGadgetName[] = "11110000.dwc3"; #define VBUS_PATH NEW_UDC_PATH "dwc3_exynos_otg_b_sess" #define USB_DATA_PATH NEW_UDC_PATH "usb_data_enabled" +#define ROLE_SWAP_RETRY_MS 700 + struct Usb : public BnUsb { Usb();