# It is important to import this part after the script that mounts fstab, # otherwise the /data partition will not be ready, and everything here will # fail. on fs # We chown/chmod /data again so because mount is run as root + defaults chown system system /data chmod 0771 /data # We restorecon /data in case the userdata partition has been reset. restorecon /data # Fake OEM filesystem that inherits oem.prop file from the real one mkdir /data/oem 0771 system system # Copy the /oem partition contents and override oem.prop if needed exec u:r:init-unified:s0 system system -- /system/bin/init.unified.sh copy /oem/oem.prop /data/oem/oem.prop copy /data/oem/oem_override.prop /data/oem/oem.prop chmod 0644 /data/oem/oem.prop umount /oem mount none /data/oem /oem bind mount none /data/oem /oem bind remount ro nosuid nodev