diff --git a/Android.bp b/Android.bp index 45720c33..bf7fac7e 100644 --- a/Android.bp +++ b/Android.bp @@ -41,14 +41,3 @@ sh_binary { vendor: true, sub_dir: "hw", } - -// Filesystem: Copy efs/efs_backup/modem_userdata to /data partition -// so that they can be accessed under 16K mode. By default, these partitions -// are 4K F2FS , which can't be mounted under 16K mode. -// (b/293313353) -sh_binary { - name: "copy_efs_files_to_data", - src: "copy_efs_files_to_data.sh", - vendor: true, -} - diff --git a/conf/fstab.efs.from_data b/conf/fstab.efs.from_data deleted file mode 100644 index dbddeac5..00000000 --- a/conf/fstab.efs.from_data +++ /dev/null @@ -1,8 +0,0 @@ -# Android fstab file. -# -# Create the specific fstab file for efs partitions for flexibility -/data/vendor/copied/efs /mnt/vendor/efs none bind latemount - -/data/vendor/copied/efs_backup /mnt/vendor/efs_backup none bind latemount - -/data/vendor/copied/modem_userdata /mnt/vendor/modem_userdata none bind latemount diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc deleted file mode 100644 index a9066835..00000000 --- a/conf/init.efs.16k.rc +++ /dev/null @@ -1,27 +0,0 @@ - -service copy_efs_files_to_data /vendor/bin/copy_efs_files_to_data - user root - group root radio system audio media graphics camera - stdio_to_kmsg - oneshot - disabled - -on post-fs-data && property:ro.boot.flash.locked=0 - mkdir /data/vendor/copied 0775 radio system - restorecon_recursive /data/vendor/copied - restorecon_recursive /mnt/vendor - mount_all /vendor/etc/fstab.efs - exec_start copy_efs_files_to_data - umount_all /vendor/etc/fstab.efs - mount_all /vendor/etc/fstab.efs.from_data - mount_all /vendor/etc/fstab.persist - restorecon_recursive /mnt/vendor/efs - restorecon_recursive /mnt/vendor/efs_backup - restorecon_recursive /mnt/vendor/modem_userdata - 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 - setprop ro.vendor.persist.status mounted - diff --git a/conf/init.efs.4k.rc b/conf/init.efs.4k.rc deleted file mode 100644 index 506c7220..00000000 --- a/conf/init.efs.4k.rc +++ /dev/null @@ -1,4 +0,0 @@ -on post-fs-data - mount_all /vendor/etc/fstab.efs - mount_all /vendor/etc/fstab.persist - setprop ro.vendor.persist.status mounted diff --git a/conf/init.persist.rc b/conf/init.efs.rc similarity index 92% rename from conf/init.persist.rc rename to conf/init.efs.rc index 26a9c4d7..d15dbc13 100644 --- a/conf/init.persist.rc +++ b/conf/init.efs.rc @@ -36,3 +36,8 @@ on property:ro.vendor.persist.status=mounted chown system system /data/vendor/ss/persist/nsp restart storageproxyd + +on post-fs-data + mount_all /vendor/etc/fstab.efs + mount_all /vendor/etc/fstab.persist + setprop ro.vendor.persist.status mounted diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc index b5c707e6..c9dd76fe 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -1,5 +1,4 @@ import /vendor/etc/init/hw/init.zuma.usb.rc -import /vendor/etc/init/hw/init.persist.rc import /vendor/etc/init/hw/init.efs.rc import android.hardware.drm@1.2-service.widevine.rc import init.exynos.sensorhub.rc diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh deleted file mode 100644 index bcbe8828..00000000 --- a/copy_efs_files_to_data.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/vendor/bin/sh - -CHECKPOINT_DIR=/data/vendor/copied - -BIN_DIR=/vendor/bin - -$BIN_DIR/mkdir -p $CHECKPOINT_DIR - -function copy_files_to_data() -{ - partition_name=$(basename $1) - mount_point=$2 - tmpdir=$CHECKPOINT_DIR/$partition_name.img - build_checkpoint=$CHECKPOINT_DIR/$partition_name - if [ ! -e $build_checkpoint ]; then - $BIN_DIR/rm -rf $tmpdir - $BIN_DIR/rm -rf $build_checkpoint - cp -rp $mount_point $tmpdir - if [ $? -ne 0 ]; then - echo "Failed to cp -rp $mount_point $tmpdir" - return - fi - fsync `find $tmpdir -type fd` - mv $tmpdir $build_checkpoint - if [ $? -ne 0 ]; then - echo "mv $tmpdir $build_checkpoint" - return - fi - fsync `dirname $build_checkpoint` - fi - echo "Successfully copied $mount_point to $build_checkpoint" -} - -chmod g+rx -R /mnt/vendor/efs -chmod g+rx -R /mnt/vendor/efs_backup -chmod g+rx -R /mnt/vendor/modem_userdata -copy_files_to_data "/dev/block/by-name/efs" "/mnt/vendor/efs" -copy_files_to_data "/dev/block/by-name/efs_backup" "/mnt/vendor/efs_backup" -copy_files_to_data "/dev/block/by-name/modem_userdata" "/mnt/vendor/modem_userdata" - diff --git a/device.mk b/device.mk index ceb01f85..7277acb8 100644 --- a/device.mk +++ b/device.mk @@ -358,18 +358,7 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.rc \ - device/google/zuma/conf/init.persist.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.persist.rc - -ifeq (true,$(PRODUCT_16K_DEVELOPER_OPTION)) -PRODUCT_COPY_FILES += \ - device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.rc \ - device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data \ - -PRODUCT_PACKAGES += copy_efs_files_to_data -else -PRODUCT_COPY_FILES += \ - device/google/zuma/conf/init.efs.4k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.rc -endif + device/google/zuma/conf/init.efs.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.rc ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_COPY_FILES += \ @@ -392,8 +381,7 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem \ - device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs \ - + device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs # Shell scripts PRODUCT_PACKAGES += \ @@ -1211,4 +1199,3 @@ include device/google/gs-common/touch/twoshay/twoshay.mk # since it can't be overridden from /vendor. PRODUCT_PRODUCT_PROPERTIES += \ dumpstate.strict_run=false -