device_google_zuma/Android.bp
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

54 lines
1.6 KiB
Text

soong_namespace {
imports: [
"hardware/google/interfaces",
"hardware/google/pixel",
],
}
package {
default_applicable_licenses: ["device_google_zuma_license"],
}
// Added automatically by a large-scale-change that took the approach of
// 'apply every license found to every target'. While this makes sure we respect
// every license restriction, it may not be entirely correct.
//
// e.g. GPL in an MIT project might only apply to the contrib/ directory.
//
// Please consider splitting the single license below into multiple licenses,
// taking care not to lose any license_kind information, and overriding the
// default license using the 'licenses: [...]' property on targets as needed.
//
// For unused files, consider creating a 'fileGroup' with "//visibility:private"
// to attach the license to, and including a comment whether the files may be
// used in the current project.
// See: http://go/android-license-faq
license {
name: "device_google_zuma_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
],
license_text: [
"NOTICE",
],
}
sh_binary {
name: "disable_contaminant_detection.sh",
src: "disable_contaminant_detection.sh",
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,
}