From 6e0d4a3109f5482677e22de51a52dcd0d2597f3b Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Tue, 8 Oct 2019 17:38:17 +0530 Subject: Add default health service Start default Health service to keep BatteryService happy, otherwise AOSP runs into bootloop with following exceptions: --------------------------------------------------- E BatteryService: health: cannot register callback. (no supported health HAL service) ---- E System : ************ Failure starting system services E System : java.lang.RuntimeException: Failed to start service com.android.server.BatteryService: onStart threw an exception ---- E Zygote : System zygote died with exception E Zygote : java.lang.RuntimeException: Failed to start service com.android.server.BatteryService: onStart threw an exception ---- E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main E AndroidRuntime: java.lang.RuntimeException: Failed to start service com.android.server.BatteryService: onStart threw an exception ---- I Zygote : Process 1660 exited due to signal 9 (Killed) E Zygote : Exit zygote because system server (pid 1660) has terminated --------------------------------------------------- Change-Id: I653dd3c177e6f9cc57fe6d69faae776680fd3423 Signed-off-by: Amit Pundir --- device-common.mk | 5 +++++ manifest.xml | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/device-common.mk b/device-common.mk index ca32194..de30076 100644 --- a/device-common.mk +++ b/device-common.mk @@ -156,6 +156,11 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.gatekeeper@1.0-service.software +# Health +PRODUCT_PACKAGES += \ + android.hardware.health@2.0-service \ + android.hardware.health@2.0-impl + # mkbootimg host tool to build boot.img separately PRODUCT_HOST_PACKAGES := \ mkbootimg diff --git a/manifest.xml b/manifest.xml index aa55ddc..d2d3477 100644 --- a/manifest.xml +++ b/manifest.xml @@ -133,4 +133,13 @@ default + + android.hardware.health + hwbinder + 2.0 + + IHealth + default + + -- cgit v1.2.3 From 90886cc360ebcd965c1e789b7fe96b1b91baac21 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Tue, 8 Oct 2019 11:09:52 +0530 Subject: sepolicy: Add sysfs path for v5.4-rc1+ kernels Upstream kernel commit a1875bf98290 ("arm64: dts: qcom: sdm845: Add unit name to soc node") broke sysfs path for sdm845 devices running kernel v5.4-rc1 and above. This broke display on db845c when selinux is enforced. Change-Id: Ic447b3747c3f6ac40141ba8e74f0101c42a4f214 Signed-off-by: Amit Pundir --- sepolicy/file_contexts | 4 ++++ sepolicy/genfs_contexts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index ab364f8..81edb8c 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -7,6 +7,10 @@ /sys/devices/platform/soc/ae00000.mdss u:object_r:sysfs_gpu:s0 /sys/devices/platform/soc/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc u:object_r:sysfs_rtc:s0 +# sysfs path changed in v5.4+ kernel for sdm845 devices +/sys/devices/platform/soc@0/ae00000.mdss u:object_r:sysfs_gpu:s0 +/sys/devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000/rtc u:object_r:sysfs_rtc:s0 + /vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software u:object_r:hal_gatekeeper_default_exec:s0 /vendor/lib(64)?/dri/.* u:object_r:same_process_hal_file:s0 diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts index 52338f0..0816df9 100644 --- a/sepolicy/genfs_contexts +++ b/sepolicy/genfs_contexts @@ -1,3 +1,6 @@ genfscon sysfs /devices/platform/soc/ae00000.mdss u:object_r:sysfs_gpu:s0 - genfscon sysfs /devices/platform/soc/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000 u:object_r:sysfs_rtc:s0 + +# sysfs path changed in v5.4+ kernel for sdm845 devices +genfscon sysfs /devices/platform/soc@0/ae00000.mdss u:object_r:sysfs_gpu:s0 +genfscon sysfs /devices/platform/soc@0/c440000.spmi/spmi-0/0-00/c440000.spmi:pmic@0:rtc@6000 u:object_r:sysfs_rtc:s0 -- cgit v1.2.3 From 34da58f235f314dbe1deb8677991a43a5d8fd537 Mon Sep 17 00:00:00 2001 From: Amit Pundir Date: Tue, 8 Oct 2019 11:01:42 +0530 Subject: Remove lowmemorykiller property overrides With new kill logic implemented in lmkd, devices should work with default values. Remove ro.lmk.* property overrides. Based on similar changes submitted for cuttlefish and crosshatch. Change-Id: Ifb8cf342795395fbc385353d3a896b86f0cb1449 Signed-off-by: Amit Pundir --- device-common.mk | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/device-common.mk b/device-common.mk index de30076..f9962d4 100644 --- a/device-common.mk +++ b/device-common.mk @@ -31,19 +31,6 @@ PRODUCT_BUILD_SUPER_PARTITION := true PRODUCT_USE_DYNAMIC_PARTITIONS := true PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true -# copied from crosshatch -# Set lmkd options -PRODUCT_SYSTEM_DEFAULT_PROPERTIES := \ - ro.lmk.low=1001 \ - ro.lmk.medium=800 \ - ro.lmk.critical=0 \ - ro.lmk.critical_upgrade=false \ - ro.lmk.upgrade_pressure=100 \ - ro.lmk.downgrade_pressure=100 \ - ro.lmk.kill_heaviest_task=true \ - ro.lmk.kill_timeout_ms=100 \ - ro.lmk.use_minfree_levels=true \ - # HACK: Avoid usb crash PRODUCT_PRODUCT_PROPERTIES := \ persist.adb.nonblocking_ffs=0 \ -- cgit v1.2.3