diff --git a/base.mk b/base.mk index 3c6b5e1..dfef4d1 100644 --- a/base.mk +++ b/base.mk @@ -93,5 +93,6 @@ PRODUCT_COPY_FILES += \ device/phh/treble/files/oneplus6-synaptics_s3320.kl:system/phh/oneplus6-synaptics_s3320.kl \ device/phh/treble/files/huawei-fingerprint.kl:system/phh/huawei/fingerprint.kl \ device/phh/treble/files/samsung-sec_e-pen.idc:system/usr/idc/sec_e-pen.idc \ + device/phh/treble/files/samsung-9810-floating_feature.xml:system/ph/sam-9810-flo_feat.xml \ SELINUX_IGNORE_NEVERALLOWS := true diff --git a/files/samsung-9810-floating_feature.xml b/files/samsung-9810-floating_feature.xml new file mode 100644 index 0000000..430b54e --- /dev/null +++ b/files/samsung-9810-floating_feature.xml @@ -0,0 +1,5 @@ + + + TRUE + + diff --git a/rw-system.sh b/rw-system.sh index a31af49..d4e2304 100644 --- a/rw-system.sh +++ b/rw-system.sh @@ -178,3 +178,18 @@ fi if getprop ro.hardware |grep -qF samsungexynos;then setprop debug.sf.latch_unsignaled 1 fi + +if getprop ro.vendor.build.fingerprint | grep -qE -e ".*(crown|star)[q2]*lte.*" -e ".*(SC-0[23]K|SCV3[89]).*";then + for f in /vendor/lib/libfloatingfeature.so /vendor/lib64/libfloatingfeature.so;do + [ ! -f $f ] && continue + ctxt="$(ls -lZ $f |grep -oE 'u:object_r:[^:]*:s0')" + b="$(echo "$f"|tr / _)" + + cp -a $f /mnt/phh/$b + sed -i \ + -e 's;/system/etc/floating_feature.xml;/system/ph/sam-9810-flo_feat.xml;g' \ + /mnt/phh/$b + chcon "$ctxt" /mnt/phh/$b + mount -o bind /mnt/phh/$b $f + done +fi