diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh index 4a6f51e1..049577e7 100755 --- a/rootdir/bin/init.qcom.post_boot.sh +++ b/rootdir/bin/init.qcom.post_boot.sh @@ -173,7 +173,6 @@ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify echo 5 > /proc/sys/kernel/sched_spill_nr_run echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker -start iop # disable thermal bcl hotplug to switch governor echo 0 > /sys/module/msm_thermal/core_control/enabled diff --git a/rootdir/bin/init.qcom.sh b/rootdir/bin/init.qcom.sh index 073f5723..fce894ef 100755 --- a/rootdir/bin/init.qcom.sh +++ b/rootdir/bin/init.qcom.sh @@ -34,71 +34,16 @@ else platformid=`cat /sys/devices/system/soc/soc0/id` fi -start_battery_monitor() -{ - if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then - chown -h root.system /sys/module/pm8921_bms/parameters/* - chown -h root.system /sys/module/qpnp_bms/parameters/* - chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data - chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp - chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl - chmod 0660 /sys/module/qpnp_bms/parameters/* - chmod 0660 /sys/module/pm8921_bms/parameters/* - mkdir -p /data/bms - chown -h root.system /data/bms - chmod 0770 /data/bms - start battery_monitor - fi -} - -start_charger_monitor() -{ - if ls /sys/module/qpnp_charger/parameters/charger_monitor; then - chown -h root.system /sys/module/qpnp_charger/parameters/* - chown -h root.system /sys/class/power_supply/battery/input_current_max - chown -h root.system /sys/class/power_supply/battery/input_current_trim - chown -h root.system /sys/class/power_supply/battery/input_current_settled - chown -h root.system /sys/class/power_supply/battery/voltage_min - chmod 0664 /sys/class/power_supply/battery/input_current_max - chmod 0664 /sys/class/power_supply/battery/input_current_trim - chmod 0664 /sys/class/power_supply/battery/input_current_settled - chmod 0664 /sys/class/power_supply/battery/voltage_min - chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor - start charger_monitor - fi -} - -start_vm_bms() -{ - if [ -e /dev/vm_bms ]; then - chown -h root.system /sys/class/power_supply/bms/current_now - chown -h root.system /sys/class/power_supply/bms/voltage_ocv - chmod 0664 /sys/class/power_supply/bms/current_now - chmod 0664 /sys/class/power_supply/bms/voltage_ocv - start vm_bms - fi -} - -start_msm_irqbalance_8939() -{ - if [ -f /system/vendor/bin/msm_irqbalance ]; then - case "$platformid" in - "239" | "293" | "294" | "295" | "304" | "313") - start vendor.msm_irqbalance;; - esac - fi -} - start_msm_irqbalance() { - if [ -f /vendor/bin/msm_irqbalance ]; then - case "$platformid" in - "317" | "324" | "325" | "326") - start vendor.msm_irqbalance;; - "318" | "327") - start vendor.msm_irqbl_sdm630;; - esac - fi + if [ -f /vendor/bin/msm_irqbalance ]; then + case "$platformid" in + "317" | "324" | "325" | "326") + start vendor.msm_irqbalance;; + "318" | "327") + start vendor.msm_irqbl_sdm630;; + esac + fi } start_copying_prebuilt_qcril_db() @@ -119,236 +64,9 @@ case "$baseband" in esac case "$target" in - "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") - if [ -f /sys/devices/soc0/hw_platform ]; then - value=`cat /sys/devices/soc0/hw_platform` - else - value=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$value" in - "Fluid") - start profiler_daemon;; - esac - ;; - "msm8660" ) - if [ -f /sys/devices/soc0/hw_platform ]; then - platformvalue=`cat /sys/devices/soc0/hw_platform` - else - platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - esac - ;; - "msm8960") - case "$baseband" in - "msm") - start_battery_monitor;; - esac - - if [ -f /sys/devices/soc0/hw_platform ]; then - platformvalue=`cat /sys/devices/soc0/hw_platform` - else - platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - "Liquid") - start profiler_daemon;; - esac - ;; - "msm8974") - platformvalue=`cat /sys/devices/soc0/hw_platform` - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - "Liquid") - start profiler_daemon;; - esac - case "$baseband" in - "msm") - start_battery_monitor - ;; - esac - start_charger_monitor - ;; - "sdm660") - if [ -f /sys/devices/soc0/soc_id ]; then - soc_id=`cat /sys/devices/soc0/soc_id` - else - soc_id=`cat /sys/devices/system/soc/soc0/id` - fi - - if [ -f /sys/devices/soc0/hw_platform ]; then - hw_platform=`cat /sys/devices/soc0/hw_platform` - else - hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - - case "$soc_id" in - "317" | "324" | "325" | "326" | "318" | "327" ) - case "$hw_platform" in - "Surf") - setprop qemu.hw.mainkeys 0 - ;; - "MTP") - setprop qemu.hw.mainkeys 0 - ;; - "RCM") - setprop qemu.hw.mainkeys 0 - ;; - "QRD") - setprop qemu.hw.mainkeys 0 - ;; - esac - ;; - esac - start_msm_irqbalance - ;; - "apq8084") - platformvalue=`cat /sys/devices/soc0/hw_platform` - case "$platformvalue" in - "Fluid") - start profiler_daemon;; - "Liquid") - start profiler_daemon;; - esac - ;; - "msm8226") - start_charger_monitor - ;; - "msm8610") - start_charger_monitor - ;; - "msm8916") - start_vm_bms - start_msm_irqbalance_8939 - if [ -f /sys/devices/soc0/soc_id ]; then - soc_id=`cat /sys/devices/soc0/soc_id` - else - soc_id=`cat /sys/devices/system/soc/soc0/id` - fi - - if [ -f /sys/devices/soc0/platform_subtype_id ]; then - platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id` - fi - if [ -f /sys/devices/soc0/hw_platform ]; then - hw_platform=`cat /sys/devices/soc0/hw_platform` - fi - case "$soc_id" in - "239") - case "$hw_platform" in - "Surf") - case "$platform_subtype_id" in - "1") - setprop qemu.hw.mainkeys 0 - ;; - esac - ;; - "MTP") - case "$platform_subtype_id" in - "3") - setprop qemu.hw.mainkeys 0 - ;; - esac - ;; - esac - ;; - esac - ;; "msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845") start_msm_irqbalance ;; - "msm8996") - if [ -f /sys/devices/soc0/hw_platform ]; then - hw_platform=`cat /sys/devices/soc0/hw_platform` - fi - case "$hw_platform" in - "MTP" | "CDP") - #Loop through the sysfs nodes and determine the correct sysfs to change the permission and ownership. - for count in 0 1 2 3 4 5 6 7 8 9 10 - do - dir="/sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input"$count - if [ -d "$dir" ]; then - chmod 0660 $dir/secure_touch_enable - chmod 0440 $dir/secure_touch - chown system.drmrpc $dir/secure_touch_enable - chown system.drmrpc $dir/secure_touch - break - fi - done - ;; - esac - ;; - "msm8909") - start_vm_bms - ;; - "msm8937") - start_msm_irqbalance_8939 - if [ -f /sys/devices/soc0/soc_id ]; then - soc_id=`cat /sys/devices/soc0/soc_id` - else - soc_id=`cat /sys/devices/system/soc/soc0/id` - fi - - if [ -f /sys/devices/soc0/hw_platform ]; then - hw_platform=`cat /sys/devices/soc0/hw_platform` - else - hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$soc_id" in - "294" | "295" | "303" | "307" | "308" | "309" | "313" | "320") - case "$hw_platform" in - "Surf") - setprop qemu.hw.mainkeys 0 - ;; - "MTP") - setprop qemu.hw.mainkeys 0 - ;; - "RCM") - setprop qemu.hw.mainkeys 0 - ;; - "QRD") - setprop qemu.hw.mainkeys 0 - ;; - esac - ;; - esac - ;; - "msm8953") - start_msm_irqbalance_8939 - if [ -f /sys/devices/soc0/soc_id ]; then - soc_id=`cat /sys/devices/soc0/soc_id` - else - soc_id=`cat /sys/devices/system/soc/soc0/id` - fi - - if [ -f /sys/devices/soc0/hw_platform ]; then - hw_platform=`cat /sys/devices/soc0/hw_platform` - else - hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform` - fi - case "$soc_id" in - "293" | "304" | "338" ) - case "$hw_platform" in - "Surf") - setprop qemu.hw.mainkeys 0 - ;; - "MTP") - setprop qemu.hw.mainkeys 0 - ;; - "RCM") - setprop qemu.hw.mainkeys 0 - ;; - "QRD") - setprop qemu.hw.mainkeys 0 - ;; - esac - ;; - esac - ;; esac # diff --git a/rootdir/etc/init.mata.ramdump.rc b/rootdir/etc/init.mata.ramdump.rc index 630195ac..77c6ffd6 100644 --- a/rootdir/etc/init.mata.ramdump.rc +++ b/rootdir/etc/init.mata.ramdump.rc @@ -65,49 +65,8 @@ on property:persist.sys.crash_dumps=2 write /sys/bus/msm_subsys/devices/subsys5/restart_level SYSTEM write /sys/bus/msm_subsys/devices/subsys6/restart_level SYSTEM -#For SSR ramdump -#Check whether need do ssr ramdump -on property:persist.sys.fih.ramdump_ssr=1 && property:sys.boot_completed=1 - write /sys/module/subsystem_restart/parameters/enable_ramdumps 1 - start ssr_ramdump - -on property:persist.sys.fih.ramdump_ssr=0 && property:sys.boot_completed=1 - write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 - stop ssr_ramdump - -on property:persist.sys.qxdm_logs=1 && property:sys.boot_completed=1 - start mdlog_start - -on property:persist.sys.qxdm_logs=0 && property:sys.boot_completed=1 - start mdlog_stop - -#subsystem_ramdump as a SSR restart monitor & ramdump generator -service ssr_ramdump /system/vendor/bin/subsystem_ramdump 2 0 0 - user root - group root - disabled - -on boot - start ssr_diag - # Host RamDump on property:persist.debug.host.ramdump=1 write /sys/module/msm_poweroff/parameters/download_mode 1 on property:persist.debug.host.ramdump=0 write /sys/module/msm_poweroff/parameters/download_mode 0 - -# QXDM logs - -service mdlog_start /system/vendor/bin/diag_mdlog -f ${persist.sys.qxdm_cfg_file} - class late_start - user system - group system diag sdcard_rw sdcard_r media_rw oem_2901 - disabled - oneshot - -service mdlog_stop /system/vendor/bin/diag_mdlog -k - class late_start - user system - group system diag sdcard_rw sdcard_r media_rw oem_2901 - disabled - oneshot diff --git a/rootdir/etc/init.mata.rc b/rootdir/etc/init.mata.rc index 27f92180..7e3c06d8 100644 --- a/rootdir/etc/init.mata.rc +++ b/rootdir/etc/init.mata.rc @@ -510,7 +510,6 @@ on boot chown system system /sys/class/leds/green/blink chown system system /sys/class/leds/blue/blink start rmt_storage - start rfs_access write /dev/cpuset/top-app/cpus 0-3 write /dev/cpuset/foreground/cpus 0-3 write /dev/cpuset/foreground/boost/cpus 0-3 @@ -559,29 +558,6 @@ on charger start hvdcp_opti setprop sys.usb.configfs 1 -service nqnfcinfo /system/vendor/bin/nqnfcinfo - class late_start - group nfc - user system - oneshot - -service iop /system/vendor/bin/iop - class main - user root - group root - disabled - socket iop seqpacket 0666 root system - -service ssr_setup /system/vendor/bin/ssr_setup - oneshot - disabled - -service ss_ramdump /system/vendor/bin/subsystem_ramdump - class main - user system - group system - disabled - on property:debug.ftrace.file=* chmod 0660 ${debug.ftrace.file} chown system shell ${debug.ftrace.file} @@ -598,13 +574,8 @@ on property:persist.sys.modem_auth_timeout=* on property:persist.sys.pil_proxy_timeout=* write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} -on property:persist.sys.ssr.restart_level=* - start ssr_setup - on property:persist.sys.ssr.enable_ramdumps=1 write /sys/module/subsystem_restart/parameters/enable_ramdumps 1 - mkdir /data/ramdump 770 system system - start ss_ramdump on property:persist.sys.ssr.enable_ramdumps=0 write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 @@ -631,33 +602,6 @@ on property:persist.debug.trace=1 mkdir /data/core 0777 root root write /proc/sys/kernel/core_pattern "/data/core/%E.%p.%e" -on property:init.svc.wpa_supplicant=stopped - stop dhcpcd - -on property:bluetooth.sap.status=running - start bt-sap - -on property:bluetooth.sap.status=stopped - stop bt-sap - -on property:bluetooth.dun.status=running - start bt-dun - -on property:bluetooth.dun.status=stopped - stop bt-dun - -on property:bluetooth.startbtsnoop=true - start btsnoop - -on property:bluetooth.startbtsnoop=false - stop btsnoop - -on property:bluetooth.startbtlogger=true - start bt_logger - -on property:bluetooth.startbtlogger=false - stop bt_logger - service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh class core user root @@ -679,11 +623,6 @@ service cnd /system/vendor/bin/cnd user system group system wifi inet radio wakelock net_admin -service dpmQmiMgr /system/vendor/bin/dpmQmiMgr - class main - user system - group system - service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config" class core user root @@ -711,34 +650,6 @@ service start_hci_filter /system/vendor/bin/wcnss_filter group bluetooth diag system wakelock disabled -service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0 - class late_start - user bluetooth - group bluetooth net_bt_admin inet - disabled - oneshot - -service bt-sap /system/bin/sapd 15 - user bluetooth - group bluetooth net_bt_admin - class late_start - disabled - oneshot - -service btsnoop /system/bin/btsnoop - user bluetooth - group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw - class late_start - disabled - oneshot - -service bt_logger /system/bin/bt_logger - user bluetooth - group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw - class late_start - disabled - oneshot - service port-bridge /system/vendor/bin/port-bridge class main user radio @@ -746,12 +657,6 @@ service port-bridge /system/vendor/bin/port-bridge disabled oneshot -service qmiproxy /system/bin/qmiproxy - class main - user radio - group radio diag - disabled - service netmgrd /system/vendor/bin/netmgrd class main disabled @@ -787,24 +692,6 @@ on property:ro.data.large_tcp_window_size=true on property:sys.sysctl.tcp_adv_win_scale=* write /proc/sys/net/ipv4/tcp_adv_win_scale ${sys.sysctl.tcp_adv_win_scale} -service amp_init /system/vendor/bin/amploader -i - class late_start - user root - disabled - oneshot - -service amp_load /system/vendor/bin/amploader -l 7000 - class late_start - user root - disabled - oneshot - -service amp_unload /system/vendor/bin/amploader -u - class late_start - user root - disabled - oneshot - service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ -I/vendor/etc/wifi/p2p_supplicant_overlay.conf -N \ @@ -821,70 +708,6 @@ service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ disabled oneshot -# FST Manager with hostapd (softap) - all settings inside ini file -service fstman /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini - user wifi - group wifi net_admin net_raw - class main - disabled - oneshot - -# FST Manager with supplicant - connect to supplicant socket -service fstman_wlan0 /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini @android:wpa_wlan0 - user wifi - group wifi net_admin net_raw - class main - disabled - oneshot - -on property:netd.fstman.start=true - start fstman - -on property:netd.fstman.start=false - stop fstman - -service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG - class late_start - disabled - oneshot - -service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG - class late_start - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -ABKLG - class late_start - disabled - oneshot - -service iprenew_wlan0 /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service iprenew_bond0 /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service iprenew_p2p /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service ptt_socket_app /system/vendor/bin/ptt_socket_app -d - class main - user root - group root - oneshot - -service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d - user root - group root - disabled - oneshot - service cnss_diag /system/vendor/bin/cnss_diag -q -f class main user system @@ -900,63 +723,11 @@ service cnss-daemon /system/vendor/bin/cnss-daemon -n -l on property:sys.shutdown.requested=* stop cnss-daemon -service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG - class late_start - disabled - oneshot - -service iprenew_bt-pan /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service mlid /vendor/bin/mlid - class late_start - user gps - group gps - socket mlid stream 0666 gps gps - service loc_launcher /system/vendor/bin/loc_launcher # loc_launcher will start as root and set its uid to gps class late_start group gps inet diag wifi -on property:crypto.driver.load=1 - insmod /system/lib/modules/qce.ko - insmod /system/lib/modules/qcedev.ko - -service drmdiag /system/vendor/bin/drmdiagapp - class late_start - user root - disabled - oneshot - -on property:drmdiag.load=1 - start drmdiag - -on property:drmdiag.load=0 - stop drmdiag - service qcom-sh /vendor/bin/init.qcom.sh class late_start user root @@ -979,12 +750,6 @@ service devstart_sh /vendor/bin/init.qcom.devstart.sh group root oneshot -service wifi-crda /vendor/bin/init.crda.sh - class late_start - user root - disabled - oneshot - on property:sys.boot_completed=1 start qcom-post-boot @@ -998,81 +763,15 @@ service atfwd /vendor/bin/ATFWD-daemon user system group system radio -service hostapd_fst /vendor/bin/hostapd -dd -g /data/vendor/wifi/hostapd/global /data/vendor/wifi/hostapd.conf - class late_start - user wifi - group wifi inet keystore net_admin net_raw - oneshot - disabled - -service ims_regmanager /system/vendor/bin/exe-ims-regmanagerprocessnative - class late_start - group net_bt_admin inet radio wifi - disabled - -on property:persist.ims.regmanager.mode=1 - start ims_regmanager - on property:ro.data.large_tcp_window_size=true # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) write /proc/sys/net/ipv4/tcp_adv_win_scale 2 -service battery_monitor /system/bin/battery_monitor - user system - group system - disabled - -service ril-daemon2 /vendor/bin/hw/rild -c 2 - class main - socket rild2 stream 660 root radio - socket rild-debug2 stream 660 radio system - user radio - disabled - group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log - capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW - -service ril-daemon3 /vendor/bin/hw/rild -c 3 - class main - socket rild3 stream 660 root radio - socket rild-debug3 stream 660 radio system - user radio - disabled - group radio cache inet misc audio sdcard_r sdcard_rw diag oem_2901 log - capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW - -service profiler_daemon /system/bin/profiler_daemon - class late_start - user root - group root - disabled - service charger /charger class charger group system graphics input seclabel u:r:charger:s0 -service ssr_diag /system/vendor/bin/ssr_diag - class late_start - user system - group system - disabled - -service hvdcp /system/bin/hvdcp - class core - user root - disabled - -on property:persist.usb.hvdcp.detect=true - start hvdcp - -on property:persist.usb.hvdcp.detect=false - stop hvdcp - -service charger_monitor /system/bin/charger_monitor - user root - group root - disabled - service qbcharger /charger -m 1 disabled oneshot @@ -1083,34 +782,17 @@ on property:sys.qbcharger.enable=true on property:sys.qbcharger.enable=false stop qbcharger -service vm_bms /vendor/bin/vm_bms - user root - group root - disabled - service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf class core user root group root disabled -# add poweroffhandler -service poweroffhandler /system/vendor/bin/poweroffhandler - class core - user media - group graphics audio - disabled - oneshot - service time_daemon /system/vendor/bin/time_daemon class main user root group root -# Set vendor-ril lib path based on Meta version -on property:vendor.rild.libpath=* - setprop rild.libpath ${vendor.rild.libpath} - # Needed for OTA control on property:ro.boot.carrier.sku=* setprop ro.oem.key1 ${ro.boot.carrier.sku}