Only copy EFS files if /data is on ext4

This reduces the amount of computation needed on critical
boot path for F2FS devices. Boot time is expected to improve
with this patch.

Bug: 341216848
Test: boot device with ext4 and f2fs
Change-Id: I7311a22a7bf9773d3909656d98cc578a43cb9477
This commit is contained in:
Kelvin Zhang
2024-05-29 11:05:39 -07:00
parent ba614b35b9
commit 5978809ae7

View File

@@ -6,7 +6,7 @@ service copy_efs_files_to_data /vendor/bin/copy_efs_files_to_data
oneshot
disabled
on post-fs-data && property:ro.boot.flash.locked=0
on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=ext4
mkdir /data/vendor/copied 0775 radio system
restorecon_recursive /data/vendor/copied
restorecon_recursive /mnt/vendor
@@ -23,6 +23,11 @@ on post-fs-data && property:ro.boot.flash.locked=0
restorecon_recursive /data/vendor/ss
setprop ro.vendor.persist.status mounted
on post-fs-data && property:ro.boot.flash.locked=0 && property:ro.fstype.data=f2fs
mount_all /vendor/etc/fstab.efs
mount_all /vendor/etc/fstab.persist
setprop ro.vendor.persist.status mounted
on post-fs-data && property:ro.boot.flash.locked=1
mount_all /vendor/etc/fstab.efs
mount_all /vendor/etc/fstab.persist