From df3b54fa20d563fffe7b5a73b26daa9a9dcac679 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 15 Nov 2021 17:06:32 -0500 Subject: [PATCH] Fixup camera on flox Camera works in OpenCamera, but it can't actually take pictures. Switch to Camera2 instead, tested pictures and videos working. Also fixup compile issue with oneplus/msm8998-common And refresh some patchers Signed-off-by: Tad --- Patches/Common/android_vendor_divested/packages.mk | 6 +++++- .../CVE_Patchers/android_kernel_fxtec_msm8998.sh | 8 +------- Scripts/LineageOS-18.1/Functions.sh | 2 +- Scripts/LineageOS-18.1/Patch.sh | 5 +++++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Patches/Common/android_vendor_divested/packages.mk b/Patches/Common/android_vendor_divested/packages.mk index 06aa3944..6a133701 100644 --- a/Patches/Common/android_vendor_divested/packages.mk +++ b/Patches/Common/android_vendor_divested/packages.mk @@ -15,10 +15,14 @@ PRODUCT_PACKAGES += \ EtarPrebuilt \ FennecDOS \ FairEmail \ - OpenCamera \ SimpleGallery \ VanillaMusic +ifeq ($(findstring flox,$(TARGET_PRODUCT)),) +PRODUCT_PACKAGES += \ + OpenCamera +endif + # Extras PRODUCT_PACKAGES += \ TalkBack \ diff --git a/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_fxtec_msm8998.sh b/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_fxtec_msm8998.sh index 872ea78e..5e5b57f6 100644 --- a/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_fxtec_msm8998.sh +++ b/Scripts/LineageOS-18.1/CVE_Patchers/android_kernel_fxtec_msm8998.sh @@ -1,11 +1,5 @@ #!/bin/bash cd "$DOS_BUILD_BASE""kernel/fxtec/msm8998" -git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0285-0286.patch --exclude=Makefile -git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0286-0287.patch --exclude=Makefile -git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0287-0288.patch --exclude=Makefile -git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0288-0289.patch --exclude=Makefile -git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0289-0290.patch --exclude=Makefile -git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0290-0291.patch --exclude=Makefile git apply $DOS_PATCHES_LINUX_CVES/0001-LinuxIncrementals/4.4/4.4.0291-0292.patch --exclude=Makefile git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening/4.4/0002.patch git apply $DOS_PATCHES_LINUX_CVES/0008-Graphene-Kernel_Hardening/4.4/0006.patch @@ -53,5 +47,5 @@ git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11608/4.4/0006.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-11608/^5.6.1/0001.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-14386/3.10-^4.4/0002.patch git apply $DOS_PATCHES_LINUX_CVES/CVE-2020-16119/^5.10/0002.patch -editKernelLocalversion "-dos.p53" +editKernelLocalversion "-dos.p47" cd "$DOS_BUILD_BASE" diff --git a/Scripts/LineageOS-18.1/Functions.sh b/Scripts/LineageOS-18.1/Functions.sh index fa2090be..40f4592d 100644 --- a/Scripts/LineageOS-18.1/Functions.sh +++ b/Scripts/LineageOS-18.1/Functions.sh @@ -156,7 +156,7 @@ enableDexPreOpt() { if [ -f BoardConfig.mk ]; then echo "WITH_DEXPREOPT := true" >> BoardConfig.mk; echo "WITH_DEXPREOPT_DEBUG_INFO := false" >> BoardConfig.mk; - #m8: /system partition too small + #m8, jfltexx: /system partition too small if [ "$1" != "device/htc/m8" ] && [ "$1" != "device/samsung/jfltexx" ]; then echo "WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false" >> BoardConfig.mk; echo "Enabled full dexpreopt for $1"; diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 057c1966..0970fad9 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -302,6 +302,10 @@ fi; # if enterAndClear "device/asus/flox"; then compressRamdisks; +echo "allow camera system_data_root_file:dir rw_dir_perms;" >> sepolicy/vendor/camera.te; #Fixup camera +echo "allow camera system_data_root_file:sock_file { create unlink write setattr };" >> sepolicy/vendor/camera.te; +echo "allow cameraserver sysfs_soc:dir r_dir_perms;" >> sepolicy/vendor/cameraserver.te; +echo "allow cameraserver sysfs_soc:file r_file_perms;" >> sepolicy/vendor/cameraserver.te; fi; if enterAndClear "device/essential/mata"; then @@ -363,6 +367,7 @@ fi; if enterAndClear "device/oneplus/msm8998-common"; then awk -i inplace '!/TARGET_RELEASETOOLS_EXTENSIONS/' BoardConfigCommon.mk; #disable releasetools to fix delta ota generation sed -i '/PRODUCT_SYSTEM_VERITY_PARTITION/iPRODUCT_VENDOR_VERITY_PARTITION := /dev/block/bootdevice/by-name/vendor' common.mk; #Support verity on /vendor too +awk -i inplace '!/vendor_sensors_dbg_prop/' sepolicy/vendor/hal_camera_default.te; #fixup fi; if enterAndClear "device/oppo/common"; then