diff --git a/BoardConfig-16k-common.mk b/BoardConfig-16k-common.mk new file mode 100644 index 0000000..229248d --- /dev/null +++ b/BoardConfig-16k-common.mk @@ -0,0 +1,19 @@ +# +# 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. +# + +ifeq ($(TARGET_BOOTS_16K),true) +BOARD_F2FS_BLOCKSIZE := 16384 +endif diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 9338eb7..de25f72 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -16,8 +16,8 @@ include build/make/target/board/BoardConfigMainlineCommon.mk include build/make/target/board/BoardConfigPixelCommon.mk -# Should be uncommented after fixing vndk-sp violation is fixed. -PRODUCT_FULL_TREBLE_OVERRIDE := true +# Include settings for 16k page size kernel if enabled. +include device/google/zumapro/BoardConfig-16k-common.mk # HACK : To fix up after bring up multimedia devices. TARGET_SOC := zumapro @@ -30,7 +30,6 @@ TARGET_ARCH := arm64 TARGET_ARCH_VARIANT := armv8-2a TARGET_CPU_ABI := arm64-v8a TARGET_CPU_VARIANT := cortex-a55 -TARGET_CPU_VARIANT_RUNTIME := cortex-a55 BOARD_KERNEL_CMDLINE += dyndbg=\"func alloc_contig_dump_pages +p\" BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10870000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on diff --git a/OWNERS b/OWNERS index e6ce5d0..d1ffbd2 100644 --- a/OWNERS +++ b/OWNERS @@ -1,2 +1,2 @@ # per-file for Pixel device makefiles, see go/pixel-device-mk-owner-checklist for details. -per-file *.mk=file:device/google/gs-common:main:/MK_OWNERS +per-file *.mk,{**/,}Android.bp=file:device/google/gs-common:main:/MK_OWNERS diff --git a/conf/Android.bp b/conf/Android.bp index ef95c54..4741102 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,102 +23,10 @@ package { default_applicable_licenses: ["device_google_zumapro_license"], } -genrule { - name: "gen_fstab.zuma-hw-encrypt", - srcs: ["fstab.zumapro.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)", +filegroup { + name: "fstab.zumapro.common", + srcs: ["fstab.ro.system", + "fstab.zumapro.common" + ], } -genrule { - name: "gen_fstab.zumapro-hw-encrypt", - srcs: ["fstab.zumapro.in"], - out: ["fstab.zumapro"], - 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.zumapro.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.zumapro-sw-encrypt", - srcs: ["fstab.zumapro.in"], - out: ["fstab.zumapro"], - 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.zumapro.in"], - out: ["fstab.zuma"], - cmd: "sed -e s/@fileencryption@//" + - " -e s/@inlinecrypt@// " + - " -e s/@metadata_encryption@// $(in) > $(out)", -} - -genrule { - name: "gen_fstab.zumapro-no-encrypt", - srcs: ["fstab.zumapro.in"], - out: ["fstab.zumapro"], - cmd: "sed -e s/@fileencryption@//" + - " -e s/@inlinecrypt@// " + - " -e s/@metadata_encryption@// $(in) > $(out)", -} - -genrule { - name: "gen_fstab.zuma-fips", - srcs: ["fstab.zumapro.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)", -} - -genrule { - name: "gen_fstab.zumapro-fips", - srcs: ["fstab.zumapro.in"], - out: ["fstab.zumapro-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.zumapro", - src: ":gen_fstab.zumapro-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, -} - -prebuilt_etc { - name: "fstab.zumapro-fips", - src: ":gen_fstab.zumapro-fips", - vendor: true, - vendor_ramdisk_available: true, -} diff --git a/conf/OWNERS b/conf/OWNERS new file mode 100644 index 0000000..20af85b --- /dev/null +++ b/conf/OWNERS @@ -0,0 +1,2 @@ +# per-file for Pixel fstab +per-file fstab.*=file:device/google/gs-common:main:/FSTAB_OWNERS diff --git a/conf/ext4/Android.bp b/conf/ext4/Android.bp new file mode 100644 index 0000000..0a2cc96 --- /dev/null +++ b/conf/ext4/Android.bp @@ -0,0 +1,164 @@ +/* + * 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. + */ + +// 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/zumapro", + ], +} + +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_zumapro_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["device_google_zumapro_license"], +} + +genrule { + name: "gen_fstab.zuma-hw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.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.zumapro-hw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.ext4", + ], + out: ["fstab.zumapro"], + 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.zumapro.common", + "fstab.rw.zumapro.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.zumapro-sw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.ext4", + ], + out: ["fstab.zumapro"], + 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.zumapro.common", + "fstab.rw.zumapro.ext4", + ], + out: ["fstab.zuma"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zumapro-no-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.ext4", + ], + out: ["fstab.zumapro"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zuma-fips", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.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)", +} + +genrule { + name: "gen_fstab.zumapro-fips", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.ext4", + ], + out: ["fstab.zumapro-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.zumapro", + src: ":gen_fstab.zumapro-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, +} + +prebuilt_etc { + name: "fstab.zumapro-fips", + src: ":gen_fstab.zumapro-fips", + vendor: true, + vendor_ramdisk_available: true, +} diff --git a/conf/ext4/fstab.rw.zumapro.ext4 b/conf/ext4/fstab.rw.zumapro.ext4 new file mode 100644 index 0000000..b548c13 --- /dev/null +++ b/conf/ext4/fstab.rw.zumapro.ext4 @@ -0,0 +1,5 @@ +# Android fstab file for /data and /metadata partitions. +# +# +/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount +/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,reservedsize=128M,readahead_size_kb=128 diff --git a/conf/f2fs/Android.bp b/conf/f2fs/Android.bp new file mode 100644 index 0000000..bcaf11d --- /dev/null +++ b/conf/f2fs/Android.bp @@ -0,0 +1,164 @@ +/* + * 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. + */ + +// 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/zumapro", + ], +} + +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_zumapro_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["device_google_zumapro_license"], +} + +genrule { + name: "gen_fstab.zuma-hw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.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.zumapro-hw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.f2fs", + ], + out: ["fstab.zumapro"], + 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.zumapro.common", + "fstab.rw.zumapro.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.zumapro-sw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.f2fs", + ], + out: ["fstab.zumapro"], + 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.zumapro.common", + "fstab.rw.zumapro.f2fs", + ], + out: ["fstab.zuma"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zumapro-no-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.f2fs", + ], + out: ["fstab.zumapro"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zuma-fips", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.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)", +} + +genrule { + name: "gen_fstab.zumapro-fips", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.f2fs", + ], + out: ["fstab.zumapro-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.zumapro", + src: ":gen_fstab.zumapro-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, +} + +prebuilt_etc { + name: "fstab.zumapro-fips", + src: ":gen_fstab.zumapro-fips", + vendor: true, + vendor_ramdisk_available: true, +} diff --git a/conf/f2fs/fstab.rw.zumapro.f2fs b/conf/f2fs/fstab.rw.zumapro.f2fs new file mode 100644 index 0000000..77ec4d5 --- /dev/null +++ b/conf/f2fs/fstab.rw.zumapro.f2fs @@ -0,0 +1,5 @@ +# Android fstab file for /data and /metadata partitions. +# +# +/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/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 diff --git a/conf/fs-16kb/Android.bp b/conf/fs-16kb/Android.bp new file mode 100644 index 0000000..b6f77a4 --- /dev/null +++ b/conf/fs-16kb/Android.bp @@ -0,0 +1,164 @@ +/* + * 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. + */ + +// 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/zumapro", + ], +} + +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_zumapro_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["device_google_zumapro_license"], +} + +genrule { + name: "gen_fstab.zuma-hw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + 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.zumapro-hw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + out: ["fstab.zumapro"], + cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0+dusize_4k/" + + " -e s/@inlinecrypt@/inlinecrypt/ " + + " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zuma-sw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + 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.zumapro-sw-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + out: ["fstab.zumapro"], + 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.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + out: ["fstab.zuma"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zumapro-no-encrypt", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + out: ["fstab.zumapro"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + +genrule { + name: "gen_fstab.zuma-fips", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + 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)", +} + +genrule { + name: "gen_fstab.zumapro-fips", + srcs: [ + ":fstab.zumapro.common", + "fstab.rw.zumapro.16kb", + ], + out: ["fstab.zumapro-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.zumapro", + src: ":gen_fstab.zumapro-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, +} + +prebuilt_etc { + name: "fstab.zumapro-fips", + src: ":gen_fstab.zumapro-fips", + vendor: true, + vendor_ramdisk_available: true, +} diff --git a/conf/fs-16kb/fstab.rw.zumapro.16kb b/conf/fs-16kb/fstab.rw.zumapro.16kb new file mode 100644 index 0000000..13fc45c --- /dev/null +++ b/conf/fs-16kb/fstab.rw.zumapro.16kb @@ -0,0 +1,6 @@ +# Android fstab file for /data and /metadata partitions. +# +# This fstab is used for devices that only boot 16kb page size kernels. +# +/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,sync wait,check,formattable,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 diff --git a/conf/fstab.modem b/conf/fstab.ro.modem similarity index 100% rename from conf/fstab.modem rename to conf/fstab.ro.modem diff --git a/conf/fstab.postinstall b/conf/fstab.ro.postinstall similarity index 100% rename from conf/fstab.postinstall rename to conf/fstab.ro.postinstall diff --git a/conf/fstab.ro.system b/conf/fstab.ro.system new file mode 100644 index 0000000..989604b --- /dev/null +++ b/conf/fstab.ro.system @@ -0,0 +1,14 @@ +# Android fstab file for system/vendor/product partitions +# +# 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 +# +# +system /system ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 +# During compliance testing, the previous line would fail (because GSI is ext4), and the next line would be used to mount GSI. +system /system ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 +system_dlkm /system_dlkm ext4 noatime,ro wait,slotselect,avb=vbmeta_system,avb_keys=no_such_key,logical,first_stage_mount,readahead_size_kb=128 +system_ext /system_ext ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 +product /product ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 +vendor /vendor ext4 noatime,ro wait,slotselect,avb=vbmeta_vendor,logical,first_stage_mount,readahead_size_kb=128 +vendor_dlkm /vendor_dlkm ext4 noatime,ro wait,slotselect,avb=vbmeta,avb_keys=no_such_key,logical,first_stage_mount diff --git a/conf/fstab.rw.efs b/conf/fstab.rw.efs new file mode 100644 index 0000000..1047887 --- /dev/null +++ b/conf/fstab.rw.efs @@ -0,0 +1,6 @@ +# Android fstab file for efs partitions +# +# +/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 diff --git a/conf/fstab.persist b/conf/fstab.rw.persist similarity index 69% rename from conf/fstab.persist rename to conf/fstab.rw.persist index 46437c1..b540a1e 100644 --- a/conf/fstab.persist +++ b/conf/fstab.rw.persist @@ -2,4 +2,3 @@ # # Keep persist in an fstab file, since we need to run fsck on it after abnormal shutdown. /dev/block/platform/13200000.ufs/by-name/persist /mnt/vendor/persist f2fs noatime,nosuid,nodev,sync wait,check,formattable -/dev/block/platform/13200000.ufs/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,formattable,metadata_csum diff --git a/conf/fstab.zumapro.common b/conf/fstab.zumapro.common new file mode 100644 index 0000000..961cac6 --- /dev/null +++ b/conf/fstab.zumapro.common @@ -0,0 +1,9 @@ +# Android fstab file. +# +# +/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/misc /misc emmc defaults wait +#/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/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount +/devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto diff --git a/conf/fstab.zumapro.in b/conf/fstab.zumapro.in deleted file mode 100644 index 779b259..0000000 --- a/conf/fstab.zumapro.in +++ /dev/null @@ -1,25 +0,0 @@ -# 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 -# -# -system /system ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 -# During compliance testing, the previous line would fail (because GSI is ext4), and the next line would be used to mount GSI. -system /system ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 -system_dlkm /system_dlkm ext4 noatime,ro wait,slotselect,avb=vbmeta_system,avb_keys=no_such_key,logical,first_stage_mount,readahead_size_kb=128 -system_ext /system_ext ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 -product /product ext4 noatime,ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128 -vendor /vendor ext4 noatime,ro wait,slotselect,avb=vbmeta_vendor,logical,first_stage_mount,readahead_size_kb=128 -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=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/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount -/devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto diff --git a/conf/init.efs.rc b/conf/init.efs.rc new file mode 100644 index 0000000..a3664d9 --- /dev/null +++ b/conf/init.efs.rc @@ -0,0 +1,11 @@ +on early-init + mount_all /vendor/etc/fstab.persist --early + +on late-fs + mount_all /vendor/etc/fstab.efs --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 diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index a0daa4f..92b21e3 100644 --- a/conf/init.zumapro.board.rc +++ b/conf/init.zumapro.board.rc @@ -1,10 +1,10 @@ import /vendor/etc/init/hw/init.zumapro.usb.rc +import /vendor/etc/init/hw/init.efs.rc import android.hardware.drm@1.2-service.widevine.rc import init.exynos.sensorhub.rc import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.soc.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 @@ -32,6 +32,7 @@ on init chown system system /proc/vendor_sched/groups/dex2oat/set_task_group chown system system /proc/vendor_sched/groups/cam_power/set_task_group chown system system /proc/vendor_sched/groups/ota/set_task_group + chown system system /proc/vendor_sched/groups/fg_wi/set_task_group chown system system /proc/vendor_sched/groups/bg/set_proc_group chown system system /proc/vendor_sched/groups/cam/set_proc_group chown system system /proc/vendor_sched/groups/fg/set_proc_group @@ -44,10 +45,13 @@ on init chown system system /proc/vendor_sched/groups/dex2oat/set_proc_group chown system system /proc/vendor_sched/groups/cam_power/set_proc_group chown system system /proc/vendor_sched/groups/ota/set_proc_group + chown system system /proc/vendor_sched/groups/fg_wi/set_proc_group chown system system /proc/vendor_sched/prefer_idle_set chown system system /proc/vendor_sched/prefer_idle_clear chown system system /proc/vendor_sched/pmu_poll_enable chown system system /proc/vendor_sched/pmu_poll_time + chown system system /proc/vendor_sched/uclamp_fork_reset_clear + chown system system /proc/vendor_sched/uclamp_fork_reset_set chmod 0220 /proc/vendor_sched/groups/bg/set_task_group chmod 0220 /proc/vendor_sched/groups/cam/set_task_group @@ -61,6 +65,7 @@ on init chmod 0220 /proc/vendor_sched/groups/dex2oat/set_task_group chmod 0220 /proc/vendor_sched/groups/cam_power/set_task_group chmod 0220 /proc/vendor_sched/groups/ota/set_task_group + chmod 0220 /proc/vendor_sched/groups/fg_wi/set_task_group chmod 0220 /proc/vendor_sched/groups/bg/set_proc_group chmod 0220 /proc/vendor_sched/groups/cam/set_proc_group chmod 0220 /proc/vendor_sched/groups/fg/set_proc_group @@ -73,15 +78,17 @@ on init chmod 0220 /proc/vendor_sched/groups/dex2oat/set_proc_group chmod 0220 /proc/vendor_sched/groups/cam_power/set_proc_group chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group + chmod 0220 /proc/vendor_sched/groups/fg_wi/set_proc_group chmod 0220 /proc/vendor_sched/prefer_idle_set chmod 0220 /proc/vendor_sched/prefer_idle_clear chmod 0660 /proc/vendor_sched/pmu_poll_enable chmod 0220 /proc/vendor_sched/pmu_poll_time + chmod 0220 /proc/vendor_sched/uclamp_fork_reset_clear + chmod 0220 /proc/vendor_sched/uclamp_fork_reset_set start vendor.keymaster-4-0 # ZRAM setup - write /sys/block/zram0/comp_algorithm lz77eh write /proc/sys/vm/page-cluster 0 # Some user code relies on ro.boot.hardware.revision @@ -118,16 +125,6 @@ on init write /sys/class/net/rmnet6/queues/rx-0/rps_cpus fe write /sys/class/net/rmnet7/queues/rx-0/rps_cpus fe - # Create UDS structure for base VR services. - mkdir /dev/socket/pdx 0775 system system - mkdir /dev/socket/pdx/system 0775 system system - mkdir /dev/socket/pdx/system/buffer_hub 0775 system system - mkdir /dev/socket/pdx/system/performance 0775 system system - mkdir /dev/socket/pdx/system/vr 0775 system system - mkdir /dev/socket/pdx/system/vr/display 0775 system system - mkdir /dev/socket/pdx/system/vr/pose 0775 system system - mkdir /dev/socket/pdx/system/vr/sensors 0775 system system - # RT uclamp setting write /proc/sys/kernel/sched_util_clamp_min_rt_default 0 @@ -183,6 +180,17 @@ on init chown root system /sys/devices/platform/16490000.gsa-ns/log_main chown root system /sys/devices/platform/16490000.gsa-ns/log_intermediate + # Enable CPU Idle histograms + write /sys/kernel/metrics/cpuidle_histogram/enable 1 + +# ZRAM setup: use EH in 4kb kernels. +on init && property:ro.boot.hardware.cpu.pagesize=4096 + write /sys/block/zram0/comp_algorithm lz77eh + +# ZRAM setup: do not use EH in 16kb kernels. +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 @@ -220,7 +228,7 @@ on post-fs-data mkdir /data/vendor/radio/logs/always-on 777 system radio # Modem extended log folder - mkdir /data/vendor/radio/extended_logs 0770 radio system + mkdir /data/vendor/radio/extended_logs 0771 radio system # Modem MDS log folder mkdir /data/vendor/radio/mds 0771 radio system @@ -360,12 +368,6 @@ 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 # for battery defender mkdir /mnt/vendor/persist/battery 0700 system system @@ -398,6 +400,7 @@ on fs chown system system /sys/class/backlight/panel0-backlight/dimming_on chown system system /sys/class/backlight/panel0-backlight/hbm_mode chown system system /sys/class/backlight/panel0-backlight/local_hbm_mode + chown system system /sys/class/backlight/panel0-backlight/local_hbm_delay_frames chown system system /sys/devices/platform/exynos-drm/primary-panel/gamma chown system system /sys/devices/platform/exynos-drm/primary-panel/min_vrefresh chown system system /sys/devices/platform/exynos-drm/primary-panel/idle_delay_ms @@ -409,6 +412,8 @@ on fs chown system system /sys/devices/platform/exynos-drm/primary-panel/te2_option chown system system /sys/devices/platform/exynos-drm/primary-panel/power_state chown system system /sys/devices/platform/exynos-drm/primary-panel/frame_rate + chown system system /sys/devices/platform/exynos-drm/primary-panel/frame_interval + chown system system /sys/devices/platform/exynos-drm/primary-panel/expected_present_time 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 @@ -507,7 +512,7 @@ on property:sys.boot_completed=1 # Setup scheduler parameters write /proc/vendor_sched/min_granularity_ns 1000000 write /proc/vendor_sched/latency_ns 8000000 - write /proc/vendor_sched/max_load_balance_interval 4 + write /proc/vendor_sched/max_load_balance_interval 1 write /proc/vendor_sched/enable_hrtick 1 # Setup final cpu.uclamp @@ -687,35 +692,6 @@ on post-fs-data chown system system /sys/kernel/metrics/thermal/tr_by_group/spmic/stats_reset on property:vendor.thermal.link_ready=1 - chown system system /dev/thermal/tz-by-name/soc/mode - chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/soc/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/soc/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_hyst - chown system system /dev/thermal/tz-by-name/batoilo2/trip_point_0_temp - chown system system /dev/thermal/tz-by-name/batoilo2/trip_point_0_hyst # Thermal chown system system /dev/thermal/tz-by-name/disp_therm/trip_point_0_temp chown system system /dev/thermal/tz-by-name/disp_therm/trip_point_0_hyst @@ -801,6 +777,9 @@ on property:vendor.all.modules.ready=1 chown system system /sys/bus/i2c/devices/9-0043/calibration/redc_stored chown system system /sys/bus/i2c/devices/9-0043/default/vibe_state chown system system /sys/bus/i2c/devices/9-0043/default/num_waves + chown system system /sys/bus/i2c/devices/9-0043/default/braking_time_bank + chown system system /sys/bus/i2c/devices/9-0043/default/braking_time_index + chown system system /sys/bus/i2c/devices/9-0043/default/braking_time_ms chown system system /sys/bus/i2c/devices/9-0043/default/f0_offset chown system system /sys/bus/i2c/devices/9-0043/default/owt_free_space chown system system /sys/bus/i2c/devices/9-0043/default/f0_comp_enable diff --git a/conf/init.zumapro.soc.rc b/conf/init.zumapro.soc.rc index ac9c316..6bd32f8 100644 --- a/conf/init.zumapro.soc.rc +++ b/conf/init.zumapro.soc.rc @@ -27,12 +27,16 @@ on init write /proc/vendor_sched/groups/fg/prefer_idle 1 write /proc/vendor_sched/groups/sys/uclamp_min 190 write /proc/vendor_sched/groups/sys/prefer_idle 1 + write /proc/vendor_sched/groups/fg_wi/prefer_idle 1 + # Make sure little core don't go below 820MHz + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 820000 write /proc/vendor_sched/groups/bg/rampup_multiplier 0 write /proc/vendor_sched/groups/cam/rampup_multiplier 1 write /proc/vendor_sched/groups/cam_power/rampup_multiplier 1 write /proc/vendor_sched/groups/dex2oat/rampup_multiplier 0 write /proc/vendor_sched/groups/fg/rampup_multiplier 0 + write /proc/vendor_sched/groups/fg_wi/rampup_multiplier 1 write /proc/vendor_sched/groups/nnapi/rampup_multiplier 0 write /proc/vendor_sched/groups/ota/rampup_multiplier 0 write /proc/vendor_sched/groups/rt/rampup_multiplier 0 @@ -42,6 +46,20 @@ on init write /proc/vendor_sched/groups/ta/rampup_multiplier 1 write /proc/vendor_sched/adpf_rampup_multiplier 2 + write /proc/vendor_sched/groups/bg/disable_util_est 1 + write /proc/vendor_sched/groups/cam/disable_util_est 0 + write /proc/vendor_sched/groups/cam_power/disable_util_est 0 + write /proc/vendor_sched/groups/dex2oat/disable_util_est 1 + write /proc/vendor_sched/groups/fg/disable_util_est 1 + write /proc/vendor_sched/groups/fg_wi/disable_util_est 0 + write /proc/vendor_sched/groups/nnapi/disable_util_est 1 + write /proc/vendor_sched/groups/ota/disable_util_est 1 + write /proc/vendor_sched/groups/rt/disable_util_est 1 + write /proc/vendor_sched/groups/sf/disable_util_est 0 + write /proc/vendor_sched/groups/sys/disable_util_est 1 + write /proc/vendor_sched/groups/sys_bg/disable_util_est 1 + write /proc/vendor_sched/groups/ta/disable_util_est 0 + # governor setting write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500 @@ -115,6 +133,16 @@ on init write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/stall_floor 2400 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/stall_floor 500 + # Prefer Asymmetric MTE mode when enabled + write /sys/devices/system/cpu/cpu0/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu1/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu2/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu3/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu4/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu5/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu6/mte_tcf_preferred asymm + write /sys/devices/system/cpu/cpu7/mte_tcf_preferred asymm + on zygote-start # For PixelLogger configuration file. chmod 0771 /data/vendor/wifi @@ -140,6 +168,7 @@ on zygote-start write /proc/vendor_sched/groups/dex2oat/ug 1 write /proc/vendor_sched/groups/ta/ug 2 write /proc/vendor_sched/groups/fg/ug 2 + write /proc/vendor_sched/groups/fg_wi/ug 2 write /proc/vendor_sched/groups/nnapi/ug 2 write /proc/vendor_sched/groups/rt/ug 2 write /proc/vendor_sched/groups/sf/ug 2 @@ -163,11 +192,12 @@ on property:sys.boot_completed=1 # Set kswapd affinity write /sys/kernel/vendor_mm/kswapd_cpu_affinity 7f write /sys/kernel/vendor_mm/pa_kill/cpu_affinity 7f + write /sys/kernel/vendor_mm/kcompactd_cpu_affinity 7f # Restore prefer idle - write /proc/vendor_sched/groups/ta/preferred_idle_mask_low 0xff - write /proc/vendor_sched/groups/ta/preferred_idle_mask_mid 0xff - write /proc/vendor_sched/groups/ta/preferred_idle_mask_high 0xff + write /proc/vendor_sched/groups/ta/preferred_idle_mask_low 0x7f + write /proc/vendor_sched/groups/ta/preferred_idle_mask_mid 0x7f + write /proc/vendor_sched/groups/ta/preferred_idle_mask_high 0x7f write /proc/vendor_sched/groups/fg/preferred_idle_mask_low 0xff write /proc/vendor_sched/groups/fg/preferred_idle_mask_mid 0xff write /proc/vendor_sched/groups/fg/preferred_idle_mask_high 0xff @@ -178,6 +208,7 @@ on property:sys.boot_completed=1 # Setup final cpuset write /dev/cpuset/top-app/cpus 0-7 write /dev/cpuset/foreground/cpus 0-6 + write /dev/cpuset/foreground_window/cpus 0-6 write /dev/cpuset/background/cpus 0-3 write /dev/cpuset/system-background/cpus 0-3 write /dev/cpuset/restricted/cpus 0-3 @@ -199,6 +230,13 @@ on property:sys.boot_completed=1 write /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/pmu_limit_enable 1 write /proc/vendor_sched/pmu_poll_enable 0 + # Set priority task name and boost value + write /proc/vendor_sched/priority_task_name "ExoPlayer:Place" + write /proc/vendor_sched/priority_task_boost_value 742 + + # To be removed after InputDispatche and InputReader become ADPF + write /proc/vendor_sched/prefer_idle_task_name "InputDispatcher,InputReader" + # MTE on property:persist.device_config.runtime_native_boot.mode_override=sync # Per-core mode overrides. diff --git a/conf/init.zumapro.usb.rc b/conf/init.zumapro.usb.rc index ae67506..2fb3639 100644 --- a/conf/init.zumapro.usb.rc +++ b/conf/init.zumapro.usb.rc @@ -252,6 +252,8 @@ on early-boot setprop vendor.usb.functions.ready 1 on boot + # Set USB timeout + write sys/module/usbcore/parameters/initial_descriptor_timeout 500 # Use USB Gadget HAL setprop sys.usb.configfs 2 # Enable in-kernel media-presence polling for SD cards @@ -291,6 +293,7 @@ on property:sys.usb.config=charger && property:sys.usb.configfs=1 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi" symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1 write /config/usb_gadget/g1/UDC ${sys.usb.controller} + write /sys/class/typec/port0/device/update_sdp_enum_timeout 0x1 setprop sys.usb.state ${sys.usb.config} on property:ro.bootmode=usbuwb @@ -308,7 +311,7 @@ on property:persist.vendor.usb.displayport.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 + write /sys/module/exynos_hdcp2/parameters/max_ver 3 on property:persist.sys.hdcp_checking="drm-only" write /sys/module/exynos_hdcp2/parameters/max_ver 2 diff --git a/conf/ueventd.zumapro.rc b/conf/ueventd.zumapro.rc index 15ca216..809b596 100644 --- a/conf/ueventd.zumapro.rc +++ b/conf/ueventd.zumapro.rc @@ -173,6 +173,7 @@ # SecureElement /dev/st54spi 0660 secure_element secure_element +/dev/st33spi 0660 secure_element secure_element #bigwave /dev/bigwave 0660 mediacodec mediadrm diff --git a/default-permissions.xml b/default-permissions.xml index 2d04542..2f6f13f 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -68,6 +68,13 @@ + + + + + + + diff --git a/device-common.mk b/device-common.mk index b67982a..1e4691a 100644 --- a/device-common.mk +++ b/device-common.mk @@ -14,7 +14,9 @@ # limitations under the License. # +ifneq ($(BOARD_WITHOUT_RADIO), true) -include vendor/google_devices/zumapro/proprietary/telephony/device-vendor.mk +endif include device/google/zumapro/device.mk # Telephony diff --git a/device.mk b/device.mk index c5f87c2..7ff1535 100644 --- a/device.mk +++ b/device.mk @@ -80,9 +80,9 @@ PRODUCT_SOONG_NAMESPACES += \ device/google/zumapro \ device/google/zumapro/powerstats \ vendor/google_devices/common/chre/host/hal \ + vendor/google_devices/zumapro/proprietary/debugpolicy \ vendor/google/whitechapel/tools \ vendor/google/interfaces \ - vendor/google_devices/common/proprietary/confirmatioui_hal \ vendor/google_nos/host/android \ vendor/google_nos/test/system-test-harness \ vendor/google/camera @@ -97,8 +97,10 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ ro.oem_unlock_supported=1 # Include vendor telephony soong namespace +ifneq ($(BOARD_WITHOUT_RADIO), true) PRODUCT_SOONG_NAMESPACES += \ vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY) +endif ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) #Set IKE logs to verbose for WFC @@ -215,13 +217,18 @@ PRODUCT_PROPERTY_OVERRIDES += \ endif PRODUCT_PROPERTY_OVERRIDES += \ - persist.sys.hdcp_checking=always + persist.sys.hdcp_checking=drm-only USE_LASSEN_OEMHOOK := true + +# Pixel Logger +include hardware/google/pixel/PixelLogger/PixelLogger.mk + ifneq ($(BOARD_WITHOUT_RADIO),true) # The "power-anomaly-sitril" is added into PRODUCT_SOONG_NAMESPACES when # $(USE_LASSEN_OEMHOOK) is true and $(BOARD_WITHOUT_RADIO) is not true. PRODUCT_SOONG_NAMESPACES += vendor/google/tools/power-anomaly-sitril +$(call soong_config_set,sitril,use_lassen_oemhook_with_radio,true) $(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk) @@ -272,9 +279,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PROPERTY_OVERRIDES += \ persist.vendor.modem.extensive_logging_enabled=false -# Pixel Logger -include hardware/google/pixel/PixelLogger/PixelLogger.mk - # Use Lassen specifc Shared Modem Platform SHARED_MODEM_PLATFORM_VENDOR := lassen @@ -290,13 +294,14 @@ include device/google/gs-common/modem/shared_modem_platform/shared_modem_platfor # Use for GRIL USES_LASSEN_MODEM := true -USE_WHI_GRIL_RECOVERY := true ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true) USE_GOOGLE_DIALER := true USE_GOOGLE_CARRIER_SETTINGS := true PRODUCT_PROPERTY_OVERRIDES += \ ro.vendor.uses_google_dialer_carrier_settings=1 +# GoogleDialer in PDK build with "USES_GOOGLE_DIALER_CARRIER_SETTINGS=true" +PRODUCT_SOONG_NAMESPACES += vendor/google_devices/zumapro/proprietary/GoogleDialer endif ifeq ($(USES_GOOGLE_PREBUILT_MODEM_SVC),true) @@ -320,8 +325,14 @@ else TARGET_USES_VULKAN = true endif +# "vendor/arm" doesn't exist in PDK build +ifeq (,$(realpath $(TOPDIR)vendor/arm/mali/valhall/Android.bp)) +PRODUCT_SOONG_NAMESPACES += \ + vendor/google_devices/zumapro/prebuilts/gpu +else PRODUCT_SOONG_NAMESPACES += \ vendor/arm/mali/valhall +endif $(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM)) # TODO (b/297408842): The gralloc is being open-sourced, and we cannot pass @@ -334,9 +345,18 @@ PRODUCT_PACKAGES += \ csffw_image_prebuilt__firmware_prebuilt_ttux_mali_csffw.bin \ libGLES_mali \ vulkan.mali \ - libOpenCL \ libgpudataproducer +# Install the OpenCL ICD Loader +PRODUCT_SOONG_NAMESPACES += external/OpenCL-ICD-Loader +PRODUCT_PACKAGES += \ + libOpenCL \ + mali_icd__customer_pixel_opencl-icd_ARM.icd +ifeq ($(DEVICE_IS_64BIT_ONLY),false) +PRODUCT_PACKAGES += \ + mali_icd__customer_pixel_opencl-icd_ARM32.icd +endif + ifeq ($(USE_SWIFTSHADER),true) $(warning USE_SWIFTSHADER set to current target) PRODUCT_PACKAGES += \ @@ -358,11 +378,10 @@ endif PRODUCT_VENDOR_PROPERTIES += ro.surface_flinger.prime_shader_cache.ultrahdr=1 # Mali Configuration Properties -# b/221255664 prevents setting PROTECTED_MAX_CORE_COUNT=2 PRODUCT_VENDOR_PROPERTIES += \ vendor.mali.platform.config=/vendor/etc/mali/platform.config \ vendor.mali.debug.config=/vendor/etc/mali/debug.config \ - vendor.mali.base_protected_max_core_count=1 \ + vendor.mali.base_protected_max_core_count=4 \ vendor.mali.base_protected_tls_max=67108864 \ vendor.mali.platform_agt_frequency_khz=24576 @@ -388,10 +407,13 @@ PRODUCT_VENDOR_PROPERTIES += \ # GRAPHICS - GPU (end) # #################### +PRODUCT_SHIPPING_API_LEVEL := $(SHIPPING_API_LEVEL) + # Device Manifest, Device Compatibility Matrix for Treble DEVICE_MANIFEST_FILE := \ device/google/zumapro/manifest.xml +BOARD_USE_CODEC2_AIDL := V1 ifneq (,$(filter aosp_%,$(TARGET_PRODUCT))) DEVICE_MANIFEST_FILE += \ device/google/zumapro/manifest_media_aosp.xml @@ -412,8 +434,6 @@ DEVICE_MATRIX_FILE := \ DEVICE_PACKAGE_OVERLAYS += device/google/zumapro/overlay -PRODUCT_SHIPPING_API_LEVEL := 34 - # RKP VINTF -include vendor/google_nos/host/android/hals/keymaster/aidl/strongbox/RemotelyProvisionedComponent-citadel.mk @@ -430,7 +450,8 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/google/zumapro/conf/init.zumapro.soc.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zumapro.soc.rc \ device/google/zumapro/conf/init.zuma.soc.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zuma.soc.rc \ - device/google/zumapro/conf/init.zumapro.board.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zumapro.board.rc + device/google/zumapro/conf/init.zumapro.board.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zumapro.board.rc \ + device/google/zumapro/conf/init.efs.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.efs.rc ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_COPY_FILES += \ @@ -445,6 +466,17 @@ PRODUCT_COPY_FILES += \ device/google/zumapro/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.zuma.rc # Fstab files +ifeq (true,$(TARGET_BOOTS_16K)) +PRODUCT_SOONG_NAMESPACES += \ + device/google/zumapro/conf/fs-16kb +else ifeq (ext4,$(TARGET_RW_FILE_SYSTEM_TYPE)) +PRODUCT_SOONG_NAMESPACES += \ + device/google/zumapro/conf/ext4 +else +PRODUCT_SOONG_NAMESPACES += \ + device/google/zumapro/conf/f2fs +endif + PRODUCT_PACKAGES += \ fstab.zuma \ fstab.zumapro \ @@ -456,8 +488,9 @@ PRODUCT_PACKAGES += \ fstab.zumapro-fips.vendor_ramdisk 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.rw.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \ + device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.ro.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem \ + device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.rw.efs:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.efs # Shell scripts PRODUCT_PACKAGES += \ @@ -498,8 +531,6 @@ PRODUCT_COPY_FILES += \ ## Enable the CHRE Daemon CHRE_USF_DAEMON_ENABLED := false -PRODUCT_PACKAGES += \ - preloaded_nanoapps.json # Filesystem management tools PRODUCT_PACKAGES += \ @@ -556,15 +587,21 @@ PRODUCT_COPY_FILES += \ # Sensors PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ - frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \ frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \ frameworks/native/data/etc/android.hardware.sensor.dynamic.head_tracker.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.dynamic.head_tracker.xml \ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \ - frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml \ frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml\ - frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml +ifneq ($(DISABLE_SENSOR_BARO_HIFI),true) +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \ + frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml +endif +ifneq ($(DISABLE_SENSOR_PROX),true) +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml +endif # Add sensor HAL AIDL product packages PRODUCT_PACKAGES += android.hardware.sensors-service.multihal @@ -620,6 +657,9 @@ PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2 PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2 PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000 +# Set util_clamp_min for s/w spatializer +PRODUCT_PROPERTY_OVERRIDES += audio.spatializer.effect.util_clamp_min=300 + # Calliope firmware overwrite #PRODUCT_COPY_FILES += \ device/google/zumapro/firmware/calliope_dram.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_dram.bin \ @@ -739,12 +779,19 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \ frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \ frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml\ frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml\ +ifneq ($(DISABLE_CAMERA_FS),true) +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml +else +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.camera.autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml +endif + #PRODUCT_COPY_FILES += \ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ @@ -814,8 +861,6 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.1.brightness.dimming.usage? PRODUCT_PROPERTY_OVERRIDES += \ persist.sys.sf.native_mode=2 -PRODUCT_COPY_FILES += \ - device/google/zumapro/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb # limit DPP downscale ratio PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.hwc.dpp.downscale=4 @@ -867,12 +912,19 @@ PRODUCT_COPY_FILES += \ device/google/zumapro/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \ PRODUCT_PROPERTY_OVERRIDES += \ - debug.stagefright.c2-poolmask=458752 \ debug.c2.use_dmabufheaps=1 \ media.c2.dmabuf.padding=512 \ debug.stagefright.ccodec_delayed_params=1 \ ro.vendor.gpu.dataspace=1 +ifneq ($(BOARD_USE_CODEC2_AIDL), ) +PRODUCT_PROPERTY_OVERRIDES += \ + debug.stagefright.c2-poolmask=1507328 +else +PRODUCT_PROPERTY_OVERRIDES += \ + debug.stagefright.c2-poolmask=458752 +endif + # Create input surface on the framework side PRODUCT_PROPERTY_OVERRIDES += \ debug.stagefright.c2inputsurface=-1 \ @@ -917,9 +969,6 @@ PRODUCT_PACKAGES_DEBUG += \ tipc-test \ trusty_stats_test \ -# Remove confirmation UI (b/316160738) -# include device/google/gs101/confirmationui/confirmationui.mk - # Trusty Metrics Daemon PRODUCT_SOONG_NAMESPACES += \ vendor/google/trusty/common @@ -967,7 +1016,7 @@ PRODUCT_PRODUCT_PROPERTIES += \ ro.postinstall.fstab.prefix=/product PRODUCT_COPY_FILES += \ - device/google/zumapro/conf/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall + device/google/zumapro/conf/fstab.ro.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall # fastbootd PRODUCT_PACKAGES += \ @@ -1015,6 +1064,8 @@ SUPPORT_NR_DS := true USE_RADIO_HAL_2_1 := true # Using Early Send Device Info USE_EARLY_SEND_DEVICE_INFO := true +# Using New Radio Access Format to modem +USE_NEW_RADIO_ACCESS_SPECIFIER_FORMAT := true #$(call inherit-product, vendor/google_devices/telephony/common/device-vendor.mk) #$(call inherit-product, vendor/google_devices/zumapro/proprietary/device-vendor.mk) @@ -1045,6 +1096,9 @@ PRODUCT_PACKAGES += \ android.hardware.health-service.zumapro_recovery \ # Audio +# Audio Vendor Prebuilt +$(call soong_config_set,aoc_spk_post_processing,prebuilts_dir,$(RELEASE_GOOGLE_SPKPOSTPROCESSING_ZUMAPRO_DIR)) + # Audio HAL Server & Default Implementations ifeq ($(USE_AUDIO_HAL_AIDL),true) include device/google/gs-common/audio/aidl.mk @@ -1237,3 +1291,5 @@ PRODUCT_PROPERTY_OVERRIDES += \ # since it can't be overridden from /vendor. PRODUCT_PRODUCT_PROPERTIES += \ dumpstate.strict_run=false + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 59d5bf9..bbd11d3 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -114,7 +114,7 @@ com.google.hardware.pixel.display - 12 + 13 IDisplay default @@ -143,14 +143,6 @@ default - - vendor.google.radioext - 1.7 - - IRadioExt - default - - vendor.google.wifi_ext 2-3 @@ -185,4 +177,22 @@ rilExternal + + vendor.samsung_slsi.telephony.hardware.radioExternal + 1 + + IOemSlsiRadioExternal + default + + + + vendor.samsung_slsi.telephony.hardware.oemservice + 1 + + IOemService + dm0 + dm1 + sced0 + + diff --git a/display/display_colordata_cal0.pb b/display/display_colordata_cal0.pb deleted file mode 100644 index 9840d6a..0000000 Binary files a/display/display_colordata_cal0.pb and /dev/null differ diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index a5b4253..2e955cf 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -180,6 +180,7 @@ void dumpMaxFg() { const char *maxfg [][2] = { {"Power supply property maxfg", "/sys/class/power_supply/maxfg/uevent"}, + {"maxfg registers", "/sys/class/power_supply/maxfg/registers_dump"}, {"m5_state", "/sys/class/power_supply/maxfg/m5_model_state"}, {"maxfg logbuffer", "/dev/logbuffer_maxfg"}, {"maxfg_monitor logbuffer", "/dev/logbuffer_maxfg_monitor"}, @@ -187,6 +188,7 @@ void dumpMaxFg() { const char *max77779fgFiles [][2] = { {"Power supply property max77779fg", "/sys/class/power_supply/max77779fg/uevent"}, + {"max77779fg registers", "/sys/class/power_supply/max77779fg/registers_dump"}, {"model_state", "/sys/class/power_supply/max77779fg/model_state"}, {"max77779fg logbuffer", "/dev/logbuffer_max77779fg"}, {"max77779fg_monitor logbuffer", "/dev/logbuffer_max77779fg_monitor"}, @@ -195,6 +197,8 @@ void dumpMaxFg() { const char *maxfgSecondary [][2] = { {"Power supply property maxfg_base", "/sys/class/power_supply/maxfg_base/uevent"}, {"Power supply property maxfg_secondary", "/sys/class/power_supply/maxfg_secondary/uevent"}, + {"maxfg_base registers", "/sys/class/power_supply/maxfg_base/registers_dump"}, + {"maxfg_secondary registers", "/sys/class/power_supply/maxfg_secondary/registers_dump"}, {"model_state", "/sys/class/power_supply/maxfg_base/model_state"}, {"maxfg_base", "/dev/logbuffer_maxfg_base"}, {"maxfg_secondary", "/dev/logbuffer_maxfg_secondary"}, @@ -235,6 +239,21 @@ void dumpPowerSupplyDock() { } } +void dumpSecondCharge() { + const char* powerSupplyPropertySecChgTitle = "Power supply property rt9471"; + const char* powerSupplyPropertySecChgFile = "/sys/class/power_supply/rt9471/uevent"; + const char *secChgTitle = "RT9470G"; + const char *secChgFile = "/sys/devices/platform/10ca0000.hsi2c/i2c-10/10-005b/registers_dump"; + + if (isValidFile(powerSupplyPropertySecChgFile)) { + dumpFileContent(powerSupplyPropertySecChgTitle, powerSupplyPropertySecChgFile); + } + + if (isValidFile(secChgFile)) { + dumpFileContent(secChgTitle, secChgFile); + } +} + void dumpLogBufferTcpm() { const char* logbufferTcpmTitle = "Logbuffer TCPM"; const char* logbufferTcpmFile = "/dev/logbuffer_tcpm"; @@ -253,48 +272,44 @@ void dumpLogBufferTcpm() { } void dumpTcpc() { - int ret; - const char* max77759TcpcHead = "TCPC"; - const char* i2cSubDirMatch = "i2c-"; - const char* directory = "/sys/devices/platform/10d60000.hsi2c/"; - const char* max77759Tcpc [][2] { - {"registers:", "/i2c-max77759tcpc/registers"}, - {"frs:", "/i2c-max77759tcpc/frs"}, - {"auto_discharge:", "/i2c-max77759tcpc/auto_discharge"}, - {"bcl2_enabled:", "/i2c-max77759tcpc/bcl2_enabled"}, - {"cc_toggle_enable:", "/i2c-max77759tcpc/cc_toggle_enable"}, - {"containment_detection:", "/i2c-max77759tcpc/containment_detection"}, - {"containment_detection_status:", "/i2c-max77759tcpc/containment_detection_status"}, + const char* max77759TcpcHead = "TCPC Device Attributes"; + const char* directory = "/sys/class/typec/port0/device"; + // alphabetic order + const char* max77759Tcpc [] { + "auto_discharge", + "bc12_enabled", + "cc_toggle_enable", + "contaminant_detection", + "contaminant_detection_status", + "frs", + "irq_hpd_count", + "manual_disable_vbus", + "non_compliant_reasons", + "sbu_pullup", + "update_sdp_enum_timeout", + "usb_limit_accessory_current", + "usb_limit_accessory_enable", + "usb_limit_sink_current", + "usb_limit_sink_enable", + "usb_limit_source_enable", }; - std::vector files; std::string content; + std::string tcpcRegistersPath(std::string(directory) + "/registers"); + + dumpFileContent("TCPC Registers", tcpcRegistersPath.c_str()); printTitle(max77759TcpcHead); - ret = getFilesInDir(directory, &files); - if (ret < 0) { - for (auto &tcpcVal : max77759Tcpc) - printf("%s\n", tcpcVal[0]); - return; - } - - for (auto &file : files) { - for (auto &tcpcVal : max77759Tcpc) { - printf("%s ", tcpcVal[0]); - if (std::string::npos == std::string(file).find(i2cSubDirMatch)) { - continue; - } - - std::string fileName = directory + file + "/" + std::string(tcpcVal[1]); - - if (!android::base::ReadFileToString(fileName, &content)) { - continue; - } - - printf("%s\n", content.c_str()); - } + for (auto& tcpcVal : max77759Tcpc) { + std::string filename = std::string(directory) + "/" + std::string(tcpcVal); + printf("%s: ", tcpcVal); + android::base::ReadFileToString(filename, &content); + if (!content.empty() && (content.back() == '\n' || content.back() == '\r')) + content.pop_back(); + printf("%s\n", content.c_str()); } + printf("\n"); } void dumpPdEngine() { @@ -532,6 +547,15 @@ void dumpChgUserDebug() { } } +void dumpScratchpad() { + const char *title = "max77779sp registers dump"; + const char *file = "/sys/devices/platform/108d0000.hsi2c/i2c-6/6-0060/registers_dump"; + + if (isValidFile(file)) { + dumpFileContent(title, file); + } +} + void dumpBatteryEeprom() { const char *title = "Battery EEPROM"; const char *files[] { @@ -1065,10 +1089,23 @@ void dumpEvtCounter() { } } +void dumpCpuIdleHistogramStats() { + const char* cpuIdleHistogramTitle = "CPU Idle Histogram"; + const char* cpuIdleHistogramFile = "/sys/kernel/metrics/cpuidle_histogram/" + "cpuidle_histogram"; + const char* cpuClusterHistogramTitle = "CPU Cluster Histogram"; + const char* cpuClusterHistogramFile = "/sys/kernel/metrics/" + "cpuidle_histogram/cpucluster_histogram"; + dumpFileContent(cpuIdleHistogramTitle, cpuIdleHistogramFile); + dumpFileContent(cpuClusterHistogramTitle, cpuClusterHistogramFile); +} + int main() { dumpPowerStatsTimes(); dumpAcpmStats(); + dumpCpuIdleHistogramStats(); dumpPowerSupplyStats(); + dumpSecondCharge(); dumpMaxFg(); dumpPowerSupplyDock(); dumpLogBufferTcpm(); @@ -1078,6 +1115,7 @@ int main() { dumpBatteryDefend(); dumpChg(); dumpChgUserDebug(); + dumpScratchpad(); dumpBatteryEeprom(); dumpChargerStats(); dumpWlcLogs(); diff --git a/manifest.xml b/manifest.xml index 69a1bcd..5728c90 100644 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,4 @@ - - android.hardware.graphics.mapper - passthrough - 4.0 - - IMapper - default - - android.hardware.boot IBootControl/default diff --git a/media_codecs_bo_c2.xml b/media_codecs_bo_c2.xml index f862dc3..06e0447 100644 --- a/media_codecs_bo_c2.xml +++ b/media_codecs_bo_c2.xml @@ -65,6 +65,7 @@ + diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml index d72a962..67ca505 100644 --- a/media_codecs_performance_c2.xml +++ b/media_codecs_performance_c2.xml @@ -190,7 +190,8 @@ - + + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index f6b7439..6a884c6 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -321,6 +321,12 @@ com.google.android.satellite + + 240000 + com.google.android.apps.scone @@ -516,6 +522,19 @@ com.google.android.apps.stargate;com.google.android.apps.stargate.questionnaire.QuestionnaireHomeActivity + + com.google.android.apps.stargate.ACTION_ESOS_QUESTIONNAIRE_TEST_WITH_ESP_REPLIES + com.google.android.apps.stargate.ACTION_ESOS_QUESTIONNAIRE + + + com.google.android.apps.stargate.ACTION_ESOS_DEMO + + + 20000 + + + 33% diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index e76a4d6..c7f3ca4 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -117,6 +117,23 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = { "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/sink_count_invalid_failures", "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/link_unstable_failures", }, + .DisplayPortDSCStatsPaths = { + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/fec_dsc_supported", + "/sys/devices/platform/exynos-drm/displayport/drm-displayport-stats/fec_dsc_not_supported", + }, + .DisplayPortMaxResolutionStatsPaths = { + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_other", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_1366_768", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_1440_900", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_1600_900", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_1920_1080", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_2560_1080", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_2560_1440", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_3440_1440", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_3840_2160", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_5120_2880", + "/sys/devices/platform/exynos-drm/drm-displayport-stats/max_res_7680_4320", + }, .HDCPStatsPaths = { "/sys/devices/platform/hdcp/hdcp2_success_count", "/sys/devices/platform/hdcp/hdcp2_fallback_count", diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp index bfde924..803e051 100644 --- a/powerstats/ZumaProCommonDataProviders.cpp +++ b/powerstats/ZumaProCommonDataProviders.cpp @@ -196,7 +196,7 @@ void addDvfsStats(std::shared_ptr p) { path, NS_TO_MS, cfgs)); // TPU DVFS - const int TICK_TO_MS = 100; + const int TICK_TO_MS = 1000; std::vector freqs = { "1119000", "1066000", diff --git a/task_profiles.json b/task_profiles.json index 732ccd1..236014b 100644 --- a/task_profiles.json +++ b/task_profiles.json @@ -159,6 +159,21 @@ } ] }, + { + "Name": "HighPerformanceWI", + "Actions": [ + { + "Name": "WriteFile", + "Params": + { + "FilePath": "/proc/vendor_sched/groups/fg_wi/set_task_group", + "ProcFilePath": "/proc/vendor_sched/groups/fg_wi/set_proc_group", + "Value": "", + "LogFailures": "false" + } + } + ] + }, { "Name": "RealtimePerformance", "Actions": [ @@ -288,6 +303,10 @@ { "Name": "OtaProfiles", "Profiles": [ "OtaPerformance", "ServiceCapacityLow", "LowIoPriority", "TimerSlackHigh" ] + }, + { + "Name": "InputPolicy", + "Profiles": [ "ResetUclampGrp" ] } ] } diff --git a/telephony/README.md b/telephony/README.md new file mode 100644 index 0000000..5047f73 --- /dev/null +++ b/telephony/README.md @@ -0,0 +1,5 @@ +# Geofence Data Description +- The file `sats2.dat` contains the geofence data for the intersection of the entire US territory +and Skylo satellite coverage. +- Satellite coverage is not available in Hawaii and most parts of Alaska. +- This data has better fidelity than previous versions. \ No newline at end of file diff --git a/telephony/sats2.dat b/telephony/sats2.dat index 577b7af..ec9a7f4 100644 Binary files a/telephony/sats2.dat and b/telephony/sats2.dat differ diff --git a/usb/gadget/UsbGadget.cpp b/usb/gadget/UsbGadget.cpp index 5dbf304..3f243ae 100644 --- a/usb/gadget/UsbGadget.cpp +++ b/usb/gadget/UsbGadget.cpp @@ -49,6 +49,7 @@ constexpr char kTcpcDevName[] = "i2c-max77759tcpc"; constexpr char kI2cClientId[] = "0025"; constexpr char kAccessoryLimitCurrent[] = "usb_limit_accessory_current"; constexpr char kAccessoryLimitCurrentEnable[] = "usb_limit_accessory_enable"; +constexpr char kUpdateSdpEnumTimeout[] = "update_sdp_enum_timeout"; UsbGadget::UsbGadget() : mGadgetIrqPath(""), mI2cClientPath("") { @@ -103,6 +104,7 @@ Status UsbGadget::getUsbGadgetIrqPath() { void currentFunctionsAppliedCallback(bool functionsApplied, void *payload) { UsbGadget *gadget = (UsbGadget *)payload; gadget->mCurrentUsbFunctionsApplied = functionsApplied; + gadget->updateSdpEnumTimeout(); } ScopedAStatus UsbGadget::getCurrentUsbFunctions(const shared_ptr &callback, @@ -369,6 +371,28 @@ ScopedAStatus UsbGadget::reset(const shared_ptr &callback, return ScopedAStatus::ok(); } +void UsbGadget::updateSdpEnumTimeout() { + string update_sdp_enum_timeout_path; + + if (mI2cClientPath.empty()) { + for (int i = 0; i < NUM_HSI2C_PATHS; ++i) { + mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId); + if (mI2cClientPath.empty()) { + ALOGE("%s: Unable to locate i2c bus node", __func__); + } else { + break; + } + } + } + + update_sdp_enum_timeout_path = mI2cClientPath + kUpdateSdpEnumTimeout; + if (!WriteStringToFile("1", update_sdp_enum_timeout_path)) { + ALOGE("%s: Unable to write to %s.", __func__, update_sdp_enum_timeout_path.c_str()); + } else { + ALOGI("%s: Updated SDP enumeration timeout value.", __func__); + } +} + Status UsbGadget::setupFunctions(long functions, const shared_ptr &callback, uint64_t timeout, int64_t in_transactionId) { @@ -427,6 +451,7 @@ Status UsbGadget::setupFunctions(long functions, mCurrentUsbFunctionsApplied = true; if (callback) callback->setCurrentUsbFunctionsCb(functions, Status::SUCCESS, in_transactionId); + updateSdpEnumTimeout(); return Status::SUCCESS; } diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h index 28a9a67..94a8d8d 100644 --- a/usb/gadget/UsbGadget.h +++ b/usb/gadget/UsbGadget.h @@ -74,7 +74,7 @@ constexpr char kProcInterruptsPath[] = "/proc/interrupts"; constexpr char kProcIrqPath[] = "/proc/irq/"; constexpr char kSmpAffinityList[] = "/smp_affinity_list"; #ifndef UDC_PATH -#define UDC_PATH "/sys/class/udc/11210000.dwc3/" +#define UDC_PATH "/sys/devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3/" #endif static MonitorFfs monitorFfs(kGadgetName); @@ -115,6 +115,9 @@ struct UsbGadget : public BnUsbGadget { ScopedAStatus setVidPid(const char *vid,const char *pid); + // Indicates to the kernel that the gadget service is ready and the kernel can + // set SDP timeout to a lower value. + void updateSdpEnumTimeout(); std::string mI2cClientPath; private: diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index d8afb80..4202407 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -54,6 +54,7 @@ namespace usb_flags = android::hardware::usb::flags; using aidl::android::frameworks::stats::IStats; using android::base::GetProperty; using android::base::Join; +using android::base::ParseInt; using android::base::ParseUint; using android::base::Tokenize; using android::base::Trim; @@ -101,7 +102,9 @@ constexpr char kThermalZoneForTempReadPrimary[] = "usb_pwr_therm2"; constexpr char kThermalZoneForTempReadSecondary1[] = "usb_pwr_therm"; constexpr char kThermalZoneForTempReadSecondary2[] = "qi_therm"; constexpr char kPogoUsbActive[] = "/sys/devices/platform/google,pogo/pogo_usb_active"; -constexpr char kPogoEnableUsb[] = "/sys/devices/platform/google,pogo/enable_usb"; +constexpr char kPogoEnableHub[] = "/sys/devices/platform/google,pogo/enable_hub"; +constexpr char kInternalHubDevnum[] = "/sys/bus/usb/devices/1-1/devnum"; +constexpr char KPogoMoveDataToUsb[] = "/sys/devices/platform/google,pogo/move_data_to_usb"; constexpr char kPowerSupplyUsbType[] = "/sys/class/power_supply/usb/usb_type"; constexpr char kIrqHpdCount[] = "irq_hpd_count"; constexpr char kUdcUeventRegex[] = @@ -242,12 +245,12 @@ ScopedAStatus Usb::enableUsbDataWhileDocked(const string& in_portName, ALOGI("Userspace enableUsbDataWhileDocked opID:%ld", in_transactionId); int flags = O_RDONLY; - ::android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(kPogoEnableUsb, flags))); + ::android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(KPogoMoveDataToUsb, flags))); if (fd != -1) { notSupported = false; - success = WriteStringToFile("1", kPogoEnableUsb); + success = WriteStringToFile("1", KPogoMoveDataToUsb); if (!success) { - ALOGE("Write to enable_usb failed"); + ALOGE("Write to move_data_to_usb failed"); } } @@ -524,11 +527,16 @@ void updatePortStatus(android::hardware::usb::Usb *usb) { queryVersionHelper(usb, ¤tPortStatus); } -static int usbDeviceRemoved(const char *devname, void* client_data) { - return 0; +static int getInternalHubUniqueId() { + string internalHubDevnum; + int devnum = 0, internalHubUniqueId = -1; + if (ReadFileToString(kInternalHubDevnum, &internalHubDevnum) && + ParseInt(Trim(internalHubDevnum).c_str(), &devnum)) + internalHubUniqueId = 1000 + devnum; + return internalHubUniqueId; } -static int usbDeviceAdded(const char *devname, void* client_data) { +static Status tuneInternalHub(const char *devname, void* client_data) { uint16_t vendorId, productId; struct usb_device *device; ::aidl::android::hardware::usb::Usb *usb; @@ -537,7 +545,7 @@ static int usbDeviceAdded(const char *devname, void* client_data) { device = usb_device_open(devname); if (!device) { ALOGE("usb_device_open failed\n"); - return 0; + return Status::ERROR; } usb = (::aidl::android::hardware::usb::Usb *)client_data; @@ -559,6 +567,26 @@ static int usbDeviceAdded(const char *devname, void* client_data) { usb_device_close(device); + return Status::SUCCESS; +} + +static int usbDeviceRemoved(const char *devname, void* client_data) { + return 0; +} + +static int usbDeviceAdded(const char *devname, void* client_data) { + string pogoEnableHub; + int uniqueId = 0; + + // Enable hub tuning when the pogo dock is connected. + if (ReadFileToString(kPogoEnableHub, &pogoEnableHub) && Trim(pogoEnableHub) == "1") { + // If enable_hub is set to 1, the internal hub is the first enumearted device on bus 1 and + // port 1. + uniqueId = usb_device_get_unique_id_from_name(devname); + if (uniqueId == getInternalHubUniqueId()) + tuneInternalHub(devname, client_data); + } + return 0; } @@ -968,7 +996,13 @@ Status getPortStatusHelper(android::hardware::usb::Usb *usb, string pogoUsbActive = "0"; if (ReadFileToString(string(kPogoUsbActive), &pogoUsbActive) && stoi(Trim(pogoUsbActive)) == 1) { - (*currentPortStatus)[i].usbDataStatus.push_back(UsbDataStatus::DISABLED_DOCK); + /* + * Always signal USB device mode disabled irrespective of hub enabled while docked. + * Hub gets automatically enabled as needed. Signalling DISABLED_DOCK_HOST_MODE & + * DEVICE_MODE during pogo direct can cause notifications to show for brief windows + * when the state machine is still moving to steady state. + */ + (*currentPortStatus)[i].usbDataStatus.push_back(UsbDataStatus::DISABLED_DOCK_DEVICE_MODE); dataEnabled = false; } if (!usb->mUsbDataEnabled) { diff --git a/usb/usb/android.hardware.usb-service-i2c11.rc b/usb/usb/android.hardware.usb-service-i2c11.rc index ba3e657..dd4b86b 100644 --- a/usb/usb/android.hardware.usb-service-i2c11.rc +++ b/usb/usb/android.hardware.usb-service-i2c11.rc @@ -15,6 +15,7 @@ on post-fs chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_current chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_enable chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_source_enable + chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/update_sdp_enum_timeout chown root graphics /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd @@ -39,6 +40,7 @@ on post-fs chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_current chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_enable chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_source_enable + chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/update_sdp_enum_timeout chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd diff --git a/usb/usb/android.hardware.usb-service-i2c6.rc b/usb/usb/android.hardware.usb-service-i2c6.rc index 5caed19..fac08b3 100644 --- a/usb/usb/android.hardware.usb-service-i2c6.rc +++ b/usb/usb/android.hardware.usb-service-i2c6.rc @@ -15,6 +15,7 @@ on post-fs chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_current chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_enable chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_source_enable + chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/update_sdp_enum_timeout chown root graphics /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd @@ -39,6 +40,7 @@ on post-fs chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_current chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_enable chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_source_enable + chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/update_sdp_enum_timeout chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd