Changes for July 2021
This commit is contained in:
parent
50c9fd2bc8
commit
efc19ee2c9
@ -80,6 +80,7 @@ git revert 82b15278bad816632dcaeaed623b569978e9840d --no-edit # Update lineage.m
|
|||||||
git am $BL/patches/0001-Remove-fsck-SELinux-labels.patch
|
git am $BL/patches/0001-Remove-fsck-SELinux-labels.patch
|
||||||
git am $BL/patches/0001-treble-Add-overlay-lineage.patch
|
git am $BL/patches/0001-treble-Add-overlay-lineage.patch
|
||||||
git am $BL/patches/0001-treble-Don-t-specify-config_wallpaperCropperPackage.patch
|
git am $BL/patches/0001-treble-Don-t-specify-config_wallpaperCropperPackage.patch
|
||||||
|
git am $BL/patches/0001-treble-Don-t-handle-apns-conf.patch
|
||||||
git am $BL/patches/0001-TEMP-treble-Fix-init.treble-environ.rc-hardcode-for-.patch
|
git am $BL/patches/0001-TEMP-treble-Fix-init.treble-environ.rc-hardcode-for-.patch
|
||||||
cd ../../..
|
cd ../../..
|
||||||
cd frameworks/native
|
cd frameworks/native
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
From c9b266ded8a63da3408c24479100ea53baf455b7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: gudenau <gudenau>
|
|
||||||
Date: Tue, 25 Sep 2018 09:44:26 +0200
|
|
||||||
Subject: [PATCH] core: Add support for MicroG
|
|
||||||
|
|
||||||
-fake signatures, enabled per app by dynamic permission
|
|
||||||
|
|
||||||
Change-Id: I84fc7e5c606f4b57012d948a4cc6cb521db6b03e
|
|
||||||
---
|
|
||||||
core/res/AndroidManifest.xml | 7 ++++++
|
|
||||||
core/res/res/values/config.xml | 2 ++
|
|
||||||
core/res/res/values/strings.xml | 5 ++++
|
|
||||||
.../server/pm/PackageManagerService.java | 23 +++++++++++++++++--
|
|
||||||
4 files changed, 35 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
|
|
||||||
index 0c3b7a137b9..fc6f9d9a1ec 100644
|
|
||||||
--- a/core/res/AndroidManifest.xml
|
|
||||||
+++ b/core/res/AndroidManifest.xml
|
|
||||||
@@ -2637,6 +2637,13 @@
|
|
||||||
android:description="@string/permdesc_getPackageSize"
|
|
||||||
android:protectionLevel="normal" />
|
|
||||||
|
|
||||||
+ <!-- @hide Allows an application to change the package signature as
|
|
||||||
+ seen by applications -->
|
|
||||||
+ <permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"
|
|
||||||
+ android:protectionLevel="dangerous"
|
|
||||||
+ android:label="@string/permlab_fakePackageSignature"
|
|
||||||
+ android:description="@string/permdesc_fakePackageSignature" />
|
|
||||||
+
|
|
||||||
<!-- @deprecated No longer useful, see
|
|
||||||
{@link android.content.pm.PackageManager#addPackageToPreferred}
|
|
||||||
for details. -->
|
|
||||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
|
||||||
index 91f4cf3093e..91fb69f8066 100644
|
|
||||||
--- a/core/res/res/values/config.xml
|
|
||||||
+++ b/core/res/res/values/config.xml
|
|
||||||
@@ -1856,6 +1856,8 @@
|
|
||||||
<string-array name="config_locationProviderPackageNames" translatable="false">
|
|
||||||
<!-- The standard AOSP fused location provider -->
|
|
||||||
<item>com.android.location.fused</item>
|
|
||||||
+ <!-- The (faked) microg fused location provider (a free reimplementation) -->
|
|
||||||
+ <item>com.google.android.gms</item>
|
|
||||||
</string-array>
|
|
||||||
|
|
||||||
<!-- This string array can be overriden to enable test location providers initially. -->
|
|
||||||
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
|
|
||||||
index 152b131af8f..f8d87a37064 100644
|
|
||||||
--- a/core/res/res/values/strings.xml
|
|
||||||
+++ b/core/res/res/values/strings.xml
|
|
||||||
@@ -827,6 +827,11 @@
|
|
||||||
|
|
||||||
<!-- Permissions -->
|
|
||||||
|
|
||||||
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
|
||||||
+ <string name="permlab_fakePackageSignature">Spoof package signature</string>
|
|
||||||
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
|
||||||
+ <string name="permdesc_fakePackageSignature">Allows the app to pretend to be a different app. Malicious applications might be able to use this to access private application data. Legitimate uses include an emulator pretending to be what it emulates. Grant this permission with caution only!</string>
|
|
||||||
+
|
|
||||||
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
|
||||||
<string name="permlab_statusBar">disable or modify status bar</string>
|
|
||||||
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
|
|
||||||
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
||||||
index fb672a5231f..d5878ed9fc4 100644
|
|
||||||
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
||||||
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
|
|
||||||
@@ -4111,8 +4111,9 @@ public class PackageManagerService extends IPackageManager.Stub
|
|
||||||
final Set<String> permissions = ArrayUtils.isEmpty(p.requestedPermissions)
|
|
||||||
? Collections.emptySet() : permissionsState.getPermissions(userId);
|
|
||||||
|
|
||||||
- PackageInfo packageInfo = PackageParser.generatePackageInfo(p, gids, flags,
|
|
||||||
- ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId);
|
|
||||||
+ PackageInfo packageInfo = mayFakeSignature(p, PackageParser.generatePackageInfo(p, gids, flags,
|
|
||||||
+ ps.firstInstallTime, ps.lastUpdateTime, permissions, state, userId),
|
|
||||||
+ permissions);
|
|
||||||
|
|
||||||
if (packageInfo == null) {
|
|
||||||
return null;
|
|
||||||
@@ -4148,6 +4149,24 @@ public class PackageManagerService extends IPackageManager.Stub
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ private PackageInfo mayFakeSignature(PackageParser.Package p, PackageInfo pi,
|
|
||||||
+ Set<String> permissions) {
|
|
||||||
+ try {
|
|
||||||
+ if (permissions.contains("android.permission.FAKE_PACKAGE_SIGNATURE")
|
|
||||||
+ && p.applicationInfo.targetSdkVersion > Build.VERSION_CODES.LOLLIPOP_MR1
|
|
||||||
+ && p.mAppMetaData != null) {
|
|
||||||
+ String sig = p.mAppMetaData.getString("fake-signature");
|
|
||||||
+ if (sig != null) {
|
|
||||||
+ pi.signatures = new Signature[] {new Signature(sig)};
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ } catch (Throwable t) {
|
|
||||||
+ // We should never die because of any failures, this is system code!
|
|
||||||
+ Log.w("PackageManagerService.FAKE_PACKAGE_SIGNATURE", t);
|
|
||||||
+ }
|
|
||||||
+ return pi;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
@Override
|
|
||||||
public void checkPackageStartable(String packageName, int userId) {
|
|
||||||
final int callingUid = Binder.getCallingUid();
|
|
||||||
--
|
|
||||||
2.17.1
|
|
||||||
|
|
53
patches/0001-treble-Don-t-handle-apns-conf.patch
Normal file
53
patches/0001-treble-Don-t-handle-apns-conf.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
From 0e30d9db18a2ff9bbdc99f0b61e666c29850f5af Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||||
|
Date: Sun, 27 Jun 2021 15:37:56 +0000
|
||||||
|
Subject: [PATCH] treble: Don't handle apns-conf
|
||||||
|
|
||||||
|
LineageOS has its own well-maintained copy
|
||||||
|
|
||||||
|
Change-Id: If568101f21098c75879af8b9b6141af179566960
|
||||||
|
---
|
||||||
|
base-pre.mk | 3 ---
|
||||||
|
base.mk | 8 ++------
|
||||||
|
2 files changed, 2 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/base-pre.mk b/base-pre.mk
|
||||||
|
index 6a317e4..e69de29 100644
|
||||||
|
--- a/base-pre.mk
|
||||||
|
+++ b/base-pre.mk
|
||||||
|
@@ -1,3 +0,0 @@
|
||||||
|
-#Use a more decent APN config
|
||||||
|
-PRODUCT_COPY_FILES += \
|
||||||
|
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||||
|
diff --git a/base.mk b/base.mk
|
||||||
|
index b11fde5..54144f9 100644
|
||||||
|
--- a/base.mk
|
||||||
|
+++ b/base.mk
|
||||||
|
@@ -7,10 +7,6 @@ PRODUCT_COPY_FILES := \
|
||||||
|
frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
|
||||||
|
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
|
||||||
|
|
||||||
|
-#Use a more decent APN config
|
||||||
|
-PRODUCT_COPY_FILES += \
|
||||||
|
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||||
|
-
|
||||||
|
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/phh/treble/sepolicy
|
||||||
|
DEVICE_PACKAGE_OVERLAYS += \
|
||||||
|
device/phh/treble/overlay \
|
||||||
|
@@ -31,11 +27,11 @@ PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||||
|
ro.build.version.security_patch=$(PLATFORM_SECURITY_PATCH) \
|
||||||
|
ro.adb.secure=0 \
|
||||||
|
ro.logd.auditd=true
|
||||||
|
-
|
||||||
|
+
|
||||||
|
#Huawei HiSuite (also other OEM custom programs I guess) it's of no use in AOSP builds
|
||||||
|
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
|
||||||
|
persist.sys.usb.config=adb \
|
||||||
|
- ro.cust.cdrom=/dev/null
|
||||||
|
+ ro.cust.cdrom=/dev/null
|
||||||
|
|
||||||
|
#VNDK config files
|
||||||
|
PRODUCT_COPY_FILES += \
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user