diff options
-rw-r--r-- | BoardConfig-common.mk | 9 | ||||
-rw-r--r-- | conf/init.debug.rc | 15 | ||||
-rw-r--r-- | conf/init.gs201.rc | 28 | ||||
-rw-r--r-- | device.mk | 58 | ||||
-rw-r--r-- | device_framework_matrix_product.xml | 32 | ||||
-rw-r--r-- | dumpstate/Android.bp | 28 | ||||
-rw-r--r-- | dumpstate/Android.mk | 44 | ||||
-rw-r--r-- | dumpstate/Dumpstate.cpp | 163 | ||||
-rw-r--r-- | dumpstate/Dumpstate.h | 6 | ||||
-rw-r--r-- | dumpstate/OWNERS | 9 | ||||
-rw-r--r-- | dumpstate/README.txt | 1 | ||||
-rw-r--r-- | dumpstate/android.hardware.dumpstate-service.gs201.xml | 9 | ||||
-rw-r--r-- | dumpstate/android.hardware.dumpstate@1.1-service.gs201.rc | 2 | ||||
-rwxr-xr-x | init.display.sh | 22 | ||||
-rw-r--r-- | init.insmod.gs201.cfg | 12 | ||||
-rwxr-xr-x | init.insmod.sh | 78 | ||||
-rw-r--r-- | manifest.xml | 7 | ||||
-rw-r--r-- | media_codecs_aosp_c2.xml | 3 | ||||
-rw-r--r-- | thermal/Android.mk | 0 | ||||
-rw-r--r-- | thermal/thermal.c | 0 | ||||
-rw-r--r-- | widevine/device.mk | 7 |
21 files changed, 172 insertions, 361 deletions
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 0f7c882..4ba0580 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -128,6 +128,9 @@ BOARD_USES_GRALLOC_ION_SYNC := true # This should be the same value as USE_SWIFTSHADER in device.mk BOARD_USES_SWIFTSHADER := false +# This should be the same value as USE_ANGLE in device.mk +BOARD_USES_ANGLE := false + # Gralloc4 ifeq ($(BOARD_USES_SWIFTSHADER),true) $(call soong_config_set,arm_gralloc,gralloc_arm_no_external_afbc,true) @@ -249,6 +252,9 @@ endif # SoundTriggerHAL Configuration #BOARD_USE_SOUNDTRIGGER_HAL := false +# Vibrator HAL actuator model configuration +$(call soong_config_set,haptics,actuator_model,$(ACTUATOR_MODEL)) + # HWComposer BOARD_HWC_VERSION := hwc3 TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := false @@ -378,9 +384,6 @@ BOARD_DTBOIMG_PARTITION_SIZE := 0x01000000 # Build vendor kernel boot image BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE := 0x04000000 -# System As Root -BOARD_BUILD_SYSTEM_ROOT_IMAGE := false - # Vendor ramdisk image for kernel development BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true diff --git a/conf/init.debug.rc b/conf/init.debug.rc index 631bc28..4d5e4c7 100644 --- a/conf/init.debug.rc +++ b/conf/init.debug.rc @@ -17,12 +17,6 @@ on init chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_itvl chown system system /sys/devices/platform/sjtag_gsa/interface/end chown system system /sys/devices/platform/sjtag_gsa/interface/pubkey - chown system system /d/maxfg/fg_model - chown system system /d/maxfg/registers - chown system system /d/maxfg_base/fg_model - chown system system /d/maxfg_base/registers - chown system system /d/maxfg_flip/registers - chown system system /d/maxfg_flip/nv_registers on property:vendor.debug.ramdump.force_crash=true write /sys/kernel/pixel_debug/trigger "null" @@ -38,3 +32,12 @@ on post-fs-data chown bluetooth system /dev/logbuffer_btlpm chown bluetooth system /dev/logbuffer_btpower chown bluetooth system /dev/logbuffer_tty18 + +# pKVM performance is different on A0 and B0 chips. +# Add extra tag to metrics collected on A0 to separate the results. +on property:ro.revision=PROTO1.0 + setprop debug.hypervisor.metrics_tag "hwrev_a0" +on property:ro.revision=PROTO1.1 + setprop debug.hypervisor.metrics_tag "hwrev_a0" +on property:ro.revision=EVT1.0 + setprop debug.hypervisor.metrics_tag "hwrev_a0" diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 76c1ffe..b8ce564 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -240,7 +240,7 @@ on init chown system system /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom # Loading common kernel modules in background - start insmod_sh_common + start init_display # Charge stats (write 0) chown system system /sys/class/power_supply/battery/charge_stats @@ -310,9 +310,6 @@ on init # Power Stats HAL chown system system /dev/bbd_pwrstat - # start watchdogd - start watchdogd - # Add a boost for NNAPI HAL write /proc/vendor_sched/nnapi_prefer_idle 0 write /proc/vendor_sched/nnapi_uclamp_min 512 @@ -372,8 +369,6 @@ on post-fs-data chmod 0664 /sys/devices/platform/1c2c0000.drmdsim/hs_clock chmod 0664 /sys/devices/platform/1c2d0000.drmdsim/hs_clock - setprop vold.post_fs_data_done 1 - # IPSEC PIDDIR for VoWiFi mkdir /data/vendor/misc 0771 root system mkdir /data/vendor/misc/vpn 0771 root system @@ -857,19 +852,13 @@ on property:persist.sys.test_harness=1 && property:persist.vendor.testing_batte on property:ro.debuggable=1 write /sys/module/scsi_mod/parameters/scsi_logging_level 63 -service insmod_sh_common /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.gs201.cfg +service init_display /vendor/bin/init.display.sh class main user root group root system disabled oneshot -# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin -service watchdogd /system/bin/watchdogd 10 20 - class core - oneshot - seclabel u:r:watchdogd:s0 - # bugreport is triggered by holding down volume down, volume up and power service bugreport /system/bin/dumpstate -d -p -z class main @@ -892,7 +881,8 @@ on post-fs-data service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 \ -r /dev/sg1 -p /data/vendor/ss -t ufs class early_hal - user root + user system + group system # Write build info to kdebuginfo on property:ro.build.fingerprint=* @@ -968,16 +958,26 @@ on property:vendor.thermal.link_ready=1 chown system system /dev/thermal/tz-by-name/usb_pwr_therm2/trip_point_0_hyst chown system system /dev/thermal/tz-by-name/usb_pwr_therm/trip_point_0_temp chown system system /dev/thermal/tz-by-name/usb_pwr_therm/trip_point_0_hyst + chmod 664 /dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote + chmod 664 /dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote + chmod 664 /dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote + chmod 664 /dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote chown system system /dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote + chmod 664 /dev/thermal/cdev-by-name/tpu_cooling/user_vote chown system system /dev/thermal/cdev-by-name/gxp-cooling/user_vote chown system system /dev/thermal/cdev-by-name/tpu_cooling/user_vote + chmod 664 /dev/thermal/cdev-by-name/fcc/cur_state chown system system /dev/thermal/cdev-by-name/fcc/cur_state + chmod 664 /dev/thermal/cdev-by-name/dc_icl/cur_state chown system system /dev/thermal/cdev-by-name/dc_icl/cur_state + chmod 664 /dev/thermal/cdev-by-name/wlc_fcc/cur_state chown system system /dev/thermal/cdev-by-name/wlc_fcc/cur_state + chmod 664 /dev/thermal/cdev-by-name/chg_mdis/cur_state chown system system /dev/thermal/cdev-by-name/chg_mdis/cur_state + chmod 664 /dev/thermal/cdev-by-name/usbc-port/cur_state chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state on charger @@ -15,6 +15,10 @@ # include device/google/gs-common/device.mk +include device/google/gs-common/gs_watchdogd/watchdog.mk +include device/google/gs-common/ramdump/ramdump.mk +include device/google/gs-common/soc/soc.mk +include device/google/gs-common/modem/modem.mk TARGET_BOARD_PLATFORM := gs201 @@ -34,19 +38,19 @@ BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH) USE_PIXEL_GRALLOC := false ifeq ($(USE_PIXEL_GRALLOC),true) PRODUCT_SOONG_NAMESPACES += hardware/google/gchips/GrallocHAL -else - PRODUCT_SOONG_NAMESPACES += hardware/google/gchips/gralloc4 endif PRODUCT_SOONG_NAMESPACES += \ hardware/google/av \ hardware/google/gchips \ + hardware/google/gchips/gralloc4 \ hardware/google/graphics/common \ hardware/google/graphics/gs201 \ hardware/google/interfaces \ hardware/google/pixel \ device/google/gs201 \ device/google/gs201/powerstats \ + system/chre/host/hal_generic \ vendor/google/whitechapel/tools \ vendor/google/interfaces \ vendor/google_devices/common/proprietary/confirmatioui_hal \ @@ -197,6 +201,9 @@ endif # Must match BOARD_USES_SWIFTSHADER in BoardConfig.mk USE_SWIFTSHADER := false +# Must match BOARD_USES_ANGLE in BoardConfig.mk +USE_ANGLE := false + # HWUI TARGET_USES_VULKAN = true @@ -224,6 +231,13 @@ PRODUCT_PACKAGES += \ libGLESv2_swiftshader endif +ifeq ($(USE_ANGLE),true) +PRODUCT_PACKAGES += \ + libEGL_angle \ + libGLESv1_CM_angle \ + libGLESv2_angle +endif + PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \ frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \ @@ -235,6 +249,10 @@ PRODUCT_COPY_FILES += \ ifeq ($(USE_SWIFTSHADER),true) PRODUCT_VENDOR_PROPERTIES += \ ro.hardware.egl = swiftshader +else ifeq ($(USE_ANGLE),true) +PRODUCT_VENDOR_PROPERTIES += \ + ro.hardware.egl = angle \ + ro.hardware.egl_legacy = mali else PRODUCT_VENDOR_PROPERTIES += \ ro.hardware.egl = mali @@ -312,12 +330,10 @@ PRODUCT_COPY_FILES += \ # Shell scripts PRODUCT_COPY_FILES += \ - device/google/gs201/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \ + device/google/gs201/init.display.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.display.sh \ device/google/gs201/disable_contaminant_detection.sh:$(TARGET_COPY_OUT_VENDOR)/bin/hw/disable_contaminant_detection.sh -# insmod files -PRODUCT_COPY_FILES += \ - device/google/gs201/init.insmod.gs201.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.gs201.cfg +include device/google/gs-common/insmod/insmod.mk # For creating dtbo image PRODUCT_HOST_PACKAGES += \ @@ -397,8 +413,8 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml endif -# Add sensor HAL 2.1 product packages -PRODUCT_PACKAGES += android.hardware.sensors@2.1-service.multihal +# Add sensor HAL AIDL product packages +PRODUCT_PACKAGES += android.hardware.sensors-service.multihal # USB HAL PRODUCT_PACKAGES += \ @@ -506,8 +522,8 @@ PANTHER_PRODUCT := %panther CHEETAH_PRODUCT := %cheetah LYNX_PRODUCT := %lynx FELIX_PRODUCT := %felix -TANGOR_PRODUCT := %tangorpro CLOUDRIPPER_PRODUCT := %cloudripper +TANGOR_PRODUCT := %tangorpro ifneq (,$(filter $(PANTHER_PRODUCT), $(TARGET_PRODUCT))) LOCAL_TARGET_PRODUCT := panther else ifneq (,$(filter $(CHEETAH_PRODUCT), $(TARGET_PRODUCT))) @@ -516,10 +532,10 @@ else ifneq (,$(filter $(LYNX_PRODUCT), $(TARGET_PRODUCT))) LOCAL_TARGET_PRODUCT := lynx else ifneq (,$(filter $(FELIX_PRODUCT), $(TARGET_PRODUCT))) LOCAL_TARGET_PRODUCT := felix -else ifneq (,$(filter $(TANGOR_PRODUCT), $(TARGET_PRODUCT))) - LOCAL_TARGET_PRODUCT := tangorpro else ifneq (,$(filter $(CLOUDRIPPER_PRODUCT), $(TARGET_PRODUCT))) LOCAL_TARGET_PRODUCT := cloudripper +else ifneq (,$(filter $(TANGOR_PRODUCT), $(TARGET_PRODUCT))) + LOCAL_TARGET_PRODUCT := tangorpro else # WAR: continue defaulting to slider build on gs201 to not # break dev targets such as ravenclaw @@ -561,6 +577,9 @@ PRODUCT_PACKAGES_DEBUG += \ f2fs.fibmap \ dump.f2fs +# Storage dump +include device/google/gs-common/storage/storage.mk + # Storage health HAL PRODUCT_PACKAGES += \ android.hardware.health.storage-service.default @@ -579,7 +598,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) # Titan-M ifeq (,$(filter true, $(BOARD_WITHOUT_DTLS))) -include hardware/google/pixel/dauntless/dauntless.mk +include device/google/gs-common/dauntless/gsc.mk endif PRODUCT_PACKAGES_DEBUG += \ @@ -791,6 +810,9 @@ endif $(call inherit-product, system/core/trusty/trusty-storage.mk) $(call inherit-product, system/core/trusty/trusty-base.mk) +# Trusty dump +include device/google/gs-common/trusty/trusty.mk + # Trusty unit test tool PRODUCT_PACKAGES_DEBUG += trusty-ut-ctrl \ tipc-test @@ -816,11 +838,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PROPERTY_OVERRIDES += \ ro.frp.pst=/dev/block/by-name/frp -# Bluetooth -PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \ - frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml - # System props to enable Bluetooth Quality Report (BQR) feature ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PRODUCT_PROPERTIES += \ @@ -1140,7 +1157,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Suspend properties PRODUCT_PROPERTY_OVERRIDES += \ - suspend.short_suspend_threshold_millis=5000 + suspend.short_suspend_threshold_millis=2000 # Enable Incremental on the device PRODUCT_PROPERTY_OVERRIDES += \ @@ -1167,7 +1184,7 @@ PRODUCT_PACKAGES_DEBUG += BatteryStatsViewer # Install product specific framework compatibility matrix # (TODO: b/169535506) This includes the FCM for system_ext and product partition. # It must be split into the FCM of each partition. -DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE := device/google/gs201/device_framework_matrix_product.xml +DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs201/device_framework_matrix_product.xml # Preopt SystemUI PRODUCT_DEXPREOPT_SPEED_APPS += SystemUIGoogle # For internal @@ -1184,3 +1201,6 @@ PRODUCT_COPY_FILES += \ # Call deleteAllKeys if vold detects a factory reset PRODUCT_VENDOR_PROPERTIES += ro.crypto.metadata_init_delete_all_keys.enabled?=true + +# Hardware Info +include hardware/google/pixel/HardwareInfo/HardwareInfo.mk diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index ced87b1..0997ab1 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -127,38 +127,6 @@ <instance>default</instance> </interface> </hal> - <hal format="hidl"> - <name>hardware.google.bluetooth.bt_channel_avoidance</name> - <version>1.0</version> - <interface> - <name>IBTChannelAvoidance</name> - <instance>default</instance> - </interface> - </hal> - <hal format="hidl"> - <name>hardware.google.bluetooth.sar</name> - <version>1.1</version> - <interface> - <name>IBluetoothSar</name> - <instance>default</instance> - </interface> - </hal> - <hal format="hidl" optional="true"> - <name>hardware.google.bluetooth.ext</name> - <version>1.0</version> - <interface> - <name>IBluetoothExt</name> - <instance>default</instance> - </interface> - </hal> - <hal format="hidl" optional="true"> - <name>hardware.google.bluetooth.ewp</name> - <version>1.0</version> - <interface> - <name>IBluetoothEwp</name> - <instance>default</instance> - </interface> - </hal> <hal format="aidl" optional="true"> <name>vendor.google.google_battery</name> <version>1</version> diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp new file mode 100644 index 0000000..85cdc25 --- /dev/null +++ b/dumpstate/Android.bp @@ -0,0 +1,28 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_binary { + name: "android.hardware.dumpstate-service.gs201", + srcs: [ + "Dumpstate.cpp", + "service.cpp", + ], + init_rc: ["android.hardware.dumpstate@1.1-service.gs201.rc"], + vintf_fragments: ["android.hardware.dumpstate-service.gs201.xml"], + cflags: [ + "-Wall", + "-Werror", + ], + shared_libs: [ + "libbase", + "libbinder_ndk", + "libcutils", + "libdumpstateutil", + "liblog", + "libutils", + "android.hardware.dumpstate-V1-ndk", + ], + vendor: true, + relative_install_path: "hw", +} diff --git a/dumpstate/Android.mk b/dumpstate/Android.mk deleted file mode 100644 index 76202ce..0000000 --- a/dumpstate/Android.mk +++ /dev/null @@ -1,44 +0,0 @@ -# -# Copyright 2016 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. -# - -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.dumpstate-service.gs201 -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE -LOCAL_INIT_RC := android.hardware.dumpstate@1.1-service.gs201.rc -LOCAL_MODULE_RELATIVE_PATH := hw - -LOCAL_SRC_FILES := \ - Dumpstate.cpp \ - service.cpp - -LOCAL_SHARED_LIBRARIES := \ - libbase \ - libbinder_ndk \ - libcutils \ - libdumpstateutil \ - liblog \ - libutils \ - android.hardware.dumpstate-V1-ndk - -LOCAL_CFLAGS := -Werror -Wall - -LOCAL_MODULE_TAGS := optional -LOCAL_PROPRIETARY_MODULE := true - -include $(BUILD_EXECUTABLE) diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index cd48440..610d754 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -43,8 +43,6 @@ #define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num" #define GPS_LOGGING_STATUS_PROPERTY "vendor.gps.aol.enabled" -#define UFS_BOOTDEVICE "ro.boot.bootdevice" - #define TCPDUMP_LOG_DIRECTORY "/data/vendor/tcpdump_logger/logs" #define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num" #define TCPDUMP_PERSIST_PROPERTY "persist.vendor.tcpdump.log.alwayson" @@ -224,9 +222,6 @@ void endSection(int fd, const std::string §ionName, timepoint_t startTime) { Dumpstate::Dumpstate() : mTextSections{ { "wlan", [this](int fd) { dumpWlanSection(fd); } }, - { "modem", [this](int fd) { dumpModemSection(fd); } }, - { "soc", [this](int fd) { dumpSocSection(fd); } }, - { "storage", [this](int fd) { dumpStorageSection(fd); } }, { "memory", [this](int fd) { dumpMemorySection(fd); } }, { "Devfreq", [this](int fd) { dumpDevfreqSection(fd); } }, { "cpu", [this](int fd) { dumpCpuSection(fd); } }, @@ -236,10 +231,7 @@ Dumpstate::Dumpstate() { "display", [this](int fd) { dumpDisplaySection(fd); } }, { "sensors-usf", [this](int fd) { dumpSensorsUSFSection(fd); } }, { "aoc", [this](int fd) { dumpAoCSection(fd); } }, - { "ramdump", [this](int fd) { dumpRamdumpSection(fd); } }, { "misc", [this](int fd) { dumpMiscSection(fd); } }, - { "gsc", [this](int fd) { dumpGscSection(fd); } }, - { "trusty", [this](int fd) { dumpTrustySection(fd); } }, { "led", [this](int fd) { dumpLEDSection(fd); } }, }, mLogSections{ @@ -268,6 +260,24 @@ void Dumpstate::dumpTextSection(int fd, const std::string §ionName) { } } + // Execute all programs under vendor/bin/dump/ + std::unique_ptr<DIR, decltype(&closedir)> dir(opendir("/vendor/bin/dump"), closedir); + if (!dir) { + ALOGE("Fail To Open Dir vendor/bin/dump/"); + } else { + dirent *entry; + while ((entry = readdir(dir.get())) != nullptr) { + // Skip '.', '..' + if (entry->d_name[0] == '.') { + continue; + } + std::string bin(entry->d_name); + auto startTime = startSection(fd, "/vendor/bin/dump/"+bin); + RunCommandToFd(fd, "/vendor/bin/dump/"+bin, {"/vendor/bin/dump/"+bin}); + endSection(fd, "/vendor/bin/dump/"+bin, startTime); + } + } + if (dumpAll) { return; } @@ -865,16 +875,6 @@ void Dumpstate::dumpTouchSection(int fd) { } } -// Dump items related to SoC -void Dumpstate::dumpSocSection(int fd) { - DumpFileToFd(fd, "AP HW TUNE", "/sys/devices/system/chip-id/ap_hw_tune_str"); - DumpFileToFd(fd, "EVT VERSION", "/sys/devices/system/chip-id/evt_ver"); - DumpFileToFd(fd, "LOT ID", "/sys/devices/system/chip-id/lot_id"); - DumpFileToFd(fd, "PRODUCT ID", "/sys/devices/system/chip-id/product_id"); - DumpFileToFd(fd, "REVISION", "/sys/devices/system/chip-id/revision"); - DumpFileToFd(fd, "RAW STR", "/sys/devices/system/chip-id/raw_str"); -} - // Dump items related to CPUs void Dumpstate::dumpCpuSection(int fd) { DumpFileToFd(fd, "CPU present", "/sys/devices/system/cpu/present"); @@ -939,69 +939,6 @@ void Dumpstate::dumpMemorySection(int fd) { "done"}); } -static void DumpF2FS(int fd) { - DumpFileToFd(fd, "F2FS", "/sys/kernel/debug/f2fs/status"); - RunCommandToFd(fd, "F2FS - fsck time (ms)", {"/vendor/bin/sh", "-c", "getprop ro.boottime.init.fsck.data"}); - RunCommandToFd(fd, "F2FS - checkpoint=disable time (ms)", {"/vendor/bin/sh", "-c", "getprop ro.boottime.init.mount.data"}); -} - -static void DumpUFS(int fd) { - DumpFileToFd(fd, "UFS model", "/sys/block/sda/device/model"); - DumpFileToFd(fd, "UFS rev", "/sys/block/sda/device/rev"); - DumpFileToFd(fd, "UFS size", "/sys/block/sda/size"); - - DumpFileToFd(fd, "UFS Slow IO Read", "/dev/sys/block/bootdevice/slowio_read_cnt"); - DumpFileToFd(fd, "UFS Slow IO Write", "/dev/sys/block/bootdevice/slowio_write_cnt"); - DumpFileToFd(fd, "UFS Slow IO Unmap", "/dev/sys/block/bootdevice/slowio_unmap_cnt"); - DumpFileToFd(fd, "UFS Slow IO Sync", "/dev/sys/block/bootdevice/slowio_sync_cnt"); - - RunCommandToFd(fd, "UFS err_stats", {"/vendor/bin/sh", "-c", - "path=\"/dev/sys/block/bootdevice/err_stats\"; " - "for node in `ls $path/* | grep -v reset_err_status`; do " - "printf \"%s:%d\\n\" $(basename $node) $(cat $node); done;"}); - - - RunCommandToFd(fd, "UFS io_stats", {"/vendor/bin/sh", "-c", - "path=\"/dev/sys/block/bootdevice/io_stats\"; " - "printf \"\\t\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "ReadCnt ReadBytes WriteCnt WriteBytes RWCnt RWBytes; " - "str=$(cat $path/*_start); arr=($str); " - "printf \"Started: \\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}; " - "str=$(cat $path/*_complete); arr=($str); " - "printf \"Completed: \\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}; " - "str=$(cat $path/*_maxdiff); arr=($str); " - "printf \"MaxDiff: \\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\\n\" " - "${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}; "}); - - RunCommandToFd(fd, "UFS req_stats", {"/vendor/bin/sh", "-c", - "path=\"/dev/sys/block/bootdevice/req_stats\"; " - "printf \"\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "All Write Read Security Flush Discard; " - "str=$(cat $path/*_min); arr=($str); " - "printf \"Min:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}; " - "str=$(cat $path/*_max); arr=($str); " - "printf \"Max:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}; " - "str=$(cat $path/*_avg); arr=($str); " - "printf \"Avg.:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\" " - "${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}; " - "str=$(cat $path/*_sum); arr=($str); " - "printf \"Count:\\t%-10s %-10s %-10s %-10s %-10s %-10s\\n\\n\" " - "${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]};"}); - - std::string ufs_health = "for f in $(find /dev/sys/block/bootdevice/health_descriptor -type f); do if [[ -r $f && -f $f ]]; then echo --- $f; cat $f; echo ''; fi; done"; - RunCommandToFd(fd, "UFS health", {"/vendor/bin/sh", "-c", ufs_health.c_str()}); -} - -// Dump items related to storage -void Dumpstate::dumpStorageSection(int fd) { - DumpF2FS(fd); - DumpUFS(fd); -} - // Dump items related to display void Dumpstate::dumpDisplaySection(int fd) { DumpFileToFd(fd, "CRTC-0 underrun count", "/sys/kernel/debug/dri/0/crtc-0/underrun_cnt"); @@ -1020,6 +957,14 @@ void Dumpstate::dumpDisplaySection(int fd) { DumpFileToFd(fd, "Primary panel extra info", "/sys/devices/platform/exynos-drm/primary-panel/panel_extinfo"); DumpFileToFd(fd, "Secondary panel name", "/sys/devices/platform/exynos-drm/secondary-panel/panel_name"); DumpFileToFd(fd, "Secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo"); + if (!PropertiesHelper::IsUserBuild()) { + DumpFileToFd(fd, "HWC Fence State", "/data/vendor/log/hwc/hwc_fence_state.txt"); + DumpFileToFd(fd, "HWC Error Log", "/data/vendor/log/hwc/hwc_error_log.txt"); + RunCommandToFd(fd, "HWC Debug Dumps", {"/vendor/bin/sh", "-c", + "for f in $(ls /data/vendor/log/hwc/*_hwc_debug*.dump); do " + "echo $f ; cat $f ; done"}, + CommandOptions::WithTimeout(2).Build()); + } } // Dump items related to AoC @@ -1078,56 +1023,12 @@ void Dumpstate::dumpSensorsUSFSection(int fd) { } } -// Gzip binary data and dump to fd in base64 format. Cmd to decode is also attached. -void dumpGzippedFileInBase64ToFd(int fd, const char* title, const char* file_path) { - auto cmd = ::android::base::StringPrintf("echo 'base64 -d <<EOF | gunzip' ; " - "/vendor/bin/gzip < \"%s\" | /vendor/bin/base64 ; " - "echo 'EOF'", file_path); - RunCommandToFd(fd, title, - {"/vendor/bin/sh", "-c", cmd.c_str()}, - CommandOptions::WithTimeout(10).Build()); -} - -struct abl_log_header { - uint64_t i; - uint64_t size; - char buf[]; -} __attribute__((packed)); - -// Dump items related to ramdump. -void Dumpstate::dumpRamdumpSection(int fd) { - std::string abl_log; - if (::android::base::ReadFileToString("/mnt/vendor/ramdump/abl.log", &abl_log)) { - const struct abl_log_header *header = (const struct abl_log_header*) abl_log.c_str(); - ::android::base::WriteStringToFd(::android::base::StringPrintf( - "------ Ramdump misc file: abl.log (i:0x%" PRIx64 " size:0x%" PRIx64 ") ------\n%s\n", - header->i, header->size, std::string(header->buf, header->i).c_str()), fd); - } else { - ::android::base::WriteStringToFd("*** Ramdump misc file: abl.log: File not found\n", fd); - } - dumpGzippedFileInBase64ToFd( - fd, "Ramdump misc file: acpm.lst (gzipped in base64)", "/mnt/vendor/ramdump/acpm.lst"); - dumpGzippedFileInBase64ToFd( - fd, "Ramdump misc file: s2d.lst (gzipped in base64)", "/mnt/vendor/ramdump/s2d.lst"); -} - // Dump items that don't fit well into any other section void Dumpstate::dumpMiscSection(int fd) { RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"}); DumpFileToFd(fd, "VENDOR PROC DUMP", "/proc/vendor_sched/dump_task"); } -// Dump items related to GSC -void Dumpstate::dumpGscSection(int fd) { - RunCommandToFd(fd, "Citadel VERSION", {"vendor/bin/hw/citadel_updater", "-lv"}); - RunCommandToFd(fd, "Citadel STATS", {"vendor/bin/hw/citadel_updater", "--stats"}); - RunCommandToFd(fd, "GSC DEBUG DUMP", {"vendor/bin/hw/citadel_updater", "-D"}); -} - -void Dumpstate::dumpTrustySection(int fd) { - RunCommandToFd(fd, "Trusty TEE0 Logs", {"/vendor/bin/sh", "-c", "cat /dev/trusty-log0"}, CommandOptions::WithTimeout(1).Build()); -} - // Dump items related to LED void Dumpstate::dumpLEDSection(int fd) { struct stat buffer; @@ -1143,18 +1044,6 @@ void Dumpstate::dumpLEDSection(int fd) { } } -void Dumpstate::dumpModemSection(int fd) { - DumpFileToFd(fd, "Modem Stat", "/data/vendor/modem_stat/debug.txt"); - RunCommandToFd(fd, "Modem SSR history", {"/vendor/bin/sh", "-c", - "for f in $(ls /data/vendor/ssrdump/crashinfo_modem*); do " - "echo $f ; cat $f ; done"}, - CommandOptions::WithTimeout(2).Build()); - RunCommandToFd(fd, "RFSD error log", {"/vendor/bin/sh", "-c", - "for f in $(ls /data/vendor/log/rfsd/rfslog_*); do " - "echo $f ; cat $f ; done"}, - CommandOptions::WithTimeout(2).Build()); -} - void Dumpstate::dumpModemLogs(int fd, const std::string &destDir) { std::string extendedLogDir = MODEM_EXTENDED_LOG_DIRECTORY; diff --git a/dumpstate/Dumpstate.h b/dumpstate/Dumpstate.h index eadaefe..77a36ec 100644 --- a/dumpstate/Dumpstate.h +++ b/dumpstate/Dumpstate.h @@ -53,22 +53,16 @@ class Dumpstate : public BnDumpstateDevice { // Text sections that can be dumped individually on the command line in // addition to being included in full dumps void dumpWlanSection(int fd); - void dumpModemSection(int fd); void dumpPowerSection(int fd); void dumpThermalSection(int fd); void dumpTouchSection(int fd); - void dumpSocSection(int fd); void dumpCpuSection(int fd); void dumpDevfreqSection(int fd); void dumpMemorySection(int fd); - void dumpStorageSection(int fd); void dumpDisplaySection(int fd); void dumpSensorsUSFSection(int fd); void dumpAoCSection(int fd); - void dumpRamdumpSection(int fd); void dumpMiscSection(int fd); - void dumpGscSection(int fd); - void dumpTrustySection(int fd); void dumpLEDSection(int fd); void dumpLogSection(int fd, int fdModem); diff --git a/dumpstate/OWNERS b/dumpstate/OWNERS new file mode 100644 index 0000000..5859d10 --- /dev/null +++ b/dumpstate/OWNERS @@ -0,0 +1,9 @@ +aaronding@google.com +rurumihong@google.com +adamshih@google.com +wilsonsung@google.com +lucaswei@google.com +cyanhsieh@google.com +rogerliao@google.com +cyuanjen@google.com +robinpeng@google.com diff --git a/dumpstate/README.txt b/dumpstate/README.txt new file mode 100644 index 0000000..b279bda --- /dev/null +++ b/dumpstate/README.txt @@ -0,0 +1 @@ +Please refer to go/pixel-recycle to modularize your code in this space. diff --git a/dumpstate/android.hardware.dumpstate-service.gs201.xml b/dumpstate/android.hardware.dumpstate-service.gs201.xml new file mode 100644 index 0000000..5e51b28 --- /dev/null +++ b/dumpstate/android.hardware.dumpstate-service.gs201.xml @@ -0,0 +1,9 @@ +<manifest version="1.0" type="device"> + <hal format="aidl"> + <name>android.hardware.dumpstate</name> + <interface> + <name>IDumpstateDevice</name> + <instance>default</instance> + </interface> + </hal> +</manifest> diff --git a/dumpstate/android.hardware.dumpstate@1.1-service.gs201.rc b/dumpstate/android.hardware.dumpstate@1.1-service.gs201.rc index 65456d1..f2452dc 100644 --- a/dumpstate/android.hardware.dumpstate@1.1-service.gs201.rc +++ b/dumpstate/android.hardware.dumpstate@1.1-service.gs201.rc @@ -1,5 +1,5 @@ service vendor.dumpstate-default /vendor/bin/hw/android.hardware.dumpstate-service.gs201 class hal user system - group system + group system shell interface aidl android.hardware.dumpstate.IDumpstateDevice/default diff --git a/init.display.sh b/init.display.sh new file mode 100755 index 0000000..bb942e3 --- /dev/null +++ b/init.display.sh @@ -0,0 +1,22 @@ +#!/vendor/bin/sh +modules_dir= + +for f in /vendor/lib/modules/*/modules.dep /vendor/lib/modules/modules.dep; do + if [[ -f "$f" ]]; then + modules_dir="$(dirname "$f")" + break + fi +done + +if [[ -z "${modules_dir}" ]]; then + echo "Unable to locate kernel modules directory" 2>&1 + exit 1 +fi + +panel_drv=`getprop ro.boot.primary_panel_drv` +if [[ -z "$panel_drv" ]]; then + panel_drv="panel-samsung-emul" +fi +modprobe -d "${modules_dir}" exynos-drm.ko +modprobe -d "${modules_dir}" $panel_drv.ko + diff --git a/init.insmod.gs201.cfg b/init.insmod.gs201.cfg deleted file mode 100644 index 1eb29b9..0000000 --- a/init.insmod.gs201.cfg +++ /dev/null @@ -1,12 +0,0 @@ -#################################################### -# init.insmod.common.cfg # -# This file contains common kernel modules to load # -# at init time by init.insmod.sh script # -#################################################### - -# Load common kernel modules -# Modules here will be loaded *before* device specific modules -install_display_drivers -modprobe|-b * -# All common modules loaded -setprop|vendor.common.modules.ready diff --git a/init.insmod.sh b/init.insmod.sh deleted file mode 100755 index 645391a..0000000 --- a/init.insmod.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/vendor/bin/sh - -############################################################# -### init.insmod.cfg format: ### -### ----------------------------------------------------- ### -### [insmod|setprop|enable/moprobe|wait] [path|prop name] ### -### ... ### -############################################################# - -modules_dir= - -for f in /vendor/lib/modules/*/modules.dep /vendor/lib/modules/modules.dep; do - if [[ -f "$f" ]]; then - modules_dir="$(dirname "$f")" - break - fi -done - -if [[ -z "${modules_dir}" ]]; then - echo "Unable to locate kernel modules directory" 2>&1 - exit 1 -fi - -# imitates wait_for_file() in init -wait_for_file() -{ - filename="${1}" - timeout="${2:-5}" - - expiry=$(($(date "+%s")+timeout)) - while [[ ! -e "${filename}" ]] && [[ "$(date "+%s")" -le "${expiry}" ]] - do - sleep 0.01 - done -} - -install_display_drivers() -{ - panel_drv=`getprop ro.boot.primary_panel_drv` - if [[ -z "$panel_drv" ]]; then - panel_drv="panel-samsung-emul" - fi - modprobe -d "${modules_dir}" exynos-drm.ko - modprobe -d "${modules_dir}" $panel_drv.ko -} - -if [ $# -eq 1 ]; then - cfg_file=$1 -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 - exit 1 -fi - -if [ -f $cfg_file ]; then - while IFS="|" read -r action arg - do - case $action in - "insmod") insmod $arg ;; - "setprop") setprop $arg 1 ;; - "enable") echo 1 > $arg ;; - "modprobe") - case ${arg} in - "-b *" | "-b") - arg="-b --all=${modules_dir}/modules.load" ;; - "*" | "") - arg="--all=${modules_dir}/modules.load" ;; - esac - modprobe -a -d "${modules_dir}" $arg ;; - "wait") wait_for_file $arg ;; - "install_display_drivers") install_display_drivers ;; - esac - done < $cfg_file -fi diff --git a/manifest.xml b/manifest.xml index 347e857..50422a3 100644 --- a/manifest.xml +++ b/manifest.xml @@ -35,13 +35,6 @@ <instance>default</instance> </interface> </hal> - <hal format="aidl"> - <name>android.hardware.dumpstate</name> - <interface> - <name>IDumpstateDevice</name> - <instance>default</instance> - </interface> - </hal> <hal format="hidl"> <name>android.hardware.boot</name> <transport>hwbinder</transport> diff --git a/media_codecs_aosp_c2.xml b/media_codecs_aosp_c2.xml index ea96e21..bae71e6 100644 --- a/media_codecs_aosp_c2.xml +++ b/media_codecs_aosp_c2.xml @@ -176,12 +176,13 @@ <Limit name="performance-point-1920x1080" range="240" /> <Limit name="performance-point-3840x2160" range="120" /> <Limit name="concurrent-instances" max="16" /> + <Limit name="quality" range="0-100" default="57" /> <Feature name="can-swap-width-height" value="1" /> <Feature name="vq-minimum-quality"/> <Feature name="qp-bounds"/> <Feature name="encoding-statistics"/> <Feature name="hdr-editing" /> - <Feature name="bitrate-modes" value="VBR,CBR,CBR-FD" /> + <Feature name="bitrate-modes" value="VBR,CBR,CQ,CBR-FD" /> </MediaCodec> <MediaCodec name="c2.exynos.mpeg4.encoder" type="video/mp4v-es"> <Limit name="size" min="32x32" max="2048x2048" /> diff --git a/thermal/Android.mk b/thermal/Android.mk deleted file mode 100644 index e69de29..0000000 --- a/thermal/Android.mk +++ /dev/null diff --git a/thermal/thermal.c b/thermal/thermal.c deleted file mode 100644 index e69de29..0000000 --- a/thermal/thermal.c +++ /dev/null diff --git a/widevine/device.mk b/widevine/device.mk index 467aa38..ea942bb 100644 --- a/widevine/device.mk +++ b/widevine/device.mk @@ -1,4 +1,9 @@ PRODUCT_PACKAGES += \ android.hardware.drm-service.clearkey \ - android.hardware.drm-service.widevine + com.google.android.widevine BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs201-sepolicy/widevine + +# Check if we can use dev keys +ifneq ($(wildcard vendor/google/dev-keystore),) +$(call soong_config_set,widevine,use_devkey,true) +endif
\ No newline at end of file |