From cbb3a445eb65dd6b67e0d748ff2ae12f32d2a382 Mon Sep 17 00:00:00 2001 From: Deftones Date: Sun, 11 Sep 2016 18:24:37 +0000 Subject: Ril and reboot fix --- board/00-qcom-platform-msm8952.mk | 1 + .../frameworks/base/core/res/res/values/config.xml | 329 +++++++++++++++++++++ .../base/core/res/res/xml/power_profile.xml | 92 ++++++ .../base/packages/SystemUI/res/values/config.xml | 44 +++ overlay/packages/apps/Dialer/res/values/config.xml | 18 ++ .../services/Telecomm/res/values/config.xml | 22 ++ .../services/Telephony/res/values/config.xml | 21 ++ overlay/vendor/cmsdk/cm/res/res/values/config.xml | 22 ++ product/overlays.mk | 2 + rootdir/Android.mk | 8 - rootdir/etc/init.qcom.rc | 103 ++++--- rootdir/etc/init.qcom.ssr.rc | 22 -- 12 files changed, 602 insertions(+), 82 deletions(-) create mode 100644 overlay/frameworks/base/core/res/res/values/config.xml create mode 100644 overlay/frameworks/base/core/res/res/xml/power_profile.xml create mode 100644 overlay/frameworks/base/packages/SystemUI/res/values/config.xml create mode 100644 overlay/packages/apps/Dialer/res/values/config.xml create mode 100644 overlay/packages/services/Telecomm/res/values/config.xml create mode 100644 overlay/packages/services/Telephony/res/values/config.xml create mode 100644 overlay/vendor/cmsdk/cm/res/res/values/config.xml create mode 100644 product/overlays.mk delete mode 100644 rootdir/etc/init.qcom.ssr.rc diff --git a/board/00-qcom-platform-msm8952.mk b/board/00-qcom-platform-msm8952.mk index 0028b4b..5799e1e 100644 --- a/board/00-qcom-platform-msm8952.mk +++ b/board/00-qcom-platform-msm8952.mk @@ -14,6 +14,7 @@ TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/ BOARD_NEEDS_VENDORIMAGE_SYMLINK := true TARGET_COPY_OUT_VENDOR := system TARGET_UNIFIED_DEVICE := true +TARGET_USES_OVERLAY := true # Qualcomm support BOARD_USES_QCOM_HARDWARE := true diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..1378138 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,329 @@ + + + + + + + true + + + true + + + + 10 + 30 + 60 + 100 + 150 + 210 + 255 + + + + + 10 + 20 + 40 + 70 + 110 + 160 + 200 + 255 + + + + 1 + + + 1 + + + true + + + false + + + true + + + + true + + + false + + + false + + + true + + + 680 + + + 500 + + + 2000 + + + true + + + true + + + true + + + true + + + #ffffffff + + + 10 + + + true + + + + "usb\\d" + "rndis\\d" + + + + + "wlan0" + + + + true + + + + bnep\\d + bt-pan + + + + + + 0 + 1 + 4 + 5 + 7 + + + + + + + + wifi,1,1,1,-1,true + mobile,0,0,0,-1,true + mobile_mms,2,0,4,300000,true + mobile_supl,3,0,2,300000,true + mobile_dun,4,0,2,300000,true + mobile_hipri,5,0,3,300000,true + mobile_fota,10,0,2,300000,true + mobile_ims,11,0,2,300000,true + mobile_cbs,12,0,2,300000,true + bluetooth,7,7,2,-1,true + ethernet,9,9,4,-1,true + + + + + + 1,1 + 0,1 + 7,1 + + + + + 0 + 1 + 20 + 21 + + + + true + + + true + + + true + + + true + + + true + + + 524288,2097152,4194304,262144,524288,1048576 + + + 64 + + + 64 + + + 4 + + true + + + true + + + true + + + + lte:2097152,4194304,8388608,262144,524288,1048576 + lte_ca:2097152,4194304,8388608,262144,524288,1048576 + umts:4094,87380,1220608,4096,16384,1220608 + hspa:4094,87380,1220608,4096,16384,1220608 + hsupa:4094,87380,1220608,4096,16384,1220608 + hsdpa:4094,87380,2441216,4096,16384,2441216 + hspap:4094,87380,1220608,4096,16384,1220608 + edge:4093,26280,35040,4096,16384,35040 + gprs:4092,8760,11680,4096,8760,11680 + evdo:4094,87380,1048576,4096,16384,262144 + ehrpd:4094,87380,1048576,4096,16384,262144 + + + + + 0 + 20 + 30 + 50 + + + + com.qualcomm.location + + + com.qualcomm.location + + + com.android.systemui/com.android.systemui.doze.DozeService + true + true + + + true + + + 3300 + diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml new file mode 100644 index 0000000..23a98e4 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -0,0 +1,92 @@ + + + 0 + 18 + 154.8 + + dark + dim + medium + light + bright + + + 18 + 52.2 + 86.04 + 120.96 + 154.80 + + + 27000 + 200000 + 320000 + 400000 + + + 102.6 + 406.8 + 525.6 + 626.4 + + 25.2 + 1.8 + 0 + 1.14 + 74 + 54 + 10.8 + 39.6 + 96.12 + 191.16 + 50.4 + 2150 + 82.8 + 160 + 550 + + 2.88 + 2.88 + + + 300000 + 422400 + 652800 + 729600 + 883200 + 960000 + 1036800 + 1190400 + 1267200 + 1497600 + 1574400 + 1728000 + 1958400 + 2265600 + + 2.52 + 9.08 + + 23.60 + 24.24 + 31.00 + 31.98 + 45.47 + 49.44 + 51.78 + 58.26 + 61.76 + 77.48 + 84.47 + 96.27 + 112.63 + 161.76 + + + 0.0002 + 0.002 + 0.02 + 0.2 + 2 + + \ No newline at end of file diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 0000000..a1e5ad3 --- /dev/null +++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,44 @@ + + + + + + + + true + + + 900 + + + 3000 + + + 600 + + + 5s,15s,30s,60s + + + true + + diff --git a/overlay/packages/apps/Dialer/res/values/config.xml b/overlay/packages/apps/Dialer/res/values/config.xml new file mode 100644 index 0000000..1703840 --- /dev/null +++ b/overlay/packages/apps/Dialer/res/values/config.xml @@ -0,0 +1,18 @@ + + + + + true + 4 + diff --git a/overlay/packages/services/Telecomm/res/values/config.xml b/overlay/packages/services/Telecomm/res/values/config.xml new file mode 100644 index 0000000..ed4f39c --- /dev/null +++ b/overlay/packages/services/Telecomm/res/values/config.xml @@ -0,0 +1,22 @@ + + + + + + + true + + diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml new file mode 100644 index 0000000..7f612f2 --- /dev/null +++ b/overlay/packages/services/Telephony/res/values/config.xml @@ -0,0 +1,21 @@ + + + + + + true + + diff --git a/overlay/vendor/cmsdk/cm/res/res/values/config.xml b/overlay/vendor/cmsdk/cm/res/res/values/config.xml new file mode 100644 index 0000000..3b23b2d --- /dev/null +++ b/overlay/vendor/cmsdk/cm/res/res/values/config.xml @@ -0,0 +1,22 @@ + + + + + + true + + diff --git a/product/overlays.mk b/product/overlays.mk new file mode 100644 index 0000000..a464a57 --- /dev/null +++ b/product/overlays.mk @@ -0,0 +1,2 @@ +# Overlays +DEVICE_PACKAGE_OVERLAYS += device/google/msm8952-common/overlay diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 53f2051..3a0768d 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -36,14 +36,6 @@ LOCAL_SRC_FILES := etc/init.qcom.power_$(TARGET_BOARD_PLATFORM_VARIANT).rc LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.ssr.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.ssr.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - include $(CLEAR_VARS) LOCAL_MODULE := init.qcom.usb.rc LOCAL_MODULE_TAGS := optional eng diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index a6dc09a..4843c75 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -11,7 +11,7 @@ # the names of its contributors may be used to endorse or promote # products derived from this software without specific prior written # permission. -# +# Build By One Team @Deftones # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -26,17 +26,13 @@ # import init.qcom.power.rc -import init.qcom.ssr.rc import init.qcom.usb.rc -import init.target.rc on early-init mkdir /firmware 0771 system system mkdir /system 0777 root root symlink /data/tombstones /tombstones - - # Turn off backlight on blank - write /sys/class/leds/lcd-backlight/trigger "backlight" + mkdir /dsp 0771 media media on init # Set permissions for persist partition @@ -82,6 +78,8 @@ on post-fs-data mkdir /data/misc/bluetooth 0770 bluetooth bluetooth + mkdir /data/misc/ipa 0700 net_admin net_admin + # Create the directories used by the Wireless subsystem mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi @@ -159,17 +157,17 @@ on post-fs-data on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 - # Allow subsystem (modem etc) debugging - write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} - write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout} - write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout} - write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} + write /sys/bus/msm_subsys/devices/subsys0/restart_level "related" + write /sys/bus/msm_subsys/devices/subsys1/restart_level "related" + write /sys/bus/msm_subsys/devices/subsys2/restart_level "related" + write /sys/bus/msm_subsys/devices/subsys3/restart_level "related" write /sys/kernel/boot_adsp/boot 1 + chown root audio /sys/kernel/boot_adsp/boot on boot chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state + chown bluetooth net_bt /sys/class/rfkill/rfkill0/type + chown bluetooth net_bt /sys/class/rfkill/rfkill0/state chown bluetooth bluetooth /proc/bluetooth/sleep/proto chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite @@ -177,9 +175,11 @@ on boot chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set chmod 0660 /sys/module/bluetooth_power/parameters/power chmod 0660 /sys/module/hci_smd/parameters/hcismd_set + chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set + chmod 0660 /sys/module/radio_iris_transport/parameters/fmsmd_set chmod 0660 /sys/class/rfkill/rfkill0/state chmod 0660 /proc/bluetooth/sleep/proto - chown bluetooth bluetooth /dev/ttyHS0 + chown net_bt bluetooth /dev/ttyHS0 chmod 0660 /sys/module/hci_uart/parameters/ath_lpm chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite chmod 0660 /dev/ttyHS0 @@ -199,14 +199,14 @@ on boot mkdir /dev/socket/qmux_gps 0770 gps gps chmod 2770 /dev/socket/qmux_gps + chown net_bt bluetooth /sys/class/rfkill/rfkill0/device/extldo + chmod 0660 /sys/class/rfkill/rfkill0/device/extldo + #Create NETMGR daemon socket area mkdir /dev/socket/netmgr 0750 radio radio chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state - #For bridgemgr daemon to inform the USB driver of the correct transport - chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport - # Assign TCP buffer thresholds to be ceiling value of technology maximums # Increased technology maximums should be reflected here. write /proc/sys/net/core/rmem_max 8388608 @@ -256,18 +256,17 @@ on boot mkdir /data/misc/display 0770 system graphics mkdir /persist/display 0770 system graphics - # Graphics node permissions - chmod 0664 /sys/class/graphics/fb0/dyn_pu - chmod 0664 /sys/class/graphics/fb0/dynamic_fps - chmod 0664 /sys/class/graphics/fb0/idle_time - chmod 0664 /sys/class/graphics/fb0/mode - chmod 0664 /sys/class/graphics/fb0/modes + write /data/misc/radio/copy_complete 0 + chown radio radio /data/misc/radio/copy_complete + chmod 0660 /data/misc/radio/copy_complete - chown system graphics /sys/class/graphics/fb0/dyn_pu - chown system graphics /sys/class/graphics/fb0/dynamic_fps - chown system graphics /sys/class/graphics/fb0/idle_time - chown system graphics /sys/class/graphics/fb0/mode - chown system graphics /sys/class/graphics/fb0/modes + # Notification LED + chown system system /sys/class/leds/red/blink + chown system system /sys/class/leds/green/blink + chown system system /sys/class/leds/blue/blink + chown system system /sys/class/leds/red/on_off_ms + chown system system /sys/class/leds/green/on_off_ms + chown system system /sys/class/leds/blue/on_off_ms on property:init.svc.wpa_supplicant=stopped stop dhcpcd @@ -276,8 +275,9 @@ on property:bluetooth.isEnabled=true write /sys/class/bluetooth/hci0/idle_timeout 7000 on property:vold.decrypt=trigger_restart_framework - start config_bt_addr start config_bluetooth + start wcnss-service + start config_bt_addr on property:persist.env.fastdorm.enabled=true setprop persist.radio.data_no_toggle 1 @@ -308,7 +308,7 @@ service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot" seclabel u:r:bluetooth_loader:s0 oneshot -service cnd /system/bin/cnd +service cnd /vendor/bin/cnd class late_start socket cnd stream 660 root inet @@ -321,12 +321,13 @@ service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh user bluetooth group bluetooth net_bt_admin disabled - seclabel u:r:bluetooth_loader:s0 oneshot on property:bluetooth.hciattach=true start hciattach +on property:bluetooth.hciattach=false + setprop bluetooth.status off # FM on property:hw.fm.init=0 write /sys/module/radio_iris_transport/parameters/fmsmd_set 0 @@ -348,6 +349,17 @@ service qti /vendor/bin/qti user radio group radio net_raw qcom_diag usb net_admin +service ipacm-diag /system/bin/ipacm-diag + class main + user system + socket ipacm_log_file dgram 660 system net_admin + group net_admin qcom_diag + +service ipacm /system/bin/ipacm + class main + user net_admin + group net_admin inet + service sensors /system/bin/sensors.qcom class late_start user root @@ -486,22 +498,14 @@ service charger /charger group log seclabel u:r:healthd:s0 -service ssr_diag /system/bin/ssr_diag - class late_start - user system - group system +on charger + start hvdcp_opti -service hvdcp /system/bin/hvdcp +service hvdcp_opti /vendor/bin/hvdcp_opti class core user root disabled -on property:persist.usb.hvdcp.detect=true - start hvdcp - -on property:persist.usb.hvdcp.detect=false - stop hvdcp - #start camera server as daemon service qcamerasvr /system/bin/mm-qcamera-daemon class late_start @@ -509,13 +513,6 @@ service qcamerasvr /system/bin/mm-qcamera-daemon group camera system inet input graphics writepid /dev/cpuset/system-background/tasks -# Allow usb charging to be disabled peristently -on property:persist.usb.chgdisabled=1 - write /sys/class/power_supply/battery/charging_enabled 0 - -on property:persist.usb.chgdisabled=0 - write /sys/class/power_supply/battery/charging_enabled 1 - service qseecomd /system/bin/qseecomd class core user root @@ -524,7 +521,6 @@ service qseecomd /system/bin/qseecomd service perfd /vendor/bin/perfd class main user root - group root disabled writepid /dev/cpuset/system-background/tasks @@ -532,6 +528,9 @@ service thermal-engine /vendor/bin/thermal-engine class main user root group root + socket thermal-send-client stream 0666 system system + socket thermal-recv-client stream 0660 system system + socket thermal-recv-passive-client stream 0666 system system service time_daemon /system/bin/time_daemon class late_start @@ -543,7 +542,7 @@ service audiod /system/bin/audiod user system group system -service ppd /system/bin/mm-pp-daemon +service ppd /vendor/bin/mm-pp-daemon class late_start disabled user system @@ -562,7 +561,7 @@ service wcnss-service /system/bin/wcnss_service group system wifi radio oneshot -service adsprpcd /system/bin/adsprpcd +service adsprpcd /vendor/bin/adsprpcd class main user media group media diff --git a/rootdir/etc/init.qcom.ssr.rc b/rootdir/etc/init.qcom.ssr.rc deleted file mode 100644 index b4f7838..0000000 --- a/rootdir/etc/init.qcom.ssr.rc +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2016 The CyanogenMod 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. - -on boot - # Subsystem Restart - # Venus - write /sys/bus/msm_subsys/devices/subsys0/restart_level "related" - # WCNSS - write /sys/bus/msm_subsys/devices/subsys1/restart_level "related" - # Modem - write /sys/bus/msm_subsys/devices/subsys2/restart_level "related" -- cgit v1.2.3