mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
msm8226-common: fix offline charging
This commit is contained in:
parent
d79f3a2047
commit
d5a4d8d567
7 changed files with 17 additions and 13 deletions
|
@ -52,8 +52,6 @@ TARGET_USES_NON_TREBLE_CAMERA := true
|
||||||
BOARD_BATTERY_DEVICE_NAME := "battery"
|
BOARD_BATTERY_DEVICE_NAME := "battery"
|
||||||
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
|
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
|
||||||
BOARD_CHARGING_CMDLINE_VALUE := "charger"
|
BOARD_CHARGING_CMDLINE_VALUE := "charger"
|
||||||
BOARD_CHARGER_ENABLE_SUSPEND := true
|
|
||||||
WITH_LINEAGE_CHARGER := false
|
|
||||||
|
|
||||||
# Dexpreopt
|
# Dexpreopt
|
||||||
ifeq ($(HOST_OS),linux)
|
ifeq ($(HOST_OS),linux)
|
||||||
|
|
|
@ -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 \
|
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
|
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
|
# OMX
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
libc2dcolorconvert \
|
libc2dcolorconvert \
|
||||||
|
|
|
@ -106,6 +106,7 @@ on charger
|
||||||
write /sys/devices/system/cpu/cpu1/online 1
|
write /sys/devices/system/cpu/cpu1/online 1
|
||||||
write /sys/devices/system/cpu/cpu2/online 1
|
write /sys/devices/system/cpu/cpu2/online 1
|
||||||
write /sys/devices/system/cpu/cpu3/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/cpu0/power_collapse/suspend_enabled 1
|
||||||
write /sys/module/msm_pm/modes/cpu1/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
|
write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
|
||||||
|
@ -131,10 +132,4 @@ on property:sys.boot_completed=1
|
||||||
setprop vendor.post_boot.parsed 1
|
setprop vendor.post_boot.parsed 1
|
||||||
# Post boot services
|
# Post boot services
|
||||||
rm /data/system/perfd/default_values
|
rm /data/system/perfd/default_values
|
||||||
start mpdecision
|
start mpdecision
|
||||||
|
|
||||||
on class_start:late_start
|
|
||||||
trigger enable-low-power
|
|
||||||
|
|
||||||
on property:init.svc.recovery=running
|
|
||||||
trigger enable-low-power
|
|
||||||
|
|
|
@ -587,9 +587,8 @@ service adsprpcd /vendor/bin/adsprpcd
|
||||||
service charger /charger
|
service charger /charger
|
||||||
class charger
|
class charger
|
||||||
critical
|
critical
|
||||||
group root system
|
|
||||||
seclabel u:r:charger:s0
|
seclabel u:r:charger:s0
|
||||||
|
|
||||||
service ds_fmc_appd /vendor/bin/ds_fmc_appd -p "rmnet0" -D
|
service ds_fmc_appd /vendor/bin/ds_fmc_appd -p "rmnet0" -D
|
||||||
class late_start
|
class late_start
|
||||||
user root
|
user root
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
/dev/pn547 u:object_r:nfc_device:s0
|
/dev/pn547 u:object_r:nfc_device:s0
|
||||||
/dev/rfkill u:object_r:wlan_device:s0
|
/dev/rfkill u:object_r:wlan_device:s0
|
||||||
/dev/sec-nfc u:object_r:nfc_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 files
|
||||||
/efs/bluetooth(/.*)? u:object_r:bluetooth_efs_file:s0
|
/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]+/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/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/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
|
# 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
|
/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
|
||||||
|
|
3
sepolicy/common/healthd.te
Normal file
3
sepolicy/common/healthd.te
Normal 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;
|
2
sepolicy/common/untrusted_app.te
Normal file
2
sepolicy/common/untrusted_app.te
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
allow untrusted_app sysfs_batteryinfo:dir r_dir_perms;
|
||||||
|
allow untrusted_app sysfs_batteryinfo:file r_file_perms;
|
Loading…
Reference in a new issue