diff --git a/16kb/16kb.mk b/16kb/16kb.mk new file mode 100644 index 0000000..96bfd89 --- /dev/null +++ b/16kb/16kb.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2025 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. +# + +####################################################################### +# WARNING: Any rule defined here automatically gets inherited for +# *BOTH* 4 KB and 16 KB targets where this file is included. +####################################################################### + +PRODUCT_PACKAGES += copy_efs_files_to_data diff --git a/16kb/Android.bp b/16kb/Android.bp new file mode 100644 index 0000000..e9bd6ac --- /dev/null +++ b/16kb/Android.bp @@ -0,0 +1,13 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +// 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/16kb/CopyEfsTest/Android.bp b/16kb/CopyEfsTest/Android.bp new file mode 100644 index 0000000..e599215 --- /dev/null +++ b/16kb/CopyEfsTest/Android.bp @@ -0,0 +1,38 @@ +// Copyright (C) 2025 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_gs-common_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", + "device-pixel-tests", + ], + test_config: "AndroidTest.xml", +} diff --git a/16kb/CopyEfsTest/AndroidTest.xml b/16kb/CopyEfsTest/AndroidTest.xml new file mode 100644 index 0000000..2b18b04 --- /dev/null +++ b/16kb/CopyEfsTest/AndroidTest.xml @@ -0,0 +1,40 @@ + + + + + diff --git a/16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java b/16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java new file mode 100644 index 0000000..0f87513 --- /dev/null +++ b/16kb/CopyEfsTest/src/com/android/test/CopyEfsTest.java @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2025 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 org.junit.Before; +import org.junit.After; + +import android.platform.test.annotations.AppModeFull; + +import com.android.tradefed.device.DeviceNotAvailableException; +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.CommandResult; +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 { + + @Before + public void setUp() throws Exception { + getDevice().enableAdbRoot(); + + getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test"); + getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("mkdir -p /data/local/tmp/efs_test/dump"); + } + + @Test + @AppModeFull + public void copyEfsTest() throws Exception { + assumeTrue(getDevice().executeShellCommand("getconf PAGESIZE").trim().equals("4096")); + + testDumpF2FS("efs"); + testDumpF2FS("efs_backup"); + testDumpF2FS("modem_userdata"); + testDumpF2FS("persist"); + } + + private CommandResult RunAndCheckAdbCmd(String cmd) throws DeviceNotAvailableException { + CommandResult r = getDevice().executeShellV2Command(cmd); + assertEquals("Failed to run " + cmd, Integer.valueOf(0), r.getExitCode()); + return r; + } + + // Remove timestamps because ls on device does not support --time-style. + // Format is [permissions] [links] [uid] [gid] [size] time [name/symlink] + // time may vary greatly in formatting + // symlinks will be of the form a -> b + // So we can check for -> in the second to last spot to determine what position the timestamp ends at + // Remove totals because on disk block usage may change depending on filesystem + private String removeTimestamps(String input) { + StringBuilder output = new StringBuilder(); + for (String line : input.split("\n")) { + String[] tokens = line.split("(?")) + name_offset = 3; + for (int i=0; i= 5 && i < tokens.length - name_offset) + continue; + if (i != 0) + output.append(" "); + output.append(tokens[i]); + } + output.append("\n"); + } + return output.toString(); + } + + private void testDumpF2FS(String name) throws Exception { + RunAndCheckAdbCmd(String.format("cp /dev/block/by-name/%s /data/local/tmp/efs_test/%s.img", name, name)); + + // The device was mounted r/w. To get a clean image, we run fsck, and then mount to allow mount time fixes to happen. + // We can then dump and mount read only to ensure the contents should be the same. + RunAndCheckAdbCmd(String.format("fsck.f2fs -f /data/local/tmp/efs_test/%s.img", name)); + RunAndCheckAdbCmd(String.format("mount /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); + RunAndCheckAdbCmd("umount /data/local/tmp/efs_test/mnt"); + + RunAndCheckAdbCmd(String.format("dump.f2fs -rfPLo /data/local/tmp/efs_test/dump /data/local/tmp/efs_test/%s.img", name)); + RunAndCheckAdbCmd(String.format("mount -r /data/local/tmp/efs_test/%s.img /data/local/tmp/efs_test/mnt", name)); + + CommandResult r = RunAndCheckAdbCmd("diff -rq --no-dereference /data/local/tmp/efs_test/mnt /data/local/tmp/efs_test/dump"); + assertEquals(r.getStdout(), ""); + + String ls_cmd = "cd /data/local/tmp/efs_test/%s;ls -AlnR ."; + CommandResult mnt_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "mnt")); + CommandResult dump_ls = RunAndCheckAdbCmd(String.format(ls_cmd, "dump")); + assertEquals(removeTimestamps(mnt_ls.getStdout()), removeTimestamps(dump_ls.getStdout())); + + getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test/dump/*"); + getDevice().executeShellCommand("rm /data/local/tmp/efs_test/" + name + ".img"); + } + + @After + public void tearDown() throws Exception { + getDevice().executeShellCommand("umount /data/local/tmp/efs_test/mnt"); + getDevice().executeShellCommand("rm -rf /data/local/tmp/efs_test"); + } +} diff --git a/16kb/copy_efs_files_to_data.sh b/16kb/copy_efs_files_to_data.sh new file mode 100644 index 0000000..e1d2204 --- /dev/null +++ b/16kb/copy_efs_files_to_data.sh @@ -0,0 +1,39 @@ +#!/vendor/bin/sh + +CHECKPOINT_DIR=/data/vendor/copied + +export 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 -rfPLo $tmpdir $block_device + if [ $? -ne 0 ]; then + echo "Failed to $BIN_DIR/dump.f2fs -rfPLo $tmpdir $block_device" + return + fi + $BIN_DIR/mv $tmpdir $build_checkpoint + if [ $? -ne 0 ]; then + echo "mv $tmpdir $build_checkpoint" + return + fi + $BIN_DIR/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" + +$BIN_DIR/fsync /data/vendor/copied diff --git a/astd/astd.mk b/astd/astd.mk new file mode 100644 index 0000000..0dfa4f9 --- /dev/null +++ b/astd/astd.mk @@ -0,0 +1,9 @@ +# This module is only for factory targets, please include this makefile +# with check: +# +# ifneq ($(filter factory_%,$(TARGET_PRODUCT)),) +# include device/google/gs-common/astd/astd.mk +# endif +SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/astd/sepolicy + +PRODUCT_PACKAGES_DEBUG += astd diff --git a/astd/sepolicy/astd.te b/astd/sepolicy/astd.te new file mode 100644 index 0000000..815e832 --- /dev/null +++ b/astd/sepolicy/astd.te @@ -0,0 +1,10 @@ +# astd service +type astd, domain; +type astd_exec, exec_type, file_type, system_file_type; + +typeattribute astd coredomain; + +userdebug_or_eng(` + init_daemon_domain(astd) +') + diff --git a/astd/sepolicy/file_contexts b/astd/sepolicy/file_contexts new file mode 100644 index 0000000..17ac54c --- /dev/null +++ b/astd/sepolicy/file_contexts @@ -0,0 +1,3 @@ +/system_ext/bin/astc u:object_r:astd_exec:s0 +/system_ext/bin/astd u:object_r:astd_exec:s0 + diff --git a/audio/aidl/device_framework_matrix_product.xml b/audio/aidl/device_framework_matrix_product.xml index 570c5d4..50b850f 100644 --- a/audio/aidl/device_framework_matrix_product.xml +++ b/audio/aidl/device_framework_matrix_product.xml @@ -1,7 +1,7 @@ vendor.google.whitechapel.audio.extension - 4 + 4-5 IAudioExtension default diff --git a/bcmbt/bluetooth.mk b/bcmbt/bluetooth.mk index 18c066b..a2fb3ab 100644 --- a/bcmbt/bluetooth.mk +++ b/bcmbt/bluetooth.mk @@ -4,7 +4,7 @@ PRODUCT_PACKAGES += \ android.hardware.bluetooth.finder-V1-ndk.so \ android.hardware.bluetooth.ranging-V1-ndk.so \ android.hardware.bluetooth-service.bcmbtlinux \ - vendor.google.bluetooth_ext-V1-ndk.so \ + vendor.google.bluetooth_ext-V3-ndk.so \ bt_vendor.conf \ android.hardware.bluetooth.prebuilt.xml \ android.hardware.bluetooth_le.prebuilt.xml diff --git a/bcmbt/compatibility_matrix.xml b/bcmbt/compatibility_matrix.xml index 65b0c6d..47928f4 100644 --- a/bcmbt/compatibility_matrix.xml +++ b/bcmbt/compatibility_matrix.xml @@ -1,7 +1,7 @@ vendor.google.bluetooth_ext - 1 + 1-3 IBluetoothFinder default @@ -26,5 +26,9 @@ IBluetoothEwp default + + IBluetoothCco + default + diff --git a/bcmbt/manifest_bluetooth.xml b/bcmbt/manifest_bluetooth.xml index a72f1c9..54e5541 100644 --- a/bcmbt/manifest_bluetooth.xml +++ b/bcmbt/manifest_bluetooth.xml @@ -16,12 +16,13 @@ vendor.google.bluetooth_ext - 1 + 3 IBTChannelAvoidance/default IBluetoothCcc/default IBluetoothEwp/default IBluetoothExt/default IBluetoothFinder/default IBluetoothSar/default + IBluetoothCco/default diff --git a/bcmbt/sepolicy/service_contexts b/bcmbt/sepolicy/service_contexts index 4aecc90..e91eb1e 100644 --- a/bcmbt/sepolicy/service_contexts +++ b/bcmbt/sepolicy/service_contexts @@ -5,3 +5,4 @@ vendor.google.bluetooth_ext.IBluetoothCcc/default u:o vendor.google.bluetooth_ext.IBluetoothEwp/default u:object_r:hal_bluetooth_coexistence_service:s0 vendor.google.bluetooth_ext.IBluetoothExt/default u:object_r:hal_bluetooth_coexistence_service:s0 vendor.google.bluetooth_ext.IBluetoothFinder/default u:object_r:hal_bluetooth_coexistence_service:s0 +vendor.google.bluetooth_ext.IBluetoothCco/default u:object_r:hal_bluetooth_coexistence_service:s0 diff --git a/camera/Android.bp b/camera/Android.bp index 2c7ec58..17f152f 100644 --- a/camera/Android.bp +++ b/camera/Android.bp @@ -58,3 +58,11 @@ prebuilt_etc { init_rc: ["libg3a_ghawb.rc"], src: "libg3a_ghawb.rc", } + +prebuilt_etc { + name: "vendor-apex-allowlist-lyric.xml", + src: "vendor-apex-allowlist-lyric.xml", + vendor: true, + sub_dir: "sysconfig", + filename_from_src: true, +} diff --git a/camera/lyric.mk b/camera/lyric.mk index adffb74..5d78b69 100644 --- a/camera/lyric.mk +++ b/camera/lyric.mk @@ -58,6 +58,7 @@ PRODUCT_PACKAGES += libg3a_standalone_ghawb_rc # Vendor APEX which contains the camera HAL PRODUCT_PACKAGES += com.google.pixel.camera.hal +PRODUCT_PACKAGES += venodr-apex-allowlist-lyric.xml PRODUCT_PACKAGES += init.camera.set-interrupts-ownership PRODUCT_PACKAGES += lyric_preview_dis_xml diff --git a/camera/vendor-apex-allowlist-lyric.xml b/camera/vendor-apex-allowlist-lyric.xml new file mode 100644 index 0000000..2bcdb72 --- /dev/null +++ b/camera/vendor-apex-allowlist-lyric.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/check_current_prebuilt/check_current_prebuilt.mk b/check_current_prebuilt/check_current_prebuilt.mk index 72e359f..93c103e 100644 --- a/check_current_prebuilt/check_current_prebuilt.mk +++ b/check_current_prebuilt/check_current_prebuilt.mk @@ -1,27 +1,32 @@ +PIXEL_PREBUILT_SYMLINK_PATH=$(OUT_DIR)/pixel +$(shell rm -rf pixel_current_*) +$(shell rm -rf $(PIXEL_PREBUILT_SYMLINK_PATH)/pixel_current_*) +$(shell mkdir -p $(PIXEL_PREBUILT_SYMLINK_PATH)) + # Create symlink for bootloader $(shell rm -f "pixel_current_bootloader") ifdef BOOTLOADER_FILE_PATH -$(shell ln -sf ${BOOTLOADER_FILE_PATH} "pixel_current_bootloader") +$(shell ln -sf ../../${BOOTLOADER_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_bootloader") else ifdef BOOTLOADER_RADIO_FILE_PATH -$(shell ln -sf ${BOOTLOADER_RADIO_FILE_PATH} "pixel_current_bootloader") +$(shell ln -sf ../../${BOOTLOADER_RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_bootloader") endif # Create symlink for kernel $(shell rm -f "pixel_current_kernel") ifdef TARGET_KERNEL_DIR -$(shell ln -sf ${TARGET_KERNEL_DIR} "pixel_current_kernel") +$(shell ln -sf ../../${TARGET_KERNEL_DIR} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_kernel") endif # Create symlink for radio $(shell rm -f "pixel_current_radio") ifdef RADIO_FILE_PATH -$(shell ln -sf ${RADIO_FILE_PATH} "pixel_current_radio") +$(shell ln -sf ../../${RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radio") else ifdef BOOTLOADER_RADIO_FILE_PATH -$(shell ln -sf ${BOOTLOADER_RADIO_FILE_PATH} "pixel_current_radio") +$(shell ln -sf ../../${BOOTLOADER_RADIO_FILE_PATH} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radio") endif # Create symlink for radiocfg $(shell rm -f "pixel_current_radiocfg") ifdef SRC_MDM_CFG_DIR -$(shell ln -sf ${SRC_MDM_CFG_DIR} "pixel_current_radiocfg") +$(shell ln -sf ../../${SRC_MDM_CFG_DIR} $(PIXEL_PREBUILT_SYMLINK_PATH)/"pixel_current_radiocfg") endif diff --git a/display/Android.bp b/display/Android.bp index 63dd76e..1a90b51 100644 --- a/display/Android.bp +++ b/display/Android.bp @@ -4,14 +4,14 @@ package { sh_binary { name: "dump_display_userdebug.sh", - src: "dump_display_userdebug.sh", + src: "common/dump_display_userdebug.sh", vendor: true, sub_dir: "dump", } cc_binary { - name: "dump_display", - srcs: ["dump_display.cpp"], + name: "dump_exynos_display", + srcs: ["exynos/dump_display.cpp"], cflags: [ "-Wall", "-Wextra", @@ -26,8 +26,8 @@ cc_binary { } cc_binary { - name: "dump_second_display", - srcs: ["dump_second_display.cpp"], + name: "dump_exynos_second_display", + srcs: ["exynos/dump_second_display.cpp"], cflags: [ "-Wall", "-Wextra", @@ -40,3 +40,33 @@ cc_binary { relative_install_path: "dump", } +cc_binary { + name: "dump_pixel_display", + srcs: ["pixel/dump_display.cpp"], + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + ], + shared_libs: [ + "libbase", + "libdump", + ], + vendor: true, + relative_install_path: "dump", +} + +cc_binary { + name: "dump_pixel_second_display", + srcs: ["pixel/dump_second_display.cpp"], + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + ], + shared_libs: [ + "libdump", + ], + vendor: true, + relative_install_path: "dump", +} diff --git a/display/dump_display_userdebug.sh b/display/common/dump_display_userdebug.sh similarity index 100% rename from display/dump_display_userdebug.sh rename to display/common/dump_display_userdebug.sh diff --git a/display/dump_exynos_display.mk b/display/dump_exynos_display.mk new file mode 100644 index 0000000..d20ba9d --- /dev/null +++ b/display/dump_exynos_display.mk @@ -0,0 +1,4 @@ +BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy/exynos + +PRODUCT_PACKAGES_DEBUG += dump_display_userdebug.sh +PRODUCT_PACKAGES += dump_exynos_display diff --git a/display/dump_exynos_second_display.mk b/display/dump_exynos_second_display.mk new file mode 100644 index 0000000..5a6afe6 --- /dev/null +++ b/display/dump_exynos_second_display.mk @@ -0,0 +1,3 @@ +PRODUCT_PACKAGES += dump_exynos_second_display +BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display/exynos + diff --git a/display/dump.mk b/display/dump_pixel_display.mk similarity index 68% rename from display/dump.mk rename to display/dump_pixel_display.mk index 250ef39..f8ba633 100644 --- a/display/dump.mk +++ b/display/dump_pixel_display.mk @@ -1,4 +1,4 @@ -BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy +BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy/pixel PRODUCT_PACKAGES_ENG += dump_display_userdebug.sh -PRODUCT_PACKAGES += dump_display +PRODUCT_PACKAGES += dump_pixel_display diff --git a/display/dump_pixel_second_display.mk b/display/dump_pixel_second_display.mk new file mode 100644 index 0000000..15cf7fd --- /dev/null +++ b/display/dump_pixel_second_display.mk @@ -0,0 +1,3 @@ +PRODUCT_PACKAGES += dump_pixel_second_display +BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display/pixel + diff --git a/display/dump_second_display.mk b/display/dump_second_display.mk deleted file mode 100644 index dfab73e..0000000 --- a/display/dump_second_display.mk +++ /dev/null @@ -1,3 +0,0 @@ -PRODUCT_PACKAGES += dump_second_display -BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/display/sepolicy_second_display - diff --git a/display/dump_display.cpp b/display/exynos/dump_display.cpp similarity index 90% rename from display/dump_display.cpp rename to display/exynos/dump_display.cpp index f57a134..2e03a63 100644 --- a/display/dump_display.cpp +++ b/display/exynos/dump_display.cpp @@ -18,7 +18,7 @@ int main() { setbuf(stdout, NULL); - dumpFileContent("DECON-0 counters /sys/class/drm/card0/device/decon0/counters", "/sys/class/drm/card0/device/decon0/counters"); + dumpFileContent("DECON-0 counters", "/sys/class/drm/card0/device/decon0/counters"); dumpFileContent("CRTC-0 event log", "/sys/kernel/debug/dri/0/crtc-0/event"); runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v"); diff --git a/display/dump_second_display.cpp b/display/exynos/dump_second_display.cpp similarity index 89% rename from display/dump_second_display.cpp rename to display/exynos/dump_second_display.cpp index 9590c7f..c05ce9a 100644 --- a/display/dump_second_display.cpp +++ b/display/exynos/dump_second_display.cpp @@ -16,7 +16,7 @@ #include int main() { - dumpFileContent("DECON-1 counters /sys/class/drm/card0/device/decon1/counters", "/sys/class/drm/card0/device/decon1/counters"); + dumpFileContent("DECON-1 counters", "/sys/class/drm/card0/device/decon1/counters"); dumpFileContent("CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event"); dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name"); diff --git a/display/pixel/dump_display.cpp b/display/pixel/dump_display.cpp new file mode 100644 index 0000000..b4a2d25 --- /dev/null +++ b/display/pixel/dump_display.cpp @@ -0,0 +1,30 @@ +/* + * Copyright 2022 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. + */ +#include +#include + +int main() { + setbuf(stdout, NULL); + dumpFileContent("CRTC-0 status", "/sys/kernel/debug/dri/0/crtc-0/status"); + dumpFileContent("DRM State", "/sys/kernel/debug/dri/0/state"); + runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v"); + + dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name"); + dumpFileContent("Primary panel extra info", "/sys/class/drm/card0/device/primary-panel/panel_extinfo"); + dumpFileContent("Primary panel power Vreg", "/sys/class/drm/card0/device/primary-panel/panel_pwr_vreg"); + dumpFileContent("Primary panel power mode register", "/sys/class/drm/card0/device/primary-panel/power_mode"); + return 0; +} diff --git a/display/pixel/dump_second_display.cpp b/display/pixel/dump_second_display.cpp new file mode 100644 index 0000000..92e6e99 --- /dev/null +++ b/display/pixel/dump_second_display.cpp @@ -0,0 +1,25 @@ +/* + * Copyright 2022 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. + */ +#include + +int main() { + dumpFileContent("CRTC-1 status", "/sys/kernel/debug/dri/0/crtc-1/status"); + + dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name"); + dumpFileContent("Secondary panel extra info", "/sys/class/drm/card0/device/secondary-panel/panel_extinfo"); + dumpFileContent("Secondary panel power mode register", "/sys/class/drm/card0/device/secondary-panel/power_mode"); + return 0; +} diff --git a/display/sepolicy/dump_display.te b/display/sepolicy/dump_display.te deleted file mode 100644 index 3e2cb69..0000000 --- a/display/sepolicy/dump_display.te +++ /dev/null @@ -1,15 +0,0 @@ -# Display (dump for bugreport) -pixel_bugreport(dump_display) - -allow dump_display sysfs_display:file r_file_perms; -allow dump_display vendor_displaycolor_service:service_manager find; -binder_call(dump_display, hal_graphics_composer_default) -allow dump_display vendor_dumpsys:file execute_no_trans; -allow dump_display vendor_shell_exec:file execute_no_trans; - -userdebug_or_eng(` - allow dump_display vendor_dri_debugfs:dir r_dir_perms; - allow dump_display vendor_dri_debugfs:file r_file_perms; -') -vndbinder_use(dump_display) - diff --git a/display/sepolicy/dump_display_userdebug.te b/display/sepolicy/dump_display_userdebug.te deleted file mode 100644 index c08fb29..0000000 --- a/display/sepolicy/dump_display_userdebug.te +++ /dev/null @@ -1,11 +0,0 @@ -# Display eng/userdebug (dump for bugreport) -pixel_bugreport(dump_display_userdebug) - -userdebug_or_eng(` - allow dump_display_userdebug vendor_toolbox_exec:file execute_no_trans; - allow dump_display_userdebug vendor_log_file:dir search; - allow dump_display_userdebug vendor_hwc_log_file:dir r_dir_perms; - allow dump_display_userdebug vendor_hwc_log_file:file r_file_perms; - allow dump_display_userdebug debugfs_tracing_instances:dir search; - allow dump_display_userdebug debugfs_tracing_instances:file r_file_perms; -') diff --git a/display/sepolicy/exynos/dump_display.te b/display/sepolicy/exynos/dump_display.te new file mode 100644 index 0000000..0b4f0c7 --- /dev/null +++ b/display/sepolicy/exynos/dump_display.te @@ -0,0 +1,15 @@ +# Display (dump for bugreport) +pixel_bugreport(dump_exynos_display) + +allow dump_exynos_display sysfs_display:file r_file_perms; +allow dump_exynos_display vendor_displaycolor_service:service_manager find; +binder_call(dump_exynos_display, hal_graphics_composer_default) +allow dump_exynos_display vendor_dumpsys:file execute_no_trans; +allow dump_exynos_display vendor_shell_exec:file execute_no_trans; + +userdebug_or_eng(` + allow dump_exynos_display vendor_dri_debugfs:dir r_dir_perms; + allow dump_exynos_display vendor_dri_debugfs:file r_file_perms; +') +vndbinder_use(dump_exynos_display) + diff --git a/display/sepolicy/exynos/dump_display_userdebug.te b/display/sepolicy/exynos/dump_display_userdebug.te new file mode 100644 index 0000000..1b8dd11 --- /dev/null +++ b/display/sepolicy/exynos/dump_display_userdebug.te @@ -0,0 +1,11 @@ +# Display eng/userdebug (dump for bugreport) +pixel_bugreport(dump_exynos_display_userdebug) + +userdebug_or_eng(` + allow dump_exynos_display_userdebug vendor_toolbox_exec:file execute_no_trans; + allow dump_exynos_display_userdebug vendor_log_file:dir search; + allow dump_exynos_display_userdebug vendor_hwc_log_file:dir r_dir_perms; + allow dump_exynos_display_userdebug vendor_hwc_log_file:file r_file_perms; + allow dump_exynos_display_userdebug debugfs_tracing_instances:dir search; + allow dump_exynos_display_userdebug debugfs_tracing_instances:file r_file_perms; +') diff --git a/display/sepolicy/file.te b/display/sepolicy/exynos/file.te similarity index 100% rename from display/sepolicy/file.te rename to display/sepolicy/exynos/file.te diff --git a/display/sepolicy/exynos/file_contexts b/display/sepolicy/exynos/file_contexts new file mode 100644 index 0000000..2a0854f --- /dev/null +++ b/display/sepolicy/exynos/file_contexts @@ -0,0 +1,5 @@ +/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_exynos_display_userdebug_exec:s0 +/vendor/bin/dump/dump_exynos_display u:object_r:dump_exynos_display_exec:s0 + +/data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0 + diff --git a/display/sepolicy/genfs_contexts b/display/sepolicy/exynos/genfs_contexts similarity index 100% rename from display/sepolicy/genfs_contexts rename to display/sepolicy/exynos/genfs_contexts diff --git a/display/sepolicy/exynos/hal_graphics_composer_default.te b/display/sepolicy/exynos/hal_graphics_composer_default.te new file mode 100644 index 0000000..86e2d96 --- /dev/null +++ b/display/sepolicy/exynos/hal_graphics_composer_default.te @@ -0,0 +1,3 @@ +allow hal_graphics_composer_default dump_exynos_display:fifo_file { append write }; +allow hal_graphics_composer_default dump_exynos_display:fd use; + diff --git a/display/sepolicy/vndservice.te b/display/sepolicy/exynos/vndservice.te similarity index 100% rename from display/sepolicy/vndservice.te rename to display/sepolicy/exynos/vndservice.te diff --git a/display/sepolicy/vndservice_contexts b/display/sepolicy/exynos/vndservice_contexts similarity index 100% rename from display/sepolicy/vndservice_contexts rename to display/sepolicy/exynos/vndservice_contexts diff --git a/display/sepolicy/hal_graphics_composer_default.te b/display/sepolicy/hal_graphics_composer_default.te deleted file mode 100644 index c644559..0000000 --- a/display/sepolicy/hal_graphics_composer_default.te +++ /dev/null @@ -1,3 +0,0 @@ -allow hal_graphics_composer_default dump_display:fifo_file { append write }; -allow hal_graphics_composer_default dump_display:fd use; - diff --git a/display/sepolicy/pixel/dump_display.te b/display/sepolicy/pixel/dump_display.te new file mode 100644 index 0000000..5f7c5c0 --- /dev/null +++ b/display/sepolicy/pixel/dump_display.te @@ -0,0 +1,15 @@ +# Display (dump for bugreport) +pixel_bugreport(dump_pixel_display) + +allow dump_pixel_display sysfs_display:file r_file_perms; +allow dump_pixel_display vendor_displaycolor_service:service_manager find; +binder_call(dump_pixel_display, hal_graphics_composer_default) +allow dump_pixel_display vendor_dumpsys:file execute_no_trans; +allow dump_pixel_display vendor_shell_exec:file execute_no_trans; + +userdebug_or_eng(` + allow dump_pixel_display vendor_dri_debugfs:dir r_dir_perms; + allow dump_pixel_display vendor_dri_debugfs:file r_file_perms; +') +vndbinder_use(dump_pixel_display) + diff --git a/display/sepolicy/pixel/dump_display_userdebug.te b/display/sepolicy/pixel/dump_display_userdebug.te new file mode 100644 index 0000000..33b9da6 --- /dev/null +++ b/display/sepolicy/pixel/dump_display_userdebug.te @@ -0,0 +1,11 @@ +# Display eng/userdebug (dump for bugreport) +pixel_bugreport(dump_pixel_display_userdebug) + +userdebug_or_eng(` + allow dump_pixel_display_userdebug vendor_toolbox_exec:file execute_no_trans; + allow dump_pixel_display_userdebug vendor_log_file:dir search; + allow dump_pixel_display_userdebug vendor_hwc_log_file:dir r_dir_perms; + allow dump_pixel_display_userdebug vendor_hwc_log_file:file r_file_perms; + allow dump_pixel_display_userdebug debugfs_tracing_instances:dir search; + allow dump_pixel_display_userdebug debugfs_tracing_instances:file r_file_perms; +') diff --git a/display/sepolicy/pixel/file.te b/display/sepolicy/pixel/file.te new file mode 100644 index 0000000..e3f2382 --- /dev/null +++ b/display/sepolicy/pixel/file.te @@ -0,0 +1,3 @@ +type vendor_hwc_log_file, file_type, data_file_type; +type vendor_dri_debugfs, fs_type, debugfs_type; + diff --git a/display/sepolicy/file_contexts b/display/sepolicy/pixel/file_contexts similarity index 55% rename from display/sepolicy/file_contexts rename to display/sepolicy/pixel/file_contexts index 66118d0..17fb960 100644 --- a/display/sepolicy/file_contexts +++ b/display/sepolicy/pixel/file_contexts @@ -1,5 +1,5 @@ -/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_display_userdebug_exec:s0 -/vendor/bin/dump/dump_display u:object_r:dump_display_exec:s0 +/vendor/bin/dump/dump_display_userdebug\.sh u:object_r:dump_pixel_display_userdebug_exec:s0 +/vendor/bin/dump/dump_pixel_display u:object_r:dump_pixel_display_exec:s0 /data/vendor/log/hwc(/.*)? u:object_r:vendor_hwc_log_file:s0 diff --git a/display/sepolicy/pixel/genfs_contexts b/display/sepolicy/pixel/genfs_contexts new file mode 100644 index 0000000..4237cc5 --- /dev/null +++ b/display/sepolicy/pixel/genfs_contexts @@ -0,0 +1,4 @@ + +genfscon debugfs /dri/0/crtc- u:object_r:vendor_dri_debugfs:s0 +genfscon debugfs /dri/0/state u:object_r:vendor_dri_debugfs:s0 +genfscon sysfs /module/drm/parameters/debug u:object_r:sysfs_display:s0 diff --git a/display/sepolicy/pixel/hal_graphics_composer_default.te b/display/sepolicy/pixel/hal_graphics_composer_default.te new file mode 100644 index 0000000..9e028a0 --- /dev/null +++ b/display/sepolicy/pixel/hal_graphics_composer_default.te @@ -0,0 +1,3 @@ +allow hal_graphics_composer_default dump_pixel_display:fifo_file { append write }; +allow hal_graphics_composer_default dump_pixel_display:fd use; + diff --git a/display/sepolicy/pixel/vndservice.te b/display/sepolicy/pixel/vndservice.te new file mode 100644 index 0000000..5c3693b --- /dev/null +++ b/display/sepolicy/pixel/vndservice.te @@ -0,0 +1,2 @@ +type vendor_displaycolor_service, vndservice_manager_type; + diff --git a/display/sepolicy/pixel/vndservice_contexts b/display/sepolicy/pixel/vndservice_contexts new file mode 100644 index 0000000..9276f97 --- /dev/null +++ b/display/sepolicy/pixel/vndservice_contexts @@ -0,0 +1,2 @@ +displaycolor u:object_r:vendor_displaycolor_service:s0 + diff --git a/display/sepolicy_second_display/dump_second_display.te b/display/sepolicy_second_display/dump_second_display.te deleted file mode 100644 index 62d9c2d..0000000 --- a/display/sepolicy_second_display/dump_second_display.te +++ /dev/null @@ -1,9 +0,0 @@ -pixel_bugreport(dump_second_display) - -allow dump_second_display sysfs_display:file r_file_perms; - -userdebug_or_eng(` - allow dump_second_display vendor_dri_debugfs:dir r_dir_perms; - allow dump_second_display vendor_dri_debugfs:file r_file_perms; -') - diff --git a/display/sepolicy_second_display/exynos/dump_second_display.te b/display/sepolicy_second_display/exynos/dump_second_display.te new file mode 100644 index 0000000..70e86b8 --- /dev/null +++ b/display/sepolicy_second_display/exynos/dump_second_display.te @@ -0,0 +1,9 @@ +pixel_bugreport(dump_exynos_second_display) + +allow dump_exynos_second_display sysfs_display:file r_file_perms; + +userdebug_or_eng(` + allow dump_exynos_second_display vendor_dri_debugfs:dir r_dir_perms; + allow dump_exynos_second_display vendor_dri_debugfs:file r_file_perms; +') + diff --git a/display/sepolicy_second_display/exynos/file_contexts b/display/sepolicy_second_display/exynos/file_contexts new file mode 100644 index 0000000..02150f5 --- /dev/null +++ b/display/sepolicy_second_display/exynos/file_contexts @@ -0,0 +1,2 @@ +/vendor/bin/dump/dump_exynos_second_display u:object_r:dump_exynos_second_display_exec:s0 + diff --git a/display/sepolicy_second_display/file_contexts b/display/sepolicy_second_display/file_contexts deleted file mode 100644 index d9bb31c..0000000 --- a/display/sepolicy_second_display/file_contexts +++ /dev/null @@ -1,2 +0,0 @@ -/vendor/bin/dump/dump_second_display u:object_r:dump_second_display_exec:s0 - diff --git a/display/sepolicy_second_display/pixel/dump_second_display.te b/display/sepolicy_second_display/pixel/dump_second_display.te new file mode 100644 index 0000000..12dc81f --- /dev/null +++ b/display/sepolicy_second_display/pixel/dump_second_display.te @@ -0,0 +1,9 @@ +pixel_bugreport(dump_pixel_second_display) + +allow dump_pixel_second_display sysfs_display:file r_file_perms; + +userdebug_or_eng(` + allow dump_pixel_second_display vendor_dri_debugfs:dir r_dir_perms; + allow dump_pixel_second_display vendor_dri_debugfs:file r_file_perms; +') + diff --git a/display/sepolicy_second_display/pixel/file_contexts b/display/sepolicy_second_display/pixel/file_contexts new file mode 100644 index 0000000..686c63a --- /dev/null +++ b/display/sepolicy_second_display/pixel/file_contexts @@ -0,0 +1,2 @@ +/vendor/bin/dump/dump_pixel_second_display u:object_r:dump_pixel_second_display_exec:s0 + diff --git a/euiccpixel_app/sepolicy/common/euiccpixel_app.te b/euiccpixel_app/sepolicy/common/euiccpixel_app.te index 8093b49..c38cb24 100644 --- a/euiccpixel_app/sepolicy/common/euiccpixel_app.te +++ b/euiccpixel_app/sepolicy/common/euiccpixel_app.te @@ -24,4 +24,4 @@ get_prop(euiccpixel_app, dck_prop) # b/265286368 framework UI rendering properties and file access dontaudit euiccpixel_app default_prop:file { read }; -dontaudit euiccpixel_app sysfs_gpu_uevent:file { read open getattr }; + diff --git a/euiccpixel_app/sepolicy/common/file.te b/euiccpixel_app/sepolicy/common/file.te deleted file mode 100644 index e76ee79..0000000 --- a/euiccpixel_app/sepolicy/common/file.te +++ /dev/null @@ -1,2 +0,0 @@ -# type for gpu uevent -type sysfs_gpu_uevent, sysfs_type, fs_type; diff --git a/euiccpixel_app/sepolicy/common/genfs_contexts b/euiccpixel_app/sepolicy/common/genfs_contexts deleted file mode 100644 index fc146df..0000000 --- a/euiccpixel_app/sepolicy/common/genfs_contexts +++ /dev/null @@ -1 +0,0 @@ -genfscon sysfs /devices/platform/34f00000.gpu0/uevent u:object_r:sysfs_gpu_uevent:s0 diff --git a/gcam_app/sepolicy/vendor/debug_camera_app.te b/gcam_app/sepolicy/vendor/debug_camera_app.te index 8cac086..61029b6 100644 --- a/gcam_app/sepolicy/vendor/debug_camera_app.te +++ b/gcam_app/sepolicy/vendor/debug_camera_app.te @@ -12,5 +12,8 @@ userdebug_or_eng(` # Allows GCA_Eng & GCA-Next to access the hw_jpeg /dev/video12. # allow debug_camera_app hw_jpg_device:chr_file rw_file_perms; + + # Allows tachyon_service to communicate with GCA-Eng via binder. + binder_call(edgetpu_tachyon_server, debug_camera_app); ') diff --git a/gcam_app/sepolicy/vendor/google_camera_app.te b/gcam_app/sepolicy/vendor/google_camera_app.te index a1c3ddb..67287b6 100644 --- a/gcam_app/sepolicy/vendor/google_camera_app.te +++ b/gcam_app/sepolicy/vendor/google_camera_app.te @@ -11,3 +11,5 @@ allow google_camera_app edgetpu_device:chr_file { read write ioctl }; # Allows GCA to access the hw_jpeg /dev/video12. #allow google_camera_app hw_jpg_device:chr_file rw_file_perms; +# Allows tachyon service to communicate with google_camera_app via binder. +binder_call(edgetpu_tachyon_server, google_camera_app); diff --git a/gear/dumpstate/android.hardware.dumpstate-service.rc b/gear/dumpstate/android.hardware.dumpstate-service.rc index ee69a68..3aba985 100644 --- a/gear/dumpstate/android.hardware.dumpstate-service.rc +++ b/gear/dumpstate/android.hardware.dumpstate-service.rc @@ -1,5 +1,5 @@ service vendor.dumpstate-default /vendor/bin/hw/android.hardware.dumpstate-service class hal user system - group system shell + group system shell readtracefs interface aidl android.hardware.dumpstate.IDumpstateDevice/default diff --git a/gps/dump/dump_gps.cpp b/gps/dump/dump_gps.cpp index 7906a1f..c2d65c8 100644 --- a/gps/dump/dump_gps.cpp +++ b/gps/dump/dump_gps.cpp @@ -39,8 +39,9 @@ static void copyDirectory(const std::string &source, if (dir == nullptr) { return; } - - if (mkdir(outputDir.c_str(), 0777) == -1) { + struct stat st; + if (!(stat(outputDir.c_str(), &st) == 0 && S_ISDIR(st.st_mode)) && + mkdir(outputDir.c_str(), 0777) == -1) { closedir(dir); return; } @@ -54,8 +55,6 @@ static void copyDirectory(const std::string &source, std::string sourcePath = source + "/" + entryName; std::string destPath = outputDir + "/" + entryName; - - struct stat st; if (stat(sourcePath.c_str(), &st) == 0) { if (S_ISDIR(st.st_mode)) copyDirectory(sourcePath, destPath); @@ -119,6 +118,46 @@ void dumpLogsAscending(const char* SrcDir, const char* DestDir, int limit, const return; } +void deleteRecursively(const char* dest_dir) { + struct dirent **dirent_list; + int num_entries = scandir(dest_dir, &dirent_list, 0, alphasort); + if (num_entries < 0) { + printf("Unable to scan dir: %s.\n", dest_dir); + return; + } + + for (int i = 0; i < num_entries; i++) { + char path[1024]; + snprintf(path, sizeof(path), "%s/%s", dest_dir, dirent_list[i]->d_name); + + if (strcmp(dirent_list[i]->d_name, ".") == 0 || strcmp(dirent_list[i]->d_name, "..") == 0) { + free(dirent_list[i]); + continue; + } + + struct stat statbuf; + if (stat(path, &statbuf) == 0) { + if (S_ISDIR(statbuf.st_mode)) { + deleteRecursively(path); + } else { + printf("Delete %s\n", path); + if (unlink(path) != 0) { + printf("Unable to delete file: %s\n", path); + } + } + } else { + printf("Unable to get file status: %s\n", path); + } + free(dirent_list[i]); + } + + free(dirent_list); + + if (rmdir(dest_dir) != 0) { + printf("Unable to delete directory: %s\n", dest_dir); + } +} + int main() { if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) { printf("vendor.gps.aol.enabled is false. gps logging is not running.\n"); @@ -126,20 +165,39 @@ int main() { } int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20); std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gps"); - if (mkdir(outputDir.c_str(), 0777) == -1) { - printf("Unable to create folder: %s\n", outputDir.c_str()); - return 0; - } - dumpLogs(GPS_TMP_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_LOG_PREFIX); - dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX); - dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_LOG_PREFIX); - dumpLogs(GPS_MALLOC_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_MALLOC_LOG_PREFIX); - if (access(GPS_VENDOR_CHIP_INFO, F_OK) == 0) { - copyFile(GPS_VENDOR_CHIP_INFO, concatenatePath(outputDir.c_str(), "chip.info").c_str()); + struct stat statbuf; + if (stat(outputDir.c_str(), &statbuf) == 0) { + printf("Directory %s already exists, delete\n", outputDir.c_str()); + deleteRecursively(outputDir.c_str()); + } + if (mkdir(outputDir.c_str(), 0777) == -1) { + printf("Unable to create folder: %s\n", outputDir.c_str()); + return 0; + } + if (!::android::base::GetBoolProperty("vendor.gps.aol.collect.thinmd", + false)) { + printf("vendor.gps.aol.collect.thinmd is false. Collecting fils as " + "legacy Pixel.\n"); + dumpLogs(GPS_TMP_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_LOG_PREFIX); + dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX); + dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, + GPS_LOG_PREFIX); + dumpLogs(GPS_MALLOC_LOG_DIRECTORY, outputDir.c_str(), 1, + GPS_MALLOC_LOG_PREFIX); + dumpLogsAscending(GPS_LOG_DIRECTORY, outputDir.c_str(), 5, + GPS_RAWLOG_PREFIX); + dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 18, + GPS_MEMDUMP_LOG_PREFIX); + } else { + printf("vendor.gps.aol.collect.thinmd is true. Collecting fils as thin " + "modem.\n"); + copyDirectory(GPS_LOG_DIRECTORY, outputDir.c_str()); + } + if (access(GPS_VENDOR_CHIP_INFO, F_OK) == 0) { + copyFile(GPS_VENDOR_CHIP_INFO, + concatenatePath(outputDir.c_str(), "chip.info").c_str()); } - dumpLogsAscending(GPS_LOG_DIRECTORY, outputDir.c_str(), 5, GPS_RAWLOG_PREFIX); - dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 18, GPS_MEMDUMP_LOG_PREFIX); copyDirectory(GPS_RESOURCE_DIRECTORY, concatenatePath(outputDir.c_str(), "resource")); return 0; } diff --git a/gsa/Android.bp b/gsa/Android.bp index 59e0369..0bbad45 100644 --- a/gsa/Android.bp +++ b/gsa/Android.bp @@ -10,7 +10,6 @@ cc_binary { "-Wall", "-Wextra", "-Werror", - "-pedantic", ], shared_libs: [ "libdump", diff --git a/input/gia/gia.mk b/input/gia/gia.mk index ea079ca..febac5b 100644 --- a/input/gia/gia.mk +++ b/input/gia/gia.mk @@ -1,11 +1,19 @@ -BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy +# When not AOSP target +ifeq (,$(filter aosp_%, $(TARGET_PRODUCT))) + BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy -PRODUCT_PACKAGES += gia -PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager + # When not factory target + ifeq (,$(filter factory_%, $(TARGET_PRODUCT))) + BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/input/gia/sepolicy-pixelsystemservice + endif -PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces -PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core -PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager + PRODUCT_PACKAGES += gia + PRODUCT_PACKAGES += com.google.input.gia.giaservicemanager -DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml -DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml + PRODUCT_SOONG_NAMESPACES += vendor/google/interfaces + PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core + PRODUCT_SOONG_NAMESPACES += vendor/google/input/gia/core-servicemanager + + DEVICE_MANIFEST_FILE += device/google/gs-common/input/gia/aidl/manifest.xml + DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/input/gia/aidl/compatibility_matrix.xml +endif diff --git a/input/gia/sepolicy-pixelsystemservice/gia.te b/input/gia/sepolicy-pixelsystemservice/gia.te new file mode 100644 index 0000000..d7313cc --- /dev/null +++ b/input/gia/sepolicy-pixelsystemservice/gia.te @@ -0,0 +1,8 @@ +# SEPolicies to be configured only if and only if Pixel System Service exists on the device + +# allow pixelsystemservice_app to communicate with gia +binder_use(pixelsystemservice_app) +hal_client_domain(pixelsystemservice_app, hal_gia) + +# allow gia to execute callback for pixelsystemservice_app +binder_call(gia, pixelsystemservice_app) diff --git a/input/gia/sepolicy/gia.te b/input/gia/sepolicy/gia.te index 2c84e7c..4a310ea 100644 --- a/input/gia/sepolicy/gia.te +++ b/input/gia/sepolicy/gia.te @@ -16,3 +16,7 @@ hal_server_domain(gia, hal_gia) # allow gia for accessing touch related system file-nodes allow gia sysfs_touch_gti:dir r_dir_perms; allow gia sysfs_touch_gti:file rw_file_perms; + +# allow gia for collecting device stats +allow gia fwk_stats_service:service_manager find; +binder_call(gia, stats_service_server); diff --git a/insmod/init.module.rc b/insmod/init.module.rc index de23b5b..a106d11 100644 --- a/insmod/init.module.rc +++ b/insmod/init.module.rc @@ -8,3 +8,4 @@ service insmod_sh /vendor/bin/insmod.sh /vendor/etc/init.common.cfg group root system disabled oneshot + file /dev/kmsg w diff --git a/insmod/insmod.sh b/insmod/insmod.sh index dfc4fdd..270fa93 100755 --- a/insmod/insmod.sh +++ b/insmod/insmod.sh @@ -52,10 +52,10 @@ if [ $# -eq 1 ]; then else # Set property even if there is no insmod config # to unblock early-boot trigger - setprop vendor.common.modules.ready - setprop vendor.device.modules.ready - setprop vendor.all.modules.ready - setprop vendor.all.devices.ready + setprop vendor.common.modules.ready 1 + setprop vendor.device.modules.ready 1 + setprop vendor.all.modules.ready 1 + setprop vendor.all.devices.ready 1 exit 1 fi diff --git a/insmod/sepolicy/insmod-sh.te b/insmod/sepolicy/insmod-sh.te index ba82b0a..3a1d91a 100644 --- a/insmod/sepolicy/insmod-sh.te +++ b/insmod/sepolicy/insmod-sh.te @@ -12,3 +12,6 @@ allow insmod-sh vendor_toolbox_exec:file execute_no_trans; set_prop(insmod-sh, vendor_device_prop) dontaudit insmod-sh proc_cmdline:file r_file_perms; + +# Allow modprobe to log to kmsg. +allow insmod-sh kmsg_device:chr_file w_file_perms; diff --git a/interrupts/init.interrupts.rc b/interrupts/init.interrupts.rc index 68bc281..d2d0173 100644 --- a/interrupts/init.interrupts.rc +++ b/interrupts/init.interrupts.rc @@ -1,7 +1,8 @@ on init - # Create the directory for the trace instance during early init - chmod 666 /sys/kernel/tracing/instances/irq_gia_google - chmod 666 /sys/kernel/tracing/instances/irq_gia_google/trace + # With permissions 666, trace was not captured in the bugreport. + # Apply relaxed permissions. + chmod 777 /sys/kernel/tracing/instances/irq_gia_google + chmod 777 /sys/kernel/tracing/instances/irq_gia_google/trace chown system system /sys/kernel/tracing/instances/irq_gia_google chown system system /sys/kernel/tracing/instances/irq_gia_google/trace @@ -13,4 +14,9 @@ on init # Keep the buffer size small. This size is practically enough for debug purpose. # Having low size helps because this entire buffer gets dumped in bugreport. # Having a large size can impact bugreport size and time it takes to pack/unpack. - write /sys/kernel/tracing/instances/irq_gia_google/buffer_size_kb 64 + write /sys/kernel/tracing/instances/irq_gia_google/buffer_size_kb 16 + + # Reduce some GIA events from interrupt handler + write /sys/kernel/tracing/instances/irq_gia_google/events/irq_gia/gia_get_power/enable 0 + write /sys/kernel/tracing/instances/irq_gia_google/events/irq_gia/gia_put_power/enable 0 + write /sys/kernel/tracing/instances/irq_gia_google/events/irq_gia/gia_irq_eoi/enable 0 diff --git a/modem/dump_modemlog/dump_modem.rs b/modem/dump_modemlog/dump_modem.rs index d9af7eb..e3b2e14 100644 --- a/modem/dump_modemlog/dump_modem.rs +++ b/modem/dump_modemlog/dump_modem.rs @@ -5,6 +5,7 @@ use std::fs; const MODEM_STAT: &str = "/data/vendor/modem_stat/debug.txt"; +const MODEM_UART: &str = "/data/vendor/radio/modem_uart_logs.txt"; const SSRDUMP_DIR: &str = "/data/vendor/ssrdump"; const RFSD_ERR_LOG_DIR: &str = "/data/vendor/log/rfsd"; const WAKEUP_EVENTS: &str = "/sys/devices/platform/cpif/wakeup_events"; @@ -64,6 +65,13 @@ fn modem_stat() { println!(); } +// Capture modem uart log if it exists +fn modem_uart() { + println!("------ Modem UART ------"); + print_file_and_handle_error(MODEM_UART); + println!(); +} + // Capture crash signatures from all modem crashes fn modem_ssr_history() { println!("------ Modem SSR history ------"); @@ -101,6 +109,7 @@ fn pcie_event_stats() { fn main() { modem_stat(); + modem_uart(); modem_ssr_history(); rfsd_error_log(); wakeup_events(); diff --git a/modem/pixel_modem_service/pixel_modem_service.mk b/modem/pixel_modem_service/pixel_modem_service.mk new file mode 100644 index 0000000..266b966 --- /dev/null +++ b/modem/pixel_modem_service/pixel_modem_service.mk @@ -0,0 +1,10 @@ +# This file is not included in `modem.mk` since this is included at the +# beginning of each `device.mk` file, and so will be called before +# `PIXEL_MODEM_SERVICE_FLAVOUR` is defined later in the file. + +SOONG_CONFIG_NAMESPACES += pixel_modem_service +SOONG_CONFIG_pixel_modem_service += \ + flavour +SOONG_CONFIG_pixel_modem_service_flavour := $(PIXEL_MODEM_SERVICE_FLAVOUR) + +PRODUCT_PACKAGES += PixelModemService diff --git a/modem/shared_modem_platform/sepolicy/file.te b/modem/shared_modem_platform/sepolicy/file.te new file mode 100644 index 0000000..0f9ce9a --- /dev/null +++ b/modem/shared_modem_platform/sepolicy/file.te @@ -0,0 +1,2 @@ +# Define the type which declare in genfs_contexts +type sysfs_kernel_metrics, sysfs_type, fs_type; diff --git a/modem/shared_modem_platform/sepolicy/genfs_contexts b/modem/shared_modem_platform/sepolicy/genfs_contexts new file mode 100644 index 0000000..3075e43 --- /dev/null +++ b/modem/shared_modem_platform/sepolicy/genfs_contexts @@ -0,0 +1,6 @@ +genfscon sysfs /kernel/pixel_metrics/modem/modem_boot_duration u:object_r:sysfs_kernel_metrics:s0 +genfscon sysfs /kernel/pixel_metrics/modem/modem_wakeup_ap u:object_r:sysfs_kernel_metrics:s0 +genfscon sysfs /kernel/pixel_metrics/modem/pcie_link_state u:object_r:sysfs_kernel_metrics:s0 +genfscon sysfs /kernel/pixel_metrics/modem/pcie_link_duration u:object_r:sysfs_kernel_metrics:s0 +genfscon sysfs /kernel/pixel_metrics/modem/pcie_link_stats u:object_r:sysfs_kernel_metrics:s0 +genfscon sysfs /kernel/pixel_metrics/modem/pcie_link_updown u:object_r:sysfs_kernel_metrics:s0 diff --git a/modem/shared_modem_platform/sepolicy/shared_modem_platform.te b/modem/shared_modem_platform/sepolicy/shared_modem_platform.te index 7fc7a30..d3cabac 100644 --- a/modem/shared_modem_platform/sepolicy/shared_modem_platform.te +++ b/modem/shared_modem_platform/sepolicy/shared_modem_platform.te @@ -1,2 +1,5 @@ # Shared modem platform will register the default instance of the AIDL ISharedModemPlatform hal. hal_server_domain(shared_modem_platform, hal_shared_modem_platform) + +allow shared_modem_platform sysfs_kernel_metrics:file r_file_perms; + diff --git a/nfc/sepolicy_st21nfc/hal_nfc_default.te b/nfc/sepolicy_st21nfc/hal_nfc_default.te new file mode 100644 index 0000000..051b64d --- /dev/null +++ b/nfc/sepolicy_st21nfc/hal_nfc_default.te @@ -0,0 +1,4 @@ +# HAL NFC property +set_prop(hal_nfc_default, vendor_secure_element_prop) +set_prop(hal_nfc_default, vendor_nfc_prop) +set_prop(hal_nfc_default, vendor_nfc_antenna_prop) diff --git a/nfc/sepolicy_st21nfc/property.te b/nfc/sepolicy_st21nfc/property.te new file mode 100644 index 0000000..02e5d54 --- /dev/null +++ b/nfc/sepolicy_st21nfc/property.te @@ -0,0 +1,4 @@ +# NFC +vendor_internal_prop(vendor_nfc_prop) +vendor_restricted_prop(vendor_nfc_antenna_prop) + diff --git a/nfc/sepolicy_st21nfc/property_contexts b/nfc/sepolicy_st21nfc/property_contexts new file mode 100644 index 0000000..0b22a27 --- /dev/null +++ b/nfc/sepolicy_st21nfc/property_contexts @@ -0,0 +1,4 @@ +# NFC +persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0 +persist.vendor.nfc.antenna. u:object_r:vendor_nfc_antenna_prop:s0 + diff --git a/nfc/sepolicy_st21nfc/untrusted_app.te b/nfc/sepolicy_st21nfc/untrusted_app.te new file mode 100644 index 0000000..d9b30bc --- /dev/null +++ b/nfc/sepolicy_st21nfc/untrusted_app.te @@ -0,0 +1,5 @@ +# NFC +userdebug_or_eng( + get_prop(untrusted_app, vendor_nfc_antenna_prop) +) + diff --git a/nfc/sepolicy_st21nfc/vendor_init.te b/nfc/sepolicy_st21nfc/vendor_init.te new file mode 100644 index 0000000..7de90e2 --- /dev/null +++ b/nfc/sepolicy_st21nfc/vendor_init.te @@ -0,0 +1,2 @@ +# NFC vendor property +set_prop(vendor_init, vendor_nfc_prop) diff --git a/performance/experiments/amm/Android.bp b/performance/experiments/amm/Android.bp new file mode 100644 index 0000000..a1c2e3b --- /dev/null +++ b/performance/experiments/amm/Android.bp @@ -0,0 +1,10 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +prebuilt_etc { + name: "pixel-amm-experiment.rc", + src: "pixel-amm-experiment.rc", + vendor: true, + sub_dir: "init", +} diff --git a/performance/experiments/amm/amm.mk b/performance/experiments/amm/amm.mk new file mode 100644 index 0000000..84f2b9e --- /dev/null +++ b/performance/experiments/amm/amm.mk @@ -0,0 +1 @@ +PRODUCT_PACKAGES += pixel-amm-experiment.rc diff --git a/performance/experiments/amm/pixel-amm-experiment.rc b/performance/experiments/amm/pixel-amm-experiment.rc new file mode 100644 index 0000000..77fccba --- /dev/null +++ b/performance/experiments/amm/pixel-amm-experiment.rc @@ -0,0 +1,23 @@ +# Activate DISABLE_AMM hint. +service pixel-amm-experiment-activate /vendor/bin/sendhint -m DISABLE_AMM + user root + disabled + oneshot + +# Deactivate DISABLE_AMM hint. +service pixel-amm-experiment-deactivate /vendor/bin/sendhint -m DISABLE_AMM -e 0 + user root + disabled + oneshot + +# AMM experiment (go/pixel-perf-amm-experiment). +on property:vendor.perf.allow_experiments=1 && \ + property:vendor.pixel.system.phenotype.Perf__amm_experiment=true + setprop vendor.powerhal.amm_enabled false + start pixel-amm-experiment-activate + +# Rampdown of the experiment. +on property:vendor.perf.allow_experiments=1 && \ + property:vendor.pixel.system.phenotype.Perf__amm_experiment="" + setprop vendor.powerhal.amm_enabled "" + start pixel-amm-experiment-deactivate diff --git a/performance/experiments/experiments.mk b/performance/experiments/experiments.mk index b14b823..3fbaa52 100644 --- a/performance/experiments/experiments.mk +++ b/performance/experiments/experiments.mk @@ -4,3 +4,4 @@ PRODUCT_PACKAGES += pixel-experiments-recovery.sh include device/google/gs-common/performance/experiments/kswapd/kswapd.mk include device/google/gs-common/performance/experiments/apf/apf.mk +include device/google/gs-common/performance/experiments/amm/amm.mk diff --git a/performance/init.pixel-perf.rc b/performance/init.pixel-perf.rc index 36c487f..0d555ce 100644 --- a/performance/init.pixel-perf.rc +++ b/performance/init.pixel-perf.rc @@ -13,6 +13,149 @@ # limitations under the License. on init + chown system system /proc/vendor_sched/groups/bg/set_task_group + chown system system /proc/vendor_sched/groups/cam/set_task_group + chown system system /proc/vendor_sched/groups/fg/set_task_group + chown system system /proc/vendor_sched/groups/nnapi/set_task_group + chown system system /proc/vendor_sched/groups/sys/set_task_group + chown system system /proc/vendor_sched/groups/sys_bg/set_task_group + chown system system /proc/vendor_sched/groups/ta/set_task_group + chown system system /proc/vendor_sched/groups/rt/set_task_group + chown system system /proc/vendor_sched/groups/sf/set_task_group + 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 + chown system system /proc/vendor_sched/groups/nnapi/set_proc_group + chown system system /proc/vendor_sched/groups/sys/set_proc_group + chown system system /proc/vendor_sched/groups/sys_bg/set_proc_group + chown system system /proc/vendor_sched/groups/ta/set_proc_group + chown system system /proc/vendor_sched/groups/rt/set_proc_group + chown system system /proc/vendor_sched/groups/sf/set_proc_group + 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 + chmod 0220 /proc/vendor_sched/groups/fg/set_task_group + chmod 0220 /proc/vendor_sched/groups/nnapi/set_task_group + chmod 0220 /proc/vendor_sched/groups/sys/set_task_group + chmod 0220 /proc/vendor_sched/groups/sys_bg/set_task_group + chmod 0220 /proc/vendor_sched/groups/ta/set_task_group + chmod 0220 /proc/vendor_sched/groups/rt/set_task_group + chmod 0220 /proc/vendor_sched/groups/sf/set_task_group + 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 + chmod 0220 /proc/vendor_sched/groups/nnapi/set_proc_group + chmod 0220 /proc/vendor_sched/groups/sys/set_proc_group + chmod 0220 /proc/vendor_sched/groups/sys_bg/set_proc_group + chmod 0220 /proc/vendor_sched/groups/ta/set_proc_group + chmod 0220 /proc/vendor_sched/groups/rt/set_proc_group + chmod 0220 /proc/vendor_sched/groups/sf/set_proc_group + 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 + + # Change permission of sched qos nodes + chown system system /proc/vendor_sched/sched_qos/adpf_set + chown system system /proc/vendor_sched/sched_qos/adpf_clear + chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_set + chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_clear + chown system system /proc/vendor_sched/sched_qos/boost_prio_set + chown system system /proc/vendor_sched/sched_qos/boost_prio_clear + chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_set + chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_clear + chown system system /proc/vendor_sched/sched_qos/prefer_fit_set + chown system system /proc/vendor_sched/sched_qos/prefer_fit_clear + chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_set + chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_clear + chown system system /proc/vendor_sched/sched_qos/prefer_idle_set + chown system system /proc/vendor_sched/sched_qos/prefer_idle_clear + chown system system /proc/vendor_sched/sched_qos/rampup_multiplier_set + chown system system /proc/vendor_sched/sched_qos/rampup_multiplier_clear + + chmod 0220 /proc/vendor_sched/sched_qos/adpf_set + chmod 0220 /proc/vendor_sched/sched_qos/adpf_clear + chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_set + chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_clear + chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_set + chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_clear + chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_set + chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_clear + chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_set + chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_clear + chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_set + chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_clear + chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_set + chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_clear + chmod 0220 /proc/vendor_sched/sched_qos/rampup_multiplier_set + chmod 0220 /proc/vendor_sched/sched_qos/rampup_multiplier_clear + + # Enable sched_qos for some groups + write /proc/vendor_sched/groups/ta/qos_adpf_enable 1 + write /proc/vendor_sched/groups/ta/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/ta/qos_boost_prio_enable 1 + write /proc/vendor_sched/groups/ta/qos_preempt_wakeup_enable 1 + write /proc/vendor_sched/groups/ta/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/ta/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/ta/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/ta/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/fg/qos_adpf_enable 1 + write /proc/vendor_sched/groups/fg/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/fg/qos_boost_prio_enable 1 + write /proc/vendor_sched/groups/fg/qos_preempt_wakeup_enable 1 + write /proc/vendor_sched/groups/fg/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/fg/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/fg/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/fg/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_adpf_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_boost_prio_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_preempt_wakeup_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/fg_wi/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/cam/qos_adpf_enable 1 + write /proc/vendor_sched/groups/cam/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/cam/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/cam/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/cam/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/cam/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_adpf_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_auto_uclamp_max_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_prefer_fit_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_prefer_high_cap_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_prefer_idle_enable 1 + write /proc/vendor_sched/groups/cam_power/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/rt/qos_adpf_enable 1 + write /proc/vendor_sched/groups/rt/qos_rampup_multiplier_enable 1 + write /proc/vendor_sched/groups/sf/qos_adpf_enable 1 + write /proc/vendor_sched/groups/sf/qos_rampup_multiplier_enable 1 + # cpufreq governor setting write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor sched_pixel @@ -43,3 +186,85 @@ on init write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 500 write /sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/down_rate_limit_us 500 write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 500 + + # Default rampup multiplier setup + 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 1 + 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 + write /proc/vendor_sched/groups/sf/rampup_multiplier 1 + write /proc/vendor_sched/groups/sys/rampup_multiplier 0 + write /proc/vendor_sched/groups/sys_bg/rampup_multiplier 0 + write /proc/vendor_sched/groups/ta/rampup_multiplier 1 + write /proc/vendor_sched/adpf_rampup_multiplier 4 + + # Default util_est setup + 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 0 + 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 + + # RT uclamp setting + write /proc/sys/kernel/sched_util_clamp_min_rt_default 0 + + write /proc/vendor_sched/groups/cam/prefer_idle 1 + write /proc/vendor_sched/groups/cam/uclamp_min 1 + + chown system system /dev/cpuset/cgroup.procs + + # Add a boost for NNAPI HAL + write /proc/vendor_sched/groups/nnapi/prefer_idle 0 + write /proc/vendor_sched/groups/nnapi/uclamp_min 512 + +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 1 + write /proc/vendor_sched/enable_hrtick 1 + + # Setup final cpu.uclamp + write /proc/vendor_sched/groups/ta/uclamp_min 1 + write /proc/vendor_sched/groups/fg/uclamp_min 0 + write /proc/vendor_sched/groups/sys/prefer_idle 0 + + # Set ug group + write /proc/vendor_sched/groups/bg/ug 0 + write /proc/vendor_sched/groups/sys_bg/ug 0 + write /proc/vendor_sched/groups/ota/ug 0 + write /proc/vendor_sched/groups/dex2oat/ug 1 + write /proc/vendor_sched/groups/ta/ug 1 + + # Set bg group throttle + write /proc/vendor_sched/ug_bg_group_throttle ${persist.device_config.vendor_system_native.ug_bg_group_throttle:-308} + + # Disable PMU freq limit + write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy1/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy2/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy3/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy5/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy6/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/pmu_limit_enable 1 + write /sys/devices/system/cpu/cpufreq/policy8/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 diff --git a/performance/sepolicy/hal_power_default.te b/performance/sepolicy/hal_power_default.te index 309e8f7..5b010fc 100644 --- a/performance/sepolicy/hal_power_default.te +++ b/performance/sepolicy/hal_power_default.te @@ -1,3 +1,10 @@ +# allow power hal to access pa kill knobs allow hal_power_default sysfs_pakills:file rw_file_perms; allow hal_power_default sysfs_pakills:dir r_dir_perms; r_dir_file(hal_power_default, sysfs_vendor_mm); + +# allow power hal to access vendor_mm knobs +allow hal_power_default sysfs_vendor_mm:file rw_file_perms; + +# Allow set display early wake up +allow hal_power_default sysfs_display:file rw_file_perms; diff --git a/performance/sepolicy/init.te b/performance/sepolicy/init.te new file mode 100644 index 0000000..5d1d13f --- /dev/null +++ b/performance/sepolicy/init.te @@ -0,0 +1,2 @@ +# zram +allow init ram_device:blk_file w_file_perms; diff --git a/pixelstats/pixelstats.mk b/pixelstats/pixelstats.mk new file mode 100644 index 0000000..d0c9603 --- /dev/null +++ b/pixelstats/pixelstats.mk @@ -0,0 +1,4 @@ +# Reliability reporting +PRODUCT_PACKAGES += pixelstats-vendor + +BOARD_SEPOLICY_DIRS += device/google/gs-common/pixelstats/sepolicy diff --git a/ramdump_and_coredump/sepolicy/ramdump_app.te b/ramdump_and_coredump/sepolicy/ramdump_app.te index 9eebc98..674786b 100644 --- a/ramdump_and_coredump/sepolicy/ramdump_app.te +++ b/ramdump_and_coredump/sepolicy/ramdump_app.te @@ -9,6 +9,10 @@ userdebug_or_eng(` allow ramdump_app app_api_service:service_manager find; + # For Firebase Analytics + allow ramdump_app privapp_data_file:file x_file_perms; + allow ramdump_app privapp_data_file:lnk_file r_file_perms; + allow ramdump_app ramdump_vendor_data_file:file create_file_perms; allow ramdump_app ramdump_vendor_data_file:dir create_dir_perms; diff --git a/sepolicy/Android.bp b/sepolicy/Android.bp index 160e494..be5970c 100644 --- a/sepolicy/Android.bp +++ b/sepolicy/Android.bp @@ -3,3 +3,9 @@ se_flags { flags: ["RELEASE_USB_UDC_SYSFS_SELINUX_POLICY_ENABLED"], export_to: ["all_selinux_flags"], } + +se_flags { + name: "pixel_selinux_flags", + flags: ["RELEASE_PIXEL_MALI_SEPOLICY_ENABLED"], + export_to: ["all_selinux_flags"], +} diff --git a/storage/dump_storage.cpp b/storage/dump_storage.cpp index 784078d..b324723 100644 --- a/storage/dump_storage.cpp +++ b/storage/dump_storage.cpp @@ -27,7 +27,6 @@ #define F2FS_FSCK_TIME_PROPERTY "ro.boottime.init.fsck.data" #define F2FS_MNT_TIME_PROPERTY "ro.boottime.init.mount.data" -#define BOOTDEVICE_PROPERTY "ro.boot.bootdevice" #define BUILD_TYPE_PROPERTY "ro.build.type" void read_buffer(int buf_id, int total_len, const char* path) @@ -68,11 +67,31 @@ int main() { int mnt_time = android::base::GetIntProperty(F2FS_MNT_TIME_PROPERTY, 0); printf("--- F2FS - checkpoint=disable time (ms) ---\n%d\n\n", mnt_time); + const std::string f2fs_proc_path("/proc/fs/f2fs/"); + std::unique_ptr procdir( + opendir(f2fs_proc_path.c_str()), closedir); + if (procdir) { + dirent *proc_entry; + while ((proc_entry = readdir(procdir.get())) != nullptr) { + std::string proc_name(proc_entry->d_name); + if (proc_name == "." || proc_name == ".." || + strncmp(proc_name.c_str(), "dm-", 3)) + continue; + dumpFileContent(("F2FS - " + proc_name).c_str(), + (f2fs_proc_path + proc_name + "/disk_map").c_str()); + } + } + //UFS dumpFileContent("UFS model", "/sys/block/sda/device/model"); dumpFileContent("UFS rev", "/sys/block/sda/device/rev"); dumpFileContent("UFS size", "/sys/block/sda/size"); + dumpFileContent("UFS phy version", + "/dev/sys/block/bootdevice/pixel/phy_version"); + dumpFileContent("UFS phy release_date", + "/dev/sys/block/bootdevice/pixel/phy_release_date"); + dumpFileContent("UFS Slow IO Read", "/dev/sys/block/bootdevice/slowio_read_cnt"); dumpFileContent("UFS Slow IO Write", @@ -90,24 +109,10 @@ int main() { if (statdir) { dirent *stat_entry; while ((stat_entry = readdir(statdir.get())) != nullptr) { - std::string ufs_err_stats_path(stat_entry->d_name); - if (!strcmp(ufs_err_stats_path.c_str(), ".") - || !strcmp(ufs_err_stats_path.c_str(), "..")) - continue; - std::string bootdevice = android::base::GetProperty( - BOOTDEVICE_PROPERTY, ""); - std::string err_stat_path = "/sys/devices/platform/"; - err_stat_path.append(bootdevice.c_str()); - err_stat_path.append("/err_stats/"); - err_stat_path.append(ufs_err_stats_path.c_str()); - std::ifstream err_stat_file(err_stat_path); - if (err_stat_file.is_open()) { - std::string err_stat_atom; - err_stat_file >> err_stat_atom; - printf("%s:%s\n", ufs_err_stats_path.c_str(), - err_stat_atom.c_str()); - err_stat_file.close(); - } + std::string stat_name(stat_entry->d_name); + if (stat_name == "." || stat_name == "..") continue; + dumpFileContent(stat_name.c_str(), + (ufs_err_stats_path + stat_name).c_str()); } } diff --git a/storage/sepolicy/dump_storage.te b/storage/sepolicy/dump_storage.te index 7a5f563..67c4b9a 100644 --- a/storage/sepolicy/dump_storage.te +++ b/storage/sepolicy/dump_storage.te @@ -4,6 +4,10 @@ pixel_bugreport(dump_storage) # adb bugreport allow dump_storage sysfs_scsi_devices_0000:dir r_dir_perms; allow dump_storage sysfs_scsi_devices_0000:file r_file_perms; +allow dump_storage sysfs:file r_file_perms; + +allow dump_storage proc_f2fs:dir r_dir_perms; +allow dump_storage proc_f2fs:file r_file_perms; # adb bugreport userdebug_or_eng(` diff --git a/storage/sepolicy/init.te b/storage/sepolicy/init.te index 464ca4b..321a7ad 100644 --- a/storage/sepolicy/init.te +++ b/storage/sepolicy/init.te @@ -1,4 +1,4 @@ # init allow init sysfs_scsi_devices_0000:file w_file_perms; - -dontaudit init intelligence_data_file:dir mounton; +allow init userdata_exp_block_device:blk_file write; +allow init intelligence_data_file:dir mounton; diff --git a/storage/sepolicy/kernel.te b/storage/sepolicy/kernel.te index 55882ed..b9712b1 100644 --- a/storage/sepolicy/kernel.te +++ b/storage/sepolicy/kernel.te @@ -1,3 +1,3 @@ # for intelligence service -allow kernel userdata_exp_block_device:blk_file read; +allow kernel userdata_exp_block_device:blk_file { read write }; diff --git a/storage/storage.intelligence.rc b/storage/storage.intelligence.rc index 85586ab..f22d813 100644 --- a/storage/storage.intelligence.rc +++ b/storage/storage.intelligence.rc @@ -10,8 +10,9 @@ service storage_intelligence /vendor/bin/storage_intelligence.sh on boot && property:persist.vendor.intelligence=on mkdir /data/vendor/intelligence 0770 vendor_intelligence vendor_intelligence + mount f2fs loop@/dev/block/by-name/userdata_exp.ai /data/vendor/intelligence rw restorecon_recursive /data/vendor/intelligence - mount f2fs loop@/dev/block/by-name/userdata_exp.ai /data/vendor/intelligence ro + mount f2fs /data/vendor/intelligence /data/vendor/intelligence remount ro start storage_intelligence on boot && property:persist.vendor.intelligence=off diff --git a/storage/storage_intelligence.sh b/storage/storage_intelligence.sh index 03d2ca7..509f12e 100755 --- a/storage/storage_intelligence.sh +++ b/storage/storage_intelligence.sh @@ -1,8 +1,6 @@ #!/vendor/bin/sh # -# The script belongs to the feature of UFS FFU via OTA: go/p23-ffu-ota -# Its purpose is to copy the corresponding firmware into partition for UFS FFU. - +# The script belongs to the feature of AI preload feature, go/gemini-package property="persist.vendor.intelligence" partition="/dev/block/by-name/userdata_exp.ai" diff --git a/thermal/sepolicy/thermal_hal/genfs_contexts b/thermal/sepolicy/thermal_hal/genfs_contexts index 3000fa0..699d0ca 100644 --- a/thermal/sepolicy/thermal_hal/genfs_contexts +++ b/thermal/sepolicy/thermal_hal/genfs_contexts @@ -1,3 +1,5 @@ genfscon sysfs /devices/virtual/thermal u:object_r:sysfs_thermal:s0 +genfscon sysfs /devices/virtual/powercap u:object_r:sysfs_thermal:s0 genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0 +genfscon sysfs /class/powercap u:object_r:sysfs_thermal:s0 genfscon debugfs /gs101-thermal u:object_r:debugfs_thermal:s0 diff --git a/touch/predump/predump_touch.sh b/touch/predump/predump_touch.sh index 6a0c738..de2bdc4 100644 --- a/touch/predump/predump_touch.sh +++ b/touch/predump/predump_touch.sh @@ -4,6 +4,10 @@ DIR=/data/vendor/dump_touch SCRIPT_DIR=/vendor/bin/dump_touch LOCKFILE="$DIR"/dumping LOGFILE="$DIR"/dump.log +DEBUG_START_TIME="$DIR"/start +DEBUG_END_TIME="$DIR"/end + +date +%s%N > $DEBUG_START_TIME if [ ! -f $LOCKFILE ] then @@ -41,4 +45,4 @@ fi echo 2 > $LOCKFILE - +date +%s%N > $DEBUG_END_TIME diff --git a/touch/twoshay/aidl/compatibility_matrix_gs101.xml b/touch/twoshay/aidl/compatibility_matrix_gs101.xml index aaa2d6e..848051e 100644 --- a/touch/twoshay/aidl/compatibility_matrix_gs101.xml +++ b/touch/twoshay/aidl/compatibility_matrix_gs101.xml @@ -1,7 +1,7 @@ com.google.input - 2-3 + 2-5 ITouchContextService default diff --git a/touch/twoshay/aidl/compatibility_matrix_zuma.xml b/touch/twoshay/aidl/compatibility_matrix_zuma.xml index 25d5c50..309e5bd 100644 --- a/touch/twoshay/aidl/compatibility_matrix_zuma.xml +++ b/touch/twoshay/aidl/compatibility_matrix_zuma.xml @@ -1,15 +1,23 @@ com.google.input - 2-3 + 2-5 ITouchContextService default + + com.google.input + 5 + + ITwoshayNotificationService + default + + com.google.input.algos.gril - 2-3 + 2-5 IGrilAntennaTuningService default @@ -17,7 +25,7 @@ com.google.input.algos.spd - 2-3 + 2-5 IScreenProtectorDetectorService default diff --git a/touch/twoshay/aidl/manifest_gs101.xml b/touch/twoshay/aidl/manifest_gs101.xml index 28472a0..a8e389d 100644 --- a/touch/twoshay/aidl/manifest_gs101.xml +++ b/touch/twoshay/aidl/manifest_gs101.xml @@ -1,7 +1,7 @@ com.google.input - 3 + 5 ITouchContextService default diff --git a/touch/twoshay/aidl/manifest_zuma.xml b/touch/twoshay/aidl/manifest_zuma.xml index dbac77d..67bb212 100644 --- a/touch/twoshay/aidl/manifest_zuma.xml +++ b/touch/twoshay/aidl/manifest_zuma.xml @@ -1,15 +1,23 @@ com.google.input - 3 + 5 ITouchContextService default + + com.google.input + 5 + + ITwoshayNotificationService + default + + com.google.input.algos.gril - 3 + 5 IGrilAntennaTuningService default @@ -17,7 +25,7 @@ com.google.input.algos.spd - 3 + 5 IScreenProtectorDetectorService default diff --git a/touch/twoshay/sepolicy/platform_app.te b/touch/twoshay/sepolicy/platform_app.te index ac997a9..fe3318d 100644 --- a/touch/twoshay/sepolicy/platform_app.te +++ b/touch/twoshay/sepolicy/platform_app.te @@ -1,4 +1,5 @@ allow platform_app gril_antenna_tuning_service:service_manager find; allow platform_app screen_protector_detector_service:service_manager find; allow platform_app touch_context_service:service_manager find; +allow platform_app twoshay_notification_service:service_manager find; binder_call(platform_app, twoshay) diff --git a/touch/twoshay/sepolicy/service.te b/touch/twoshay/sepolicy/service.te index 4aa064d..dd7720c 100644 --- a/touch/twoshay/sepolicy/service.te +++ b/touch/twoshay/sepolicy/service.te @@ -1,3 +1,4 @@ type gril_antenna_tuning_service, service_manager_type, hal_service_type; type screen_protector_detector_service, service_manager_type, hal_service_type; type touch_context_service, service_manager_type, hal_service_type; +type twoshay_notification_service, service_manager_type, hal_service_type; diff --git a/touch/twoshay/sepolicy/service_contexts b/touch/twoshay/sepolicy/service_contexts index f6aa1db..76dc4b9 100644 --- a/touch/twoshay/sepolicy/service_contexts +++ b/touch/twoshay/sepolicy/service_contexts @@ -1,3 +1,4 @@ com.google.input.ITouchContextService/default u:object_r:touch_context_service:s0 +com.google.input.ITwoshayNotificationService/default u:object_r:twoshay_notification_service:s0 com.google.input.algos.gril.IGrilAntennaTuningService/default u:object_r:gril_antenna_tuning_service:s0 com.google.input.algos.spd.IScreenProtectorDetectorService/default u:object_r:screen_protector_detector_service:s0 diff --git a/touch/twoshay/sepolicy/twoshay.te b/touch/twoshay/sepolicy/twoshay.te index cd317a0..e910ff9 100644 --- a/touch/twoshay/sepolicy/twoshay.te +++ b/touch/twoshay/sepolicy/twoshay.te @@ -10,6 +10,7 @@ binder_use(twoshay) add_service(twoshay, gril_antenna_tuning_service) add_service(twoshay, screen_protector_detector_service) add_service(twoshay, touch_context_service) +add_service(twoshay, twoshay_notification_service) binder_call(twoshay, platform_app) diff --git a/tts/de-de/de-de-x-multi-r53.zvoice b/tts/de-de/de-de-x-multi-r57.zvoice similarity index 63% rename from tts/de-de/de-de-x-multi-r53.zvoice rename to tts/de-de/de-de-x-multi-r57.zvoice index 87a9b04..1660eab 100644 Binary files a/tts/de-de/de-de-x-multi-r53.zvoice and b/tts/de-de/de-de-x-multi-r57.zvoice differ diff --git a/tts/es-es/es-es-x-multi-r52.zvoice b/tts/es-es/es-es-x-multi-r56.zvoice similarity index 53% rename from tts/es-es/es-es-x-multi-r52.zvoice rename to tts/es-es/es-es-x-multi-r56.zvoice index 5f8c243..a63cdc4 100644 Binary files a/tts/es-es/es-es-x-multi-r52.zvoice and b/tts/es-es/es-es-x-multi-r56.zvoice differ diff --git a/tts/fr-fr/fr-fr-x-multi-r53.zvoice b/tts/fr-fr/fr-fr-x-multi-r57.zvoice similarity index 66% rename from tts/fr-fr/fr-fr-x-multi-r53.zvoice rename to tts/fr-fr/fr-fr-x-multi-r57.zvoice index 71ad1ca..4aa6148 100644 Binary files a/tts/fr-fr/fr-fr-x-multi-r53.zvoice and b/tts/fr-fr/fr-fr-x-multi-r57.zvoice differ diff --git a/tts/it-it/it-it-x-multi-r49.zvoice b/tts/it-it/it-it-x-multi-r54.zvoice similarity index 59% rename from tts/it-it/it-it-x-multi-r49.zvoice rename to tts/it-it/it-it-x-multi-r54.zvoice index c1ecf15..e016410 100644 Binary files a/tts/it-it/it-it-x-multi-r49.zvoice and b/tts/it-it/it-it-x-multi-r54.zvoice differ diff --git a/tts/ja-jp/ja-jp-x-multi-r51.zvoice b/tts/ja-jp/ja-jp-x-multi-r55.zvoice similarity index 68% rename from tts/ja-jp/ja-jp-x-multi-r51.zvoice rename to tts/ja-jp/ja-jp-x-multi-r55.zvoice index d507720..c8d3f15 100644 Binary files a/tts/ja-jp/ja-jp-x-multi-r51.zvoice and b/tts/ja-jp/ja-jp-x-multi-r55.zvoice differ diff --git a/tts/voice_packs.mk b/tts/voice_packs.mk index 86e2590..204da3b 100644 --- a/tts/voice_packs.mk +++ b/tts/voice_packs.mk @@ -15,8 +15,8 @@ # Voice packs for Text-To-Speech PRODUCT_COPY_FILES += \ - device/google/gs-common/tts/ja-jp/ja-jp-x-multi-r51.zvoice:product/tts/google/ja-jp/ja-jp-x-multi-r51.zvoice\ - device/google/gs-common/tts/fr-fr/fr-fr-x-multi-r53.zvoice:product/tts/google/fr-fr/fr-fr-x-multi-r53.zvoice\ - device/google/gs-common/tts/de-de/de-de-x-multi-r53.zvoice:product/tts/google/de-de/de-de-x-multi-r53.zvoice\ - device/google/gs-common/tts/it-it/it-it-x-multi-r49.zvoice:product/tts/google/it-it/it-it-x-multi-r49.zvoice\ - device/google/gs-common/tts/es-es/es-es-x-multi-r52.zvoice:product/tts/google/es-es/es-es-x-multi-r52.zvoice + device/google/gs-common/tts/ja-jp/ja-jp-x-multi-r55.zvoice:product/tts/google/ja-jp/ja-jp-x-multi-r55.zvoice\ + device/google/gs-common/tts/fr-fr/fr-fr-x-multi-r57.zvoice:product/tts/google/fr-fr/fr-fr-x-multi-r57.zvoice\ + device/google/gs-common/tts/de-de/de-de-x-multi-r57.zvoice:product/tts/google/de-de/de-de-x-multi-r57.zvoice\ + device/google/gs-common/tts/it-it/it-it-x-multi-r54.zvoice:product/tts/google/it-it/it-it-x-multi-r54.zvoice\ + device/google/gs-common/tts/es-es/es-es-x-multi-r56.zvoice:product/tts/google/es-es/es-es-x-multi-r56.zvoice diff --git a/wireless_charger/compatibility_matrix.xml b/wireless_charger/compatibility_matrix.xml index 5185344..78e29ce 100644 --- a/wireless_charger/compatibility_matrix.xml +++ b/wireless_charger/compatibility_matrix.xml @@ -1,7 +1,7 @@ vendor.google.wireless_charger - 1-2 + 1-3 IWirelessCharger default diff --git a/wireless_charger/sepolicy/hal_googlebattery.te b/wireless_charger/sepolicy/hal_googlebattery.te index 6fda60f..6c9d3fb 100644 --- a/wireless_charger/sepolicy/hal_googlebattery.te +++ b/wireless_charger/sepolicy/hal_googlebattery.te @@ -1,2 +1,4 @@ +# wlc permission for googlebattery r_dir_file(hal_googlebattery, sysfs_wlc) allow hal_googlebattery sysfs_wlc:file rw_file_perms; +set_prop(hal_googlebattery, vendor_wlcservice_prop) diff --git a/wireless_charger/sepolicy/hal_wlcservice.te b/wireless_charger/sepolicy/hal_wlcservice.te index 6eba2ef..bcda19d 100644 --- a/wireless_charger/sepolicy/hal_wlcservice.te +++ b/wireless_charger/sepolicy/hal_wlcservice.te @@ -1,3 +1,4 @@ +# wlcservice hal type and permission type hal_wlcservice, domain; type hal_wlcservice_exec, exec_type, vendor_file_type, file_type; @@ -8,7 +9,7 @@ allow hal_wlcservice vendor_wlc_file:file create_file_perms; allow hal_wlcservice hal_wireless_charger_service:service_manager find; allow hal_wlcservice kmsg_device:chr_file { getattr w_file_perms }; -get_prop(hal_wlcservice, vendor_wlcservice_test_prop) +set_prop(hal_wlcservice, vendor_wlcservice_prop) binder_call(hal_wlcservice, servicemanager) add_service(hal_wlcservice, hal_wlcservice_service) diff --git a/wireless_charger/sepolicy/property.te b/wireless_charger/sepolicy/property.te index b8ddbdf..7cf9903 100644 --- a/wireless_charger/sepolicy/property.te +++ b/wireless_charger/sepolicy/property.te @@ -1 +1,2 @@ -vendor_internal_prop(vendor_wlcservice_test_prop) +# wlcservice property +vendor_internal_prop(vendor_wlcservice_prop) diff --git a/wireless_charger/sepolicy/property_contexts b/wireless_charger/sepolicy/property_contexts index 8cf8f70..9055e69 100644 --- a/wireless_charger/sepolicy/property_contexts +++ b/wireless_charger/sepolicy/property_contexts @@ -1 +1,2 @@ -vendor.wlcservice.test.authentication u:object_r:vendor_wlcservice_test_prop:s0 exact bool +vendor.wlcservice.test.authentication u:object_r:vendor_wlcservice_prop:s0 exact bool +vendor.wlcservice.fwupdate.tx u:object_r:vendor_wlcservice_prop:s0 exact enum 0 1 2 3