From 5978809ae71815193b8c0a7395f4e103ec269461 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Wed, 29 May 2024 11:05:39 -0700 Subject: [PATCH] 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 --- conf/init.efs.16k.rc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc index cfe1e2aa..9e891680 100644 --- a/conf/init.efs.16k.rc +++ b/conf/init.efs.16k.rc @@ -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