197 lines
8.3 KiB
Diff
197 lines
8.3 KiB
Diff
From f58f4704de0b4e9f9e650ca954de1bf971d897d1 Mon Sep 17 00:00:00 2001
|
|
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
|
Date: Thu, 18 Nov 2021 02:19:52 +0000
|
|
Subject: [PATCH 1/3] 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
|
|
---
|
|
base-pre.mk | 3 -
|
|
base.mk | 16 ++--
|
|
generate.sh | 2 +-
|
|
.../lineage/res/res/values/config.xml | 81 +++++++++++++++++++
|
|
.../base/core/res/res/values/config.xml | 1 -
|
|
sepolicy/file_contexts | 3 -
|
|
6 files changed, 91 insertions(+), 15 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 301fee9..e8ac0a3 100644
|
|
--- a/base.mk
|
|
+++ b/base.mk
|
|
@@ -8,12 +8,14 @@ PRODUCT_COPY_FILES := \
|
|
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
|
|
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.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
|
|
-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)
|
|
@@ -30,11 +32,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 c1494c7..2760fad 100644
|
|
--- a/generate.sh
|
|
+++ b/generate.sh
|
|
@@ -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 2d5c21e..7a15163 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>
|
|
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
|
|
index 4ae5095..5e39d5b 100644
|
|
--- a/sepolicy/file_contexts
|
|
+++ b/sepolicy/file_contexts
|
|
@@ -6,9 +6,6 @@
|
|
/system/bin/phh-on-data.sh u:object_r:phhsu_exec:s0
|
|
/system/bin/asus-motor u:object_r:phhsu_exec:s0
|
|
|
|
-#/system/bin/fsck\.exfat u:object_r:fsck_exec:s0
|
|
-/system/bin/fsck\.ntfs u:object_r:fsck_exec:s0
|
|
-
|
|
/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
|
|
|
|
/sec_storage(/.*)? u:object_r:teecd_data_file:s0
|
|
--
|
|
2.25.1
|
|
|