Snap for 10832001 from c7042d8b23 to udc-qpr1-release

Change-Id: I69bdc532bac2b50c64092ea414d4382705489016
This commit is contained in:
Android Build Coastguard Worker 2023-09-19 23:03:02 +00:00
commit b06c4d69cf
3 changed files with 14 additions and 2 deletions

View file

@ -16,6 +16,8 @@ on init
# Set teo as cpu idle governor # Set teo as cpu idle governor
write /sys/devices/system/cpu/cpuidle/current_governor teo write /sys/devices/system/cpu/cpuidle/current_governor teo
# Disable util-awareness
write /proc/vendor_sched/teo_util_threshold "1024 1024 1024"
# Boot time fs tuning # Boot time fs tuning
write /sys/block/sda/queue/iostats 0 write /sys/block/sda/queue/iostats 0

View file

@ -291,5 +291,5 @@
</string-array> </string-array>
<!-- Enable variable refresh rate when typing. --> <!-- Enable variable refresh rate when typing. -->
<bool name="config_variableRefreshRateTypingSupported">true</bool> <bool name="config_variableRefreshRateTypingSupported">false</bool>
</resources> </resources>

View file

@ -6,13 +6,23 @@
ufs_dev="/dev/sys/block/bootdevice" ufs_dev="/dev/sys/block/bootdevice"
fw_dir="/vendor/firmware" fw_dir="/vendor/firmware"
blk_dev="/dev/block/by-name/fips" blk_dev="/dev/block/by-name/fips"
min_timestamp=$(date -d "2022-10-01" +%s)
epoch_1y=$(date -u -d "1971-01-01" +%s)
vendor=$(cat ${ufs_dev}/vendor | tr -d "[:space:]") vendor=$(cat ${ufs_dev}/vendor | tr -d "[:space:]")
model=$(cat ${ufs_dev}/model | tr -d "[:space:]") model=$(cat ${ufs_dev}/model | tr -d "[:space:]")
rev=$(cat ${ufs_dev}/rev | tr -d "[:space:]") rev=$(cat ${ufs_dev}/rev | tr -d "[:space:]")
file=$(find ${fw_dir} -name "*${vendor}${model}${rev}*" | head -n 1) file=$(find ${fw_dir} -name "*${vendor}${model}${rev}*" | head -n 1)
if [ -n "$file" ]; then lifec=$(cat ${ufs_dev}/health_descriptor/life_time_estimation_c | tr -d "[:space:]")
[ ! "$lifec" ] && lifec=0xff
atime=$(ls -lu -d /data 2>&1 | awk '{print $6}')
timestamp=$(date -d "$atime" +%s)
(( $timestamp < $min_timestamp )) && timestamp=$min_timestamp
now=$(date +%s)
if [ -n "$file" ] && (( $lifec < 0x0a )) && (( $timestamp + $epoch_1y >= $now )); then
# The first 4KB block at fips partition has been occupied, and unused space begins from 4 KB # The first 4KB block at fips partition has been occupied, and unused space begins from 4 KB
# Refer to: go/pixel-mp-ffu-ota-1p # Refer to: go/pixel-mp-ffu-ota-1p
dd if="$file" of=$blk_dev bs=4k seek=1 dd if="$file" of=$blk_dev bs=4k seek=1