msm8226-common: fix offline charging

This commit is contained in:
Francescodario Cuzzocrea 2019-10-02 21:32:07 +02:00
parent 51e63aa497
commit 385deca4db
7 changed files with 17 additions and 13 deletions

View file

@ -52,8 +52,6 @@ TARGET_USES_NON_TREBLE_CAMERA := true
BOARD_BATTERY_DEVICE_NAME := "battery"
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
BOARD_CHARGING_CMDLINE_VALUE := "charger"
BOARD_CHARGER_ENABLE_SUSPEND := true
WITH_LINEAGE_CHARGER := false
# Dexpreopt
ifeq ($(HOST_OS),linux)

View file

@ -178,6 +178,12 @@ PRODUCT_COPY_FILES += \
frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video_le.xml \
device/samsung/msm8226-common/configs/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml
# Offline Charger
PRODUCT_PACKAGES += \
charger \
charger_res_images \
lineage_charger_res_images
# OMX
PRODUCT_PACKAGES += \
libc2dcolorconvert \

View file

@ -106,6 +106,7 @@ on charger
write /sys/devices/system/cpu/cpu1/online 1
write /sys/devices/system/cpu/cpu2/online 1
write /sys/devices/system/cpu/cpu3/online 1
write /sys/module/lpm_levels/enable_low_power/l2 4
write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
@ -132,9 +133,3 @@ on property:sys.boot_completed=1
# Post boot services
rm /data/system/perfd/default_values
start mpdecision
on class_start:late_start
trigger enable-low-power
on property:init.svc.recovery=running
trigger enable-low-power

View file

@ -587,7 +587,6 @@ service adsprpcd /vendor/bin/adsprpcd
service charger /charger
class charger
critical
group root system
seclabel u:r:charger:s0
service ds_fmc_appd /vendor/bin/ds_fmc_appd -p "rmnet0" -D

View file

@ -13,8 +13,6 @@
/dev/pn547 u:object_r:nfc_device:s0
/dev/rfkill u:object_r:wlan_device:s0
/dev/sec-nfc u:object_r:nfc_device:s0
# this should be needed but it says it is already defined
#/dev/keychord u:object_r:keychord_device:s0
# efs files
/efs/bluetooth(/.*)? u:object_r:bluetooth_efs_file:s0
@ -47,6 +45,9 @@
/sys/devices/i2c\.[0-9]+/i2c-[0-9]+/[0-9]+-[a-z0-9]+/max[a-z0-9]+-charger/power_supply(/.*)? u:object_r:sysfs_batteryinfo:s0
/sys/devices/i2c\.[0-9]+/i2c-[0-9]+/[0-9]+-[a-z0-9]+/power_supply(/.*)? u:object_r:sysfs_batteryinfo:s0
/sys/devices/msm_dwc3/power_supply(/.*)? u:object_r:sysfs_batteryinfo:s0
/sys/devices/[a-z0-9]+\.i2c/i2c-[0-9]+/[0-9]+-[0-9]+/power_supply(/.*)? u:object_r:sysfs_batteryinfo:s0
/sys/devices/qpnp-bms-[0-9]+/power_supply(/.*)? u:object_r:sysfs_batteryinfo:s0
/sys/devices/qpnp-charger-[0-9]+/power_supply(/.*)? u:object_r:sysfs_batteryinfo:s0
# sysfs - block/storage
/sys/devices/msm_sdcc\.[0-9]/mmc_host/mmc[0-9]/mmc[0-9]:[0-9]+/block/mmcblk[0-9]/bkops_en u:object_r:sysfs_io_sched_tuneable:s0

View file

@ -0,0 +1,3 @@
allow healthd alarm_device:chr_file rw_file_perms;
allow healthd device:dir r_dir_perms;
allow healthd rtc_device:chr_file rw_file_perms;

View file

@ -0,0 +1,2 @@
allow untrusted_app sysfs_batteryinfo:dir r_dir_perms;
allow untrusted_app sysfs_batteryinfo:file r_file_perms;