From 98a0defd383cbeeb80b25241f2ed0c31052a8f43 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Mon, 22 Jun 2020 10:35:37 +0200 Subject: [PATCH] sdm845-common -> sm8250-common --- Android.mk | 2 +- BoardConfigCommon.mk | 46 +++++++---- bootctrl/Android.bp | 4 +- common.mk | 19 +++-- gpt-utils/Android.bp | 2 +- lights/Android.mk | 8 +- ...ardware.light@2.0-service.oneplus_kona.rc} | 0 lights/service.cpp | 2 +- lineage.dependencies | 4 +- livedisplay/Android.bp | 4 +- ...e.livedisplay@2.0-service.oneplus_kona.rc} | 2 +- livedisplay/service.cpp | 2 +- rootdir/etc/fstab.qcom | 81 ++++++++++--------- sepolicy/private/file_contexts | 6 +- sepolicy/private/hal_fod_kona.te | 23 ++++++ sepolicy/private/hal_fod_sdm845.te | 23 ------ sepolicy/private/hal_livedisplay_kona.te | 12 +++ sepolicy/private/hal_livedisplay_sdm845.te | 12 --- sepolicy/private/hal_touch_kona.te | 9 +++ sepolicy/private/hal_touch_sdm845.te | 9 --- setup-makefiles.sh | 2 +- touch/Android.bp | 4 +- ...lineage.touch@1.0-service.oneplus_kona.rc} | 2 +- touch/service.cpp | 2 +- 24 files changed, 153 insertions(+), 127 deletions(-) rename lights/{android.hardware.light@2.0-service.oneplus_sdm845.rc => android.hardware.light@2.0-service.oneplus_kona.rc} (100%) rename livedisplay/{lineage.livedisplay@2.0-service.oneplus_sdm845.rc => lineage.livedisplay@2.0-service.oneplus_kona.rc} (95%) create mode 100644 sepolicy/private/hal_fod_kona.te delete mode 100644 sepolicy/private/hal_fod_sdm845.te create mode 100644 sepolicy/private/hal_livedisplay_kona.te delete mode 100644 sepolicy/private/hal_livedisplay_sdm845.te create mode 100644 sepolicy/private/hal_touch_kona.te delete mode 100644 sepolicy/private/hal_touch_sdm845.te rename touch/{lineage.touch@1.0-service.oneplus_sdm845.rc => lineage.touch@1.0-service.oneplus_kona.rc} (99%) diff --git a/Android.mk b/Android.mk index 3750700..0f28183 100644 --- a/Android.mk +++ b/Android.mk @@ -16,7 +16,7 @@ LOCAL_PATH := $(call my-dir) -ifneq ($(filter enchilada fajita,$(TARGET_DEVICE)),) +ifneq ($(filter instantnoodle instantnoodlep,$(TARGET_DEVICE)),) subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH)) $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk))) endif diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index db0853f..a9349db 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -16,7 +16,7 @@ BOARD_VENDOR := oneplus -COMMON_PATH := device/oneplus/sdm845-common +COMMON_PATH := device/oneplus/sm8250-common TARGET_SPECIFIC_HEADER_PATH := $(COMMON_PATH)/include @@ -38,25 +38,26 @@ TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385 TARGET_USES_64_BIT_BINDER := true # Bootloader -TARGET_BOOTLOADER_BOARD_NAME := sdm845 +TARGET_BOOTLOADER_BOARD_NAME := kona TARGET_NO_BOOTLOADER := true # Kernel BOARD_KERNEL_BASE := 0x80000000 -BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 +BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 loop.max_part=7 cgroup.memory=nokmem,nosocket reboot=panic_warm BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb BOARD_KERNEL_PAGESIZE := 4096 BOARD_KERNEL_SEPARATED_DTBO := true NEED_KERNEL_MODULE_SYSTEM := true TARGET_KERNEL_ARCH := arm64 -TARGET_KERNEL_SOURCE := kernel/oneplus/sdm845 +TARGET_KERNEL_SOURCE := kernel/oneplus/sm8250 TARGET_KERNEL_CLANG_COMPILE := true +TARGET_KERNEL_CONFIG := vendor/kona-perf_defconfig # Platform BOARD_USES_QCOM_HARDWARE := true BUILD_WITHOUT_VENDOR := true -TARGET_BOARD_PLATFORM := sdm845 -TARGET_BOARD_PLATFORM_GPU := qcom-adreno630 +TARGET_BOARD_PLATFORM := kona +TARGET_BOARD_PLATFORM_GPU := qcom-adreno650 # Properties TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop @@ -97,18 +98,27 @@ TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs # HIDL DEVICE_FRAMEWORK_MANIFEST_FILE := $(COMMON_PATH)/framework_manifest.xml +# Metadata +BOARD_USES_METADATA_PARTITION := true + # Partitions -BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 -BOARD_DTBOIMG_PARTITION_SIZE := 8388608 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2998927360 -BOARD_USERDATAIMAGE_PARTITION_SIZE := 118112366592 -BOARD_BUILD_SYSTEM_ROOT_IMAGE := true +BOARD_BOOTIMAGE_PARTITION_SIZE := 100663296 +BOARD_DTBOIMG_PARTITION_SIZE := 25165824 +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 100663296 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 236009631744 +BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_ONEPLUS_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system +BOARD_ONEPLUS_DYNAMIC_PARTITIONS_SIZE := 7511998464 +BOARD_SUPER_PARTITION_GROUPS := oneplus_dynamic_partitions +BOARD_SUPER_PARTITION_SIZE := 15032385536 BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) +TARGET_COPY_OUT_ODM := odm +TARGET_COPY_OUT_PRODUCT := product TARGET_COPY_OUT_VENDOR := vendor # Recovery -BOARD_USES_RECOVERY_AS_BOOT := true -TARGET_NO_RECOVERY := true TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" TARGET_USERIMAGES_USE_EXT4 := true @@ -134,7 +144,13 @@ BOARD_PLAT_PUBLIC_SEPOLICY_DIR += \ # Verified Boot BOARD_AVB_ENABLE := true -BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 +BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag +BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 2 +BOARD_AVB_VBMETA_SYSTEM := system +BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem +BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 +BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) +BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 # Inherit from the proprietary version --include vendor/oneplus/sdm845-common/BoardConfigVendor.mk +-include vendor/oneplus/sm8250-common/BoardConfigVendor.mk diff --git a/bootctrl/Android.bp b/bootctrl/Android.bp index f4b3446..fdafd53 100644 --- a/bootctrl/Android.bp +++ b/bootctrl/Android.bp @@ -15,7 +15,7 @@ // cc_library { - name: "bootctrl.sdm845", + name: "bootctrl.kona", defaults: ["bootctrl_hal_defaults"], - static_libs: ["libgptutils.oneplus_sdm845"], + static_libs: ["libgptutils.oneplus_kona"], } diff --git a/common.mk b/common.mk index 8459eb6..3be2fc2 100644 --- a/common.mk +++ b/common.mk @@ -18,7 +18,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) # Get non-open-source specific aspects -$(call inherit-product, vendor/oneplus/sdm845-common/sdm845-common-vendor.mk) +$(call inherit-product, vendor/oneplus/sm8250-common/sm8250-common-vendor.mk) # Overlays DEVICE_PACKAGE_OVERLAYS += \ @@ -49,8 +49,12 @@ AB_OTA_UPDATER := true AB_OTA_PARTITIONS += \ boot \ dtbo \ + odm \ + product \ + recovery \ system \ - vbmeta + vbmeta \ + vbmeta_system AB_OTA_POSTINSTALL_CONFIG += \ RUN_POSTINSTALL_system=true \ @@ -77,7 +81,7 @@ PRODUCT_COPY_FILES += \ # Boot control PRODUCT_PACKAGES += \ android.hardware.boot@1.0-impl.recovery \ - bootctrl.sdm845.recovery + bootctrl.kona.recovery PRODUCT_PACKAGES_DEBUG += \ bootctl @@ -115,11 +119,11 @@ PRODUCT_COPY_FILES += \ # Lights PRODUCT_PACKAGES += \ - android.hardware.light@2.0-service.oneplus_sdm845 + android.hardware.light@2.0-service.oneplus_kona # LiveDisplay PRODUCT_PACKAGES += \ - lineage.livedisplay@2.0-service.oneplus_sdm845 + lineage.livedisplay@2.0-service.oneplus_kona # Media PRODUCT_COPY_FILES += \ @@ -167,7 +171,7 @@ PRODUCT_BOOT_JARS += \ # Touch PRODUCT_PACKAGES += \ - lineage.touch@1.0-service.oneplus_sdm845 + lineage.touch@1.0-service.oneplus_kona # tri-state-key PRODUCT_PACKAGES += \ @@ -196,3 +200,6 @@ PRODUCT_BOOT_JARS += \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/privapp-permissions-wfd.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/privapp-permissions-wfd.xml + +PRODUCT_BUILD_SUPER_PARTITION := false +PRODUCT_USE_DYNAMIC_PARTITIONS := true diff --git a/gpt-utils/Android.bp b/gpt-utils/Android.bp index 55330e0..bdf3b04 100644 --- a/gpt-utils/Android.bp +++ b/gpt-utils/Android.bp @@ -16,7 +16,7 @@ cc_library { - name: "libgptutils.oneplus_sdm845", + name: "libgptutils.oneplus_kona", vendor: true, recovery_available: true, shared_libs: [ diff --git a/lights/Android.mk b/lights/Android.mk index be85403..45181d8 100644 --- a/lights/Android.mk +++ b/lights/Android.mk @@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.light@2.0-service.oneplus_sdm845 +LOCAL_MODULE := android.hardware.light@2.0-service.oneplus_kona LOCAL_MODULE_TAGS := optional LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/bin @@ -14,7 +14,7 @@ LOCAL_SRC_FILES := \ Light.cpp LOCAL_REQUIRED_MODULES := \ - android.hardware.light@2.0-service.oneplus_sdm845.rc + android.hardware.light@2.0-service.oneplus_kona.rc LOCAL_SHARED_LIBRARIES := \ libbase \ @@ -30,13 +30,13 @@ include $(BUILD_EXECUTABLE) include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.light@2.0-service.oneplus_sdm845.rc +LOCAL_MODULE := android.hardware.light@2.0-service.oneplus_kona.rc LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/vendor_overlay/$(PRODUCT_TARGET_VNDK_VERSION)/etc/init LOCAL_MODULE_STEM := android.hardware.light@2.0-service.rc -LOCAL_SRC_FILES := android.hardware.light@2.0-service.oneplus_sdm845.rc +LOCAL_SRC_FILES := android.hardware.light@2.0-service.oneplus_kona.rc include $(BUILD_PREBUILT) diff --git a/lights/android.hardware.light@2.0-service.oneplus_sdm845.rc b/lights/android.hardware.light@2.0-service.oneplus_kona.rc similarity index 100% rename from lights/android.hardware.light@2.0-service.oneplus_sdm845.rc rename to lights/android.hardware.light@2.0-service.oneplus_kona.rc diff --git a/lights/service.cpp b/lights/service.cpp index 25c1b04..c37925f 100644 --- a/lights/service.cpp +++ b/lights/service.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.light@2.0-service.oneplus_sdm845" +#define LOG_TAG "android.hardware.light@2.0-service.oneplus_kona" #include #include diff --git a/lineage.dependencies b/lineage.dependencies index b28addf..96ff27f 100644 --- a/lineage.dependencies +++ b/lineage.dependencies @@ -1,6 +1,6 @@ [ { - "repository": "android_kernel_oneplus_sdm845", - "target_path": "kernel/oneplus/sdm845" + "repository": "android_kernel_oneplus_sm8250", + "target_path": "kernel/oneplus/sm8250" } ] diff --git a/livedisplay/Android.bp b/livedisplay/Android.bp index 0b9df45..e7a1aac 100644 --- a/livedisplay/Android.bp +++ b/livedisplay/Android.bp @@ -14,8 +14,8 @@ // limitations under the License. cc_binary { - name: "lineage.livedisplay@2.0-service.oneplus_sdm845", - init_rc: ["lineage.livedisplay@2.0-service.oneplus_sdm845.rc"], + name: "lineage.livedisplay@2.0-service.oneplus_kona", + init_rc: ["lineage.livedisplay@2.0-service.oneplus_kona.rc"], defaults: ["hidl_defaults"], relative_install_path: "hw", srcs: [ diff --git a/livedisplay/lineage.livedisplay@2.0-service.oneplus_sdm845.rc b/livedisplay/lineage.livedisplay@2.0-service.oneplus_kona.rc similarity index 95% rename from livedisplay/lineage.livedisplay@2.0-service.oneplus_sdm845.rc rename to livedisplay/lineage.livedisplay@2.0-service.oneplus_kona.rc index 2f957f9..83bdcc3 100644 --- a/livedisplay/lineage.livedisplay@2.0-service.oneplus_sdm845.rc +++ b/livedisplay/lineage.livedisplay@2.0-service.oneplus_kona.rc @@ -7,7 +7,7 @@ on init on post-fs-data mkdir /data/misc/display 0770 system graphics -service livedisplay-hal-2-0 /system/bin/hw/lineage.livedisplay@2.0-service.oneplus_sdm845 +service livedisplay-hal-2-0 /system/bin/hw/lineage.livedisplay@2.0-service.oneplus_kona class hal user system group system diff --git a/livedisplay/service.cpp b/livedisplay/service.cpp index 8893b0e..623a291 100644 --- a/livedisplay/service.cpp +++ b/livedisplay/service.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "lineage.livedisplay@2.0-service.oneplus_sdm845" +#define LOG_TAG "lineage.livedisplay@2.0-service.oneplus_kona" #include #include diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom index 5686040..36b60bc 100644 --- a/rootdir/etc/fstab.qcom +++ b/rootdir/etc/fstab.qcom @@ -1,50 +1,53 @@ -# Copyright (c) 2018, The Linux Foundation. All rights reserved. +# Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of The Linux Foundation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. +# modification, are permitted (subject to the limitations in the +# disclaimer below) provided that the following conditions are met: # -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE +# GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT +# HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Android fstab file. # The filesystem that contains the filesystem checker binary (typically /system) cannot # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK -#TODO: Add 'check' as fs_mgr_flags with data partition. -# Currently we dont have e2fsck compiled. So fs check would failed. +# +system /system ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey +product /product ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount +vendor /vendor ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount +odm /odm ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount +/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard,sync wait,formattable,wrappedkey,first_stage_mount +/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,check,formattable,fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption,quota,reservedsize=512M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs +/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait,check +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults +#/devices/platform/soc/8804000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer +#/devices/platform/soc/1da4000.ufshc_card/host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer +/devices/platform/soc/*.ssusb/*.dwc3/xhci-hcd.*.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto +#/dev/block/bootdevice/by-name/spunvm /mnt/vendor/spunvm vfat rw,noatime,shortname=lower,uid=1000,gid=1000,dmask=007,fmask=007,context=u:object_r:spunvm_file:s0 wait +/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt ext4 ro,context=u:object_r:firmware_file:s0 wait,slotselect +/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect +/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect -# -/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,slotselect,avb -/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,fileencryption=ice,quota,reservedsize=512M -/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard wait,check,fileencryption=ice,quota -#/devices/platform/soc/8804000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer -#/devices/platform/soc/1da4000.ufshc_card/host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer -/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect -/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect -/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait -/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect -/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto -# Need to have this entry in here even though the mount point itself is no longer needed. -# The update_engine code looks for this entry in order to determine the boot device address -# and fails if it does not find it. -/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults -/dev/block/zram0 none swap defaults zramsize=1073741824 diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts index 302b3f6..dd89a72 100644 --- a/sepolicy/private/file_contexts +++ b/sepolicy/private/file_contexts @@ -14,9 +14,9 @@ # HALs /(product|system/product)/vendor_overlay/[0-9]+/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_default_exec:s0 -/system/bin/hw/lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.oneplus_fajita u:object_r:hal_fod_sdm845_exec:s0 -/system/bin/hw/lineage\.livedisplay@2\.0-service\.oneplus_sdm845 u:object_r:hal_livedisplay_sdm845_exec:s0 -/system/bin/hw/lineage\.touch@1\.0-service\.oneplus_sdm845 u:object_r:hal_touch_sdm845_exec:s0 +/system/bin/hw/lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.oneplus_kona u:object_r:hal_fod_kona_exec:s0 +/system/bin/hw/lineage\.livedisplay@2\.0-service\.oneplus_kona u:object_r:hal_livedisplay_kona_exec:s0 +/system/bin/hw/lineage\.touch@1\.0-service\.oneplus_kona u:object_r:hal_touch_kona_exec:s0 # DASH /system/bin/dashd u:object_r:dashd_exec:s0 diff --git a/sepolicy/private/hal_fod_kona.te b/sepolicy/private/hal_fod_kona.te new file mode 100644 index 0000000..ac38af2 --- /dev/null +++ b/sepolicy/private/hal_fod_kona.te @@ -0,0 +1,23 @@ +type hal_fod_kona, coredomain, domain; +hal_server_domain(hal_fod_kona, hal_lineage_fod) + +type hal_fod_kona_exec, system_file_type, exec_type, file_type; +init_daemon_domain(hal_fod_kona) + +# Allow access to the HALs +hal_client_domain(hal_fod_kona, hal_fingerprint) + +# Allow binder communication with hal_display_default +binder_call(hal_fod_kona, hal_display_default) + +# Allow binder communication with hal_fingerprint +binder_call(hal_fod_kona, hal_fingerprint) + +# Allow hal_fod_kona to hal_display_hwservice +allow hal_fod_kona hal_display_hwservice:hwservice_manager find; + +# Allow hal_fod_kona to hal_fingerprint_hwservice +allow hal_fod_kona hal_fingerprint_hwservice:hwservice_manager find; + +# Allow hal_fod_kona to read and write to sysfs_fod +allow hal_fod_kona sysfs_fod:file rw_file_perms; diff --git a/sepolicy/private/hal_fod_sdm845.te b/sepolicy/private/hal_fod_sdm845.te deleted file mode 100644 index e16b36f..0000000 --- a/sepolicy/private/hal_fod_sdm845.te +++ /dev/null @@ -1,23 +0,0 @@ -type hal_fod_sdm845, coredomain, domain; -hal_server_domain(hal_fod_sdm845, hal_lineage_fod) - -type hal_fod_sdm845_exec, system_file_type, exec_type, file_type; -init_daemon_domain(hal_fod_sdm845) - -# Allow access to the HALs -hal_client_domain(hal_fod_sdm845, hal_fingerprint) - -# Allow binder communication with hal_display_default -binder_call(hal_fod_sdm845, hal_display_default) - -# Allow binder communication with hal_fingerprint -binder_call(hal_fod_sdm845, hal_fingerprint) - -# Allow hal_fod_sdm845 to hal_display_hwservice -allow hal_fod_sdm845 hal_display_hwservice:hwservice_manager find; - -# Allow hal_fod_sdm845 to hal_fingerprint_hwservice -allow hal_fod_sdm845 hal_fingerprint_hwservice:hwservice_manager find; - -# Allow hal_fod_sdm845 to read and write to sysfs_fod -allow hal_fod_sdm845 sysfs_fod:file rw_file_perms; diff --git a/sepolicy/private/hal_livedisplay_kona.te b/sepolicy/private/hal_livedisplay_kona.te new file mode 100644 index 0000000..55ac7a0 --- /dev/null +++ b/sepolicy/private/hal_livedisplay_kona.te @@ -0,0 +1,12 @@ +type hal_livedisplay_kona, coredomain, domain; +hal_server_domain(hal_livedisplay_kona, hal_lineage_livedisplay) + +type hal_livedisplay_kona_exec, system_file_type, exec_type, file_type; +init_daemon_domain(hal_livedisplay_kona) + +# Allow LiveDisplay to store files under /data/misc/display and access them +allow hal_livedisplay_kona display_misc_file:dir rw_dir_perms; +allow hal_livedisplay_kona display_misc_file:file create_file_perms; + +# Grant access over LiveDisplay tuneables +allow hal_livedisplay_kona sysfs_livedisplay_tuneable:file rw_file_perms; diff --git a/sepolicy/private/hal_livedisplay_sdm845.te b/sepolicy/private/hal_livedisplay_sdm845.te deleted file mode 100644 index 97201b1..0000000 --- a/sepolicy/private/hal_livedisplay_sdm845.te +++ /dev/null @@ -1,12 +0,0 @@ -type hal_livedisplay_sdm845, coredomain, domain; -hal_server_domain(hal_livedisplay_sdm845, hal_lineage_livedisplay) - -type hal_livedisplay_sdm845_exec, system_file_type, exec_type, file_type; -init_daemon_domain(hal_livedisplay_sdm845) - -# Allow LiveDisplay to store files under /data/misc/display and access them -allow hal_livedisplay_sdm845 display_misc_file:dir rw_dir_perms; -allow hal_livedisplay_sdm845 display_misc_file:file create_file_perms; - -# Grant access over LiveDisplay tuneables -allow hal_livedisplay_sdm845 sysfs_livedisplay_tuneable:file rw_file_perms; diff --git a/sepolicy/private/hal_touch_kona.te b/sepolicy/private/hal_touch_kona.te new file mode 100644 index 0000000..f4a646e --- /dev/null +++ b/sepolicy/private/hal_touch_kona.te @@ -0,0 +1,9 @@ +type hal_touch_kona, coredomain, domain; +hal_server_domain(hal_touch_kona, hal_lineage_touch) + +type hal_touch_kona_exec, system_file_type, exec_type, file_type; +init_daemon_domain(hal_touch_kona) + +# Allow access to gesture enable nodes +allow hal_touch_kona proc_touchpanel:dir search; +allow hal_touch_kona proc_touchpanel:file rw_file_perms; diff --git a/sepolicy/private/hal_touch_sdm845.te b/sepolicy/private/hal_touch_sdm845.te deleted file mode 100644 index 95f3c6c..0000000 --- a/sepolicy/private/hal_touch_sdm845.te +++ /dev/null @@ -1,9 +0,0 @@ -type hal_touch_sdm845, coredomain, domain; -hal_server_domain(hal_touch_sdm845, hal_lineage_touch) - -type hal_touch_sdm845_exec, system_file_type, exec_type, file_type; -init_daemon_domain(hal_touch_sdm845) - -# Allow access to gesture enable nodes -allow hal_touch_sdm845 proc_touchpanel:dir search; -allow hal_touch_sdm845 proc_touchpanel:file rw_file_perms; diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 753cea6..50863fe 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -34,7 +34,7 @@ source "${HELPER}" setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true # Copyright headers and guards -write_headers "enchilada fajita" +write_headers "instantnoodle instantnoodlep" # The standard common blobs write_makefiles "${MY_DIR}/proprietary-files.txt" true diff --git a/touch/Android.bp b/touch/Android.bp index 5c94921..4b80640 100644 --- a/touch/Android.bp +++ b/touch/Android.bp @@ -14,8 +14,8 @@ // limitations under the License. cc_binary { - name: "lineage.touch@1.0-service.oneplus_sdm845", - init_rc: ["lineage.touch@1.0-service.oneplus_sdm845.rc"], + name: "lineage.touch@1.0-service.oneplus_kona", + init_rc: ["lineage.touch@1.0-service.oneplus_kona.rc"], defaults: ["hidl_defaults"], relative_install_path: "hw", srcs: [ diff --git a/touch/lineage.touch@1.0-service.oneplus_sdm845.rc b/touch/lineage.touch@1.0-service.oneplus_kona.rc similarity index 99% rename from touch/lineage.touch@1.0-service.oneplus_sdm845.rc rename to touch/lineage.touch@1.0-service.oneplus_kona.rc index cbaaf32..6cd3068 100644 --- a/touch/lineage.touch@1.0-service.oneplus_sdm845.rc +++ b/touch/lineage.touch@1.0-service.oneplus_kona.rc @@ -28,7 +28,7 @@ on boot chown system system /proc/touchpanel/up_swipe_enable chown system system /proc/touchpanel/single_tap_enable -service touch-hal-1-0 /system/bin/hw/lineage.touch@1.0-service.oneplus_sdm845 +service touch-hal-1-0 /system/bin/hw/lineage.touch@1.0-service.oneplus_kona class hal user system group system diff --git a/touch/service.cpp b/touch/service.cpp index a3e2986..7580948 100644 --- a/touch/service.cpp +++ b/touch/service.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "lineage.touch@1.0-service.oneplus_sdm845" +#define LOG_TAG "lineage.touch@1.0-service.oneplus_kona" #include #include