Android 15.0.0 Release 20 (BP1A.250305.019)

-----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZ8eo6wAKCRDorT+BmrEO
 eAiMAJwKoTVsPgds031Rdi11ZDZR0sHrUwCfQiM0q3/561pqrsmmLP9YPULFyzc=
 =YB0/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN SSH SIGNATURE-----
 U1NIU0lHAAAAAQAAADMAAAALc3NoLWVkMjU1MTkAAAAgPpdpjxPACTIhnlvYz0GM4BR7FJ
 +rYv3jMbfxNKD3JvcAAAADZ2l0AAAAAAAAAAZzaGE1MTIAAABTAAAAC3NzaC1lZDI1NTE5
 AAAAQNuEaggqmmDVT3BZ2H+rws+V6I7yxcdLQgEHNCxkO+mTy5pdke7GXeL/liuaiDYVOF
 /P6D6ymiRzH14f8J6JEgc=
 -----END SSH SIGNATURE-----

Merge tag 'android-15.0.0_r20' into staging/lineage-22.2_merge-android-15.0.0_r20

Android 15.0.0 Release 20 (BP1A.250305.019)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZ8eo6wAKCRDorT+BmrEO
# eAiMAJwKoTVsPgds031Rdi11ZDZR0sHrUwCfQiM0q3/561pqrsmmLP9YPULFyzc=
# =YB0/
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Mar  5 03:29:15 2025 EET
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

# By Herbert Xue (3) and others
# Via Android Build Coastguard Worker (30) and others
* tag 'android-15.0.0_r20': (30 commits)
  dump_power: add battery caretaker dump into bugreport
  update health HAL dependency
  Add sched qos support
  Change TARGET_RECOVERY_UI_LIB to use fully qualified names in gs101
  Change TARGET_RECOVERY_UI_LIB to use fully qualified names in gs101
  Clean up unnecessary data_connection_5g_plus overlay
  init: gs101: move sched rate limit to late init
  Set soong config variables for libExynosC2H263Dec and libExynosC2H263Enc
  Disable Wifi BugReport for subsystem restart
  init: make pmu_poll_enable node readable
  Set soong config variable "board_use_dec_sw_csc" for libExynosVideoCodec
  Switch to using gs101 instead of valhall for GPU UMD
  Update ldaf sensor device filename
  dump_power: gs101: correct dump path
  Move video_codec soong config variables into board config
  dumpstate: gs101: fix dump path
  Revert "Add IGoodixFingerprintDaemon aidl interface"
  Add IGoodixFingerprintDaemon aidl interface
  Set BOARD_LIBACRYL_G2D_HDR_PLUGIN for soong
  Add a soong config variable for CitadelProvision
  ...

Change-Id: Id9e92997364278af84bc79ca08631451f93c2123
This commit is contained in:
Michael Bestas 2025-03-09 11:06:40 +02:00
commit 1382844ae3
13 changed files with 534 additions and 123 deletions

View file

@ -22,6 +22,7 @@ TARGET_SOC := gs101
TARGET_SOC_NAME := google
USES_DEVICE_GOOGLE_GS101 := true
$(call soong_config_set,CitadelProvision,target_soc,gs101)
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
@ -44,6 +45,7 @@ BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10A00000 console=ttySAC0,115200 an
BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all rcutree.enable_rcu_lazy
BOARD_KERNEL_CMDLINE += swiotlb=noforce
BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs
TARGET_NO_BOOTLOADER := true
@ -67,7 +69,7 @@ TARGET_RECOVERY_FSTAB_GENRULE = gen_fstab.gs101
TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
TARGET_RECOVERY_UI_MARGIN_HEIGHT := 165
TARGET_RECOVERY_UI_LIB := \
librecovery_ui_pixel \
//hardware/google/pixel/recovery:librecovery_ui_pixel \
libfstab
AB_OTA_UPDATER := true
@ -170,7 +172,16 @@ BOARD_SUPPORT_MFC_ENC_RGB := true
BOARD_USE_BLOB_ALLOCATOR := false
BOARD_SUPPORT_MFC_ENC_BT2020 := true
BOARD_SUPPORT_FLEXIBLE_P010 := true
$(call soong_config_set,video_codec,target_soc_name,$(TARGET_SOC_NAME))
$(call soong_config_set_bool,video_codec,board_use_codec2_hidl_1_2,$(BOARD_USE_CODEC2_HIDL_1_2))
$(call soong_config_set_bool,video_codec,board_use_csc_filter,$(BOARD_USE_CSC_FILTER))
$(call soong_config_set_bool,video_codec,board_use_dec_sw_csc,$(BOARD_USE_DEC_SW_CSC))
$(call soong_config_set_bool,video_codec,board_use_enc_sw_csc,$(BOARD_USE_ENC_SW_CSC))
$(call soong_config_set_bool,video_codec,board_support_mfc_enc_rgb,$(BOARD_SUPPORT_MFC_ENC_RGB))
$(call soong_config_set_bool,video_codec,board_use_blob_allocator,$(BOARD_USE_BLOB_ALLOCATOR))
$(call soong_config_set_bool,video_codec,board_support_mfc_enc_bt2020,$(BOARD_SUPPORT_MFC_ENC_BT2020))
$(call soong_config_set_bool,video_codec,board_support_flexible_p010,$(BOARD_SUPPORT_FLEXIBLE_P010))
$(call soong_config_set_bool,video_codec,board_use_codec2_aidl,$(if $(BOARD_USE_CODEC2_AIDL),true,false))
########################
BOARD_SUPER_PARTITION_SIZE := 8531214336

