Snap for 12872597 from 4af1d41ade
to mainline-tzdata6-release
Change-Id: I99c2a77873f4d5108f8248d3774394b1bd782739
This commit is contained in:
commit
998211dd99
10 changed files with 440 additions and 183 deletions
|
@ -22,7 +22,7 @@ TARGET_SOC := gs101
|
|||
TARGET_SOC_NAME := google
|
||||
|
||||
USES_DEVICE_GOOGLE_GS101 := true
|
||||
$(call soong_config_set,CitadelProvision,target_soc,gs101)
|
||||
$(call soong_config_set,googleDeviceConfig,target_soc,gs101)
|
||||
|
||||
TARGET_ARCH := arm64
|
||||
TARGET_ARCH_VARIANT := armv8-2a
|
||||
|
@ -69,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 +170,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
|
||||
|
|
|
@ -16,36 +16,6 @@ on init
|
|||
# Disable util-awareness
|
||||
write /proc/vendor_sched/teo_util_threshold "1024 1024 1024"
|
||||
|
||||
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/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/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
|
||||
chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold
|
||||
chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold
|
||||
chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency
|
||||
|
@ -67,37 +37,6 @@ on init
|
|||
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware
|
||||
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware
|
||||
|
||||
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/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/prefer_idle_set
|
||||
chmod 0220 /proc/vendor_sched/prefer_idle_clear
|
||||
chmod 0220 /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
|
||||
|
||||
# ZRAM setup
|
||||
|
@ -149,14 +88,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 +298,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 +358,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
|
||||
|
@ -688,6 +629,7 @@ on property:sys.boot_completed=1
|
|||
# Setup final cpuset
|
||||
write /dev/cpuset/top-app/cpus ${persist.device_config.vendor_system_native.top-app_cpuset:-0-7}
|
||||
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_cpuset:-0-3,4-5}
|
||||
write /dev/cpuset/foreground_window/cpus ${persist.device_config.vendor_system_native.foreground_window_cpuset:-0-3,4-5}
|
||||
write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
|
||||
write /dev/cpuset/system-background/cpus ${persist.device_config.vendor_system_native.system-background_cpuset:-0-3}
|
||||
write /dev/cpuset/restricted/cpus ${persist.device_config.vendor_system_native.restricted_cpuset:-0-3}
|
||||
|
@ -929,6 +871,8 @@ on property:persist.device_config.vendor_system_native.top-app_cpuset=*
|
|||
write /dev/cpuset/top-app/cpus ${persist.device_config.vendor_system_native.top-app_cpuset:-0-7}
|
||||
on property:persist.device_config.vendor_system_native.foreground_cpuset=*
|
||||
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_cpuset:-0-3,4-5}
|
||||
on property:persist.device_config.vendor_system_native.foreground_window_cpuset=*
|
||||
write /dev/cpuset/foreground/cpus ${persist.device_config.vendor_system_native.foreground_window_cpuset:-0-3,4-5}
|
||||
on property:persist.device_config.vendor_system_native.background_cpuset=*
|
||||
write /dev/cpuset/background/cpus ${persist.device_config.vendor_system_native.background_cpuset:-0-3}
|
||||
on property:persist.device_config.vendor_system_native.system-background_cpuset=*
|
||||
|
|
|
@ -26,7 +26,7 @@ include device/google/gs-common/thermal/thermal_hal/device.mk
|
|||
include device/google/gs-common/pixel_metrics/pixel_metrics.mk
|
||||
include device/google/gs-common/performance/perf.mk
|
||||
include device/google/gs-common/power/power.mk
|
||||
include device/google/gs-common/display/dump.mk
|
||||
include device/google/gs-common/display/dump_exynos_display.mk
|
||||
include device/google/gs101/dumpstate/item.mk
|
||||
include device/google/gs-common/radio/dump.mk
|
||||
include device/google/gs-common/gear/dumpstate/aidl.mk
|
||||
|
@ -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)
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.hardware.pixel.display</name>
|
||||
<version>13</version>
|
||||
<version>13-14</version>
|
||||
<interface>
|
||||
<name>IDisplay</name>
|
||||
<instance>default</instance>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -173,4 +173,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>
|
||||
|
|
|
@ -15,21 +15,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "PreferIdle",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "WriteFile",
|
||||
"Params":
|
||||
{
|
||||
"FilePath": "/proc/vendor_sched/prefer_idle_set",
|
||||
"ProcFilePath": "/proc/vendor_sched/prefer_idle_set",
|
||||
"Value": "<pid>",
|
||||
"LogFailures": "false"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "CameraServicePerformance",
|
||||
"Actions": [
|
||||
|
@ -174,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": [
|
||||
|
@ -265,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": [
|
||||
|
@ -292,6 +488,19 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "HighestCfsPrioScheduling",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "SetSchedulerPolicy",
|
||||
"Params":
|
||||
{
|
||||
"Policy": "SCHED_OTHER",
|
||||
"Nice": "-20"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -302,11 +511,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": [ "MaxPerformance", "ResetUclampGrp", "PreferIdle" ]
|
||||
"Profiles": [ "HighestCfsPrioScheduling", "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME_SET" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue