From 39eccba58f0e6085f5837728ef489420b925ebca Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Thu, 1 Feb 2024 16:04:39 -0800 Subject: [PATCH 1/5] Support booting on ext4 for zuma devices When a user opts into 16K developer option, we would need to convert the /data and /metadata partition into ext4. Add necessary fstab entries for ext4 so that zuma devices can boot on ext4. This CL does not automatically switch existing devices to ext4, the newly added fstab entries are intentionally marked as "non-formattable", so that we don't accidentally format a wiped device as ext4. This CL merely allows the device to boot if the /data partition is already formatted as ext4. Test: adb shell cmd recovery wipe ext4 , make sure device boots Bug: 293313353 Change-Id: I3a2a2e9d09cdea884f58b509a06c6829938dc369 --- conf/fstab.zuma.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/fstab.zuma.in b/conf/fstab.zuma.in index bcb0c2f5..903bfe47 100644 --- a/conf/fstab.zuma.in +++ b/conf/fstab.zuma.in @@ -16,7 +16,9 @@ vendor_dlkm /vendor_dlkm /dev/block/platform/13200000.ufs/by-name/init_boot /init_boot emmc defaults slotselect,avb=init_boot,first_stage_mount /dev/block/platform/13200000.ufs/by-name/misc /misc emmc defaults wait /dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount +/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,first_stage_mount,metadata_csum #/dev/block/platform/13200000.ufs/by-name/pvmfw /pvmfw emmc defaults wait,slotselect,avb=pvmfw,first_stage_mount /dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,device=zoned:/dev/block/by-name/zoned_device +/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption /dev/block/platform/13200000.ufs/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount /devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto From 7251274bee1bc27227f92db1c0707c043d8bb657 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Wed, 13 Mar 2024 15:45:45 -0700 Subject: [PATCH 2/5] Copy files on EFS partition to /data on boot During boot, this CL adds the following sequence of actions: 1. mount original efs partitions(most likely f2fs) on /mnt/vendor/efs 2. copy files in /mnt/vendor/efs to /data/vendor/copied/efs.img 3. fsync all the files in /data/vendor/copied/efs.img 4. rename /data/vendor/copied/efs.img to /data/vendor/copied/efs 5. bind-mount /data/vendor/copied/efs to /mnt/vendor/efs 6. repeat 1-5 for efs_backup and modem_userdata The original EFS partitions are mounted and only used for file copying, no destructive action done on original efs partitions. Test: reformat /data as ext4, boot the device Bug: 319335586 Change-Id: I4c4024b4cad18199226f5644f98254b2230574d6 --- Android.bp | 11 ++++++++ conf/fstab.efs.from_data | 8 ++++++ conf/init.efs.16k.rc | 27 ++++++++++++++++++ conf/init.efs.4k.rc | 4 +++ conf/{init.efs.rc => init.persist.rc} | 5 ---- conf/init.zuma.rc | 1 + copy_efs_files_to_data.sh | 40 +++++++++++++++++++++++++++ device.mk | 17 ++++++++++-- 8 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 conf/fstab.efs.from_data create mode 100644 conf/init.efs.16k.rc create mode 100644 conf/init.efs.4k.rc rename conf/{init.efs.rc => init.persist.rc} (92%) create mode 100644 copy_efs_files_to_data.sh diff --git a/Android.bp b/Android.bp index bf7fac7e..45720c33 100644 --- a/Android.bp +++ b/Android.bp @@ -41,3 +41,14 @@ 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 new file mode 100644 index 00000000..dbddeac5 --- /dev/null +++ b/conf/fstab.efs.from_data @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 00000000..a9066835 --- /dev/null +++ b/conf/init.efs.16k.rc @@ -0,0 +1,27 @@ + +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 new file mode 100644 index 00000000..506c7220 --- /dev/null +++ b/conf/init.efs.4k.rc @@ -0,0 +1,4 @@ +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.efs.rc b/conf/init.persist.rc similarity index 92% rename from conf/init.efs.rc rename to conf/init.persist.rc index d15dbc13..26a9c4d7 100644 --- a/conf/init.efs.rc +++ b/conf/init.persist.rc @@ -36,8 +36,3 @@ 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 c9dd76fe..b5c707e6 100644 --- a/conf/init.zuma.rc +++ b/conf/init.zuma.rc @@ -1,4 +1,5 @@ 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 new file mode 100644 index 00000000..bcbe8828 --- /dev/null +++ b/copy_efs_files_to_data.sh @@ -0,0 +1,40 @@ +#!/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 7277acb8..ceb01f85 100644 --- a/device.mk +++ b/device.mk @@ -358,7 +358,18 @@ 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.efs.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.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 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_COPY_FILES += \ @@ -381,7 +392,8 @@ 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 += \ @@ -1199,3 +1211,4 @@ include device/google/gs-common/touch/twoshay/twoshay.mk # since it can't be overridden from /vendor. PRODUCT_PRODUCT_PROPERTIES += \ dumpstate.strict_run=false + From 62b3d171c7c134e83ffcb23268bd8b029031eeb6 Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Tue, 16 Apr 2024 15:48:35 -0700 Subject: [PATCH 3/5] Copy persist partition files to /data on boot Since /persisit was previously mounted during eraly-init stage, this CL delays the /persist mount to post-fs-data stage. Actions which depends on the /persist partition are also moved. Bug: 319335586 Change-Id: I0e70f672b9a5f4b05b95dd30b0a74bb8f91f399a --- conf/fstab.efs.from_data | 2 ++ conf/init.efs.16k.rc | 5 ++++- copy_efs_files_to_data.sh | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/fstab.efs.from_data b/conf/fstab.efs.from_data index dbddeac5..4845e3ee 100644 --- a/conf/fstab.efs.from_data +++ b/conf/fstab.efs.from_data @@ -6,3 +6,5 @@ /data/vendor/copied/efs_backup /mnt/vendor/efs_backup none bind latemount /data/vendor/copied/modem_userdata /mnt/vendor/modem_userdata none bind latemount + +/data/vendor/copied/persist /mnt/vendor/persist none bind latemount diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc index a9066835..cfe1e2aa 100644 --- a/conf/init.efs.16k.rc +++ b/conf/init.efs.16k.rc @@ -11,13 +11,16 @@ on post-fs-data && property:ro.boot.flash.locked=0 restorecon_recursive /data/vendor/copied restorecon_recursive /mnt/vendor mount_all /vendor/etc/fstab.efs + mount_all /vendor/etc/fstab.persist exec_start copy_efs_files_to_data umount_all /vendor/etc/fstab.efs + umount_all /vendor/etc/fstab.persist 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 + restorecon_recursive /mnt/vendor/persist + restorecon_recursive /data/vendor/ss setprop ro.vendor.persist.status mounted on post-fs-data && property:ro.boot.flash.locked=1 diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh index bcbe8828..898bc8e9 100644 --- a/copy_efs_files_to_data.sh +++ b/copy_efs_files_to_data.sh @@ -38,3 +38,5 @@ 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" +chmod g+rx -R /mnt/vendor/persist +copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist" From 327973016eb5eeacedac135df7485db9b21a8d2a Mon Sep 17 00:00:00 2001 From: Pechetty Sravani Date: Tue, 7 May 2024 07:19:37 +0000 Subject: [PATCH 4/5] Revert "Copy persist partition files 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: I744fccbf1aacd817ca1a0c6f4a121393307c8797 --- conf/fstab.efs.from_data | 2 -- conf/init.efs.16k.rc | 5 +---- copy_efs_files_to_data.sh | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/conf/fstab.efs.from_data b/conf/fstab.efs.from_data index 4845e3ee..dbddeac5 100644 --- a/conf/fstab.efs.from_data +++ b/conf/fstab.efs.from_data @@ -6,5 +6,3 @@ /data/vendor/copied/efs_backup /mnt/vendor/efs_backup none bind latemount /data/vendor/copied/modem_userdata /mnt/vendor/modem_userdata none bind latemount - -/data/vendor/copied/persist /mnt/vendor/persist none bind latemount diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc index cfe1e2aa..a9066835 100644 --- a/conf/init.efs.16k.rc +++ b/conf/init.efs.16k.rc @@ -11,16 +11,13 @@ on post-fs-data && property:ro.boot.flash.locked=0 restorecon_recursive /data/vendor/copied restorecon_recursive /mnt/vendor mount_all /vendor/etc/fstab.efs - mount_all /vendor/etc/fstab.persist exec_start copy_efs_files_to_data umount_all /vendor/etc/fstab.efs - umount_all /vendor/etc/fstab.persist 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 - restorecon_recursive /mnt/vendor/persist - restorecon_recursive /data/vendor/ss setprop ro.vendor.persist.status mounted on post-fs-data && property:ro.boot.flash.locked=1 diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh index 898bc8e9..bcbe8828 100644 --- a/copy_efs_files_to_data.sh +++ b/copy_efs_files_to_data.sh @@ -38,5 +38,3 @@ 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" -chmod g+rx -R /mnt/vendor/persist -copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist" From 4053a85fe78a3cbfbc93c460fd43de356db1745f Mon Sep 17 00:00:00 2001 From: Pechetty Sravani Date: Tue, 7 May 2024 07:19:37 +0000 Subject: [PATCH 5/5] 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 --- Android.bp | 11 -------- conf/fstab.efs.from_data | 8 ------ conf/init.efs.16k.rc | 27 ------------------ conf/init.efs.4k.rc | 4 --- conf/{init.persist.rc => init.efs.rc} | 5 ++++ conf/init.zuma.rc | 1 - copy_efs_files_to_data.sh | 40 --------------------------- device.mk | 17 ++---------- 8 files changed, 7 insertions(+), 106 deletions(-) delete mode 100644 conf/fstab.efs.from_data delete mode 100644 conf/init.efs.16k.rc delete mode 100644 conf/init.efs.4k.rc rename conf/{init.persist.rc => init.efs.rc} (92%) 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/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 -