utils: eth_mac_addr: Fix the GSI/Treble compatibility
This patch fixes this script, which update Ethernet MAC
address on DB845c and RB5, to work with Android GSI images.
So we no longer copy the scripts to system.img and we switch
from using "/system/bin/ip" to "/vendor/bin/ifconfig"
because "/vendor/bin/ip" doesn't exist and selinux denials
for using "/system/bin/ip" from vendor domain are just to
complex to handle for me.
Change-Id: Icf71c349c74a87f784b2cf1ff7b8604b1c43b03f
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 014cd9c..82370f6 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -49,10 +49,10 @@
/data/vendor/readwrite(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
/data/vendor/readonly(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
-/system/bin/set_ethaddr\.sh u:object_r:set_ethaddr_exec:s0
/system/bin/tinymix u:object_r:tinymix_exec:s0
/vendor/bin/grep u:object_r:vendor_toolbox_exec:s0
+/vendor/bin/ifconfig u:object_r:vendor_toolbox_exec:s0
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software u:object_r:hal_gatekeeper_default_exec:s0
/vendor/bin/pd-mapper u:object_r:pd_mapper_exec:s0
/vendor/bin/qrtr-cfg u:object_r:qrtr_exec:s0
@@ -61,6 +61,7 @@
/vendor/bin/tqftpserv u:object_r:tqftpserv_exec:s0
/vendor/bin/suspend_blocker u:object_r:suspend_blocker_exec:s0
/vendor/bin/set_bdaddr\.sh u:object_r:set_bdaddr_exec:s0
+/vendor/bin/set_ethaddr\.sh u:object_r:set_ethaddr_exec:s0
/vendor/bin/set_hw\.sh u:object_r:set_hw_exec:s0
/vendor/bin/set_udc\.sh u:object_r:set_udc_exec:s0