Commit graph

11 commits

Author SHA1 Message Date
Kelvin Zhang
2d0a254101 Mount persist partition in early-init
The graphics hal might need to access /persist early in the boot
process. So mount persist early for 4K devices.

Test: boot 4K device
Bug: 338504890
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:73a68dd6d3794ed8a4e791f2c86c4e55a61ea2aa)
Merged-In: I4b2a0a61ebaff5d85a4daac445d81ae3d21aa9c3
Change-Id: I4b2a0a61ebaff5d85a4daac445d81ae3d21aa9c3
2024-07-10 05:10:21 +00:00
Kelvin Zhang
9d0f747603 Only copy efs files to /data if device is 16K page size
Test: Boot device, test dev options
Bug: 341216848
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:763984677a0630a2100b150c057c3d128a8f6c3d)
Merged-In: I0bf328b8ff90e125dcbca5261fb8dd4e0ad458d8
Change-Id: I0bf328b8ff90e125dcbca5261fb8dd4e0ad458d8
2024-07-10 05:10:05 +00:00
Kelvin Zhang
d3ce2b9873 Restore permission of efs/efs_backup/modem_userdata after mount
Test: Boot device, erase EFS, check selinux labels
Bug: 345803836
Change-Id: Ia511731e001d74409b40b087432e3535ca5cfc8f
2024-06-11 09:13:27 -07:00
Kelvin Zhang
e3ed1eabdf Use dump.f2fs to extract files from efs partitions
Previously, we rely on mount points to copy files out of
efs partitions. Switch over to dump.f2fs to read directly
from block device without mounting. This allows us to copy
files out of efs partition in both 4K and 16K mode.

Test: Boot dev option enabled ext4 device
Bug: 340965747
Change-Id: I9d3f3d5200adc31f13298488b5be068b0fe7c7f4
2024-06-04 10:02:36 -07:00
Kelvin Zhang
5978809ae7 Only copy EFS files if /data is on ext4
This reduces the amount of computation needed on critical
boot path for F2FS devices. Boot time is expected to improve
with this patch.

Bug: 341216848
Test: boot device with ext4 and f2fs
Change-Id: I7311a22a7bf9773d3909656d98cc578a43cb9477
2024-05-30 16:08:24 -07:00
Kelvin Zhang
4bc3f5a338 Reland: 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: I6bcc775f16331905c6896f3a2ec5bbea9e20744f
2024-05-07 21:31:13 -07:00
Kelvin Zhang
b08f8dbf23 Reland: 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: Ide78be316778acfc5c582c4a7b78853796cf4c1e
2024-05-07 21:31:13 -07:00
Pechetty Sravani
4053a85fe7 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
2024-05-07 07:19:37 +00:00
Pechetty Sravani
327973016e 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
2024-05-07 07:19:37 +00:00
Kelvin Zhang
62b3d171c7 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
2024-05-06 15:27:46 -07:00
Kelvin Zhang
7251274bee 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
2024-05-06 15:27:46 -07:00