Add floating_feature.xml overwrite for S9/N9. Currently it declares Stereo feature
Change-Id: I8437bf2373cc82561d978c4db0891b9df28083e0
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 @@
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