Commit graph

3 commits

Author SHA1 Message Date
Vilas Bhat
0ec2cdae26 Revert "Revert "16KB: Move copy_efs_file_to_data script to gs-co..."
Revert submission 31345232-revert-31155502-move_copy_efs_script-IXYVMGOHBR

Reason for revert: Re-submitting with fix for breaking target

Reverted changes: /q/submissionid:31345232-revert-31155502-move_copy_efs_script-IXYVMGOHBR

Bug: 383151792
Flag: EXEMPT bugfix
Change-Id: I6ae4d5f26325e0cf732792483e056132226633e2
2025-01-16 17:09:09 -08:00
Priyanka Advani (xWF)
0594fa2887 Revert "16KB: Move copy_efs_file_to_data script to gs-common"
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: Iba1b7ffca817e2750481f44c86a38b083b795353
2025-01-16 16:50:41 -08:00
Vilas Bhat
23425fbc54 16KB: Move copy_efs_file_to_data script to gs-common
There are 4 partitions that are flashed at the factory and use F2FS
fs with 4KB block size:

- /dev/block/by-name/efs
- /dev/block/by-name/efs_backup
- /dev/block/by-name/modem_userdata
- /dev/block/by-name/persist

These partitions can NOT be mounted by 16KB kernels because F2FS
expects BLOCK_SIZE == PAGE_SIZE.

In order for the files in these partitions to be accessible to 16KB
kernels, the dump.f2fs tool is used.

This change will perform these steps at boot time ONLY for 16KB mode.
For every partition (efs/efs_backup/modem_userdata/persist):

1. Use dump.f2fs to copy the content of the partition
   to /data/vendor/copied/<partition name>.img.
2. If the copy was succesfull, rename /data/vendor/copied/<partition
   name>.img to /data/vendor/copied/<partition name>
3. fsync the content of the directory /data/vendor/copied/<partition
   name>.

After the content of the partitions is in /data/vendor/copied,
bind-mount the partitions to the directory /mnt/vendor. See
conf/fstab.efs.from_data.

Note: This change ONLY applies to 16KB kernels. This change does not
modify the original partitions.

Test: Boot test and Enable16kbTest for Pixel 8 & Pixel 9 targets
      Fingerprint and Phone Calls work in 16KB mode
Bug: 383151792
Flag: EXEMPT bugfix
Change-Id: Ib67fd8678f8bd97bd50663657046c28137bd4435
2025-01-16 13:45:48 -08:00