Snap for 11740859 from d5028db7e3c53961a6f4c7d12d123e3c57466f2f to 24Q3-release

Change-Id: I9ca7df41681282a1fff15d2d51f6bca94524e3da
This commit is contained in:
Android Build Coastguard Worker 2024-04-20 01:02:11 +00:00
commit e2d4962800
32 changed files with 224 additions and 1 deletions

View File

@ -9,7 +9,7 @@
</hal>
<hal format="aidl">
<name>vendor.google.whitechapel.audio.extension</name>
<version>1</version>
<version>2</version>
<interface>
<name>IAudioExtension</name>
<instance>default</instance>

View File

@ -42,6 +42,7 @@ int main() {
// Attach multiple latest sessions (in case the user is running concurrent
// sessions or starts a new session after the one with performance issues).
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 10, "session-ended-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 10, "multicam-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "high-drop-rate-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "watchdog-");
dumpLogs(kCameraLogDir.data(), cameraDestDir.c_str(), 5, "camera-ended-");

View File

@ -5,6 +5,7 @@ package {
cc_binary {
name: "dump_perf",
srcs: ["dump_perf.cpp"],
init_rc: ["init.pixel-mm-gs.rc"],
cflags: [
"-Wall",
"-Wextra",

View File

@ -0,0 +1,20 @@
# 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.
on init
# adjust PCP high level
write /proc/sys/vm/percpu_pagelist_high_fraction 430
# disable proactive compaction
write /proc/sys/vm/compaction_proactiveness 0

View File

@ -0,0 +1,4 @@
# MM
allow vendor_init proc_percpu_pagelist_high_fraction:file w_file_perms;
allow vendor_init proc_compaction_proactiveness:file w_file_perms;

View File

@ -33,3 +33,19 @@ cc_binary {
],
vendor: true,
}
sh_binary {
name: "predump_gti0.sh",
src: "dump_gti0.sh",
init_rc: ["init.touch.gti0.rc"],
vendor: true,
sub_dir: "dump_touch",
}
sh_binary {
name: "predump_gti1.sh",
src: "dump_gti1.sh",
init_rc: ["init.touch.gti1.rc"],
vendor: true,
sub_dir: "dump_touch",
}

7
touch/gti/predump_gti.mk Normal file
View File

@ -0,0 +1,7 @@
include device/google/gs-common/touch/predump/predump_touch.mk
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/predump_sepolicy
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/ical/sepolicy
PRODUCT_PACKAGES += predump_gti0.sh
PRODUCT_PACKAGES += touch_gti_ical

View File

@ -0,0 +1,6 @@
include device/google/gs-common/touch/gti/predump_gti.mk
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/predump_sepolicy_gti_dual
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/gti/ical/sepolicy_gti_dual
PRODUCT_PACKAGES += predump_gti1.sh

View File

@ -0,0 +1,3 @@
type proc_touch_gti, proc_type, fs_type;
type sysfs_touch_gti, sysfs_type, fs_type;

View File

@ -0,0 +1 @@
/vendor/bin/dump_touch/predump_gti0\.sh u:object_r:predump_touch_exec:s0

View File

@ -0,0 +1,4 @@
# Touch
genfscon sysfs /devices/virtual/goog_touch_interface u:object_r:sysfs_touch_gti:s0
genfscon proc /goog_touch_interface u:object_r:proc_touch_gti:s0

View File

@ -0,0 +1,4 @@
allow predump_touch proc_touch_gti:dir r_dir_perms;
allow predump_touch proc_touch_gti:file rw_file_perms;
allow predump_touch sysfs_touch_gti:dir r_dir_perms;
allow predump_touch sysfs_touch_gti:file rw_file_perms;

View File

@ -0,0 +1,2 @@
/vendor/bin/dump_touch/predump_gti1\.sh u:object_r:predump_touch_exec:s0

17
touch/predump/Android.bp Normal file
View File

@ -0,0 +1,17 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "predump_touch.sh",
src: "predump_touch.sh",
init_rc: ["init.touch.predump.rc"],
vendor: true,
}
sh_binary {
name: "dump_touch.sh",
src: "dump_touch.sh",
vendor: true,
sub_dir: "dump",
}

View File

@ -0,0 +1,25 @@
#!/vendor/bin/sh
DIR=/data/vendor/dump_touch
LOCKFILE="$DIR"/dumping
LOGFILE="$DIR"/dump.log
if [ ! -f $LOCKFILE ]
then
echo "-----------------------------------------------------"
echo "Error : PreDump Touch Logs couldn't be found."
echo "-----------------------------------------------------"
exit 2
fi
state=$(cat $LOCKFILE)
if [ "$state" != 2 ]
then
echo "Unexpected state! Expected 2 but found ${state}" >> $LOGFILE
fi
cat $LOGFILE
echo "" > $LOGFILE
echo 0 > $LOCKFILE

View File

@ -0,0 +1,12 @@
service vendor.touch_dumpstate /vendor/bin/predump_touch.sh
class main
user system
group system shell
disabled
oneshot
on post-fs-data
mkdir /data/vendor/dump_touch 0775 system system
on property:init.svc.dumpstatez=running
start vendor.touch_dumpstate

View File

@ -0,0 +1,4 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/predump/sepolicy
PRODUCT_PACKAGES += predump_touch.sh
PRODUCT_PACKAGES += dump_touch.sh

View File

@ -0,0 +1,44 @@
#!/vendor/bin/sh
DIR=/data/vendor/dump_touch
SCRIPT_DIR=/vendor/bin/dump_touch
LOCKFILE="$DIR"/dumping
LOGFILE="$DIR"/dump.log
if [ ! -f $LOCKFILE ]
then
#Init Setup
echo 0 > $LOCKFILE
echo "" > $LOGFILE
chmod 660 $LOCKFILE
chmod 660 $LOGFILE
fi
echo $(date) >> $LOGFILE
state=$(cat $LOCKFILE)
if [ "$state" != 0 ]
then
echo "Unexpected state! Expected 0 but found ${state}" >> $LOGFILE
fi
echo 1 > $LOCKFILE
for entry in "$SCRIPT_DIR"/*.sh
do
echo "----------------------------------" >> $LOGFILE
echo "$entry" >> $LOGFILE
echo "----------------------------------" >> $LOGFILE
sh $entry >> $LOGFILE
echo "----------------------------------" >> $LOGFILE
done
state=$(cat $LOCKFILE)
if [ "$state" != 1 ]
then
echo "Unexpected state! Expected 1 but found ${state}" >> $LOGFILE
fi
echo 2 > $LOCKFILE

View File

@ -0,0 +1,5 @@
pixel_bugreport(dump_touch)
allow dump_touch vendor_touch_dump_file:dir r_dir_perms;
allow dump_touch vendor_touch_dump_file:file rw_file_perms;
allow dump_touch vendor_toolbox_exec:file execute_no_trans;

View File

@ -0,0 +1 @@
type vendor_touch_dump_file, file_type, data_file_type;

View File

@ -0,0 +1,5 @@
/vendor/bin/predump_touch\.sh u:object_r:predump_touch_exec:s0
/vendor/bin/dump/dump_touch\.sh u:object_r:dump_touch_exec:s0
/data/vendor/dump_touch/dump\.log u:object_r:vendor_touch_dump_file:s0
/data/vendor/dump_touch/dumping u:object_r:vendor_touch_dump_file:s0
/data/vendor/dump_touch u:object_r:vendor_touch_dump_file:s0

View File

@ -0,0 +1,9 @@
type predump_touch, domain;
type predump_touch_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(predump_touch)
allow predump_touch vendor_touch_dump_file:dir rw_dir_perms;
allow predump_touch vendor_touch_dump_file:file create_file_perms;
allow predump_touch vendor_toolbox_exec:file execute_no_trans;
allow predump_touch vendor_shell_exec:file execute_no_trans;

View File

@ -10,3 +10,10 @@ sh_binary {
sub_dir: "dump",
}
sh_binary {
name: "predump_syna.sh",
src: "dump_syna.sh",
init_rc: ["init.touch.syna.rc"],
vendor: true,
sub_dir: "dump_touch",
}

View File

@ -0,0 +1,2 @@
type sysfs_touch, sysfs_type, fs_type;

View File

@ -0,0 +1,2 @@
/vendor/bin/dump_touch/predump_syna\.sh u:object_r:predump_touch_exec:s0

View File

@ -0,0 +1,3 @@
genfscon sysfs /devices/platform/10d10000.spi/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs u:object_r:sysfs_touch:s0
genfscon sysfs /devices/platform/111c0000.spi/spi_master/spi19/spi19.0/synaptics_tcm.0/sysfs u:object_r:sysfs_touch:s0
genfscon sysfs /devices/platform/111d0000.spi/spi_master/spi20/spi20.0/synaptics_tcm.0/sysfs u:object_r:sysfs_touch:s0

View File

@ -0,0 +1,5 @@
allow predump_touch sysfs_touch:dir r_dir_perms;
allow predump_touch sysfs_touch:file rw_file_perms;
get_prop(predump_touch, vendor_touch_dump_path_prop)

View File

@ -0,0 +1 @@
vendor_internal_prop(vendor_touch_dump_path_prop)

View File

@ -0,0 +1 @@
ro.vendor.touch.dump. u:object_r:vendor_touch_dump_path_prop:s0

View File

@ -0,0 +1 @@
set_prop(vendor_init, vendor_touch_dump_path_prop)

View File

@ -0,0 +1,5 @@
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/class/spi_master/spi19/spi19.0/synaptics_tcm.0/sysfs
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/syna/predump_sepolicy
PRODUCT_PACKAGES += predump_syna.sh

View File

@ -0,0 +1,5 @@
PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/devices/platform/111d0000.spi/spi_master/spi20/spi20.0/synaptics_tcm.0/sysfs
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/syna/predump_sepolicy
PRODUCT_PACKAGES += predump_syna.sh