View file

@ -93,13 +93,90 @@ on init
chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group
chmod 0220 /proc/vendor_sched/prefer_idle_set
chmod 0220 /proc/vendor_sched/prefer_idle_clear
chmod 0220 /proc/vendor_sched/pmu_poll_enable
chmod 0660 /proc/vendor_sched/pmu_poll_enable
chmod 0220 /proc/vendor_sched/pmu_poll_time
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_clear
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_set
start vendor.keymaster-3-0
# 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
# ZRAM setup
write /sys/block/zram0/comp_algorithm lz77eh
write /proc/sys/vm/page-cluster 0
@ -149,14 +226,11 @@ on init
# governor setting
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor sched_pixel
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/up_rate_limit_us 500
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 20000
# memlat cpuidle awareness setting
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
@ -362,6 +436,11 @@ on late-fs
# Mount RW partitions which need run fsck
mount_all --late
on late-init
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
write /sys/devices/system/cpu/cpu6/cpufreq/sched_pixel/down_rate_limit_us 20000
on post-fs-data
# Log data folder
mkdir /data/vendor 0771 radio system
@ -417,8 +496,8 @@ on post-fs-data
restorecon /sys/kernel/debug/tracing/trace_marker
# ranging sensor
chown system system /dev/stmvl53l1_ranging
chmod 0660 /dev/stmvl53l1_ranging
chown system system /dev/ispolin_ranging
chmod 0660 /dev/ispolin_ranging
# Factory calibration files
chmod 0771 /mnt/vendor/persist/camera

View file

@ -173,7 +173,7 @@
</exception>
<exception package="com.google.android.apps.pixel.relationships">
<!-- Contacts -->
<permission name="android.permission.CALL_PHONE" fixed="false"/>
<permission name="android.permission.READ_CALL_LOG" fixed="false"/>
<permission name="android.permission.READ_CONTACTS" fixed="false"/>
<permission name="android.permission.WRITE_CONTACTS" fixed="false"/>

View file

@ -210,9 +210,8 @@ USE_SWIFTSHADER := false
TARGET_USES_VULKAN = true
PRODUCT_SOONG_NAMESPACES += \
vendor/arm/mali/valhall
vendor/arm/mali/gs101
$(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM))
# Used in gfx_tools when defining tests with composer2 interface for gs101 devices
$(call soong_config_set,gfx_tools,use_hwc2,true)
@ -361,6 +360,10 @@ PRODUCT_COPY_FILES += \
include device/google/gs-common/insmod/insmod.mk
# Insmod config files
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,init.insmod.*.cfg,$(TARGET_KERNEL_DIR),$(TARGET_COPY_OUT_VENDOR_DLKM)/etc)
# For creating dtbo image
PRODUCT_HOST_PACKAGES += \
mkdtimg
@ -955,9 +958,6 @@ PRODUCT_COPY_FILES += \
device/google/gs101/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml \
device/google/gs101/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml
# modem_svc_sit daemon
PRODUCT_PACKAGES += modem_svc_sit
# modem logging binary/configs
PRODUCT_PACKAGES += modem_logging_control
@ -1065,7 +1065,7 @@ PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/gs101/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/gs101/proprietary/gchips/tpu/aidl \
vendor/google_devices/gs101/proprietary/gchips/tpu/hal \
vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/api \
vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/tachyon_apis \
vendor/google_devices/gs101/proprietary/gchips/tpu/tachyon/service
# TPU firmware
PRODUCT_PACKAGES += edgetpu-abrolhos.fw
@ -1135,12 +1135,19 @@ PRODUCT_PACKAGES_ENG += BatteryStatsViewer
DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs101/device_framework_matrix_product.xml
# Preopt SystemUI
ifneq ($(RELEASE_SYSTEMUI_USE_SPEED_PROFILE), true)
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUIGoogle # For internal
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI # For AOSP
PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI # For AOSP
endif
# Compile SystemUI on device with `speed`.
# Set on-device compilation mode for SystemUI.
ifeq ($(RELEASE_SYSTEMUI_USE_SPEED_PROFILE), true)
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.systemuicompilerfilter=speed-profile
else
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.systemuicompilerfilter=speed
endif
# Keymaster configuration
PRODUCT_COPY_FILES += \

