Initial unified commit for Android 13, with TrebleDroid GSI target, syncing up to 20221111
This commit is contained in:
192
patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch
Normal file
192
patches_treble/device_phh_treble/0001-treble-Lineage-ify.patch
Normal file
@@ -0,0 +1,192 @@
|
||||
From 33bd59e348d95f59265fad3abb72e27038f5222f Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 01:43:40 +0000
|
||||
Subject: [PATCH 1/6] treble: Lineage-ify
|
||||
|
||||
Squash of:
|
||||
- Proper target names
|
||||
- Remove fsck SELinux labels
|
||||
- treble: Add overlay-lineage
|
||||
- treble: Don't specify config_wallpaperCropperPackage
|
||||
- treble: Don't handle apns-conf
|
||||
|
||||
Change-Id: I25eee7a3804f335430a447ae1424402d7e37851b
|
||||
---
|
||||
base-pre.mk | 3 -
|
||||
base.mk | 16 ++--
|
||||
generate.sh | 4 +-
|
||||
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
|
||||
.../base/core/res/res/values/config.xml | 1 -
|
||||
5 files changed, 92 insertions(+), 13 deletions(-)
|
||||
create mode 100644 overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
||||
|
||||
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 ce2f218..48b2ccb 100644
|
||||
--- a/base.mk
|
||||
+++ b/base.mk
|
||||
@@ -17,12 +17,14 @@ PRODUCT_COPY_FILES += \
|
||||
device/phh/treble/bluetooth/audio/config/sysbta_audio_policy_configuration.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysbta_audio_policy_configuration.xml \
|
||||
device/phh/treble/bluetooth/audio/config/sysbta_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysbta_audio_policy_configuration_7_0.xml
|
||||
|
||||
-#Use a more decent APN config
|
||||
-PRODUCT_COPY_FILES += \
|
||||
- device/sample/etc/apns-full-conf.xml:system/etc/apns-conf.xml
|
||||
-
|
||||
SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/phh/treble/sepolicy
|
||||
-PRODUCT_PACKAGE_OVERLAYS += device/phh/treble/overlay
|
||||
+
|
||||
+PRODUCT_PACKAGE_OVERLAYS += \
|
||||
+ device/phh/treble/overlay \
|
||||
+ device/phh/treble/overlay-lineage
|
||||
+
|
||||
+PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += \
|
||||
+ device/phh/treble/overlay-lineage/lineage-sdk
|
||||
|
||||
$(call inherit-product, vendor/hardware_overlay/overlay.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
@@ -39,11 +41,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 += \
|
||||
diff --git a/generate.sh b/generate.sh
|
||||
index fac8208..2160786 100644
|
||||
--- a/generate.sh
|
||||
+++ b/generate.sh
|
||||
@@ -54,7 +54,7 @@ for part in a ab;do
|
||||
su_suffix='N'
|
||||
if [ "$su" == "yes" ];then
|
||||
su_suffix='S'
|
||||
- extra_packages+=' phh-su me.phh.superuser'
|
||||
+ extra_packages+=' phh-su me.phh.superuser su'
|
||||
fi
|
||||
|
||||
part_suffix='a'
|
||||
@@ -64,7 +64,7 @@ for part in a ab;do
|
||||
optional_base='$(call inherit-product, device/phh/treble/base-sas.mk)'
|
||||
fi
|
||||
|
||||
- target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
|
||||
+ target="lineage_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
|
||||
|
||||
baseArch="$arch"
|
||||
if [ "$arch" = "a64" ];then
|
||||
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
||||
new file mode 100644
|
||||
index 0000000..8df673a
|
||||
--- /dev/null
|
||||
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
|
||||
@@ -0,0 +1,81 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<!--
|
||||
+ Copyright (C) 2015-2016 The CyanogenMod Project
|
||||
+ 2017-2018 The LineageOS Project
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+-->
|
||||
+<resources>
|
||||
+ <!-- Whether device has screen with higher aspect ratio -->
|
||||
+ <bool name="config_haveHigherAspectRatioScreen">true</bool>
|
||||
+
|
||||
+ <!-- All the capabilities of the LEDs on this device, stored as a bit field.
|
||||
+ This integer should equal the sum of the corresponding value for each
|
||||
+ of the following capabilities present:
|
||||
+ // Device has a color adjustable battery light.
|
||||
+ LIGHTS_RGB_NOTIFICATION_LED = 1
|
||||
+ // Device has a color adjustable notification light.
|
||||
+ LIGHTS_RGB_BATTERY_LED = 2
|
||||
+ LIGHTS_MULTIPLE_NOTIFICATION_LED = 4 (deprecated)
|
||||
+ // The notification light has adjustable pulsing capability.
|
||||
+ LIGHTS_PULSATING_LED = 8
|
||||
+ // Device has a multi-segment battery light that is able to
|
||||
+ // use the light brightness value to determine how many
|
||||
+ // segments to show (in order to represent battery level).
|
||||
+ LIGHTS_SEGMENTED_BATTERY_LED = 16
|
||||
+ // The notification light supports HAL adjustable brightness
|
||||
+ // via the alpha channel.
|
||||
+ // Note: if a device notification light supports LIGHTS_RGB_NOTIFICATION_LED
|
||||
+ // then HAL support is not necessary for brightness control. In this case,
|
||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
||||
+ // RGB color values.
|
||||
+ LIGHTS_ADJUSTABLE_NOTIFICATION_LED_BRIGHTNESS = 32
|
||||
+ // Device has a battery light.
|
||||
+ LIGHTS_BATTERY_LED = 64
|
||||
+ // The battery light supports HAL adjustable brightness via
|
||||
+ // the alpha channel.
|
||||
+ // Note: if a device battery light supports LIGHTS_RGB_BATTERY_LED then HAL
|
||||
+ // support is not necessary for brightness control. In this case,
|
||||
+ // brightness support will be provided by lineage-sdk through the scaling of
|
||||
+ // RGB color values.
|
||||
+ LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS = 128
|
||||
+ For example, a device with notification and battery lights that supports
|
||||
+ pulsating and RGB control would set this config to 75. -->
|
||||
+ <integer name="config_deviceLightCapabilities">255</integer>
|
||||
+
|
||||
+ <!-- Hardware keys present on the device, stored as a bit field.
|
||||
+ This integer should equal the sum of the corresponding value for each
|
||||
+ of the following keys present:
|
||||
+ 1 - Home
|
||||
+ 2 - Back
|
||||
+ 4 - Menu
|
||||
+ 8 - Assistant (search)
|
||||
+ 16 - App switch
|
||||
+ 32 - Camera
|
||||
+ 64 - Volume rocker
|
||||
+ For example, a device with Home, Back and Menu keys would set this
|
||||
+ config to 7. -->
|
||||
+ <integer name="config_deviceHardwareKeys">127</integer>
|
||||
+
|
||||
+ <!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
|
||||
+ This integer should equal the sum of the corresponding value for each
|
||||
+ of the following keys present:
|
||||
+ 1 - Home
|
||||
+ 2 - Back
|
||||
+ 4 - Menu
|
||||
+ 8 - Assistant (search)
|
||||
+ 16 - App switch
|
||||
+ 32 - Camera
|
||||
+ 64 - Volume rocker
|
||||
+ For example, a device with Home, Back and Menu keys would set this
|
||||
+ config to 7. -->
|
||||
+ <integer name="config_deviceHardwareWakeKeys">127</integer>
|
||||
+</resources>
|
||||
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
index 0bc3350..045f4b3 100644
|
||||
--- a/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
|
||||
@@ -22,7 +22,6 @@
|
||||
<string name="config_icon_mask" translatable="false">"M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"</string>
|
||||
<bool name="config_useRoundIcon">true</bool>
|
||||
|
||||
- <string name="config_wallpaperCropperPackage">com.android.wallpaperpicker</string>
|
||||
<bool name="config_unplugTurnsOnScreen">true</bool>
|
||||
<integer name="config_multiuserMaximumUsers">5</integer>
|
||||
<bool name="config_enableMultiUserUI">true</bool>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From 1d807ba01f00a2b2be96f3e0b06c31f0b68852aa Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sun, 8 Aug 2021 09:29:32 +0000
|
||||
Subject: [PATCH 2/6] treble: Set BOARD_EXT4_SHARE_DUP_BLOCKS explicitly
|
||||
|
||||
Change-Id: I725443154fabde548d2e6c1b072d34c27596c421
|
||||
---
|
||||
board-base.mk | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/board-base.mk b/board-base.mk
|
||||
index 2cb5dbc..e493d1c 100644
|
||||
--- a/board-base.mk
|
||||
+++ b/board-base.mk
|
||||
@@ -10,3 +10,5 @@ BOARD_ROOT_EXTRA_FOLDERS += bt_firmware sec_storage efs persist
|
||||
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
|
||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
||||
+
|
||||
+BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From a5d17b7fb89bc838b39e642952e897f3ee042e1a Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Wed, 20 Oct 2021 11:30:25 +0000
|
||||
Subject: [PATCH 3/6] treble: Set TARGET_NO_KERNEL_OVERRIDE
|
||||
|
||||
Taken from Lineage generic targets - skips building kernel cleanly
|
||||
|
||||
Change-Id: Id71d3a3aed56fd4e815a64ef4191b125fc5026ce
|
||||
---
|
||||
board-base.mk | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/board-base.mk b/board-base.mk
|
||||
index e493d1c..9d1d45e 100644
|
||||
--- a/board-base.mk
|
||||
+++ b/board-base.mk
|
||||
@@ -12,3 +12,5 @@ BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true
|
||||
BOARD_ROOT_EXTRA_SYMLINKS := $(filter-out $(BOARD_ROOT_EXTRA_SYMLINKS),/mnt/vendor/persist:/persist)
|
||||
|
||||
BOARD_EXT4_SHARE_DUP_BLOCKS := true
|
||||
+
|
||||
+TARGET_NO_KERNEL_OVERRIDE := true
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From bd8cc570c61789a9df881bd60f53d03bd73d974d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 11 Oct 2022 11:29:02 +0000
|
||||
Subject: [PATCH 4/6] treble: Enable call recording
|
||||
|
||||
Change-Id: I57ca3604363547419a566b37b5151b6b30c46d28
|
||||
---
|
||||
.../dialer/callrecord/res/values/config.xml | 20 +++++++++++++++++++
|
||||
1 file changed, 20 insertions(+)
|
||||
create mode 100644 overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
|
||||
|
||||
diff --git a/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
|
||||
new file mode 100644
|
||||
index 0000000..4cacde5
|
||||
--- /dev/null
|
||||
+++ b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml
|
||||
@@ -0,0 +1,20 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<!--
|
||||
+ Copyright (C) 2021 The LineageOS Project
|
||||
+
|
||||
+ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
+ you may not use this file except in compliance with the License.
|
||||
+ You may obtain a copy of the License at
|
||||
+
|
||||
+ http://www.apache.org/licenses/LICENSE-2.0
|
||||
+
|
||||
+ Unless required by applicable law or agreed to in writing, software
|
||||
+ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
+ See the License for the specific language governing permissions and
|
||||
+ limitations under the License.
|
||||
+-->
|
||||
+<resources>
|
||||
+ <bool name="call_recording_enabled">true</bool>
|
||||
+ <integer name="call_recording_audio_source">4</integer>
|
||||
+</resources>
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From efd5867e8b259b885d3dab87704e038f71eb6d86 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 5 Nov 2022 23:44:33 +0000
|
||||
Subject: [PATCH 5/6] treble: Integrally secure *N builds
|
||||
|
||||
Change-Id: I22b5f746cb88a5fa4059595a8daa693d9adca979
|
||||
---
|
||||
generate.sh | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/generate.sh b/generate.sh
|
||||
index 2160786..f64ea84 100644
|
||||
--- a/generate.sh
|
||||
+++ b/generate.sh
|
||||
@@ -23,6 +23,7 @@ for part in a ab;do
|
||||
apps_name=""
|
||||
extra_packages=""
|
||||
vndk="vndk.mk"
|
||||
+ secure=""
|
||||
optional_base=""
|
||||
if [ "$apps" == "gapps" ];then
|
||||
apps_suffix="g"
|
||||
@@ -55,6 +56,8 @@ for part in a ab;do
|
||||
if [ "$su" == "yes" ];then
|
||||
su_suffix='S'
|
||||
extra_packages+=' phh-su me.phh.superuser su'
|
||||
+ else
|
||||
+ secure='PRODUCT_COPY_FILES += device/phh/treble/empty:system/phh/secure'
|
||||
fi
|
||||
|
||||
part_suffix='a'
|
||||
@@ -96,6 +99,8 @@ PRODUCT_CHARACTERISTICS := device
|
||||
|
||||
PRODUCT_PACKAGES += $extra_packages
|
||||
|
||||
+$secure
|
||||
+
|
||||
EOF
|
||||
echo -e '\t$(LOCAL_DIR)/'$target.mk '\' >> AndroidProducts.mk
|
||||
done
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 667aa0b0c11f18bb8b0f5aeda31e186c0a1fc60d Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 5 Nov 2022 23:49:11 +0000
|
||||
Subject: [PATCH 6/6] treble: Switch to MindTheGapps
|
||||
|
||||
Change-Id: I1b80d4c5176cbf4af21d147c71b0abce6027c7c7
|
||||
---
|
||||
generate.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/generate.sh b/generate.sh
|
||||
index f64ea84..b0d6d41 100644
|
||||
--- a/generate.sh
|
||||
+++ b/generate.sh
|
||||
@@ -27,7 +27,7 @@ for part in a ab;do
|
||||
optional_base=""
|
||||
if [ "$apps" == "gapps" ];then
|
||||
apps_suffix="g"
|
||||
- apps_script='$(call inherit-product, device/phh/treble/gapps.mk)'
|
||||
+ apps_script='$(call inherit-product, vendor/gapps/arm64/arm64-vendor.mk)'
|
||||
apps_name="with GApps"
|
||||
fi
|
||||
if [ "$apps" == "gapps-go" ];then
|
||||
--
|
||||
2.25.1
|
||||
|
||||
Reference in New Issue
Block a user