From 126ea8b7758dbcf2da102c60c8acdd85a75047f0 Mon Sep 17 00:00:00 2001 From: Vilas Bhat Date: Fri, 3 Jan 2025 20:08:57 +0000 Subject: [PATCH] 16KB: zuma: Move copy_efs_file_to_data script to gs-common Bug: 383151792 Flag: EXEMPT bugfix Test: Enable16kbTest on Pixel 8 target Fingerprint and Phone Calls work in 16 KB mode Change-Id: I3c4fa84887cbb46c9f171a0f0a31f4d47d5c4c6e --- Android.bp | 11 ----------- copy_efs_files_to_data.sh | 40 --------------------------------------- device.mk | 2 +- 3 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 copy_efs_files_to_data.sh 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/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh deleted file mode 100644 index 9d293aef..00000000 --- a/copy_efs_files_to_data.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/vendor/bin/sh - -CHECKPOINT_DIR=/data/vendor/copied - -export BIN_DIR=/vendor/bin - -$BIN_DIR/mkdir -p $CHECKPOINT_DIR - -function copy_files_to_data() -{ - block_device=$1 - 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/mkdir -p $tmpdir - $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device - if [ $? -ne 0 ]; then - echo "Failed to $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device" - return - fi - $BIN_DIR/mv $tmpdir $build_checkpoint - if [ $? -ne 0 ]; then - echo "mv $tmpdir $build_checkpoint" - return - fi - $BIN_DIR/fsync `dirname $build_checkpoint` - fi - echo "Successfully copied $mount_point to $build_checkpoint" -} - -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" - -copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist" - -$BIN_DIR/fsync /data/vendor/copied diff --git a/device.mk b/device.mk index 75405efd..34e5a116 100644 --- a/device.mk +++ b/device.mk @@ -45,6 +45,7 @@ include device/google/gs-common/gyotaku_app/gyotaku.mk include device/google/gs-common/bootctrl/bootctrl_aidl.mk include device/google/gs-common/betterbug/betterbug.mk include device/google/gs-common/fingerprint/fingerprint.mk +include device/google/gs-common/16kb/16kb.mk include device/google/zuma/dumpstate/item.mk @@ -390,7 +391,6 @@ PRODUCT_COPY_FILES += \ device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/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 PRODUCT_PACKAGES += fsck.f2fs.vendor else PRODUCT_COPY_FILES += \