View file

@ -118,7 +118,7 @@
</hal>
<hal format="aidl" optional="true">
<name>vendor.google.wifi_ext</name>
<version>2-3</version>
<version>2-4</version>
<interface>
<name>IWifiExt</name>
<instance>default</instance>

View file

@ -44,9 +44,19 @@ int getCommandOutput(const char *cmd, std::string *output) {
return 0;
}
bool isValidFile(const char *file) {
if (!access(file, R_OK)) {
return false;
FILE *fp = fopen(file, "r");
if (fp != NULL) {
fclose(fp);
return true;
}
return false;
}
bool isValidDir(const char *directory) {
DIR *dir = opendir(directory);
if (dir == NULL)
return false;
closedir(dir);
return true;
}
bool isUserBuild() {
@ -123,8 +133,8 @@ void dumpPowerSupplyStats() {
{"Power supply property gcpm", "/sys/class/power_supply/gcpm/uevent"},
{"Power supply property gcpm_pps", "/sys/class/power_supply/gcpm_pps/uevent"},
{"Power supply property main-charger", "/sys/class/power_supply/main-charger/uevent"},
{"Power supply property dc-mains", "/sys/class/power_supply/dc-mains/uevent"},
{"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-8-0025/uevent"},
{"Power supply property pca9468-mains", "/sys/class/power_supply/pca9468-mains/uevent"},
{"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-i2c-max77759tcpc/uevent"},
{"Power supply property usb", "/sys/class/power_supply/usb/uevent"},
{"Power supply property wireless", "/sys/class/power_supply/wireless/uevent"},
};
@ -137,32 +147,15 @@ void dumpMaxFg() {
const char *maxfg [][2] = {
{"Power supply property maxfg", "/sys/class/power_supply/maxfg/uevent"},
{"m5_state", "/sys/class/power_supply/maxfg/m5_model_state"},
{"maxfg", "/dev/logbuffer_maxfg"},
{"maxfg", "/dev/logbuffer_maxfg_monitor"},
{"maxfg registers", "/sys/class/power_supply/maxfg/registers_dump"},
{"maxfg logbuffer", "/dev/logbuffer_maxfg"},
{"maxfg_monitor logbuffer", "/dev/logbuffer_maxfg_monitor"},
};
const char *maxfgFlip [][2] = {
{"Power supply property maxfg_base", "/sys/class/power_supply/maxfg_base/uevent"},
{"Power supply property maxfg_flip", "/sys/class/power_supply/maxfg_flip/uevent"},
{"m5_state", "/sys/class/power_supply/maxfg_base/m5_model_state"},
{"maxfg_base", "/dev/logbuffer_maxfg_base"},
{"maxfg_flip", "/dev/logbuffer_maxfg_flip"},
{"maxfg_base", "/dev/logbuffer_maxfg_base_monitor"},
{"maxfg_flip", "/dev/logbuffer_maxfg_flip_monitor"},
};
const char *maxfgHistoryName = "Maxim FG History";
const char *maxfgHistoryDir = "/dev/maxfg_history";
std::string content;
if (isValidFile(maxfgLoc)) {
if (isValidDir(maxfgLoc)) {
for (const auto &row : maxfg) {
dumpFileContent(row[0], row[1]);
}
} else {
for (const auto &row : maxfgFlip) {
dumpFileContent(row[0], row[1]);
}
}
if (isValidFile(maxfgHistoryDir)) {
dumpFileContent(maxfgHistoryName, maxfgHistoryDir);
}
}
void dumpPowerSupplyDock() {
@ -224,26 +217,17 @@ void dumpTcpc() {
void dumpPdEngine() {
const char* pdEngine [][2] {
{"PD Engine", "/dev/logbuffer_usbpd"},
{"PPS-google_cpm", "/dev/logbuffer_cpm"},
{"PPS-dc", "/dev/logbuffer_pca9468"},
{"PPS-google_cpm logbuffer", "/dev/logbuffer_cpm"},
{"PPS-pca9468 logbuffer", "/dev/logbuffer_pca9468"},
};
for (const auto &row : pdEngine) {
dumpFileContent(row[0], row[1]);
}
}
void dumpWc68() {
const char* wc68Title = "WC68";
const char* wc68File = "/dev/logbuffer_wc68";
dumpFileContent(wc68Title, wc68File);
}
void dumpLn8411() {
const char* ln8411Title = "LN8411";
const char* ln8411File = "/dev/logbuffer_ln8411";
dumpFileContent(ln8411Title, ln8411File);
}
void dumpBatteryHealth() {
const char* batteryHealth [][2] {
{"Battery Health", "/sys/class/power_supply/battery/health_index_stats"},
{"Battery Health SoC Residency", "/sys/class/power_supply/battery/swelling_data"},
{"BMS", "/dev/logbuffer_ssoc"},
{"TTF", "/dev/logbuffer_ttf"},
{"TTF details", "/sys/class/power_supply/battery/ttf_details"},
@ -282,7 +266,7 @@ void dumpBatteryDefend() {
sort(files.begin(), files.end());
for (auto &file : files) {
fileLocation = std::string(config[1]) + std::string(file);
if (!android::base::ReadFileToString(fileLocation, &content)) {
if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
content = "\n";
}
printf("%s: %s", file.c_str(), content.c_str());
@ -292,15 +276,144 @@ void dumpBatteryDefend() {
files.clear();
}
}
void dumpBatteryCaretaker() {
const char* aacpConfig [][3] {
{"AACP Version",
"/sys/devices/platform/google,battery/power_supply/battery/", "aacp_"},
{"AACR Config",
"/sys/devices/platform/google,battery/power_supply/battery/", "aacr_"},
{"AAFV Config",
"/sys/devices/platform/google,battery/power_supply/battery/", "aafv_"},
{"AACT Config",
"/sys/devices/platform/google,battery/power_supply/battery/", "aact_"},
{"AACC",
"/sys/devices/platform/google,battery/power_supply/battery/", "aacc"},
};
std::vector<std::string> files;
struct dirent *entry;
std::string content;
std::string fileLocation;
for (auto &config : aacpConfig) {
DIR *dir = opendir(config[1]);
if (dir == NULL)
continue;
printTitle(config[0]);
while ((entry = readdir(dir)) != NULL) {
if (std::string(entry->d_name).find(config[2]) != std::string::npos &&
strncmp(config[2], entry->d_name, strlen(config[2])) == 0) {
files.push_back(entry->d_name);
}
}
closedir(dir);
sort(files.begin(), files.end());
for (auto &file : files) {
fileLocation = std::string(config[1]) + std::string(file);
if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
content = "\n";
}
printf("%s: %s", file.c_str(), content.c_str());
if (content.back() != '\n')
printf("\n");
}
files.clear();
}
}
void printValuesOfDirectory(const char *directory, std::string debugfs, const char *strMatch) {
std::vector<std::string> files;
auto info = directory;
std::string content;
struct dirent *entry;
DIR *dir = opendir(debugfs.c_str());
if (dir == NULL)
return;
printTitle((debugfs + std::string(strMatch) + "/" + std::string(info)).c_str());
while ((entry = readdir(dir)) != NULL)
if (std::string(entry->d_name).find(strMatch) != std::string::npos)
files.push_back(entry->d_name);
closedir(dir);
sort(files.begin(), files.end());
for (auto &file : files) {
std::string fileDirectory = debugfs + file;
std::string fileLocation = fileDirectory + "/" + std::string(info);
if (!android::base::ReadFileToString(fileLocation, &content)) {
content = "\n";
}
printf("%s:\n%s", fileDirectory.c_str(), content.c_str());
if (content.back() != '\n')
printf("\n");
}
files.clear();
}
void dumpChg() {
const std::string pmic_bus = "/sys/devices/platform/10d50000.hsi2c/i2c-12/12-0066";
const char* chg_reg_dump_file = "/sys/class/power_supply/main-charger/device/registers_dump";
const std::string chg_name_cmd = "/sys/class/power_supply/main-charger/device/name";
const std::string pmic_name_cmd = pmic_bus + "/name";
const std::string pmic_reg_dump_file = pmic_bus + "/registers_dump";
const std::string reg_dump_str = " registers dump";
const char* chgConfig [][2] {
{"DC_registers dump", "/sys/class/power_supply/pca9468-mains/device/registers_dump"},
};
std::string chg_name;
std::string pmic_name;
printf("\n");
int ret = android::base::ReadFileToString(chg_name_cmd, &chg_name);
if (ret && !chg_name.empty()) {
chg_name.erase(chg_name.length() - 1); // remove new line
const std::string chg_reg_dump_title = chg_name + reg_dump_str;
/* CHG reg dump */
dumpFileContent(chg_reg_dump_title.c_str(), chg_reg_dump_file);
}
ret = android::base::ReadFileToString(pmic_name_cmd, &pmic_name);
if (ret && !pmic_name.empty()) {
pmic_name.erase(pmic_name.length() - 1); // remove new line
const std::string pmic_reg_dump_title = pmic_name + reg_dump_str;
/* PMIC reg dump */
dumpFileContent(pmic_reg_dump_title.c_str(), pmic_reg_dump_file.c_str());
}
for (auto &config : chgConfig) {
dumpFileContent(config[0], config[1]);
}
}
void dumpChgUserDebug() {
const std::string debugfs = "/d/";
const char *maxFgDir = "/d/maxfg";
const char *maxFgStrMatch = "maxfg";
const char *chgTblName = "Charging table dump";
const char *chgTblDir = "/d/google_battery/chg_raw_profile";
const char *maxFgInfo [] {
"fg_model",
"algo_ver",
"model_ok",
};
if (isUserBuild())
return;
dumpFileContent(chgTblName, chgTblDir);
if (isValidDir(maxFgDir)) {
for (auto & directory : maxFgInfo) {
printValuesOfDirectory(directory, debugfs, maxFgStrMatch);
}
}
}
void dumpBatteryEeprom() {
const char *title = "Battery EEPROM";
const char *files[] {
"/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom",
"/sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom",
"/sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom",
"/sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom",
"/sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom",
"/sys/devices/platform/10c90000.hsi2c/i2c-6/6-0050/eeprom",
"/sys/devices/platform/10970000.hsi2c/i2c-8/8-0050/eeprom",
};
std::string result;
std::string xxdCmd;
@ -326,7 +439,7 @@ void dumpChargerStats() {
std::string content;
struct dirent *entry;
dumpFileContent(chgStatsTitle, chgStatsLocation);
if (!isUserBuild())
if (isUserBuild())
return;
for (auto &stat : chargerStats) {
DIR *dir = opendir(stat[1]);
@ -371,7 +484,7 @@ void dumpGvoteables() {
std::string content;
std::vector<std::string> files;
int ret;
if (!isUserBuild())
if (isUserBuild())
return;
ret = getFilesInDir(directory, &files);
if (ret < 0)
@ -659,10 +772,11 @@ int main() {
dumpLogBufferTcpm();
dumpTcpc();
dumpPdEngine();
dumpWc68();
dumpLn8411();
dumpBatteryHealth();
dumpBatteryDefend();
dumpBatteryCaretaker();
dumpChg();
dumpChgUserDebug();
dumpBatteryEeprom();
dumpChargerStats();
dumpWlcLogs();

View file

@ -1,7 +1,7 @@
<manifest version="1.0" type="device">
<hal format="aidl">
<name>android.hardware.health</name>
<version>3</version>
<version>4</version>
<fqname>IHealth/default</fqname>
</hal>
</manifest>

View file

@ -264,6 +264,9 @@
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
<bool name="config_zramWriteback">true</bool>
<!-- the number of the max cached processes in the system. -->
<integer name="config_customizedMaxCachedProcesses">1024</integer>
<!-- List of system components which are allowed to receive ServiceState entries in an
un-sanitized form, even if the location toggle is off. This is intended ONLY for system
components, such as the telephony stack, which require access to the full ServiceState for

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2020, 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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] -->
<string name="data_connection_5g_plus" translatable="false">5G UW</string>
</resources>

View file

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2020, 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.
*/
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] -->
<string name="data_connection_5g_plus" translatable="false">5G UW</string>
</resources>

View file

@ -167,4 +167,6 @@
false: firmware roaming will not be affected. -->
<bool translatable="false" name ="config_wifiDisableFirmwareRoamingInIdleMode">true</bool>
<!-- Boolean indicating whether to trigger bugreport for WiFi subsystem restart issue -->
<bool translatable="false" name ="config_wifi_subsystem_restart_bugreport_enabled">false</bool>
</resources>

View file

@ -159,6 +159,21 @@
}
]
},
{
"Name": "HighPerformanceWI",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/groups/fg_wi/set_task_group",
"ProcFilePath": "/proc/vendor_sched/groups/fg_wi/set_proc_group",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "RealtimePerformance",
"Actions": [
@ -250,6 +265,202 @@
}
]
},
{
"Name": "AdpfSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/adpf_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "AdpfClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/adpf_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "BoostPrioSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/boost_prio_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "BoostPrioClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/boost_prio_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreemptWakeupSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/preempt_wakeup_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreemptWakeupClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/preempt_wakeup_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreferFitSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/prefer_fit_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreferFitClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/prefer_fit_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreferIdleSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/prefer_idle_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreferIdleClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/prefer_idle_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "AutoUclampMaxSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/auto_uclamp_max_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "AutoUclampMaxClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/auto_uclamp_max_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreferHighCapSet",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/prefer_high_cap_set",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "PreferHighCapClear",
"Actions": [
{
"Name": "WriteFile",
"Params":
{
"FilePath": "/proc/vendor_sched/sched_qos/prefer_high_cap_clear",
"Value": "<pid>",
"LogFailures": "false"
}
}
]
},
{
"Name": "ResetUclampGrp",
"Actions": [
@ -287,11 +498,35 @@
},
{
"Name": "OtaProfiles",
"Profiles": [ "OtaPerformance", "ProcessCapacityNormal", "LowIoPriority", "TimerSlackHigh" ]
"Profiles": [ "OtaPerformance", "ServiceCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_EXTREME_SET",
"Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet", "BoostPrioSet", "PreemptWakeupSet" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_EXTREME_CLEAR",
"Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear", "BoostPrioClear", "PreemptWakeupClear" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_STANDARD_SET",
"Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet" ]
},
{
"Name": "SCHED_QOS_SENSITIVE_STANDARD_CLEAR",
"Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear" ]
},
{
"Name": "SCHED_QOS_POWER_EFFICIENCY_SET",
"Profiles": [ "AutoUclampMaxSet" ]
},
{
"Name": "SCHED_QOS_POWER_EFFICIENCY_CLEAR",
"Profiles": [ "AutoUclampMaxClear" ]
},
{
"Name": "InputPolicy",
"Profiles": [ "ResetUclampGrp" ]
"Profiles": [ "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME_SET" ]
}
]
}

View file

@ -943,17 +943,21 @@ void queryVersionHelper(android::hardware::usb::Usb *usb,
Status status;
pthread_mutex_lock(&usb->mLock);
status = getPortStatusHelper(usb, currentPortStatus);
queryMoistureDetectionStatus(usb, currentPortStatus);
queryPowerTransferStatus(usb, currentPortStatus);
queryNonCompliantChargerStatus(currentPortStatus);
queryUsbDataSession(usb, currentPortStatus);
if (usb->mCallback != NULL) {
ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus,
status);
if (!ret.isOk())
ALOGE("queryPortStatus error %s", ret.getDescription().c_str());
if (status == Status::SUCCESS && currentPortStatus->size() > 0) {
queryMoistureDetectionStatus(usb, currentPortStatus);
queryPowerTransferStatus(usb, currentPortStatus);
queryNonCompliantChargerStatus(currentPortStatus);
queryUsbDataSession(usb, currentPortStatus);
if (usb->mCallback != NULL) {
ScopedAStatus ret = usb->mCallback->notifyPortStatusChange(*currentPortStatus,
status);
if (!ret.isOk())
ALOGE("queryPortStatus error %s", ret.getDescription().c_str());
} else {
ALOGI("Notifying userspace skipped. Callback is NULL");
}
} else {
ALOGI("Notifying userspace skipped. Callback is NULL");
ALOGI("%s skipped. currentPortStatus is empty", __func__);
}
pthread_mutex_unlock(&usb->mLock);
}