From a9271c85edfa1abe11afa58739b1bc59da808d7d Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Mon, 15 Jul 2024 18:14:18 -0700 Subject: [PATCH] Add -L to copy_efs_files_to_data.sh This flag preserves symlinks on the copied images. With support for this flag, we no longer need to fix up symlinks after the fact. Bug: 352567354 Test: atest EfsCopyEfsTest Flag: EXEMPT bug fix Change-Id: If26e38856672f6a4b6c55b7921b3aa6268ca9964 --- copy_efs_files_to_data.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh index 96c3a386..9d293aef 100644 --- a/copy_efs_files_to_data.sh +++ b/copy_efs_files_to_data.sh @@ -16,9 +16,9 @@ function copy_files_to_data() if [ ! -e $build_checkpoint ]; then $BIN_DIR/rm -rf $tmpdir $BIN_DIR/mkdir -p $tmpdir - $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device + $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device if [ $? -ne 0 ]; then - echo "Failed to $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device" + echo "Failed to $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device" return fi $BIN_DIR/mv $tmpdir $build_checkpoint @@ -37,9 +37,4 @@ copy_files_to_data "/dev/block/by-name/modem_userdata" "/mnt/vendor/modem_userda copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist" -# TODO(b/352567354): fixup symlinks until dump.f2fs is fixed -a=$($BIN_DIR/cat /data/vendor/copied/persist/ss/0) -$BIN_DIR/mv /data/vendor/copied/persist/ss/0 /data/vendor/copied/persist/ss/0_backup -$BIN_DIR/ln -s $a /data/vendor/copied/persist/ss/0 - $BIN_DIR/fsync /data/vendor/copied