Reconcile picks

Signed-off-by: Tavi <tavi@divested.dev>
This commit is contained in:
Tavi 2024-07-16 18:22:54 -04:00
parent 83d7f9a807
commit bcfba01d60
No known key found for this signature in database
GPG Key ID: E599F62ECBAEAF2E
8 changed files with 81 additions and 13 deletions

View File

@ -133,7 +133,7 @@ index 10f77144e022..eaa6bbb58679 100644
|| newPkg.isForceQueryable()
|| ArrayUtils.contains(mForceQueryableByDevicePackageNames,
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index f284d58713e5..a0992aa25b12 100644
index a218bd7fe369..dc4f9f4d8298 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -4465,8 +4465,20 @@ public class PackageManagerService extends IPackageManager.Stub

View File

@ -0,0 +1,65 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Chiang <chiangi@google.com>
Date: Mon, 18 Mar 2024 02:46:56 +0000
Subject: [PATCH] Send ACTION_PACKAGE_CHANGED when mimeGroups are changed
Test: atest CtsPackageManagerTestCases:PackageManagerShellCommandMultiUserTest
Test: atest CtsPackageManagerTestCases:PackageManagerTest
Bug: 297517712
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:2c0dff90d63674ee0d098219b88f2e01a0ab4612)
Merged-In: I271a3526ea4555249e3a2797605269257330e0e9
Change-Id: I271a3526ea4555249e3a2797605269257330e0e9
---
.../server/pm/PackageManagerService.java | 30 ++++++++++++++++---
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 1f6c113969c0..819a1437a4f1 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -25877,10 +25877,20 @@ public class PackageManagerService extends IPackageManager.Stub
}
}
- private void applyMimeGroupChanges(String packageName, String mimeGroup) {
+ private void applyMimeGroupChanges(String packageName, String mimeGroup,
+ List<Integer> packageUids) {
if (mComponentResolver.updateMimeGroup(packageName, mimeGroup)) {
- Binder.withCleanCallingIdentity(() ->
- clearPackagePreferredActivities(packageName, UserHandle.USER_ALL));
+ Binder.withCleanCallingIdentity(() -> {
+ clearPackagePreferredActivities(packageName, UserHandle.USER_ALL);
+ // Send the ACTION_PACKAGE_CHANGED when the mimeGroup has changes
+ final ArrayList<String> components = new ArrayList<>(
+ Collections.singletonList(packageName));
+ final String reason = "The mimeGroup is changed";
+ for (int i = 0; i < packageUids.size(); i++) {
+ sendPackageChangedBroadcast(packageName, true /* dontKillApp */,
+ components, packageUids.get(i), reason);
+ }
+ });
}
mPmInternal.writeSettings(false);
@@ -25891,8 +25901,20 @@ public class PackageManagerService extends IPackageManager.Stub
boolean changed = mSettings.mPackages.get(packageName)
.setMimeGroup(mimeGroup, mimeTypes);
+ final List<Integer> packageUids = new ArrayList<Integer>();
+ final PackageSetting ps = mSettings.getPackageLPr(packageName);
+ if (changed) {
+ final int appId = ps.appId;
+ final int[] userIds = resolveUserIds(UserHandle.USER_ALL);
+ for (int i = 0; i < userIds.length; i++) {
+ final int userId = userIds[i];
+ if (ps.getInstalled(userId)) {
+ packageUids.add(UserHandle.getUid(userId, appId));
+ }
+ }
+ }
if (changed) {
- applyMimeGroupChanges(packageName, mimeGroup);
+ applyMimeGroupChanges(packageName, mimeGroup, packageUids);
}
}

View File

@ -20,6 +20,8 @@ Modified the native logic to drop new connections with a mismatching
UID, and to keep serving the existing connection (if it was still
there).
[Backport: No native layer for ZygoteCommandBuffer present]
Bug: 319081336
Test: manual
(cherry picked from commit 2ffc7cb220e4220b7e108c4043a3f0f2a85b6508)

View File

@ -22,14 +22,14 @@ Change-Id: Ie219bbdbe28819421040e4c083b65ab47d8ebde6
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/com/android/providers/media/MediaProvider.java b/src/com/android/providers/media/MediaProvider.java
index 5b3a8c41e..3b040f9d1 100644
index 5b3a8c41e..a01ba34c6 100644
--- a/src/com/android/providers/media/MediaProvider.java
+++ b/src/com/android/providers/media/MediaProvider.java
@@ -2652,6 +2652,7 @@ public class MediaProvider extends ContentProvider {
FileUtils.sanitizeValues(values, /*rewriteHiddenFileName*/ !isFuseThread());
FileUtils.computeDataFromValues(values, volumePath, isFuseThread());
+ assertFileColumnsConsistent(match, uri, values);
+ assertFileColumnsSane(match, uri, values);
// Create result file
File res = new File(values.getAsString(MediaColumns.DATA));

View File

@ -20,7 +20,7 @@ Change-Id: I66b1f9a80060f48a604001829db8ea7c96c7b7f8
2 files changed, 13 insertions(+)
diff --git a/stack/smp/smp_act.cc b/stack/smp/smp_act.cc
index c1f143e92..7edd7bd60 100644
index c1f143e92..199c5abb3 100644
--- a/stack/smp/smp_act.cc
+++ b/stack/smp/smp_act.cc
@@ -284,6 +284,7 @@ void smp_send_pair_rsp(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
@ -31,7 +31,7 @@ index c1f143e92..7edd7bd60 100644
}
/*******************************************************************************
@@ -665,6 +666,17 @@ void smp_proc_rand(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
@@ -645,6 +646,17 @@ void smp_proc_init(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
return;
}

View File

@ -93,7 +93,7 @@ applyPatch "$DOS_PATCHES_COMMON/android_build/0001-verity-openssl3.patch"; #Fix
sed -i '75i$(my_res_package): PRIVATE_AAPT_FLAGS += --auto-add-overlay' core/aapt2.mk; #Enable auto-add-overlay for packages, this allows the vendor overlay to easily work across all branches.
awk -i inplace '!/updatable_apex.mk/' target/product/mainline_system.mk; #Disable APEX
sed -i 's/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 23/PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION := 28/' core/version_defaults.mk; #Set the minimum supported target SDK to Pie (GrapheneOS)
sed -i 's/2024-02-05/2024-07-05/' core/version_defaults.mk; #Bump Security String #X_asb_2024-07
sed -i 's/2024-02-05/2024-07-05/' core/version_defaults.mk; #Bump Security String #R_asb_2024-07
fi;
if enterAndClear "build/soong"; then
@ -156,8 +156,9 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/394560.patch"; #R_asb_2024-06 A
applyPatch "$DOS_PATCHES/android_frameworks_base/394561.patch"; #R_asb_2024-06 Check hidden API exemptions
applyPatch "$DOS_PATCHES/android_frameworks_base/394562.patch"; #R_asb_2024-06 AccessibilityManagerService: remove uninstalled services from enabled list after service update.
applyPatch "$DOS_PATCHES/android_frameworks_base/394563.patch"; #R_asb_2024-06 Check permissions for CDM shell commands
applyPatch "$DOS_PATCHES/android_frameworks_base/397450-backport.patch"; #S_asb_2024-07 Verify UID of incoming Zygote connections.
applyPatch "$DOS_PATCHES/android_frameworks_base/397451.patch"; #S_asb_2024-07 Fix security vulnerability of non-dynamic permission removal
applyPatch "$DOS_PATCHES/android_frameworks_base/397541.patch"; #R_asb_2024-07 [PM] Send ACTION_PACKAGE_CHANGED when mimeGroups are changed
applyPatch "$DOS_PATCHES/android_frameworks_base/397542.patch"; #R_asb_2024-07 Verify UID of incoming Zygote connections.
applyPatch "$DOS_PATCHES/android_frameworks_base/397543.patch"; #R_asb_2024-07 Fix security vulnerability of non-dynamic permission removal
git revert --no-edit 438d9feacfcad73d3ee918541574132928a93644; #Reverts "Allow signature spoofing for microG Companion/Services" in favor of below patch
applyPatch "$DOS_PATCHES/android_frameworks_base/0007-Always_Restict_Serial.patch"; #Always restrict access to Build.SERIAL (GrapheneOS)
applyPatch "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch"; #Don't grant location permission to system browsers (GrapheneOS)
@ -410,9 +411,9 @@ if enterAndClear "packages/providers/DownloadProvider"; then
applyPatch "$DOS_PATCHES/android_packages_providers_DownloadProvider/0001-Network_Permission.patch"; #Expose the NETWORK permission (GrapheneOS)
fi;
#if enterAndClear "packages/providers/MediaProvider"; then
#applyPatch "$DOS_PATCHES/android_packages_providers_MediaProvider/397453-backport.patch"; #S_asb_2024-07 Prevent insertion in other users storage volumes #XXX
#fi;
if enterAndClear "packages/providers/MediaProvider"; then
applyPatch "$DOS_PATCHES/android_packages_providers_MediaProvider/397544.patch"; #R_asb_2024-07 Prevent insertion in other users storage volumes
fi;
if enterAndClear "packages/providers/TelephonyProvider"; then
applyPatch "$DOS_PATCHES/android_packages_providers_TelephonyProvider/304614.patch"; #mcc/mnc fix (Sony)
@ -427,7 +428,7 @@ if enterAndClear "system/bt"; then
applyPatch "$DOS_PATCHES/android_system_bt/385557.patch"; #R_asb_2024-03 Fix an OOB bug in smp_proc_sec_req
applyPatch "$DOS_PATCHES/android_system_bt/385558.patch"; #R_asb_2024-03 Reland: Fix an OOB write bug in attp_build_value_cmd
applyPatch "$DOS_PATCHES/android_system_bt/385559.patch"; #R_asb_2024-03 Fix a security bypass issue in access_secure_service_from_temp_bond
applyPatch "$DOS_PATCHES/android_system_bt/397454-backport.patch"; #S_asb_2024-07 Fix an authentication bypass bug in SMP
applyPatch "$DOS_PATCHES/android_system_bt/397545.patch"; #R_asb_2024-07 Fix an authentication bypass bug in SMP
git am "$DOS_PATCHES/android_system_bt/a2dp-master-fixes.patch"; #topic (AOSP)
applyPatch "$DOS_PATCHES_COMMON/android_system_bt/0001-alloc_size.patch"; #Add alloc_size attributes to the allocator (GrapheneOS)
fi;
@ -480,7 +481,7 @@ if enterAndClear "vendor/qcom/opensource/commonsys/system/bt"; then
applyPatch "$DOS_PATCHES/android_vendor_qcom_opensource_system_bt/385591.patch"; #R_asb_2024-03 Fix an OOB bug in smp_proc_sec_req
applyPatch "$DOS_PATCHES/android_vendor_qcom_opensource_system_bt/385592.patch"; #R_asb_2024-03 Reland: Fix an OOB write bug in attp_build_value_cmd
applyPatch "$DOS_PATCHES/android_vendor_qcom_opensource_system_bt/385593.patch"; #R_asb_2024-03 Fix a security bypass issue in access_secure_service_from_temp_bond
applyPatch "$DOS_PATCHES/android_vendor_qcom_opensource_system_bt/397455.patch"; #S_asb_2024-07 Fix an authentication bypass bug in SMP
applyPatch "$DOS_PATCHES/android_vendor_qcom_opensource_system_bt/397546.patch"; #R_asb_2024-07 Fix an authentication bypass bug in SMP
fi;
if enterAndClear "vendor/lineage"; then