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/BoardConfig-common.mk b/BoardConfig-common.mk
index fee3bb32..692d2c62 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -391,11 +391,19 @@ KERNEL_MODULES := $(wildcard $(KERNEL_MODULE_DIR)/*.ko)
BOARD_SYSTEM_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_MODULE_DIR)/system_dlkm.modules.blocklist
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.blocklist
-BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_kernel_boot.modules.load))
-ifndef BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD
+# Prebuilt kernel modules that are *not* listed in vendor_kernel_boot.modules.load
+BOARD_PREBUILT_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES = fips140.ko
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_EXTRA = $(foreach k,$(BOARD_PREBUILT_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES),$(if $(wildcard $(KERNEL_MODULE_DIR)/$(k)), $(k)))
+
+# Kernel modules that are listed in vendor_kernel_boot.modules.load
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_FILE := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_kernel_boot.modules.load))
+ifndef BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_FILE
$(error vendor_kernel_boot.modules.load not found or empty)
endif
-BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD)))
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD := $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_EXTRA)
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD += $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_FILE)
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_EXTRA))
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES += $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD_FILE)))
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.load))
ifndef BOARD_VENDOR_KERNEL_MODULES_LOAD
diff --git a/CopyEfsTest/Android.bp b/CopyEfsTest/Android.bp
new file mode 100644
index 00000000..52c5de4e
--- /dev/null
+++ b/CopyEfsTest/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2024 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ default_applicable_licenses: ["device_google_zuma_license"],
+}
+
+java_test_host {
+ name: "CopyEfsTest",
+ // Include all test java files
+ srcs: ["src/**/*.java"],
+ static_libs: [
+ "junit",
+ "platform-test-annotations",
+ "truth",
+ ],
+ libs: [
+ "tradefed",
+ "compatibility-host-util",
+ "compatibility-tradefed",
+ ],
+ test_suites: ["device-tests"],
+ test_config: "AndroidTest.xml",
+}
diff --git a/CopyEfsTest/AndroidTest.xml b/CopyEfsTest/AndroidTest.xml
new file mode 100644
index 00000000..398991f3
--- /dev/null
+++ b/CopyEfsTest/AndroidTest.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CopyEfsTest/TEST_MAPPING b/CopyEfsTest/TEST_MAPPING
new file mode 100644
index 00000000..37a720b5
--- /dev/null
+++ b/CopyEfsTest/TEST_MAPPING
@@ -0,0 +1,8 @@
+{
+ "postsubmit": [
+ {
+ "name": "CopyEfsTest"
+ }
+ ]
+}
+
diff --git a/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/CopyEfsTest/src/com/android/test/CopyEfsTest.java
new file mode 100644
index 00000000..b00ef2fc
--- /dev/null
+++ b/CopyEfsTest/src/com/android/test/CopyEfsTest.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
+
+import android.platform.test.annotations.AppModeFull;
+
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
+import com.android.tradefed.testtype.junit4.DeviceTestRunOptions;
+import com.android.tradefed.util.RunUtil;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.BufferedReader;
+import java.io.StringReader;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CopyEfsTest extends BaseHostJUnit4Test {
+
+
+
+
+ @Test
+ @AppModeFull
+ public void copyEfsTest() throws Exception {
+
+ getDevice().enableAdbRoot();
+
+ // This test can be run on OEM unlocked device only as unlocking bootloader requires
+ // manual intervention.
+ String result = getDevice().getProperty("ro.boot.flash.locked");
+ assumeTrue("0".equals(result));
+ final String dataFstype = getFsTypeFor("/data");
+ assertTrue(!dataFstype.isEmpty());
+ if (!dataFstype.equals("ext4")) {
+ getDevice().executeShellCommand("cmd recovery wipe ext4");
+ RunUtil.getDefault().sleep(10000);
+ // Wait for 2 mins device to be online againg
+ getDevice().waitForDeviceOnline(120000);
+ getDevice().enableAdbRoot();
+ }
+ assertEquals("ext4", getFsTypeFor("/data"));
+ String dataBlockDev = getBlockDevFor("/data");
+ assertEquals(dataBlockDev, getBlockDevFor("/mnt/vendor/efs"));
+ assertEquals(dataBlockDev, getBlockDevFor("/mnt/vendor/efs_backup"));
+ assertEquals(dataBlockDev, getBlockDevFor("/mnt/vendor/modem_userdata"));
+ }
+
+ private String[] getMountInfo(String mountPoint) throws Exception {
+ String result = getDevice().executeShellCommand("cat /proc/mounts");
+ BufferedReader br = new BufferedReader(new StringReader(result));
+ String line;
+ while ((line = br.readLine()) != null) {
+ final String[] fields = line.split(" ");
+ final String device = fields[0];
+ final String partition = fields[1];
+ final String fsType = fields[2];
+ if (partition.equals(mountPoint)) {
+ return fields;
+ }
+ }
+ return null;
+ }
+ private String getFsTypeFor(String mountPoint) throws Exception {
+ String[] result = getMountInfo(mountPoint);
+ if (result == null) {
+ return "";
+ }
+ return result[2];
+ }
+ private String getBlockDevFor(String mountPoint) throws Exception {
+ String[] result = getMountInfo(mountPoint);
+ if (result == null) {
+ return "";
+ }
+ return result[0];
+ }
+}
diff --git a/conf/Android.bp b/conf/Android.bp
index 58f11f32..3958e167 100644
--- a/conf/Android.bp
+++ b/conf/Android.bp
@@ -14,16 +14,6 @@
* limitations under the License.
*/
-// By default this device uses hardware-wrapped keys for storage encryption,
-// which is intended to offer increased security over the traditional method
-// (software keys). However, hardware-wrapped keys aren't compatible with
-// FIPS-140 certification of the encryption hardware, and hence we have to
-// disable the use of them in FIPS mode. This requires having two fstab files:
-// one for the default mode, and one for FIPS mode selectable via
-// androidboot.fstab_suffix on the kernel command line. These fstabs should be
-// identical with the exception of the encryption settings, so to keep them in
-// sync the rules below generate them from a template file.
-
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
@@ -33,52 +23,7 @@ package {
default_applicable_licenses: ["device_google_zuma_license"],
}
-genrule {
- name: "gen_fstab.zuma-hw-encrypt",
- srcs: ["fstab.zuma.in"],
- out: ["fstab.zuma"],
- cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" +
- " -e s/@inlinecrypt@/inlinecrypt/ " +
- " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)",
-}
-
-genrule {
- name: "gen_fstab.zuma-sw-encrypt",
- srcs: ["fstab.zuma.in"],
- out: ["fstab.zuma"],
- cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" +
- " -e s/@inlinecrypt@// " +
- " -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)",
-}
-
-genrule {
- name: "gen_fstab.zuma-no-encrypt",
- srcs: ["fstab.zuma.in"],
- out: ["fstab.zuma"],
- cmd: "sed -e s/@fileencryption@//" +
- " -e s/@inlinecrypt@// " +
- " -e s/@metadata_encryption@// $(in) > $(out)",
-}
-
-genrule {
- name: "gen_fstab.zuma-fips",
- srcs: ["fstab.zuma.in"],
- out: ["fstab.zuma-fips"],
- cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" +
- " -e s/@inlinecrypt@/inlinecrypt/ " +
- " -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)",
-}
-
-prebuilt_etc {
- name: "fstab.zuma",
- src: ":gen_fstab.zuma-hw-encrypt",
- vendor: true,
- vendor_ramdisk_available: true,
-}
-
-prebuilt_etc {
- name: "fstab.zuma-fips",
- src: ":gen_fstab.zuma-fips",
- vendor: true,
- vendor_ramdisk_available: true,
-}
+filegroup {
+ name: "fstab.zuma.common",
+ srcs: ["fstab.zuma.common"],
+}
\ No newline at end of file
diff --git a/conf/ext4/Android.bp b/conf/ext4/Android.bp
new file mode 100644
index 00000000..8f809ef3
--- /dev/null
+++ b/conf/ext4/Android.bp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// By default this device uses hardware-wrapped keys for storage encryption,
+// which is intended to offer increased security over the traditional method
+// (software keys). However, hardware-wrapped keys aren't compatible with
+// FIPS-140 certification of the encryption hardware, and hence we have to
+// disable the use of them in FIPS mode. This requires having two fstab files:
+// one for the default mode, and one for FIPS mode selectable via
+// androidboot.fstab_suffix on the kernel command line. These fstabs should be
+// identical with the exception of the encryption settings, so to keep them in
+// sync the rules below generate them from a template file.
+
+soong_namespace {
+ imports: [
+ "device/google/zuma",
+ ],
+}
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "device_google_zuma_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["device_google_zuma_license"],
+}
+
+genrule {
+ name: "gen_fstab.zuma-hw-encrypt",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.ext4",
+ ],
+ out: ["fstab.zuma"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" +
+ " -e s/@inlinecrypt@/inlinecrypt/ " +
+ " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zuma-sw-encrypt",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.ext4",
+ ],
+ out: ["fstab.zuma"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" +
+ " -e s/@inlinecrypt@// " +
+ " -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zuma-no-encrypt",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.ext4",
+ ],
+ out: ["fstab.zuma"],
+ cmd: "sed -e s/@fileencryption@//" +
+ " -e s/@inlinecrypt@// " +
+ " -e s/@metadata_encryption@// $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zuma-fips",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.ext4",
+ ],
+ out: ["fstab.zuma-fips"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" +
+ " -e s/@inlinecrypt@/inlinecrypt/ " +
+ " -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "fstab.zuma",
+ src: ":gen_fstab.zuma-hw-encrypt",
+ vendor: true,
+ vendor_ramdisk_available: true,
+}
+
+prebuilt_etc {
+ name: "fstab.zuma-fips",
+ src: ":gen_fstab.zuma-fips",
+ vendor: true,
+ vendor_ramdisk_available: true,
+}
diff --git a/conf/ext4/fstab.zuma.ext4 b/conf/ext4/fstab.zuma.ext4
new file mode 100644
index 00000000..94c64a0d
--- /dev/null
+++ b/conf/ext4/fstab.zuma.ext4
@@ -0,0 +1,10 @@
+# Android fstab file.
+#
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+#
+#
+/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,formattable,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption
+/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,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/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,formattable,first_stage_mount,metadata_csum
+/dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,first_stage_mount
diff --git a/conf/f2fs/Android.bp b/conf/f2fs/Android.bp
new file mode 100644
index 00000000..535df6cf
--- /dev/null
+++ b/conf/f2fs/Android.bp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// By default this device uses hardware-wrapped keys for storage encryption,
+// which is intended to offer increased security over the traditional method
+// (software keys). However, hardware-wrapped keys aren't compatible with
+// FIPS-140 certification of the encryption hardware, and hence we have to
+// disable the use of them in FIPS mode. This requires having two fstab files:
+// one for the default mode, and one for FIPS mode selectable via
+// androidboot.fstab_suffix on the kernel command line. These fstabs should be
+// identical with the exception of the encryption settings, so to keep them in
+// sync the rules below generate them from a template file.
+
+soong_namespace {
+ imports: [
+ "device/google/zuma",
+ ],
+}
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "device_google_zuma_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["device_google_zuma_license"],
+}
+
+genrule {
+ name: "gen_fstab.zuma-hw-encrypt",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.f2fs",
+ ],
+ out: ["fstab.zuma"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" +
+ " -e s/@inlinecrypt@/inlinecrypt/ " +
+ " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zuma-sw-encrypt",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.f2fs",
+ ],
+ out: ["fstab.zuma"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" +
+ " -e s/@inlinecrypt@// " +
+ " -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zuma-no-encrypt",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.f2fs",
+ ],
+ out: ["fstab.zuma"],
+ cmd: "sed -e s/@fileencryption@//" +
+ " -e s/@inlinecrypt@// " +
+ " -e s/@metadata_encryption@// $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zuma-fips",
+ srcs: [
+ ":fstab.zuma.common",
+ "fstab.zuma.f2fs",
+ ],
+ out: ["fstab.zuma-fips"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" +
+ " -e s/@inlinecrypt@/inlinecrypt/ " +
+ " -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "fstab.zuma",
+ src: ":gen_fstab.zuma-hw-encrypt",
+ vendor: true,
+ vendor_ramdisk_available: true,
+}
+
+prebuilt_etc {
+ name: "fstab.zuma-fips",
+ src: ":gen_fstab.zuma-fips",
+ vendor: true,
+ vendor_ramdisk_available: true,
+}
diff --git a/conf/f2fs/fstab.zuma.f2fs b/conf/f2fs/fstab.zuma.f2fs
new file mode 100644
index 00000000..10b82262
--- /dev/null
+++ b/conf/f2fs/fstab.zuma.f2fs
@@ -0,0 +1,10 @@
+# Android fstab file.
+#
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+#
+#
+/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/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
diff --git a/conf/fstab.efs b/conf/fstab.efs
new file mode 100644
index 00000000..23182479
--- /dev/null
+++ b/conf/fstab.efs
@@ -0,0 +1,6 @@
+# Android fstab file.
+#
+# Create the specific fstab file for efs partitions for flexibility
+/dev/block/platform/13200000.ufs/by-name/efs /mnt/vendor/efs f2fs noatime,sync wait,check,formattable
+/dev/block/platform/13200000.ufs/by-name/efs_backup /mnt/vendor/efs_backup f2fs noatime,sync wait,check,formattable
+/dev/block/platform/13200000.ufs/by-name/modem_userdata /mnt/vendor/modem_userdata f2fs noatime,sync wait,check,formattable
\ No newline at end of file
diff --git a/conf/fstab.efs.from_data b/conf/fstab.efs.from_data
new file mode 100644
index 00000000..4845e3ee
--- /dev/null
+++ b/conf/fstab.efs.from_data
@@ -0,0 +1,10 @@
+# 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
+
+/data/vendor/copied/persist /mnt/vendor/persist none bind latemount
diff --git a/conf/fstab.zuma.in b/conf/fstab.zuma.common
similarity index 70%
rename from conf/fstab.zuma.in
rename to conf/fstab.zuma.common
index b2a5f141..a5521b74 100644
--- a/conf/fstab.zuma.in
+++ b/conf/fstab.zuma.common
@@ -14,12 +14,7 @@ vendor /vendor
vendor_dlkm /vendor_dlkm ext4 noatime,ro wait,slotselect,avb=vbmeta,avb_keys=no_such_key,logical,first_stage_mount
/dev/block/platform/13200000.ufs/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount
/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/efs /mnt/vendor/efs f2fs noatime,sync wait,check,formattable
-/dev/block/platform/13200000.ufs/by-name/efs_backup /mnt/vendor/efs_backup f2fs noatime,sync wait,check,formattable
-/dev/block/platform/13200000.ufs/by-name/modem_userdata /mnt/vendor/modem_userdata f2fs noatime,sync wait,check,formattable
/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/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=apex,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,zoned_device
/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
diff --git a/conf/init.efs.16k.rc b/conf/init.efs.16k.rc
new file mode 100644
index 00000000..e39ac23f
--- /dev/null
+++ b/conf/init.efs.16k.rc
@@ -0,0 +1,24 @@
+
+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.hardware.cpu.pagesize=16384
+ mkdir /data/vendor/copied 0775 radio system
+ restorecon_recursive /data/vendor/copied
+ exec_start copy_efs_files_to_data
+ mount_all /vendor/etc/fstab.efs.from_data
+ restorecon_recursive /mnt/vendor/persist
+ restorecon_recursive /data/vendor/ss
+ setprop ro.vendor.persist.status mounted
+
+on early-init && property:ro.boot.hardware.cpu.pagesize=4096
+ mount_all /vendor/etc/fstab.persist --early
+ setprop ro.vendor.persist.status mounted
+
+on late-fs && property:ro.boot.hardware.cpu.pagesize=4096
+ mount_all /vendor/etc/fstab.efs --early
+
diff --git a/conf/init.efs.4k.rc b/conf/init.efs.4k.rc
new file mode 100644
index 00000000..8b48bdfb
--- /dev/null
+++ b/conf/init.efs.4k.rc
@@ -0,0 +1,6 @@
+on early-init
+ mount_all /vendor/etc/fstab.persist --early
+ setprop ro.vendor.persist.status mounted
+
+on late-fs
+ mount_all /vendor/etc/fstab.efs --early
diff --git a/conf/init.persist.rc b/conf/init.persist.rc
new file mode 100644
index 00000000..4a4c3ff3
--- /dev/null
+++ b/conf/init.persist.rc
@@ -0,0 +1,47 @@
+on property:ro.vendor.persist.status=mounted
+ # for modem related functions
+ restorecon_recursive /mnt/vendor/efs
+ chown radio system /mnt/vendor/efs
+ restorecon_recursive /mnt/vendor/efs_backup
+ chown radio system /mnt/vendor/efs_backup
+ restorecon_recursive /mnt/vendor/modem_userdata
+ chown radio system /mnt/vendor/modem_userdata
+
+ # for battery defender
+ mkdir /mnt/vendor/persist/battery 0700 system system
+
+ # Factory calibration files
+ chmod 0771 /mnt/vendor/persist/camera
+ chmod 0771 /mnt/vendor/persist/camera/OTP_calibration
+ chmod 0771 /mnt/vendor/persist/camera/pdaf_calibration_data
+ mkdir /mnt/vendor/persist/camera/rear 0771 system camera
+ chmod 0771 /mnt/vendor/persist/camera/rear
+
+ restorecon_recursive /mnt/vendor/persist
+ restorecon_recursive /mnt/vendor/persist/aoc
+ restorecon_recursive /mnt/vendor/persist/audio
+ restorecon_recursive /mnt/vendor/persist/sensors
+ restorecon_recursive /mnt/vendor/persist/battery
+ restorecon_recursive /mnt/vendor/persist/camera
+ restorecon_recursive /mnt/vendor/persist/modem
+ # Set up display-related directories and permissions
+ # Add restorecon_recursive command to make sure the restorecon label is persist_display_file.
+ restorecon_recursive /mnt/vendor/persist/display
+ mkdir /mnt/vendor/persist/data/sfs 0700 system system
+ mkdir /mnt/vendor/persist/data/tz 0700 system system
+ mkdir /mnt/vendor/persist/touch 0770 system system
+
+on property:ro.fstype.data=* && property:ro.vendor.persist.status=mounted
+ # Proxy for Secure Storage
+ mkdir /data/vendor/rebootescrow 0770 hsm hsm
+ mkdir /data/vendor/ss 0770 root system
+ mkdir /mnt/vendor/persist/ss 0770 root system
+ restorecon_recursive /mnt/vendor/persist/ss
+ symlink /mnt/vendor/persist/ss /data/vendor/ss/persist
+ chown root system /data/vendor/ss/persist
+ chmod 0770 /data/vendor/ss/persist
+ symlink /dev/block/platform/13200000\.ufs/by-name/trusty_persist /data/vendor/ss/persist/0
+ chown system system /data/vendor/ss/persist/0
+ chown system system /data/vendor/ss/persist/nsp
+
+ restart storageproxyd
diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc
index b6e622e5..f0cbf01c 100644
--- a/conf/init.zuma.rc
+++ b/conf/init.zuma.rc
@@ -3,7 +3,6 @@ import android.hardware.drm@1.2-service.widevine.rc
import init.exynos.sensorhub.rc
on early-init
- mount_all /vendor/etc/fstab.persist --early
write /proc/sys/kernel/sched_pelt_multiplier 1
write /sys/kernel/mm/lru_gen/enabled n
@@ -103,12 +102,8 @@ on init
start vendor.keymaster-4-0
# ZRAM setup
- write /sys/block/zram0/comp_algorithm lz77eh
write /proc/sys/vm/page-cluster 0
- # adjust PCP high level
- write /proc/sys/vm/percpu_pagelist_high_fraction 430
-
# Some user code relies on ro.boot.hardware.revision
setprop ro.boot.hardware.revision ${ro.revision}
@@ -365,6 +360,12 @@ on init
chown root system /sys/devices/platform/16490000.gsa-ns/log_main
chown root system /sys/devices/platform/16490000.gsa-ns/log_intermediate
+on init && property:ro.boot.hardware.cpu.pagesize=4096
+ write /sys/block/zram0/comp_algorithm lz77eh
+
+on init && property:ro.boot.hardware.cpu.pagesize=16384
+ write /sys/block/zram0/comp_algorithm lzo-rle
+
on post-fs
# Ensure device is ready and start storageproxyd
wait /dev/sg1
@@ -443,13 +444,6 @@ on post-fs-data
chown system system /dev/ispolin_ranging
chmod 0660 /dev/ispolin_ranging
- # Factory calibration files
- chmod 0771 /mnt/vendor/persist/camera
- chmod 0771 /mnt/vendor/persist/camera/OTP_calibration
- chmod 0771 /mnt/vendor/persist/camera/pdaf_calibration_data
- mkdir /mnt/vendor/persist/camera/rear 0771 system camera
- chmod 0771 /mnt/vendor/persist/camera/rear
-
# Audio dump and debug
mkdir /data/vendor/audio 0770 audio audio
@@ -611,34 +605,11 @@ on property:persist.vendor.radio.no_modem_board=1
on fs
mount_all --early
- restorecon_recursive /mnt/vendor/efs
- chown radio system /mnt/vendor/efs
- restorecon_recursive /mnt/vendor/efs_backup
- chown radio system /mnt/vendor/efs_backup
- restorecon_recursive /mnt/vendor/modem_userdata
- chown radio system /mnt/vendor/modem_userdata
# Mount modem partition
mount_all /vendor/etc/fstab.modem --early
restorecon_recursive /mnt/vendor/modem_img
- # for battery defender
- mkdir /mnt/vendor/persist/battery 0700 system system
-
- restorecon_recursive /mnt/vendor/persist
- restorecon_recursive /mnt/vendor/persist/aoc
- restorecon_recursive /mnt/vendor/persist/audio
- restorecon_recursive /mnt/vendor/persist/sensors
- restorecon_recursive /mnt/vendor/persist/battery
- restorecon_recursive /mnt/vendor/persist/camera
- restorecon_recursive /mnt/vendor/persist/modem
- # Set up display-related directories and permissions
- # Add restorecon_recursive command to make sure the restorecon label is persist_display_file.
- restorecon_recursive /mnt/vendor/persist/display
- mkdir /mnt/vendor/persist/data/sfs 0700 system system
- mkdir /mnt/vendor/persist/data/tz 0700 system system
- mkdir /mnt/vendor/persist/touch 0770 system system
-
# Permissions for ION
chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated
chown system system /sys/class/ion_cma/ion_video_ext/isolated
@@ -657,6 +628,7 @@ on fs
chown system system /sys/devices/platform/exynos-drm/primary-panel/panel_need_handle_idle_exit
chown system system /sys/devices/platform/exynos-drm/primary-panel/op_hz
chown system system /sys/devices/platform/exynos-drm/primary-panel/refresh_ctrl
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/power_state
chown system system /sys/module/drm/parameters/vblankoffdelay
chown system system /sys/module/drm/parameters/debug
chown system system /sys/class/dqe0/atc/ambient_light
@@ -937,20 +909,6 @@ service bugreport /system/bin/dumpstate -d -p -z
oneshot
keycodes 114 115 116
-# Proxy for Secure Storage
-on post-fs-data
- mkdir /data/vendor/rebootescrow 0770 hsm hsm
- mkdir /data/vendor/ss 0770 root system
- mkdir /mnt/vendor/persist/ss 0770 root system
- restorecon_recursive /mnt/vendor/persist/ss
- symlink /mnt/vendor/persist/ss /data/vendor/ss/persist
- chown root system /data/vendor/ss/persist
- chmod 0770 /data/vendor/ss/persist
- symlink /dev/block/platform/13200000\.ufs/by-name/trusty_persist /data/vendor/ss/persist/0
- chown system system /data/vendor/ss/persist/0
- chown system system /data/vendor/ss/persist/nsp
-
- restart storageproxyd
service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 \
-r /dev/sg1 -p /data/vendor/ss -t ufs
diff --git a/conf/init.zuma.usb.rc b/conf/init.zuma.usb.rc
index 2cbb30b5..88e187be 100644
--- a/conf/init.zuma.usb.rc
+++ b/conf/init.zuma.usb.rc
@@ -423,3 +423,12 @@ on property:persist.vendor.usb.displayport.enabled=1
on property:persist.vendor.usb.displayport.enabled=0
write /sys/module/exynos_drm/parameters/dp_enabled 0
write /sys/class/typec/port0/port0.0/mode1/active "no"
+
+on property:persist.sys.hdcp_checking=always
+ write /sys/module/exynos_hdcp2/parameters/max_ver 2
+
+on property:persist.sys.hdcp_checking="drm-only"
+ write /sys/module/exynos_hdcp2/parameters/max_ver 2
+
+on property:persist.sys.hdcp_checking=never
+ write /sys/module/exynos_hdcp2/parameters/max_ver 0
diff --git a/conf/ueventd.zuma.rc b/conf/ueventd.zuma.rc
index 8564d994..e69f4672 100644
--- a/conf/ueventd.zuma.rc
+++ b/conf/ueventd.zuma.rc
@@ -159,6 +159,11 @@
/dev/acd-com.google.bt 0660 system system
/dev/acd-com.google.bt.non_wake_up 0660 system system
+# AoC Bluetooth Offload
+/dev/acd-chre_bt_offload_ctl 0660 bluetooth bluetooth
+/dev/acd-chre_bt_offload_data_tx 0220 bluetooth bluetooth
+/dev/acd-chre_bt_offload_data_rx 0440 bluetooth bluetooth
+
# LWIS
/dev/lwis* 0660 system system
@@ -245,4 +250,4 @@
/sys/bus/aoc/devices/control udfps_get_disp_freq 0440 system system
# USB Alt Modes
-/sys/devices/platform/10cb0000.hsi2c/i2c-*/*-0025/typec/port0/port0-partner/port0-partner.* mode1/active 0664 system system
\ No newline at end of file
+/sys/devices/platform/10cb0000.hsi2c/i2c-*/*-0025/typec/port0/port0-partner/port0-partner.* mode1/active 0664 system system
diff --git a/copy_efs_files_to_data.sh b/copy_efs_files_to_data.sh
new file mode 100644
index 00000000..2ac9e462
--- /dev/null
+++ b/copy_efs_files_to_data.sh
@@ -0,0 +1,38 @@
+#!/vendor/bin/sh
+
+CHECKPOINT_DIR=/data/vendor/copied
+
+BIN_DIR=/vendor/bin
+
+$BIN_DIR/mkdir -p $CHECKPOINT_DIR
+
+function copy_files_to_data()
+{
+ block_device=$1
+ 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/mkdir -p $tmpdir
+ $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device
+ if [ $? -ne 0 ]; then
+ echo "Failed to $BIN_DIR/dump.f2fs -rfPo $tmpdir $block_device"
+ return
+ fi
+ 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"
+}
+
+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"
+
+copy_files_to_data "/dev/block/by-name/persist" "/mnt/vendor/persist"
diff --git a/default-permissions.xml b/default-permissions.xml
index fd29d6bc..00959c8f 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -51,11 +51,14 @@
+
+
+
+
-
@@ -75,6 +78,8 @@
+
+
diff --git a/device.mk b/device.mk
index 4ff88743..cd4f0f35 100644
--- a/device.mk
+++ b/device.mk
@@ -16,7 +16,7 @@
include device/google/gs-common/device.mk
include device/google/gs-common/gs_watchdogd/watchdog.mk
-include device/google/gs-common/ramdump/ramdump.mk
+include device/google/gs-common/ramdump_and_coredump/ramdump_and_coredump.mk
include device/google/gs-common/soc/soc.mk
include device/google/gs-common/modem/modem.mk
include device/google/gs-common/aoc/aoc.mk
@@ -26,6 +26,7 @@ include device/google/gs-common/storage/storage.mk
include device/google/gs-common/thermal/dump/thermal.mk
include device/google/gs-common/thermal/thermal_hal/device.mk
include device/google/gs-common/performance/perf.mk
+include device/google/gs-common/power/power.mk
include device/google/gs-common/pixel_metrics/pixel_metrics.mk
include device/google/gs-common/soc/freq.mk
include device/google/gs-common/gps/dump/log.mk
@@ -42,6 +43,8 @@ include device/google/gs-common/sota_app/factoryota.mk
include device/google/gs-common/misc_writer/misc_writer.mk
include device/google/gs-common/gyotaku_app/gyotaku.mk
include device/google/gs-common/bootctrl/bootctrl_aidl.mk
+include device/google/gs-common/betterbug/betterbug.mk
+include device/google/gs-common/fingerprint/fingerprint.mk
include device/google/zuma/dumpstate/item.mk
@@ -221,7 +224,15 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=1
endif
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.sys.hdcp_checking=always
+
USE_LASSEN_OEMHOOK := true
+# The "power-anomaly-sitril" is added into PRODUCT_SOONG_NAMESPACES when
+# $(USE_LASSEN_OEMHOOK) is true and $(BOARD_WITHOUT_RADIO) is not true.
+ifneq ($(BOARD_WITHOUT_RADIO),true)
+ PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril
+endif
# Use for GRIL
USES_LASSEN_MODEM := true
@@ -292,9 +303,8 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
- frameworks/native/data/etc/android.software.contextualsearch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.contextualsearch.xml \
- frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
- frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
+ frameworks/native/data/etc/android.software.vulkan.deqp.level-2024-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
+ frameworks/native/data/etc/android.software.opengles.deqp.level-2024-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
#endif
@@ -354,7 +364,20 @@ PRODUCT_COPY_FILES += \
device/google/zuma/conf/ueventd.zuma.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
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/init.persist.rc
+
+ifeq (true,$(filter $(DEVICE_PAGE_AGNOSTIC) $(PRODUCT_16K_DEVELOPER_OPTION),true))
+PRODUCT_COPY_FILES += \
+ device/google/zuma/conf/init.efs.16k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/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
+PRODUCT_PACKAGES += fsck.f2fs.vendor
+else
+PRODUCT_COPY_FILES += \
+ device/google/zuma/conf/init.efs.4k.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.efs.rc
+endif
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
@@ -368,6 +391,14 @@ PRODUCT_COPY_FILES += \
device/google/zuma/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.zuma.rc
# Fstab files
+ifeq (ext4,$(TARGET_RW_FILE_SYSTEM_TYPE))
+PRODUCT_SOONG_NAMESPACES += \
+ device/google/zuma/conf/ext4
+else
+PRODUCT_SOONG_NAMESPACES += \
+ device/google/zuma/conf/f2fs
+endif
+
PRODUCT_PACKAGES += \
fstab.zuma \
fstab.zuma.vendor_ramdisk \
@@ -376,7 +407,9 @@ 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.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem \
+ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.efs:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs
+
# Shell scripts
PRODUCT_PACKAGES += \
@@ -555,10 +588,6 @@ PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
PRODUCT_PACKAGES += \
com.android.future.usb.accessory
-PRODUCT_PACKAGES += \
- android.hardware.graphics.mapper@4.0-impl \
- android.hardware.graphics.allocator-V1-service
-
PRODUCT_PACKAGES += \
android.hardware.memtrack-service.pixel \
libion_exynos \
@@ -796,6 +825,8 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PROPERTY_OVERRIDES += \
debug.stagefright.c2inputsurface=-1 \
+PRODUCT_PROPERTY_OVERRIDES += media.c2.hal.selection=aidl
+
# 2. OpenMAX IL
PRODUCT_COPY_FILES += \
device/google/zuma/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
@@ -1095,7 +1126,9 @@ PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/zuma/proprietary/gchips/tpu/darwinn_logging_service \
vendor/google_devices/zuma/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/zuma/proprietary/gchips/tpu/aidl \
- vendor/google_devices/zuma/proprietary/gchips/tpu/hal
+ vendor/google_devices/zuma/proprietary/gchips/tpu/hal \
+ vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/api \
+ vendor/google_devices/zuma/proprietary/gchips/tpu/tachyon/service
# TPU firmware
PRODUCT_PACKAGES += edgetpu-rio.fw
@@ -1147,9 +1180,6 @@ else
BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/logger_app
endif
-# sscoredump
-include hardware/google/pixel/sscoredump/device.mk
-
# RadioExt Version
USES_RADIOEXT_V1_6 = true
@@ -1188,8 +1218,8 @@ include device/google/gs-common/pixel_ril/ril.mk
endif
# Touch service
-include hardware/google/pixel/input/twoshay.mk
include device/google/gs-common/touch/twoshay/aidl_zuma.mk
+include device/google/gs-common/touch/twoshay/twoshay.mk
# Allow longer timeout for incident report generation in bugreport
# Overriding in /product partition instead of /vendor intentionally,
diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml
index ba83dfa4..895ce99b 100644
--- a/device_framework_matrix_product.xml
+++ b/device_framework_matrix_product.xml
@@ -114,7 +114,7 @@
com.google.hardware.pixel.display
- 10
+ 12
IDisplay
default
diff --git a/manifest_media.xml b/manifest_media.xml
index 195d587b..18588a69 100644
--- a/manifest_media.xml
+++ b/manifest_media.xml
@@ -1,12 +1,13 @@
-
- android.hardware.media.c2
- hwbinder
- 1.2
-
- IComponentStore
- default
- default1
-
+
+
+ android.hardware.media.c2
+ 1
+ IComponentStore/default1
+
+
+ android.hardware.media.c2
+ 1
+ IComponentStore/default
diff --git a/manifest_media_aosp.xml b/manifest_media_aosp.xml
index 9a1a3dba..2d1888be 100644
--- a/manifest_media_aosp.xml
+++ b/manifest_media_aosp.xml
@@ -1,4 +1,5 @@
+
android.hardware.media.c2
hwbinder
@@ -8,4 +9,10 @@
default
+
+
+ android.hardware.media.c2
+ 1
+ IComponentStore/default
+
diff --git a/media_codecs_aosp_c2.xml b/media_codecs_aosp_c2.xml
index c1d4a891..ab61ca92 100644
--- a/media_codecs_aosp_c2.xml
+++ b/media_codecs_aosp_c2.xml
@@ -108,7 +108,7 @@
-
+
@@ -122,7 +122,7 @@
-
+
@@ -137,7 +137,7 @@
-
+
@@ -222,7 +222,7 @@
-
+
@@ -238,7 +238,7 @@
-
+
diff --git a/media_codecs_bo_c2.xml b/media_codecs_bo_c2.xml
index 443c27e4..a6759b66 100644
--- a/media_codecs_bo_c2.xml
+++ b/media_codecs_bo_c2.xml
@@ -19,7 +19,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -52,15 +52,15 @@
-
+
-
+
-
+
diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml
index fb148bc0..5bf32ce8 100644
--- a/media_codecs_performance_c2.xml
+++ b/media_codecs_performance_c2.xml
@@ -115,24 +115,24 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 921b7522..a3f0420f 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -74,6 +74,9 @@
true
+
+ false
+
true
@@ -249,8 +252,8 @@
true
-
- true
+
+ 6291456
20971520
diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp
index bb64ea62..eaac5207 100644
--- a/pixelstats/service.cpp
+++ b/pixelstats/service.cpp
@@ -105,6 +105,16 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
"/sys/class/power_supply/maxfg/gmsr",
"/sys/class/power_supply/maxfg_base/gmsr",
},
+ .FGModelLoadingPath = {
+ "/sys/class/power_supply/maxfg/m5_model_state",
+ "/sys/class/power_supply/maxfg_base/m5_model_state"
+ },
+ .FGLogBufferPath = {
+ "/dev/logbuffer_maxfg_monitor",
+ "/dev/logbuffer_max77779fg_monitor",
+ "/dev/logbuffer_maxfg_base_monitor",
+ "/dev/logbuffer_maxfg_secondary_monitor"
+ },
.DisplayPortStatsPaths = {
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/link_negotiation_failures",
"/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/edid_read_failures",
@@ -120,21 +130,14 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
"/sys/devices/platform/hdcp/hdcp1_success_count",
"/sys/devices/platform/hdcp/hdcp1_fail_count",
"/sys/devices/platform/hdcp/hdcp0_count",
- }
+ },
+ .SpeakerVersionPath = "/sys/devices/platform/audiometrics/speaker_version"
};
const struct UeventListener::UeventPaths ueventPaths = {
.AudioUevent = "/devices/virtual/amcs/amcs",
.TypeCPartnerUevent = "PRODUCT_TYPE=",
- .FGLearningPath = {
- "/sys/class/power_supply/maxfg/fg_learning_events",
- "/sys/class/power_supply/maxfg_base/fg_learning_events"
- },
- .FwUpdatePath = "",
- .FGModelLoadingPath = {
- "/sys/class/power_supply/maxfg/m5_model_state",
- "/sys/class/power_supply/maxfg_base/m5_model_state"
- }
+ .FwUpdatePath = ""
};
int main() {
diff --git a/usb/usb/Android.bp b/usb/usb/Android.bp
index 858fc472..be45393f 100644
--- a/usb/usb/Android.bp
+++ b/usb/usb/Android.bp
@@ -55,6 +55,7 @@ cc_binary {
"libbinder_ndk",
"libprotobuf-cpp-lite",
"server_configurable_flags",
+ "libaconfig_storage_read_api_cc",
],
static_libs: [
"libpixelusb-aidl",
diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp
index 7b037303..4f6d1272 100644
--- a/usb/usb/Usb.cpp
+++ b/usb/usb/Usb.cpp
@@ -602,6 +602,11 @@ ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role
fp = fopen(filename.c_str(), "w");
if (fp != NULL) {
int ret = fputs(convertRoletoString(in_role).c_str(), fp);
+ if (ret == EAGAIN) {
+ ALOGI("role switch busy, retry in %d ms", ROLE_SWAP_RETRY_MS);
+ std::this_thread::sleep_for(std::chrono::milliseconds(ROLE_SWAP_RETRY_MS));
+ ret = fputs(convertRoletoString(in_role).c_str(), fp);
+ }
fclose(fp);
if ((ret != EOF) && ReadFileToString(filename, &written)) {
written = Trim(written);
@@ -1724,8 +1729,10 @@ void *displayPortPollWork(void *param) {
std::vector currentPortStatus;
ret = read(usb->mDisplayPortDebounceTimer, &res, sizeof(res));
ALOGI("usbdp: dp debounce triggered, val:%lu ret:%d", res, ret);
- if (ret < 0)
- ALOGE("usbdp: debounce read errno:%d", errno);
+ if (ret < 0) {
+ ALOGW("usbdp: debounce read error:%d", errno);
+ continue;
+ }
queryVersionHelper(usb, ¤tPortStatus);
} else if (events[n].data.fd == usb->mDisplayPortActivateTimer) {
string activePartner, activePort;
@@ -1776,6 +1783,7 @@ void *displayPortPollWork(void *param) {
error:
/* Need to disarm so new threads don't get old event */
+ armTimerFdHelper(usb->mDisplayPortDebounceTimer, 0);
armTimerFdHelper(usb->mDisplayPortActivateTimer, 0);
close(link_training_status_fd);
link_training_status_fd_error:
diff --git a/usb/usb/Usb.h b/usb/usb/Usb.h
index 60064514..4746a88c 100644
--- a/usb/usb/Usb.h
+++ b/usb/usb/Usb.h
@@ -79,6 +79,7 @@ constexpr char kGadgetName[] = "11210000.dwc3";
#define DISPLAYPORT_IRQ_HPD_COUNT_CHECK 3
#define DISPLAYPORT_POLL_WAIT_MS 100
+#define ROLE_SWAP_RETRY_MS 700
#define SVID_DISPLAYPORT "ff01"
#define SVID_THUNDERBOLT "8087"