Revert "16KB: zumapro: Move copy_efs_file_to_data script to gs-c..."
Revert submission 31155502-move_copy_efs_script Reason for revert: Droidmonitor created revert due to b/390502519. Will be verifying through ABTD before submission. Reverted changes: /q/submissionid:31155502-move_copy_efs_script Change-Id: Ic090ed513bffba5abcea6e56194af71c41e880b2
This commit is contained in:
parent
571ff2a4b3
commit
34e1162d09
3 changed files with 50 additions and 1 deletions
10
Android.bp
10
Android.bp
|
@ -41,3 +41,13 @@ sh_binary {
|
||||||
vendor: true,
|
vendor: true,
|
||||||
sub_dir: "hw",
|
sub_dir: "hw",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filesystem: Copy the content of the efs/efs_backup/modem_userdata/persist
|
||||||
|
// partitions to /data partition so that they can be accessed by 16kb kernels.
|
||||||
|
// By default, these partitions are F2FS formatted with 4kb block size,
|
||||||
|
// which can't be mounted by 16kb kernels.
|
||||||
|
sh_binary {
|
||||||
|
name: "copy_efs_files_to_data",
|
||||||
|
src: "copy_efs_files_to_data.sh",
|
||||||
|
vendor: true,
|
||||||
|
}
|
||||||
|
|
39
copy_efs_files_to_data.sh
Normal file
39
copy_efs_files_to_data.sh
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/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 -rfPo $tmpdir $block_device
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to $BIN_DIR/dump.f2fs -rfPo $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
|
|
@ -45,7 +45,6 @@ include device/google/gs-common/bootctrl/bootctrl_aidl.mk
|
||||||
include device/google/gs-common/betterbug/betterbug.mk
|
include device/google/gs-common/betterbug/betterbug.mk
|
||||||
include device/google/gs-common/recorder/recorder.mk
|
include device/google/gs-common/recorder/recorder.mk
|
||||||
include device/google/gs-common/fingerprint/fingerprint.mk
|
include device/google/gs-common/fingerprint/fingerprint.mk
|
||||||
include device/google/gs-common/16kb/16kb.mk
|
|
||||||
|
|
||||||
include device/google/zumapro/dumpstate/item.mk
|
include device/google/zumapro/dumpstate/item.mk
|
||||||
|
|
||||||
|
@ -492,6 +491,7 @@ PRODUCT_COPY_FILES += \
|
||||||
device/google/zumapro/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.rc \
|
device/google/zumapro/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.rc \
|
||||||
device/google/zumapro/conf/fstab.efs.from_data:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs.from_data
|
device/google/zumapro/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
|
PRODUCT_PACKAGES += fsck.f2fs.vendor
|
||||||
else
|
else
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue