Revert "Copy files on EFS partition to /data on boot"
Revert submission 26822004 Reason for revert: Potential culprit for b/339099720- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reverted changes: /q/submissionid:26822004 Change-Id: Ie9598a3b3b56c8ce26f475079798c44314696f44
This commit is contained in:
parent
327973016e
commit
4053a85fe7
8 changed files with 7 additions and 106 deletions
11
Android.bp
11
Android.bp
|
@ -41,14 +41,3 @@ sh_binary {
|
||||||
vendor: true,
|
vendor: true,
|
||||||
sub_dir: "hw",
|
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,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# Android fstab file.
|
|
||||||
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
|
||||||
# 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
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
|
|
@ -36,3 +36,8 @@ on property:ro.vendor.persist.status=mounted
|
||||||
chown system system /data/vendor/ss/persist/nsp
|
chown system system /data/vendor/ss/persist/nsp
|
||||||
|
|
||||||
restart storageproxyd
|
restart storageproxyd
|
||||||
|
|
||||||
|
on post-fs-data
|
||||||
|
mount_all /vendor/etc/fstab.efs
|
||||||
|
mount_all /vendor/etc/fstab.persist
|
||||||
|
setprop ro.vendor.persist.status mounted
|
|
@ -1,5 +1,4 @@
|
||||||
import /vendor/etc/init/hw/init.zuma.usb.rc
|
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 /vendor/etc/init/hw/init.efs.rc
|
||||||
import android.hardware.drm@1.2-service.widevine.rc
|
import android.hardware.drm@1.2-service.widevine.rc
|
||||||
import init.exynos.sensorhub.rc
|
import init.exynos.sensorhub.rc
|
||||||
|
|
|
@ -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"
|
|
||||||
|
|
17
device.mk
17
device.mk
|
@ -358,18 +358,7 @@ PRODUCT_COPY_FILES += \
|
||||||
|
|
||||||
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.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
|
device/google/zuma/conf/init.efs.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.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
|
|
||||||
|
|
||||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
|
@ -392,8 +381,7 @@ PRODUCT_PACKAGES += \
|
||||||
PRODUCT_COPY_FILES += \
|
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.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.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
|
# Shell scripts
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
@ -1211,4 +1199,3 @@ include device/google/gs-common/touch/twoshay/twoshay.mk
|
||||||
# since it can't be overridden from /vendor.
|
# since it can't be overridden from /vendor.
|
||||||
PRODUCT_PRODUCT_PROPERTIES += \
|
PRODUCT_PRODUCT_PROPERTIES += \
|
||||||
dumpstate.strict_run=false
|
dumpstate.strict_run=false
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue