diff --git a/Android.mk b/Android.mk
index b0971c02b..c376480d3 100644
--- a/Android.mk
+++ b/Android.mk
@@ -6,9 +6,8 @@
LOCAL_PATH := $(call my-dir)
-ifneq ($(filter grus sirius,$(TARGET_DEVICE)),)
- subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
- $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))
+ifneq ($(filter sirius,$(TARGET_DEVICE)),)
+include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
@@ -81,4 +80,20 @@ $(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_CDSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS)
+WCNSS_INI_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini
+$(WCNSS_INI_SYMLINK): $(LOCAL_INSTALLED_MODULE)
+ @echo "WCNSS config ini link: $@"
+ @mkdir -p $(dir $@)
+ @rm -rf $@
+ $(hide) ln -sf /vendor/etc/wifi/$(notdir $@) $@
+
+WCNSS_MAC_SYMLINK := $(TARGET_OUT_VENDOR)/firmware/wlan/qca_cld/wlan_mac.bin
+$(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE)
+ @echo "WCNSS MAC bin link: $@"
+ @mkdir -p $(dir $@)
+ @rm -rf $@
+ $(hide) ln -sf /mnt/vendor/persist/$(notdir $@) $@
+
+ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_INI_SYMLINK) $(WCNSS_MAC_SYMLINK)
+
endif
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index a5327f0cf..3496b1c9a 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -13,7 +13,7 @@ TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
-TARGET_CPU_VARIANT := kryo300
+TARGET_CPU_VARIANT := cortex-a75
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-a
@@ -29,22 +29,21 @@ TARGET_NO_BOOTLOADER := true
# Kernel
BOARD_KERNEL_BASE := 0x00000000
-BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000 androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.usbcontroller=a600000.dwc3
+BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xA84000 androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 androidboot.selinux=permissive
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
BOARD_KERNEL_PAGESIZE := 4096
-BOARD_KERNEL_SEPARATED_DTBO := true
BOARD_KERNEL_TAGS_OFFSET := 0x00000100
BOARD_RAMDISK_OFFSET := 0x01000000
TARGET_KERNEL_ARCH := arm64
ifeq ($(TARGET_PREBUILT_KERNEL),)
TARGET_KERNEL_CLANG_COMPILE := true
- TARGET_KERNEL_CLANG_VERSION := 9.0.6
TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
TARGET_KERNEL_SOURCE := kernel/xiaomi/sdm710
endif
# Platform
-TARGET_BOARD_PLATFORM := sdm710
+#TARGET_BOARD_PLATFORM := sdm710
+FORCE_QCOM_DISPLAY_HAL_VARIANT := sdm845
TARGET_BOARD_PLATFORM_GPU := qcom-adreno616
# Audio
@@ -67,9 +66,10 @@ BOARD_CHARGER_ENABLE_SUSPEND := true
# Dex
ifeq ($(HOST_OS),linux)
ifneq ($(TARGET_BUILD_VARIANT),eng)
- WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false
+ WITH_DEXPREOPT ?= true
endif
endif
+WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY ?= true
# DRM
TARGET_ENABLE_MEDIADRM_64 := true
@@ -88,10 +88,13 @@ DEVICE_FRAMEWORK_MANIFEST_FILE := $(COMMON_PATH)/framework_manifest.xml
DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
# Partitions
+BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
-BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
+BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3006477107
BOARD_USERDATAIMAGE_PARTITION_SIZE := 57453555712
+BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64)
BOARD_ROOT_EXTRA_SYMLINKS := \
@@ -109,6 +112,7 @@ TARGET_COPY_OUT_VENDOR := vendor
# QCOM
BOARD_USES_QCOM_HARDWARE := true
+BUILD_WITHOUT_VENDOR := true
# Recovery
TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
@@ -121,14 +125,19 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
# RIL
+ENABLE_VENDOR_RIL_SERVICE := true
TARGET_PROVIDES_QTI_TELEPHONY_JAR := true
TARGET_RIL_VARIANT := caf
+# Security patch level
+VENDOR_SECURITY_PATCH := 2018-06-05
+
# Sepolicy
-BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private
+include device/qcom/sepolicy/sepolicy.mk
-BOARD_PLAT_PRIVATE_SEPOLICY_DIR += device/qcom/sepolicy/private
-BOARD_PLAT_PUBLIC_SEPOLICY_DIR += device/qcom/sepolicy/public
+BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/private
+BOARD_PLAT_PUBLIC_SEPOLICY_DIR += $(COMMON_PATH)/sepolicy/public
+BOARD_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += $(COMMON_PATH)
@@ -137,6 +146,7 @@ PRODUCT_SOONG_NAMESPACES += $(COMMON_PATH)
TARGET_USES_ALTERNATIVE_MANUAL_NETWORK_SELECT := true
# Treble
+BOARD_VNDK_RUNTIME_DISABLE := true
BOARD_VNDK_VERSION := current
PRODUCT_FULL_TREBLE_OVERRIDE := true
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index d64569567..000000000
--- a/LICENSE
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- 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.
diff --git a/README.md b/README.md
index d571c8546..5f3ac471b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
-Copyright (C) 2018-2019 - The LineageOS Project
-Copyright (C) 2019 - The XenonHD Project
+Copyright (C) 2018 - The LineageOS Project
Common device tree for Xiaomi SDM710 based devices
==============
diff --git a/bluetooth/include/bdroid_buildcfg.h b/bluetooth/include/bdroid_buildcfg.h
index 422f606ae..177b3c282 100644
--- a/bluetooth/include/bdroid_buildcfg.h
+++ b/bluetooth/include/bdroid_buildcfg.h
@@ -34,8 +34,13 @@ typedef struct {
} device_t;
static const device_t devices[] = {
- {"grus", "Xiaomi Mi 9 SE"},
+ {"beryllium", "Pocophone F1"},
+ {"dipper", "Xiaomi Mi 8"},
{"sirius", "Xiaomi Mi 8 SE"},
+ {"equuleus", "Xiaomi Mi 8 Pro"},
+ {"perseus", "Xiaomi Mi MIX 3"},
+ {"polaris", "Xiaomi Mi MIX 2S"},
+ {"ursa", "Xiaomi Mi 8 Explorer Edition"},
};
static inline const char *BtmGetDefaultName()
diff --git a/common-props.mk b/common-props.mk
index 1618b4ad2..dda822ffa 100644
--- a/common-props.mk
+++ b/common-props.mk
@@ -1,19 +1,58 @@
# Audio
PRODUCT_PROPERTY_OVERRIDES += \
+ af.fast_track_multiplier=1 \
audio.deep_buffer.media=true \
+ audio.offload.min.duration.secs=20 \
+ persist.vendor.audio.button_jack.profile=volume \
+ persist.vendor.audio.button_jack.switch=0 \
+ persist.vendor.audio.fluence.speaker=true \
+ persist.vendor.audio.fluence.voicecall=true \
+ persist.vendor.audio.fluence.voicerec=false \
+ persist.vendor.audio.ras.enabled=false \
ro.af.client_heap_size_kbyte=7168 \
ro.config.media_vol_steps=25 \
- ro.config.vc_call_vol_steps=7
+ ro.config.vc_call_vol_steps=11 \
+ ro.vendor.audio.sdk.fluencetype=fluence \
+ ro.vendor.audio.sdk.ssr=false \
+ ro.vendor.audio.soundfx.usb=true \
+ vendor.audio.adm.buffering.ms=6 \
+ vendor.audio.dolby.ds2.enabled=false \
+ vendor.audio.dolby.ds2.hardbypass=false \
+ vendor.audio.enable.dp.for.voice=false \
+ vendor.audio.flac.sw.decoder.24bit=true \
+ vendor.audio_hal.in_period_size=144 \
+ vendor.audio.hal.output.suspend.supported=false \
+ vendor.audio_hal.period_size=192 \
+ vendor.audio_hal.period_multiplier=3 \
+ vendor.audio.hw.aac.encoder=false \
+ vendor.audio.noisy.broadcast.delay=600 \
+ vendor.audio.offload.buffer.size.kb=32 \
+ vendor.audio.offload.gapless.enabled=true \
+ vendor.audio.offload.multiaac.enable=true \
+ vendor.audio.offload.multiple.enabled=true \
+ vendor.audio.offload.passthrough=false \
+ vendor.audio.offload.pstimeout.secs=3 \
+ vendor.audio.offload.track.enable=false \
+ vendor.audio.parser.ip.buffer.size=262144 \
+ vendor.voice.path.for.pcm.voip=false \
+ vendor.audio.safx.pbe.enabled=true \
+ vendor.audio.tunnel.encode=false \
+ vendor.audio.use.sw.alac.decoder=true \
+ vendor.audio.use.sw.ape.decoder=true
# Bluetooth
PRODUCT_PROPERTY_OVERRIDES += \
- vendor.bluetooth.soc=cherokee
+ persist.vendor.bt.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac \
+ persist.vendor.bt.enable.splita2dp=true \
+ vendor.bluetooth.soc=cherokee \
+ vendor.qcom.bluetooth.soc=cherokee
# Camera
PRODUCT_PROPERTY_OVERRIDES += \
camera.disable_zsl_mode=true \
vendor.camera.aux.packagelist=org.codeaurora.snapcam,com.android.camera,org.lineageos.snap
+
# CNE and DPM
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.cne.feature=1 \
@@ -21,48 +60,63 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.dpm.loglevel=0 \
persist.vendor.dpm.nsrm.bkg.evt=3955
+# Dalvik heap
+PRODUCT_PROPERTY_OVERRIDES += \
+ dalvik.vm.heapstartsize=8m \
+ dalvik.vm.heapsize=512m \
+ dalvik.vm.heaptargetutilization=0.75 \
+ dalvik.vm.heapminfree=512k \
+ dalvik.vm.heapmaxfree=8m
+
# Data modules
PRODUCT_PROPERTY_OVERRIDES += \
persist.data.df.dev_name=rmnet_usb0 \
- persist.data.netmgrd.qos.enable=true \
persist.vendor.data.profile_update=true \
persist.vendor.data.mode=concurrent \
ro.vendor.use_data_netmgrd=true
+# Display features
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.df.extcolor.proc=0 \
+ persist.vendor.max.brightness=0
+
# Display post-processing
PRODUCT_PROPERTY_OVERRIDES += \
ro.qualcomm.cabl=0 \
ro.vendor.display.ad=1 \
ro.vendor.display.ad.hdr_calib_data=/vendor/etc/hdr_config.cfg \
ro.vendor.display.ad.sdr_calib_data=/vendor/etc/sdr_config.cfg \
- ro.vendor.display.sensortype=2 \
- vendor.display.enable_default_color_mode=0
+ ro.vendor.display.sensortype=2
+
+# DRM
+PRODUCT_PROPERTY_OVERRIDES += \
+ drm.service.enabled=true
+
+# FRP
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.frp.pst=/dev/block/bootdevice/by-name/frp \
# Graphics
PRODUCT_PROPERTY_OVERRIDES += \
+ debug.egl.hw=0 \
debug.sf.disable_backpressure=1 \
debug.sf.enable_hwc_vds=1 \
+ debug.sf.latch_unsignaled=1 \
+ debug.sf.hw=0 \
+ persist.demo.hdmirotationlock=false \
+ persist.sys.sf.native_mode=0 \
+ ro.opengles.version=196610 \
sdm.debug.disable_inline_rotator=1 \
- sdm.debug.disable_inline_rotator_secure=1 \
- sdm.drop_skewed_vsync=1
-
-# IMS
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.dbg.ims_volte_enable=1 \
- persist.dbg.volte_avail_ovr=1 \
- persist.dbg.vt_avail_ovr=1 \
- persist.dbg.wfc_avail_ovr=1
+ sdm.debug.disable_inline_rotator_secure=1
# Media
PRODUCT_PROPERTY_OVERRIDES += \
- audio.offload.video=true
+ audio.offload.video=true \
+ media.settings.xml=/system/etc/media_profiles_vendor.xml
# Memory optimizations
PRODUCT_PROPERTY_OVERRIDES += \
- ro.vendor.qti.am.reschedule_service=true \
- ro.vendor.qti.sys.fw.bservice_age=5000 \
- ro.vendor.qti.sys.fw.bservice_enable=true \
- ro.vendor.qti.sys.fw.bservice_limit=5
+ ro.vendor.qti.sys.fw.bservice_enable=true
# Netflix custom property
PRODUCT_PROPERTY_OVERRIDES += \
@@ -70,25 +124,33 @@ PRODUCT_PROPERTY_OVERRIDES += \
# Perf
PRODUCT_PROPERTY_OVERRIDES += \
+ ro.vendor.extension_library=libqti-perfd-client.so \
ro.vendor.qti.core_ctl_min_cpu=4 \
ro.vendor.qti.core_ctl_max_cpu=6 \
+ ro.vendor.qti.sys.fw.bg_apps_limit=60 \
vendor.iop.enable_prefetch_ofr=0 \
vendor.iop.enable_uxe=0
# RCS and IMS
PRODUCT_PROPERTY_OVERRIDES += \
- persist.rcs.supported=0
+ persist.rcs.supported=0 \
+ persist.vendor.ims.disableUserAgent=0
# RIL
PRODUCT_PROPERTY_OVERRIDES += \
DEVICE_PROVISIONED=1 \
- persist.vendor.radio.atfwd.start=true \
+ persist.radio.multisim.config=dsds \
+ persist.vendor.radio.apm_sim_not_pwdn=1 \
+ persist.vendor.radio.custom_ecc=1 \
persist.vendor.radio.flexmap_type=none \
persist.vendor.radio.force_on_dc=true \
+ persist.vendor.radio.rat_on=combine \
persist.vendor.radio.redir_party_num=1 \
persist.vendor.radio.report_codec=1 \
+ persist.vendor.radio.sib16_support=1 \
ril.subscription.types=NV,RUIM \
- ro.telephony.default_cdma_sub=0 \
+ rild.libpath=/vendor/lib64/libril-qc-hal-qmi.so \
+ ro.com.android.dataroaming=true \
ro.telephony.default_network=22,22 \
telephony.lteOnCdmaDevice=1
diff --git a/configs/media_profiles_vendor.xml b/configs/media_profiles_vendor.xml
new file mode 100644
index 000000000..0bd827d74
--- /dev/null
+++ b/configs/media_profiles_vendor.xml
@@ -0,0 +1,751 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/extract-files.sh b/extract-files.sh
old mode 100755
new mode 100644
index 34d33e098..69dfaf136
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -1,7 +1,6 @@
#!/bin/bash
#
# Copyright (C) 2018-2019 The LineageOS Project
-# Copyright (C) 2019 The XenonHD Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -12,9 +11,9 @@ set -e
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
-XENONHD_ROOT="${MY_DIR}"/../../..
+LINEAGE_ROOT="${MY_DIR}"/../../..
-HELPER="${XENONHD_ROOT}/vendor/xenonhd/build/tools/extract_utils.sh"
+HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
@@ -51,7 +50,7 @@ if [ -z "${SRC}" ]; then
fi
# Initialize the helper for common device
-setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${XENONHD_ROOT}" true "${CLEAN_VENDOR}"
+setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
"${KANG}" --section "${SECTION}"
@@ -59,7 +58,7 @@ extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
# Reinitialize the helper for device
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
- setup_vendor "${DEVICE}" "${VENDOR}" "${XENONHD_ROOT}" false "${CLEAN_VENDOR}"
+ setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false "${CLEAN_VENDOR}"
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" \
"${KANG}" --section "${SECTION}"
diff --git a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc
index 19ea5347c..a39fd36cc 100644
--- a/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc
+++ b/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc
@@ -1,3 +1,12 @@
+service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service
+ # "class hal" causes a race condition on some devices due to files created
+ # in /data. As a workaround, postpone startup until later in boot once
+ # /data is mounted.
+ class late_start
+ user system
+ group system input
+ #writepid /dev/cpuset/system-background/tasks
+
on init
# Goodix fingerprint
chown system system /dev/goodix_fp
@@ -22,12 +31,8 @@ on boot
chmod 0660 /sys/bus/platform/devices/soc:fingerprint_fpc/regulator_enable
chmod 0660 /sys/bus/platform/devices/soc:fingerprint_fpc/screen_status
chmod 0660 /sys/bus/platform/devices/soc:fingerprint_fpc/vreg_op_cnt
-
- chown system system /sys/devices/platform/soc/soc:fingerprint_goodix/proximity_state
-
chown system system /sys/class/drm/card0-DSI-1/disp_param
chmod 0700 /sys/class/drm/card0-DSI-1/disp_param
-
chmod 0666 /dev/input/event2
on post-fs-data
@@ -36,14 +41,5 @@ on post-fs-data
chown system system /data/vendor
chgrp system system /data/vendor
-service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service
- # "class hal" causes a race condition on some devices due to files created
- # in /data. As a workaround, postpone startup until later in boot once
- # /data is mounted.
- class late_start
- user system
- group system input
- writepid /dev/cpuset/system-background/tasks
-
on property:vendor.fps_hal.restartimes=max
stop vendor.fps_hal
diff --git a/fod/Android.bp b/fod/Android.bp
deleted file mode 100644
index 784ed91cb..000000000
--- a/fod/Android.bp
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright (C) 2019 The LineageOS 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.
-
-xiaomi_sdm710_fod_hal_binary {
- relative_install_path: "hw",
- defaults: ["hidl_defaults"],
- name: "lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710",
- init_rc: ["lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710.rc"],
- srcs: [
- "service.cpp",
- "FingerprintInscreen.cpp",
- ],
- shared_libs: [
- "libbase",
- "libhardware",
- "libhidlbase",
- "libhidltransport",
- "liblog",
- "libhwbinder",
- "libutils",
- "vendor.lineage.biometrics.fingerprint.inscreen@1.0",
- "vendor.xiaomi.hardware.fingerprintextension@1.0",
- ],
-}
diff --git a/fod/FingerprintInscreen.cpp b/fod/FingerprintInscreen.cpp
deleted file mode 100644
index daca7b33b..000000000
--- a/fod/FingerprintInscreen.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2019 The LineageOS 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.
- */
-
-#define LOG_TAG "FingerprintInscreenService"
-
-#include "FingerprintInscreen.h"
-
-#include
-#include
-#include
-
-#define COMMAND_NIT 10
-#define PARAM_NIT_FOD 3
-#define PARAM_NIT_NONE 0
-
-#define DISPPARAM_PATH "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/disp_param"
-#define DISPPARAM_FOD_BACKLIGHT_HBM "0x1D007FF"
-#define DISPPARAM_FOD_BACKLIGHT_RESET "0x2D01000"
-
-#define FOD_STATUS_PATH "/sys/devices/virtual/touch/tp_dev/fod_status"
-#define FOD_STATUS_ON 1
-#define FOD_STATUS_OFF 0
-
-namespace {
-
-template
-static void set(const std::string& path, const T& value) {
- std::ofstream file(path);
- file << value;
-}
-
-} // anonymous namespace
-
-namespace vendor {
-namespace lineage {
-namespace biometrics {
-namespace fingerprint {
-namespace inscreen {
-namespace V1_0 {
-namespace implementation {
-
-FingerprintInscreen::FingerprintInscreen() {
- xiaomiFingerprintService = IXiaomiFingerprint::getService();
-}
-
-Return FingerprintInscreen::getPositionX() {
- return FOD_POS_X;
-}
-
-Return FingerprintInscreen::getPositionY() {
- return FOD_POS_Y;
-}
-
-Return FingerprintInscreen::getSize() {
- return FOD_SIZE;
-}
-
-Return FingerprintInscreen::onStartEnroll() {
- return Void();
-}
-
-Return FingerprintInscreen::onFinishEnroll() {
- return Void();
-}
-
-Return FingerprintInscreen::onPress() {
- set(DISPPARAM_PATH, DISPPARAM_FOD_BACKLIGHT_HBM);
- xiaomiFingerprintService->extCmd(COMMAND_NIT, PARAM_NIT_FOD);
- return Void();
-}
-
-Return FingerprintInscreen::onRelease() {
- set(DISPPARAM_PATH, DISPPARAM_FOD_BACKLIGHT_RESET);
- xiaomiFingerprintService->extCmd(COMMAND_NIT, PARAM_NIT_NONE);
- return Void();
-}
-
-Return FingerprintInscreen::onShowFODView() {
- set(FOD_STATUS_PATH, FOD_STATUS_ON);
- return Void();
-}
-
-Return FingerprintInscreen::onHideFODView() {
- set(FOD_STATUS_PATH, FOD_STATUS_OFF);
- set(DISPPARAM_PATH, DISPPARAM_FOD_BACKLIGHT_RESET);
- xiaomiFingerprintService->extCmd(COMMAND_NIT, PARAM_NIT_NONE);
- return Void();
-}
-
-Return FingerprintInscreen::handleAcquired(int32_t acquiredInfo, int32_t vendorCode) {
- LOG(ERROR) << "acquiredInfo: " << acquiredInfo << ", vendorCode: " << vendorCode << "\n";
- return false;
-}
-
-Return FingerprintInscreen::handleError(int32_t error, int32_t vendorCode) {
- LOG(ERROR) << "error: " << error << ", vendorCode: " << vendorCode << "\n";
- return false;
-}
-
-Return FingerprintInscreen::setLongPressEnabled(bool) {
- return Void();
-}
-
-Return FingerprintInscreen::getDimAmount(int32_t brightness) {
- float alpha;
-
- if (brightness > 62) {
- alpha = 1.0 - pow(brightness / 255.0 * 430.0 / 600.0, 0.45);
- } else {
- alpha = 1.0 - pow(brightness / 200.0, 0.45);
- }
-
- return 255 * alpha;
-}
-
-Return FingerprintInscreen::shouldBoostBrightness() {
- return false;
-}
-
-Return FingerprintInscreen::setCallback(const sp<::vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreenCallback>& callback) {
- (void) callback;
- return Void();
-}
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace inscreen
-} // namespace fingerprint
-} // namespace biometrics
-} // namespace lineage
-} // namespace vendor
diff --git a/fod/FingerprintInscreen.h b/fod/FingerprintInscreen.h
deleted file mode 100644
index 30f362bc2..000000000
--- a/fod/FingerprintInscreen.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2019 The LineageOS 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.
- */
-
-#ifndef VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
-#define VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
-
-#include
-#include
-
-namespace vendor {
-namespace lineage {
-namespace biometrics {
-namespace fingerprint {
-namespace inscreen {
-namespace V1_0 {
-namespace implementation {
-
-using ::android::sp;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::vendor::xiaomi::hardware::fingerprintextension::V1_0::IXiaomiFingerprint;
-
-class FingerprintInscreen : public IFingerprintInscreen {
-public:
- FingerprintInscreen();
- Return getPositionX() override;
- Return getPositionY() override;
- Return getSize() override;
- Return onStartEnroll() override;
- Return onFinishEnroll() override;
- Return onPress() override;
- Return onRelease() override;
- Return onShowFODView() override;
- Return onHideFODView() override;
- Return handleAcquired(int32_t acquiredInfo, int32_t vendorCode) override;
- Return handleError(int32_t error, int32_t vendorCode) override;
- Return setLongPressEnabled(bool enabled) override;
- Return getDimAmount(int32_t brightness) override;
- Return shouldBoostBrightness() override;
- Return setCallback(const sp<::vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreenCallback>& callback) override;
-
-private:
- sp xiaomiFingerprintService;
-};
-
-} // namespace implementation
-} // namespace V1_0
-} // namespace inscreen
-} // namespace fingerprint
-} // namespace biometrics
-} // namespace lineage
-} // namespace vendor
-
-#endif // VENDOR_LINEAGE_BIOMETRICS_FINGERPRINT_INSCREEN_V1_0_FINGERPRINTINSCREEN_H
diff --git a/fod/lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710.rc b/fod/lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710.rc
deleted file mode 100644
index 10ff035ad..000000000
--- a/fod/lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710.rc
+++ /dev/null
@@ -1,6 +0,0 @@
-service fingerprint-inscreen-1-0 /system/bin/hw/lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710
- interface vendor.lineage.biometrics.fingerprint.inscreen@1.0::IFingerprintInscreen default
- class hal
- user system
- group system
- shutdown critical
diff --git a/fod/service.cpp b/fod/service.cpp
deleted file mode 100644
index 9e7505372..000000000
--- a/fod/service.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2019 The LineageOS 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.
- */
-
-#define LOG_TAG "lineage.biometrics.fingerprint.inscreen@1.0-service.xiaomi_sdm710"
-
-#include
-#include
-
-#include "FingerprintInscreen.h"
-
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-
-using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::IFingerprintInscreen;
-using vendor::lineage::biometrics::fingerprint::inscreen::V1_0::implementation::FingerprintInscreen;
-
-using android::OK;
-using android::status_t;
-
-int main() {
- android::sp service = new FingerprintInscreen();
-
- configureRpcThreadpool(1, true);
-
- status_t status = service->registerAsService();
- if (status != OK) {
- LOG(ERROR) << "Cannot register FOD HAL service.";
- return 1;
- }
-
- LOG(INFO) << "FOD HAL service ready.";
-
- joinRpcThreadpool();
-
- LOG(ERROR) << "FOD HAL service failed to join thread pool.";
- return 1;
-}
diff --git a/framework_compatibility_matrix.xml b/framework_compatibility_matrix.xml
index 17ab9a314..2483adf88 100644
--- a/framework_compatibility_matrix.xml
+++ b/framework_compatibility_matrix.xml
@@ -1,20 +1,4 @@
-
- android.hardware.biometrics.fingerprint
- 2.1
-
- IBiometricsFingerprint
- default
-
-
-
- android.hardware.biometrics.fingerprint
- 2.1
-
- IBiometricsFingerprint
- default
-
-
android.hardware.gnss
1.0-1
@@ -31,6 +15,14 @@
gnss_vendor
+
+ android.hardware.health
+ 2.0
+
+ IHealth
+ default
+
+
android.hardware.nfc
1.0
@@ -53,6 +45,16 @@
slot2
+
+ android.hardware.secure_element
+ 1.0
+
+ ISecureElement
+ xiaomi-SIM1
+ xiaomi-SIM2
+ xiaomi-eSE1
+
+
android.hardware.wifi.supplicant
1.0
@@ -145,6 +147,22 @@
wifidisplayhdcphal
+
+ com.quicinc.cne.api
+ 1.0-1
+
+ IApiService
+ cnd
+
+
+
+ com.quicinc.cne.server
+ 2.0-2
+
+ IServer
+ cnd
+
+
vendor.display.color
1.0-2
@@ -155,7 +173,7 @@
vendor.display.config
- 1.0-6
+ 1.0-2
IDisplayConfig
default
@@ -176,6 +194,18 @@
IGoodixFingerprintDaemon
default
+
+ IGoodixFingerprintDaemonExt
+ default
+
+
+ IGoodixFingerprintDaemonFido
+ default
+
+
+ IGoodixFingerprintDaemonHbd
+ default
+
vendor.goodix.hardware.fingerprintextension
@@ -234,15 +264,6 @@
default
-
- vendor.qti.hardware.data.connection
- 1.0
-
- IDataConnection
- slot1
- slot2
-
-
vendor.qti.hardware.data.latency
1.0
@@ -259,14 +280,6 @@
default
-
- vendor.qti.hardware.fingerprint
- 1.0
-
- IQtiExtendedFingerprint
- default
-
-
vendor.qti.hardware.fm
1.0
@@ -275,14 +288,6 @@
default
-
- vendor.qti.hardware.improvetouch.touchcompanion
- 1.0
-
- ITouchCompanion
- TouchCompanionService
-
-
vendor.qti.hardware.iop
2.0
@@ -291,14 +296,6 @@
default
-
- vendor.qti.hardware.limits
- 1.0
-
- IThermal
- default
-
-
vendor.qti.hardware.perf
1.0
@@ -338,7 +335,7 @@
vendor.qti.hardware.radio.ims
- 1.0-4
+ 1.0-3
IImsRadio
imsradio0
@@ -366,7 +363,7 @@
vendor.qti.hardware.radio.qtiradio
1.0
- 2.0-1
+ 2.0
IQtiRadio
slot1
@@ -375,7 +372,6 @@
vendor.qti.hardware.radio.uim
- 1.0
1.1
IUim
@@ -386,7 +382,6 @@
vendor.qti.hardware.radio.uim_remote_client
1.0
- 1.1
IUimRemoteServiceClient
uimRemoteClient0
@@ -402,6 +397,14 @@
uimRemoteServer1
+
+ vendor.qti.hardware.scve.objecttracker
+ 1.0
+
+ IObjectTracker
+ objectTracker
+
+
vendor.qti.hardware.scve.panorama
1.0
@@ -470,14 +473,6 @@
default
-
- vendor.qti.hardware.wifi.wifilearner
- 1.0
-
- IWifiStats
- wifiStats
-
-
vendor.qti.hardware.wigig.netperftuner
1.0
@@ -494,14 +489,6 @@
default
-
- vendor.qti.hardware.wipower
- 1.0
-
- IWipower
- default
-
-
vendor.qti.ims.callinfo
1.0
@@ -526,6 +513,22 @@
default
+
+ vendor.synaptics.fingerprints.interfaces.extensions
+ 1.0
+
+ IFpCollection
+ default
+
+
+ INavigation
+ default
+
+
+ ISensorTest
+ default
+
+
vendor.xiaomi.hardware.citsensorservice
1.1
@@ -566,14 +569,6 @@
default
-
- vendor.xiaomi.hardware.misys
- 2.0
-
- IMiSys
- default
-
-
vendor.xiaomi.hardware.mlipay
1.0-1
@@ -599,10 +594,10 @@
- vendor.xiaomi.hardware.touchfeature
+ vendor.xiaomi.hardware.tpdbg
1.0
- ITouchFeature
+ ITpdbg
default
diff --git a/framework_manifest.xml b/framework_manifest.xml
index 9f98672bf..08d346953 100644
--- a/framework_manifest.xml
+++ b/framework_manifest.xml
@@ -8,16 +8,6 @@
default
-
- vendor.qti.hardware.radio.atcmdfwd
- hwbinder
- 1.0
-
- IAtCmdFwd
- AtCmdFwdService
-
- @1.0::IAtCmdFwd/AtCmdFwdService
-
vendor.qti.hardware.wifi.keystore
hwbinder
diff --git a/interfaces/Android.bp b/interfaces/Android.bp
deleted file mode 100644
index 7f1181727..000000000
--- a/interfaces/Android.bp
+++ /dev/null
@@ -1,4 +0,0 @@
-hidl_package_root {
- name: "vendor.xiaomi",
- path: "device/xiaomi/sdm710-common/interfaces",
-}
diff --git a/interfaces/hardware/fingerprintextension/1.0/Android.bp b/interfaces/hardware/fingerprintextension/1.0/Android.bp
deleted file mode 100644
index 27510cf10..000000000
--- a/interfaces/hardware/fingerprintextension/1.0/Android.bp
+++ /dev/null
@@ -1,14 +0,0 @@
-// This file is autogenerated by hidl-gen -Landroidbp.
-
-hidl_interface {
- name: "vendor.xiaomi.hardware.fingerprintextension@1.0",
- root: "vendor.xiaomi",
- srcs: [
- "IXiaomiFingerprint.hal",
- ],
- interfaces: [
- "android.hidl.base@1.0",
- ],
- gen_java: true,
-}
-
diff --git a/interfaces/hardware/fingerprintextension/1.0/IXiaomiFingerprint.hal b/interfaces/hardware/fingerprintextension/1.0/IXiaomiFingerprint.hal
deleted file mode 100644
index 33003f470..000000000
--- a/interfaces/hardware/fingerprintextension/1.0/IXiaomiFingerprint.hal
+++ /dev/null
@@ -1,16 +0,0 @@
-package vendor.xiaomi.hardware.fingerprintextension@1.0;
-
-interface IXiaomiFingerprint {
- /**
- * Call a fingerprint extension command.
- *
- * @param cmd the command to run, 10 for setting nit value.
- * @param param a parameter for the command; in case of command
- * 10, 0 will disable the fingerprint sensor, while { 1, 3, 4 }
- * will enable it, with 1 being the brightest and 4 being the
- * least bright.
- *
- * @return result the result of the operation.
- */
- extCmd(int32_t cmd, int32_t param) generates (int32_t result);
-};
diff --git a/interfaces/update-makefiles.sh b/interfaces/update-makefiles.sh
deleted file mode 100755
index f50ab2319..000000000
--- a/interfaces/update-makefiles.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
-
-do_makefiles_update \
- "vendor.xiaomi:device/xiaomi/sdm710-common/interfaces"
diff --git a/keylayout/gpio-keys.kl b/keylayout/sdm710-tavil-snd-card_Button_Jack.kl
similarity index 84%
rename from keylayout/gpio-keys.kl
rename to keylayout/sdm710-tavil-snd-card_Button_Jack.kl
index 12feebc42..07cb9016e 100644
--- a/keylayout/gpio-keys.kl
+++ b/keylayout/sdm710-tavil-snd-card_Button_Jack.kl
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, The Linux Foundation. All rights reserved.
+# Copyright (c) 2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -23,9 +23,8 @@
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-key 115 VOLUME_UP WAKE_DROPPED
-key 114 VOLUME_DOWN WAKE_DROPPED
-key 102 HOME WAKE_DROPPED
-key 528 FOCUS WAKE_DROPPED
-key 766 CAMERA WAKE_DROPPED
+key 226 HEADSETHOOK
+key 257 VOLUME_UP
+key 258 VOLUME_DOWN
diff --git a/light/Android.bp b/light/Android.bp
index 8624aad15..08a31479e 100644
--- a/light/Android.bp
+++ b/light/Android.bp
@@ -18,6 +18,7 @@ cc_binary {
name: "android.hardware.light@2.0-service.xiaomi_sdm710",
init_rc: ["android.hardware.light@2.0-service.xiaomi_sdm710.rc"],
srcs: ["service.cpp", "Light.cpp"],
+ vendor: true,
shared_libs: [
"android.hardware.light@2.0",
"libbase",
diff --git a/light/Light.cpp b/light/Light.cpp
index bd332ba63..d5bcff7e0 100644
--- a/light/Light.cpp
+++ b/light/Light.cpp
@@ -51,8 +51,8 @@ static T get(const std::string& path, const T& def) {
}
static constexpr int kDefaultMaxBrightness = 255;
-static constexpr int kRampSteps = 50;
-static constexpr int kRampMaxStepDurationMs = 5;
+static constexpr int kRampSteps = 15;
+static constexpr int kRampMaxStepDurationMs = 150;
static uint32_t getBrightness(const LightState& state) {
uint32_t alpha, red, green, blue;
diff --git a/light/android.hardware.light@2.0-service.xiaomi_sdm710.rc b/light/android.hardware.light@2.0-service.xiaomi_sdm710.rc
index 1c5aeb325..cff262ff0 100644
--- a/light/android.hardware.light@2.0-service.xiaomi_sdm710.rc
+++ b/light/android.hardware.light@2.0-service.xiaomi_sdm710.rc
@@ -1,21 +1,4 @@
-on boot
- chown system system /sys/class/leds/white/brightness
-
- chown system system /sys/class/leds/white/blink
- chown system system /sys/class/leds/white/duty_pcts
- chown system system /sys/class/leds/white/pause_hi
- chown system system /sys/class/leds/white/pause_lo
- chown system system /sys/class/leds/white/ramp_step_ms
- chown system system /sys/class/leds/white/start_idx
-
- chmod 660 /sys/class/leds/white/blink
- chmod 660 /sys/class/leds/white/duty_pcts
- chmod 660 /sys/class/leds/white/pause_hi
- chmod 660 /sys/class/leds/white/pause_lo
- chmod 660 /sys/class/leds/white/ramp_step_ms
- chmod 660 /sys/class/leds/white/start_idx
-
-service vendor.light-hal-2-0 /system/bin/hw/android.hardware.light@2.0-service.xiaomi_sdm710
+service vendor.light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service.xiaomi_sdm710
interface android.hardware.light@2.0::ILight default
class hal
user system
diff --git a/lineage.dependencies b/lineage.dependencies
new file mode 100644
index 000000000..d9903951f
--- /dev/null
+++ b/lineage.dependencies
@@ -0,0 +1,10 @@
+[
+ {
+ "repository": "android_kernel_xiaomi_sdm710",
+ "target_path": "kernel/xiaomi/sdm710"
+ },
+ {
+ "repository": "android_packages_resources_devicesettings",
+ "target_path": "packages/resources/devicesettings"
+ }
+]
diff --git a/livedisplay/Android.bp b/livedisplay/Android.bp
index 1c9039a19..7da58adb2 100644
--- a/livedisplay/Android.bp
+++ b/livedisplay/Android.bp
@@ -14,14 +14,15 @@
// limitations under the License.
cc_binary {
- name: "lineage.livedisplay@2.0-service.xiaomi_sdm710",
- init_rc: ["lineage.livedisplay@2.0-service.xiaomi_sdm710.rc"],
+ name: "vendor.lineage.livedisplay@2.0-service.xiaomi_sdm710",
+ init_rc: ["vendor.lineage.livedisplay@2.0-service.xiaomi_sdm710.rc"],
defaults: ["hidl_defaults"],
relative_install_path: "hw",
srcs: [
"SunlightEnhancement.cpp",
"service.cpp",
],
+ vendor: true,
shared_libs: [
"libbase",
"libbinder",
diff --git a/livedisplay/SunlightEnhancement.cpp b/livedisplay/SunlightEnhancement.cpp
index 5d4acb7cd..4c3589713 100644
--- a/livedisplay/SunlightEnhancement.cpp
+++ b/livedisplay/SunlightEnhancement.cpp
@@ -43,12 +43,13 @@ static constexpr const char* kDispParamHbmFodOn = "0x20000";
bool hasAmoledPanel() {
std::string device = android::base::GetProperty("ro.product.device", "");
- return device == "grus" || device == "sirius";
+ return device == "dipper" || device == "equuleus" ||
+ device == "perseus" || device == "sirius" || device == "ursa";
}
bool hasFingerprintOnDisplay() {
std::string device = android::base::GetProperty("ro.product.device", "");
- return device == "grus";
+ return device == "equuleus" || device == "ursa";
}
bool SunlightEnhancement::isSupported() {
diff --git a/livedisplay/lineage.livedisplay@2.0-service.xiaomi_sdm710.rc b/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sdm710.rc
similarity index 73%
rename from livedisplay/lineage.livedisplay@2.0-service.xiaomi_sdm710.rc
rename to livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sdm710.rc
index 3860747aa..3afd4dc2a 100644
--- a/livedisplay/lineage.livedisplay@2.0-service.xiaomi_sdm710.rc
+++ b/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sdm710.rc
@@ -2,7 +2,7 @@ on boot
chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/disp_param
chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/hbm_status
-service livedisplay-hal-2-0 /system/bin/hw/lineage.livedisplay@2.0-service.xiaomi_sdm710
+service livedisplay-hal-2-0 vendor/bin/hw/vendor.lineage.livedisplay@2.0-service.xiaomi_sdm710
class hal
user system
group system
diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
index 55ad66bd6..5c56f563c 100644
--- a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
+++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml
@@ -14,15 +14,8 @@
limitations under the License.
-->
-
-
- - 3082046c30820354a003020102020900e552a8ecb9011b7c300d06092a864886f70d0101050500308180310b300906035504061302434e3110300e060355040813074265696a696e673110300e060355040713074265696a696e67310f300d060355040a13065869616f6d69310d300b060355040b13044d495549310d300b060355040313044d495549311e301c06092a864886f70d010901160f6d697569407869616f6d692e636f6d301e170d3131313230363033323632365a170d3339303432333033323632365a308180310b300906035504061302434e3110300e060355040813074265696a696e673110300e060355040713074265696a696e67310f300d060355040a13065869616f6d69310d300b060355040b13044d495549310d300b060355040313044d495549311e301c06092a864886f70d010901160f6d697569407869616f6d692e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100c786568a9aff253ad74c5d3e6fbffa12fed44cd3244f18960ec5511bb551e413115197234845112cc3df9bbacd3e0f4b3528cd87ed397d577dc9008e9cbc6a25fc0664d3a3f440243786db8b250d40f6f148c9a3cd6fbc2dd8d24039bd6a8972a1bdee28c308798bfa9bb3b549877b10f98e265f118c05f264537d95e29339157b9d2a31485e0c823521cca6d0b721a8432600076d669e20ac43aa588b52c11c2a51f04c6bb31ad6ae8573991afe8e4957d549591fcb83ec62d1da35b1727dc6b63001a5ef387b5a7186c1e68da1325772b5307b1bc739ef236b9efe06d52dcaf1e32768e3403e55e3ec56028cf5680cfb33971ccf7870572bc47d3e3affa385020103a381e83081e5301d0603551d0e0416041491ae2f8c72e305f92aa9f7452e2a3160b841a15c3081b50603551d230481ad3081aa801491ae2f8c72e305f92aa9f7452e2a3160b841a15ca18186a48183308180310b300906035504061302434e3110300e060355040813074265696a696e673110300e060355040713074265696a696e67310f300d060355040a13065869616f6d69310d300b060355040b13044d495549310d300b060355040313044d495549311e301c06092a864886f70d010901160f6d697569407869616f6d692e636f6d820900e552a8ecb9011b7c300c0603551d13040530030101ff300d06092a864886f70d010105050003820101003b3a699ceb497300f2ab86cbd41c513440bf60aa5c43984eb1da140ef30544d9fbbb3733df24b26f2703d7ffc645bf598a5e6023596a947e91731542f2c269d0816a69c92df9bfe8b1c9bc3c54c46c12355bb4629fe6020ca9d15f8d6155dc5586f5616db806ecea2d06bd83e32b5f13f5a04fe3e5aa514f05df3d555526c63d3d62acf00adee894b923c2698dc571bc52c756ffa7a2221d834d10cb7175c864c30872fe217c31442dff0040a67a2fb1c8ba63eac2d5ba3d8e76b4ff2a49b0db8a33ef4ae0dd0a840dd2a8714cb5531a56b786819ec9eb1051d91b23fde06bd9d0708f150c4f9efe6a416ca4a5e0c23a952af931ad3579fb4a8b19de98f64bd9
-
true
-
- true
diff --git a/overlay-xenonhd/frameworks/base/core/res/res/values/xenonhd_config.xml b/overlay-xenonhd/frameworks/base/core/res/res/values/xenonhd_config.xml
deleted file mode 100644
index b22972c6d..000000000
--- a/overlay-xenonhd/frameworks/base/core/res/res/values/xenonhd_config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- true
-
-
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml
new file mode 100644
index 000000000..9c345d92c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc302-mnc220/config.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=3
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
+
+
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc221/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc221/config.xml
new file mode 100644
index 000000000..bc41d501c
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc302-mnc221/config.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=3
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
+
+
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc370/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc370/config.xml
new file mode 100644
index 000000000..59b7975b1
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc302-mnc370/config.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=2
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
+
+
+ - %s
+ - %s Wi-Fi
+
+
+
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml
new file mode 100644
index 000000000..58e726fdc
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc302-mnc610/config.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=2
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
+
+
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc640/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc640/config.xml
new file mode 100644
index 000000000..58e726fdc
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc302-mnc640/config.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=2
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
+
+
diff --git a/overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml b/overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml
new file mode 100644
index 000000000..59b7975b1
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc302-mnc720/config.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=2
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
+
+
+ - %s
+ - %s Wi-Fi
+
+
+
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 94e98588c..cb0fcc9af 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -1,90 +1,87 @@
+ for different hardware and product builds. Do not translate. -->
+
+ true
-
-
-
-
-
- - wifi,1,1,1,-1,true
- - mobile,0,0,0,-1,true
- - mobile_mms,2,0,4,60000,true
- - mobile_supl,3,0,2,60000,true
- - mobile_dun,4,0,2,60000,true
- - mobile_hipri,5,0,3,60000,true
- - mobile_fota,10,0,2,60000,true
- - mobile_ims,11,0,2,60000,true
- - mobile_cbs,12,0,2,60000,true
- - bluetooth,7,7,2,-1,true
- - mobile_emergency,15,0,5,-1,true
-
+
+ true
-
-
-
- - 1,1
- - 0,1
- - 7,1
-
+
+
+ true
+
+
+ true
+
+
+ Android-Mms/2.0
+
+
+ http://www.google.com/oha/rdf/ua-profile-kila.xml
- - usb\\d
- - rndis\\d
+ - "usb\\d"
+ - "rndis\\d"
- - softap0
- - wlan0
+ - "softap0"
+ - "wigig0"
+ - "wifi_br0"
- - bnep\\d
- - bt-pan
+ - "bnep\\d"
+ - "bt-pan"
+
+ true
+
-
+
+
- 192.168.42.2
- 192.168.42.254
- 192.168.43.2
@@ -107,716 +104,89 @@
- 192.168.51.254
+
+
+
+
+
+ - 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"
+ - "9,1"
+
+
+
+ true
+
+
+ true
+
true
-
+
true
true
-
- true
-
-
- true
-
-
- true
+
+ 524288,1048576,5505024,262144,524288,5505024
-
- true
+
+ true
true
-
- true
-
-
-
- - 0
- - 1
- - 2
- - 3
-
-
-
- true
-
-
- 1
-
-
- 98
-
-
- 127
-
-
- 127
-
-
- 25
-
-
- 2000
- 4000
-
-
- 6
-
-
-
- - 1
- - 2
- - 3
- - 4
- - 8
- - 12
- - 20
- - 33
- - 55
- - 90
- - 148
- - 245
- - 403
- - 665
- - 1097
- - 1808
- - 2981
- - 5000
-
-
-
-
- - 10.45935
- - 29.25559
- - 34.240692
- - 37.514347
- - 40.018696
- - 46.885098
- - 51.626434
- - 58.610405
- - 66.890915
- - 77.61644
- - 90.221886
- - 105.80314
- - 126.073845
- - 154.16931
- - 191.83717
- - 240.74442
- - 294.84857
- - 348.05453
- - 420
-
-
-
-
- - 1
- - 2
- - 3
- - 4
- - 5
- - 6
- - 7
- - 8
- - 9
- - 10
- - 11
- - 12
- - 13
- - 14
- - 15
- - 16
- - 17
- - 18
- - 19
- - 20
- - 21
- - 22
- - 23
- - 24
- - 25
- - 26
- - 27
- - 28
- - 29
- - 30
- - 31
- - 32
- - 33
- - 34
- - 35
- - 36
- - 37
- - 38
- - 39
- - 40
- - 41
- - 42
- - 43
- - 44
- - 45
- - 46
- - 47
- - 48
- - 49
- - 50
- - 51
- - 52
- - 53
- - 54
- - 55
- - 56
- - 57
- - 58
- - 59
- - 60
- - 61
- - 62
- - 63
- - 64
- - 65
- - 66
- - 67
- - 68
- - 69
- - 70
- - 71
- - 72
- - 73
- - 74
- - 75
- - 76
- - 77
- - 78
- - 79
- - 80
- - 81
- - 82
- - 83
- - 84
- - 85
- - 86
- - 87
- - 88
- - 89
- - 90
- - 91
- - 92
- - 93
- - 94
- - 95
- - 96
- - 97
- - 98
- - 99
- - 100
- - 101
- - 102
- - 103
- - 104
- - 105
- - 106
- - 107
- - 108
- - 109
- - 110
- - 111
- - 112
- - 113
- - 114
- - 115
- - 116
- - 117
- - 118
- - 119
- - 120
- - 121
- - 122
- - 123
- - 124
- - 125
- - 126
- - 127
- - 128
- - 129
- - 130
- - 131
- - 132
- - 133
- - 134
- - 135
- - 136
- - 137
- - 138
- - 139
- - 140
- - 141
- - 142
- - 143
- - 144
- - 145
- - 146
- - 147
- - 148
- - 149
- - 150
- - 151
- - 152
- - 153
- - 154
- - 155
- - 156
- - 157
- - 158
- - 159
- - 160
- - 161
- - 162
- - 163
- - 164
- - 165
- - 166
- - 167
- - 168
- - 169
- - 170
- - 171
- - 172
- - 173
- - 174
- - 175
- - 176
- - 177
- - 178
- - 179
- - 180
- - 181
- - 182
- - 183
- - 184
- - 185
- - 186
- - 187
- - 188
- - 189
- - 190
- - 191
- - 192
- - 193
- - 194
- - 195
- - 196
- - 197
- - 198
- - 199
- - 200
- - 201
- - 202
- - 203
- - 204
- - 205
- - 206
- - 207
- - 208
- - 209
- - 210
- - 211
- - 212
- - 213
- - 214
- - 215
- - 216
- - 217
- - 218
- - 219
- - 220
- - 221
- - 222
- - 223
- - 224
- - 225
- - 226
- - 227
- - 228
- - 229
- - 230
- - 231
- - 232
- - 233
- - 234
- - 235
- - 236
- - 237
- - 238
- - 239
- - 240
- - 241
- - 242
- - 243
- - 244
- - 245
- - 246
- - 247
- - 248
- - 249
- - 250
- - 251
- - 252
- - 253
- - 254
- - 255
-
-
-
-
- - 2.2
- - 3.29
- - 4.93
- - 6.57
- - 8.22
- - 9.86
- - 11.5
- - 13.14
- - 14.79
- - 16.43
- - 18.07
- - 19.71
- - 21.35
- - 23
- - 24.64
- - 26.28
- - 27.92
- - 29.57
- - 31.21
- - 32.85
- - 34.49
- - 36.13
- - 37.78
- - 39.42
- - 41.06
- - 42.7
- - 44.35
- - 45.99
- - 47.63
- - 49.27
- - 50.91
- - 52.56
- - 54.2
- - 55.84
- - 57.48
- - 59.13
- - 60.77
- - 62.41
- - 64.05
- - 65.69
- - 67.34
- - 68.98
- - 70.62
- - 72.26
- - 73.91
- - 75.55
- - 77.19
- - 78.83
- - 80.47
- - 82.12
- - 83.76
- - 85.4
- - 87.04
- - 88.69
- - 90.33
- - 91.97
- - 93.61
- - 95.25
- - 96.9
- - 98.54
- - 100.18
- - 101.82
- - 103.47
- - 105.11
- - 107.16
- - 108.8
- - 110.44
- - 112.09
- - 113.73
- - 115.37
- - 117.01
- - 118.66
- - 120.3
- - 121.94
- - 123.58
- - 125.22
- - 126.87
- - 128.51
- - 130.15
- - 131.79
- - 133.44
- - 135.08
- - 136.72
- - 138.36
- - 140
- - 141.65
- - 143.29
- - 144.93
- - 146.57
- - 148.22
- - 149.86
- - 151.5
- - 153.14
- - 154.79
- - 156.43
- - 158.07
- - 159.71
- - 161.35
- - 163
- - 164.64
- - 166.28
- - 167.92
- - 169.57
- - 171.21
- - 172.85
- - 174.49
- - 176.13
- - 177.78
- - 179.42
- - 181.06
- - 182.7
- - 184.35
- - 185.99
- - 187.63
- - 189.27
- - 190.91
- - 192.56
- - 194.2
- - 195.84
- - 197.48
- - 199.13
- - 200.77
- - 202.41
- - 204.05
- - 205.69
- - 207.34
- - 208.98
- - 210.62
- - 212.67
- - 214.32
- - 215.96
- - 217.6
- - 219.24
- - 220.88
- - 222.53
- - 224.17
- - 225.81
- - 227.45
- - 229.1
- - 230.74
- - 232.38
- - 234.02
- - 235.66
- - 237.31
- - 238.95
- - 240.59
- - 242.23
- - 243.88
- - 245.52
- - 247.16
- - 248.8
- - 250.44
- - 252.09
- - 253.73
- - 255.37
- - 257.01
- - 258.66
- - 260.3
- - 261.94
- - 263.58
- - 265.22
- - 266.87
- - 268.51
- - 270.15
- - 271.79
- - 273.44
- - 275.08
- - 276.72
- - 278.36
- - 280
- - 281.65
- - 283.29
- - 284.93
- - 286.57
- - 288.22
- - 289.86
- - 291.5
- - 293.14
- - 294.79
- - 296.43
- - 298.07
- - 299.71
- - 301.35
- - 303
- - 304.64
- - 306.28
- - 307.92
- - 309.57
- - 311.21
- - 312.85
- - 314.49
- - 316.54
- - 318.19
- - 319.83
- - 321.47
- - 323.11
- - 324.76
- - 326.4
- - 328.04
- - 329.68
- - 331.32
- - 332.97
- - 334.61
- - 336.25
- - 337.89
- - 339.54
- - 341.18
- - 342.82
- - 344.46
- - 346.1
- - 347.75
- - 349.39
- - 351.03
- - 352.67
- - 354.32
- - 355.96
- - 357.6
- - 359.24
- - 360.88
- - 362.53
- - 364.17
- - 365.81
- - 367.45
- - 369.1
- - 370.74
- - 372.38
- - 374.02
- - 375.66
- - 377.31
- - 378.95
- - 380.59
- - 382.23
- - 383.88
- - 385.52
- - 387.16
- - 388.8
- - 390.44
- - 392.09
- - 393.73
- - 395.37
- - 397.01
- - 398.66
- - 400.3
- - 401.94
- - 403.58
- - 405.22
- - 406.87
- - 408.51
- - 410.15
- - 411.79
- - 413.44
- - 415.08
- - 416.72
- - 418.36
- - 420
-
-
-
- 100
-
-
- true
-
-
- true
-
-
-
- true
-
-
- true
-
-
- 6000
-
-
- 20
-
true
-
- true
-
true
-
- 18000
+
- 30%
-
-
- true
+ false
- 524288,1048576,5505024,262144,524288,5505024
-
-
- true
-
-
- true
-
-
- true
-
-
- true
-
-
- 0
-
-
- 2
+
+
+ - SUPL_HOST=supl.google.com
+ - SUPL_PORT=7275
+ - SUPL_VER=0x20000
+ - SUPL_MODE=1
+ - SUPL_ES=1
+ - LPP_PROFILE=0
+ - USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1
+ - A_GLONASS_POS_PROTOCOL_SELECT=0
+ - GPS_LOCK=0
+
true
@@ -969,14 +280,6 @@
provisioning, availability etc -->
true
-
- true
-
-
- true
-
true
@@ -985,12 +288,10 @@
provisioning, availability etc -->
true
-
-
+
org.codeaurora.ims
-
+
true
false
+
+ true
+
+
+ true
+
2
-
-
- - -140
- - -140
- - -125
- - -112
- - -102
- - -44
-
-
-
- true
+
+ true
-
- true
+
+ true
true
-
+
+ 600
+
+
+ 3300
+
+
- "/system/framework/arm64/boot-framework.oat"
- "/system/framework/boot-framework.vdex"
@@ -1043,13 +347,41 @@
- /system/lib64/libblas.so
-
+
true
-
+
true
-
- false
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ - 0
+ - 7
+ - 10
+
+
+ - 0
+ - 5
+ - 10
+
+
+ - 10
+
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index db55c6d30..dbedcf1e8 100644
--- a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -17,6 +17,14 @@
*/
-->
+
true
+
+ 30000
+ false
+
+
+ true
+
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
index c7e7f84c9..f19ebe225 100644
--- a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
+++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml
@@ -20,7 +20,13 @@
+
+
+ true
+
true
+
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
deleted file mode 100644
index fb395cf4d..000000000
--- a/overlay/packages/apps/Bluetooth/res/values/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- false
- true
-
-
diff --git a/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml b/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml
index 29acd72fe..dd75720bd 100644
--- a/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml
+++ b/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml
@@ -1,1683 +1,1882 @@
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
+
+
+
-
-
+
+
+
-
+
+
-
+
+
-
+
-
-
+
+
+
-
-
-
+
+
+
+
-
-
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
+
+
+
+
-
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
+
+
+
-
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- China Mobile
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ China Mobile
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
- China Unicom
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ China Unicom
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- China Mobile
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ China Mobile
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- China Unicom
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ China Unicom
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- China Unicom
-
-
+
+
+
+ China Unicom
+
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
diff --git a/overlay/packages/apps/CarrierConfig/res/xml/vendor_device.xml b/overlay/packages/apps/CarrierConfig/res/xml/vendor_device.xml
index c56b5974f..04533d008 100644
--- a/overlay/packages/apps/CarrierConfig/res/xml/vendor_device.xml
+++ b/overlay/packages/apps/CarrierConfig/res/xml/vendor_device.xml
@@ -1,88 +1,103 @@
-
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
-
-
-
+
+
+
+
+
-
+
+
-
-
+
+
+
-
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
diff --git a/overlay/packages/apps/CarrierConfig/res/xml/vendor_miui.xml b/overlay/packages/apps/CarrierConfig/res/xml/vendor_miui.xml
index a87b09059..80029b281 100644
--- a/overlay/packages/apps/CarrierConfig/res/xml/vendor_miui.xml
+++ b/overlay/packages/apps/CarrierConfig/res/xml/vendor_miui.xml
@@ -1,299 +1,90 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +351962000000
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
-
+
+
-
-
+
+
-
-
+
+
+
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
- +64222022002
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5500
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 121
-
-
-
-
-
-
-
- 123
-
-
-
+
+
+
+
-
+
+
-
-
-
- 22177
-
-
+
-
-
+
+
+ 22177
+
-
-
-
-
-
-
-
- *20
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- +38598151100
-
-
-
-
-
-
-
-
-
- *123
-
-
-
- 131
-
-
-
-
-
-
- *123
-
-
-
-
-
diff --git a/overlay/packages/apps/Settings/res/values/arrays.xml b/overlay/packages/apps/Settings/res/values/arrays.xml
deleted file mode 100644
index 23fb85920..000000000
--- a/overlay/packages/apps/Settings/res/values/arrays.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
- - 0
- - -1
- - -1
-
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/Android.mk b/overlay/packages/apps/overlays/NoCutoutOverlay/Android.mk
deleted file mode 100644
index 7102268aa..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_RRO_THEME := DisplayCutoutNoCutout
-LOCAL_CERTIFICATE := platform
-
-LOCAL_SRC_FILES := $(call all-subdir-java-files)
-
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_PACKAGE_NAME := NoCutoutOverlay
-LOCAL_SDK_VERSION := current
-
-include $(BUILD_RRO_SYSTEM_PACKAGE)
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/AndroidManifest.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/AndroidManifest.xml
deleted file mode 100644
index e215b3fdc..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
-
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-af/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-af/strings.xml
deleted file mode 100644
index 65a0e8184..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-af/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Versteek"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-am/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-am/strings.xml
deleted file mode 100644
index 8b0c21204..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-am/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ደብቅ"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ar/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ar/strings.xml
deleted file mode 100644
index e42e0ce69..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ar/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "إخفاء"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-as/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-as/strings.xml
deleted file mode 100644
index 57df7126a..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-as/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "লুকুৱাওক"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-az/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-az/strings.xml
deleted file mode 100644
index 03d109daa..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-az/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Gizlədin"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-b+sr+Latn/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-b+sr+Latn/strings.xml
deleted file mode 100644
index d970479a9..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Sakrij"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-be/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-be/strings.xml
deleted file mode 100644
index c83f504d0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-be/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Схаваць"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bg/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bg/strings.xml
deleted file mode 100644
index 0594ee2ae..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bg/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Скриване"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bn/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bn/strings.xml
deleted file mode 100644
index c76368394..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bn/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "লুকান"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bs/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bs/strings.xml
deleted file mode 100644
index d970479a9..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-bs/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Sakrij"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ca/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ca/strings.xml
deleted file mode 100644
index 079d52d6f..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ca/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Amaga"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-cs/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-cs/strings.xml
deleted file mode 100644
index 77282f162..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-cs/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Skrýt"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-da/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-da/strings.xml
deleted file mode 100644
index 98d18a593..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-da/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Skjul"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-de/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-de/strings.xml
deleted file mode 100644
index af5887a48..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-de/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ausblenden"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-el/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-el/strings.xml
deleted file mode 100644
index 8fd6d449a..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-el/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Απόκρυψη"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rAU/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rAU/strings.xml
deleted file mode 100644
index 9e227b609..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rAU/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Hide"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rCA/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rCA/strings.xml
deleted file mode 100644
index 9e227b609..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rCA/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Hide"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rGB/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rGB/strings.xml
deleted file mode 100644
index 9e227b609..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rGB/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Hide"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rIN/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rIN/strings.xml
deleted file mode 100644
index 9e227b609..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Hide"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rXC/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rXC/strings.xml
deleted file mode 100644
index d490bf1ae..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-en-rXC/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Hide"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es-rUS/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es-rUS/strings.xml
deleted file mode 100644
index 58ca55ad5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ocultar"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es/strings.xml
deleted file mode 100644
index 58ca55ad5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-es/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ocultar"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-et/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-et/strings.xml
deleted file mode 100644
index ca4aca2b1..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-et/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Peida"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-eu/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-eu/strings.xml
deleted file mode 100644
index 9e36f3b14..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-eu/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ezkutatu"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fa/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fa/strings.xml
deleted file mode 100644
index e9bfd759b..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fa/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "پنهان کردن"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fi/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fi/strings.xml
deleted file mode 100644
index 823f37076..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fi/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Piilota"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr-rCA/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr-rCA/strings.xml
deleted file mode 100644
index 4bde836b0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Masquer"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr/strings.xml
deleted file mode 100644
index 4bde836b0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-fr/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Masquer"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gl/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gl/strings.xml
deleted file mode 100644
index 58ca55ad5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gl/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ocultar"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gu/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gu/strings.xml
deleted file mode 100644
index 437441c94..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-gu/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "છુપાવો"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hi/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hi/strings.xml
deleted file mode 100644
index b931845e5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hi/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "छिपाएं"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hr/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hr/strings.xml
deleted file mode 100644
index d970479a9..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hr/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Sakrij"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hu/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hu/strings.xml
deleted file mode 100644
index ffd681289..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hu/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Elrejtés"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hy/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hy/strings.xml
deleted file mode 100644
index 094686e37..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-hy/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Թաքցնել"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-in/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-in/strings.xml
deleted file mode 100644
index eace0cf43..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-in/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Sembunyikan"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-is/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-is/strings.xml
deleted file mode 100644
index 0d102f2df..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-is/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Fela"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-it/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-it/strings.xml
deleted file mode 100644
index c7c6e8dc7..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-it/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Nascondi"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-iw/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-iw/strings.xml
deleted file mode 100644
index b2194c625..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-iw/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "הסתר"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ja/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ja/strings.xml
deleted file mode 100644
index 079dce8ae..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ja/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "非表示"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ka/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ka/strings.xml
deleted file mode 100644
index 774441569..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ka/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "დამალვა"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kk/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kk/strings.xml
deleted file mode 100644
index 497e6e5e0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kk/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Жасыру"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-km/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-km/strings.xml
deleted file mode 100644
index addea0e80..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-km/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "លាក់"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kn/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kn/strings.xml
deleted file mode 100644
index 03065d0b0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-kn/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ಮರೆಮಾಡು"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ko/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ko/strings.xml
deleted file mode 100644
index 2e25f42a4..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ko/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "숨기기"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ky/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ky/strings.xml
deleted file mode 100644
index 85f55bdd0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ky/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Жашыруу"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-land/config.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-land/config.xml
deleted file mode 100644
index bd52901ce..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-land/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- 28dp
-
- 156dp
-
\ No newline at end of file
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lo/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lo/strings.xml
deleted file mode 100644
index f9c8a715a..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lo/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ເຊື່ອງ"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lt/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lt/strings.xml
deleted file mode 100644
index 5ac46ed2c..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lt/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Slėpti"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lv/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lv/strings.xml
deleted file mode 100644
index 09fbde61b..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-lv/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Paslēpt"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mk/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mk/strings.xml
deleted file mode 100644
index 5db59dd8d..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mk/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Сокриј"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ml/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ml/strings.xml
deleted file mode 100644
index d616aaf32..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ml/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "മറയ്ക്കുക"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mn/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mn/strings.xml
deleted file mode 100644
index c775ea32a..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mn/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Нуух"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mr/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mr/strings.xml
deleted file mode 100644
index 25fe0e422..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-mr/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "लपवा"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ms/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ms/strings.xml
deleted file mode 100644
index eace0cf43..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ms/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Sembunyikan"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-my/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-my/strings.xml
deleted file mode 100644
index 5140ca3a9..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-my/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ဝှက်ပါ"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nb/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nb/strings.xml
deleted file mode 100644
index 98d18a593..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nb/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Skjul"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ne/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ne/strings.xml
deleted file mode 100644
index b964f0a24..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ne/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "लुकाउनुहोस्"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nl/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nl/strings.xml
deleted file mode 100644
index 0140cd8f5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-nl/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Verbergen"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-or/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-or/strings.xml
deleted file mode 100644
index 62b9b6915..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-or/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ଲୁଚାନ୍ତୁ"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pa/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pa/strings.xml
deleted file mode 100644
index 39b8c1bf2..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pa/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ਲੁਕਾਓ"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pl/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pl/strings.xml
deleted file mode 100644
index b1059efec..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pl/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ukryj"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rBR/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rBR/strings.xml
deleted file mode 100644
index 58ca55ad5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rBR/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ocultar"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rPT/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rPT/strings.xml
deleted file mode 100644
index 58ca55ad5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ocultar"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt/strings.xml
deleted file mode 100644
index 58ca55ad5..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-pt/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ocultar"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ro/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ro/strings.xml
deleted file mode 100644
index 61254b24c..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ro/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ascundeți"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ru/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ru/strings.xml
deleted file mode 100644
index 507b87db2..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ru/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Скрыть"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-si/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-si/strings.xml
deleted file mode 100644
index d72c1beeb..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-si/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "සඟවන්න"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sk/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sk/strings.xml
deleted file mode 100644
index d663882ea..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sk/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Skryť"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sl/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sl/strings.xml
deleted file mode 100644
index e2fb8eebd..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sl/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Skrivanje"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sq/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sq/strings.xml
deleted file mode 100644
index c210dcddc..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sq/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Fshih"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sr/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sr/strings.xml
deleted file mode 100644
index 8843ed8e0..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sr/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Сакриј"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sv/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sv/strings.xml
deleted file mode 100644
index 9dc5cf0fb..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sv/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Dölj"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sw/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sw/strings.xml
deleted file mode 100644
index b177c3f80..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-sw/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ficha"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ta/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ta/strings.xml
deleted file mode 100644
index 0d1627290..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ta/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "மறை"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-te/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-te/strings.xml
deleted file mode 100644
index 8efd0f10c..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-te/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "దాస్తుంది"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-th/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-th/strings.xml
deleted file mode 100644
index beb73619d..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-th/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "ซ่อน"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tl/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tl/strings.xml
deleted file mode 100644
index 1ab2b8005..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tl/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Itago"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tr/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tr/strings.xml
deleted file mode 100644
index 29b9e44ee..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-tr/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Gizle"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uk/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uk/strings.xml
deleted file mode 100644
index 4cb28d974..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uk/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Сховати"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ur/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ur/strings.xml
deleted file mode 100644
index bbf4e152e..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-ur/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "چھپائیں"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uz/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uz/strings.xml
deleted file mode 100644
index e7663e989..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-uz/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Berkitish"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-vi/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-vi/strings.xml
deleted file mode 100644
index 0480b9a33..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-vi/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Ẩn"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rCN/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rCN/strings.xml
deleted file mode 100644
index 0da23f7a3..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "隐藏"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rHK/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rHK/strings.xml
deleted file mode 100644
index 4eb6b3a00..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "隱藏"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rTW/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rTW/strings.xml
deleted file mode 100644
index 4eb6b3a00..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "隱藏"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zu/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zu/strings.xml
deleted file mode 100644
index c51c9fc1d..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values-zu/strings.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- "Fihla"
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/config.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/config.xml
deleted file mode 100644
index 6d61f9b13..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
- false
-
-
- true
-
-
- 28dp
- 28dp
-
-
diff --git a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/strings.xml b/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/strings.xml
deleted file mode 100644
index 17eb0d525..000000000
--- a/overlay/packages/apps/overlays/NoCutoutOverlay/res/values/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- Hide
-
-
-
diff --git a/parts/Android.mk b/parts/Android.mk
index 60552d07e..640c2595d 100644
--- a/parts/Android.mk
+++ b/parts/Android.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2017-2018 The LineageOS Project
+# Copyright (C) 2017-2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -20,12 +20,8 @@ LOCAL_PRIVILEGED_MODULE := true
LOCAL_USE_AAPT2 := true
LOCAL_STATIC_ANDROID_LIBRARIES := \
- android-support-v4 \
- android-support-v13 \
- android-support-v7-recyclerview \
- android-support-v7-preference \
- android-support-v7-appcompat \
- android-support-v14-preference
+ androidx.core_core \
+ androidx.preference_preference
LOCAL_RESOURCE_DIR := \
$(LOCAL_PATH)/res \
diff --git a/parts/src/org/lineageos/settings/doze/DozeSettingsFragment.java b/parts/src/org/lineageos/settings/doze/DozeSettingsFragment.java
index 8efbdf5ff..c1c9ffb23 100644
--- a/parts/src/org/lineageos/settings/doze/DozeSettingsFragment.java
+++ b/parts/src/org/lineageos/settings/doze/DozeSettingsFragment.java
@@ -27,11 +27,6 @@
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
-import android.support.v14.preference.PreferenceFragment;
-import android.support.v14.preference.SwitchPreference;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.PreferenceCategory;
-import android.support.v7.preference.Preference.OnPreferenceChangeListener;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
@@ -39,6 +34,11 @@
import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
+import androidx.preference.Preference;
+import androidx.preference.Preference.OnPreferenceChangeListener;
+import androidx.preference.PreferenceCategory;
+import androidx.preference.PreferenceFragment;
+import androidx.preference.SwitchPreference;
import org.lineageos.settings.R;
diff --git a/parts/src/org/lineageos/settings/doze/DozeUtils.java b/parts/src/org/lineageos/settings/doze/DozeUtils.java
index be759cc96..4f4204655 100644
--- a/parts/src/org/lineageos/settings/doze/DozeUtils.java
+++ b/parts/src/org/lineageos/settings/doze/DozeUtils.java
@@ -23,9 +23,9 @@
import android.hardware.Sensor;
import android.hardware.SensorManager;
import android.os.UserHandle;
-import android.support.v7.preference.PreferenceManager;
import android.provider.Settings;
import android.util.Log;
+import androidx.preference.PreferenceManager;
import com.android.internal.hardware.AmbientDisplayConfiguration;
diff --git a/permissions/privapp-permissions-hotword.xml b/permissions/privapp-permissions-hotword.xml
new file mode 100644
index 000000000..3f2f2afeb
--- /dev/null
+++ b/permissions/privapp-permissions-hotword.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/placeholder b/placeholder
deleted file mode 100644
index e69de29bb..000000000
diff --git a/power/Android.mk b/power/Android.mk
index 61b73d3b8..10a907909 100644
--- a/power/Android.mk
+++ b/power/Android.mk
@@ -6,24 +6,37 @@ ifneq ($(TARGET_TAP_TO_WAKE_NODE),)
LOCAL_CFLAGS += -DTAP_TO_WAKE_NODE=\"$(TARGET_TAP_TO_WAKE_NODE)\"
endif
-LOCAL_MODULE := power.qcom
-LOCAL_INIT_RC := android.hardware.power@1.0-service.rc
+LOCAL_MODULE := android.hardware.power@1.2-service.xiaomi_sdm710
+LOCAL_INIT_RC := android.hardware.power@1.2-service.xiaomi_sdm710.rc
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE_TAGS := optional
+LOCAL_VENDOR_MODULE := true
+
LOCAL_SRC_FILES := \
hint-data.c \
list.c \
metadata-parser.c \
power-710.c \
- power.c \
+ power-common.c \
powerhintparser.c \
+ Power.cpp \
+ service.cpp \
utils.c
LOCAL_C_INCLUDES := external/libxml2/include \
external/icu/icu4c/source/common
-LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libxml2
+LOCAL_SHARED_LIBRARIES := \
+ android.hardware.power@1.2 \
+ libbase \
+ libcutils \
+ libdl \
+ libhidlbase \
+ libhidltransport \
+ liblog \
+ libutils \
+ libxml2
LOCAL_HEADER_LIBRARIES := generated_kernel_headers
LOCAL_HEADER_LIBRARIES += libutils_headers
@@ -32,4 +45,4 @@ LOCAL_HEADER_LIBRARIES += libhardware_headers
LOCAL_CFLAGS += -Werror -Wall -Wno-unused-parameter
LOCAL_CFLAGS += -DINTERACTION_BOOST
-include $(BUILD_SHARED_LIBRARY)
+include $(BUILD_EXECUTABLE)
diff --git a/power/Power.cpp b/power/Power.cpp
new file mode 100644
index 000000000..948a914b2
--- /dev/null
+++ b/power/Power.cpp
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define LOG_TAG "QTI PowerHAL"
+
+#include
+#include
+#include "Power.h"
+#include "power-common.h"
+
+namespace android {
+namespace hardware {
+namespace power {
+namespace V1_2 {
+namespace implementation {
+
+using ::android::hardware::power::V1_0::Feature;
+using ::android::hardware::power::V1_0::PowerHint;
+using ::android::hardware::power::V1_0::PowerStatePlatformSleepState;
+using ::android::hardware::power::V1_0::Status;
+using ::android::hardware::power::V1_1::PowerStateSubsystem;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+Power::Power() {
+ power_init();
+}
+
+Return Power::setInteractive(bool interactive) {
+ set_interactive(interactive ? 1 : 0);
+ return Void();
+}
+
+Return Power::powerHint(PowerHint_1_0 hint, int32_t data) {
+
+ power_hint(static_cast(hint), data ? (&data) : NULL);
+ return Void();
+}
+
+Return Power::setFeature(Feature feature, bool activate) {
+ set_feature(static_cast(feature), activate ? 1 : 0);
+ return Void();
+}
+
+Return Power::getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) {
+
+ hidl_vec states;
+ states.resize(0);
+
+ _hidl_cb(states, Status::SUCCESS);
+ return Void();
+}
+
+Return Power::getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) {
+
+ hidl_vec subsystems;
+
+ _hidl_cb(subsystems, Status::SUCCESS);
+ return Void();
+}
+
+Return Power::powerHintAsync(PowerHint_1_0 hint, int32_t data) {
+
+ return powerHint(hint, data);
+}
+
+Return Power::powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) {
+
+ return powerHint(static_cast (hint), data);
+}
+
+} // namespace implementation
+} // namespace V1_2
+} // namespace power
+} // namespace hardware
+} // namespace android
diff --git a/power/Power.h b/power/Power.h
new file mode 100644
index 000000000..a78759076
--- /dev/null
+++ b/power/Power.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ANDROID_HARDWARE_POWER_V1_2_POWER_H
+#define ANDROID_HARDWARE_POWER_V1_2_POWER_H
+
+#include
+#include
+#include
+#include
+
+namespace android {
+namespace hardware {
+namespace power {
+namespace V1_2 {
+namespace implementation {
+
+using ::android::hardware::power::V1_0::Feature;
+using PowerHint_1_0 = ::android::hardware::power::V1_0::PowerHint;
+using PowerHint_1_2 = ::android::hardware::power::V1_2::PowerHint;
+using ::android::hardware::power::V1_2::IPower;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+struct Power : public IPower {
+ // Methods from ::android::hardware::power::V1_0::IPower follow.
+
+ Power();
+
+ Return setInteractive(bool interactive) override;
+ Return powerHint(PowerHint_1_0 hint, int32_t data) override;
+ Return setFeature(Feature feature, bool activate) override;
+ Return getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) override;
+
+ // Methods from ::android::hardware::power::V1_1::IPower follow
+ Return getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) override;
+ Return powerHintAsync(PowerHint_1_0 hint, int32_t data) override;
+ // Methods from ::android::hardware::power::V1_2::IPower follow
+ Return powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) override;
+};
+
+} // namespace implementation
+} // namespace V1_2
+} // namespace power
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_POWER_V1_2_POWER_H
diff --git a/power/android.hardware.power@1.0-service.rc b/power/android.hardware.power@1.0-service.rc
deleted file mode 100644
index 6bedb8997..000000000
--- a/power/android.hardware.power@1.0-service.rc
+++ /dev/null
@@ -1,5 +0,0 @@
-service vendor.power-hal-1-0 /vendor/bin/hw/android.hardware.power@1.0-service
- override
- class hal
- user system
- group system input
diff --git a/power/android.hardware.power@1.2-service.xiaomi_sdm710.rc b/power/android.hardware.power@1.2-service.xiaomi_sdm710.rc
new file mode 100644
index 000000000..e0062f8bc
--- /dev/null
+++ b/power/android.hardware.power@1.2-service.xiaomi_sdm710.rc
@@ -0,0 +1,4 @@
+service vendor.power-hal-1-2 /vendor/bin/hw/android.hardware.power@1.2-service.xiaomi_sdm710
+ class hal
+ user system
+ group system input
diff --git a/power/configs/powerhint.xml b/power/configs/powerhint.xml
new file mode 100644
index 000000000..8a8619bb7
--- /dev/null
+++ b/power/configs/powerhint.xml
@@ -0,0 +1,234 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/power/power-710.c b/power/power-710.c
index 0fb3f119d..1c4cae410 100644
--- a/power/power-710.c
+++ b/power/power-710.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -257,7 +257,7 @@ static int process_interaction_hint(void* data) {
return HINT_HANDLED;
}
-int power_hint_override(struct power_module* module, power_hint_t hint, void* data) {
+int power_hint_override(power_hint_t hint, void* data) {
int ret_val = HINT_NONE;
switch (hint) {
case POWER_HINT_VIDEO_ENCODE:
@@ -281,7 +281,7 @@ int power_hint_override(struct power_module* module, power_hint_t hint, void* da
return ret_val;
}
-int set_interactive_override(struct power_module* module, int on) {
+int set_interactive_override(int on) {
static int set_i_count = 0;
set_i_count++;
diff --git a/power/power.c b/power/power-common.c
similarity index 62%
rename from power/power.c
rename to power/power-common.c
index 742fe8acc..1fd7d296f 100644
--- a/power/power.c
+++ b/power/power-common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -51,13 +51,7 @@
static struct hint_handles handles[NUM_HINTS];
-static int power_device_open(const hw_module_t* module, const char* name, hw_device_t** device);
-
-static struct hw_module_methods_t power_module_methods = {
- .open = power_device_open,
-};
-
-static void power_init(struct power_module* module) {
+void power_init() {
ALOGI("Initing");
for (int i = 0; i < NUM_HINTS; i++) {
@@ -66,17 +60,16 @@ static void power_init(struct power_module* module) {
}
}
-int __attribute__((weak))
-power_hint_override(struct power_module* module, power_hint_t hint, void* data) {
+int __attribute__((weak)) power_hint_override(power_hint_t hint, void* data) {
return HINT_NONE;
}
/* Declare function before use */
void interaction(int duration, int num_args, int opt_list[]);
-static void power_hint(struct power_module* module, power_hint_t hint, void* data) {
+void power_hint(power_hint_t hint, void* data) {
/* Check if this hint has been overridden. */
- if (power_hint_override(module, hint, data) == HINT_HANDLED) {
+ if (power_hint_override(hint, data) == HINT_HANDLED) {
/* The power_hint has been handled. We can skip the rest. */
return;
}
@@ -118,11 +111,11 @@ static void power_hint(struct power_module* module, power_hint_t hint, void* dat
}
}
-int __attribute__((weak)) set_interactive_override(struct power_module* module, int on) {
+int __attribute__((weak)) set_interactive_override(int on) {
return HINT_NONE;
}
-void set_interactive(struct power_module* module, int on) {
+void set_interactive(int on) {
if (!on) {
/* Send Display OFF hint to perf HAL */
perf_hint_enable(VENDOR_HINT_DISPLAY_OFF, 0);
@@ -131,14 +124,14 @@ void set_interactive(struct power_module* module, int on) {
perf_hint_enable(VENDOR_HINT_DISPLAY_ON, 0);
}
- if (set_interactive_override(module, on) == HINT_HANDLED) {
+ if (set_interactive_override(on) == HINT_HANDLED) {
return;
}
ALOGI("Got set_interactive hint");
}
-void set_feature(struct power_module* module, feature_t feature, int state) {
+void set_feature(feature_t feature, int state) {
switch (feature) {
#ifdef TAP_TO_WAKE_NODE
case POWER_FEATURE_DOUBLE_TAP_TO_WAKE: {
@@ -155,56 +148,3 @@ void set_feature(struct power_module* module, feature_t feature, int state) {
break;
}
}
-
-static int power_device_open(const hw_module_t* module, const char* name, hw_device_t** device) {
- int status = -EINVAL;
- if (module && name && device) {
- if (!strcmp(name, POWER_HARDWARE_MODULE_ID)) {
- power_module_t* dev = (power_module_t*)malloc(sizeof(*dev));
-
- if (dev) {
- memset(dev, 0, sizeof(*dev));
-
- if (dev) {
- /* initialize the fields */
- dev->common.module_api_version = POWER_MODULE_API_VERSION_0_3;
- dev->common.tag = HARDWARE_DEVICE_TAG;
- dev->init = power_init;
- dev->powerHint = power_hint;
- dev->setInteractive = set_interactive;
- /* At the moment we support 0.3 APIs */
- dev->setFeature = set_feature;
- dev->get_number_of_platform_modes = NULL;
- dev->get_platform_low_power_stats = NULL;
- dev->get_voter_list = NULL;
- *device = (hw_device_t*)dev;
- status = 0;
- } else {
- status = -ENOMEM;
- }
- } else {
- status = -ENOMEM;
- }
- }
- }
-
- return status;
-}
-
-struct power_module HAL_MODULE_INFO_SYM = {
- .common =
- {
- .tag = HARDWARE_MODULE_TAG,
- .module_api_version = POWER_MODULE_API_VERSION_0_3,
- .hal_api_version = HARDWARE_HAL_API_VERSION,
- .id = POWER_HARDWARE_MODULE_ID,
- .name = "QCOM Power HAL",
- .author = "Qualcomm",
- .methods = &power_module_methods,
- },
-
- .init = power_init,
- .powerHint = power_hint,
- .setInteractive = set_interactive,
- .setFeature = set_feature
-};
diff --git a/power/power-common.h b/power/power-common.h
index 6de1773b2..a89e4fe27 100644
--- a/power/power-common.h
+++ b/power/power-common.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013, 2018-2019 The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,6 +26,14 @@
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+#ifndef __POWER_COMMON_H__
+#define __POWER_COMMON_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define NODE_MAX (64)
#define SCALING_GOVERNOR_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
@@ -44,4 +52,17 @@
#define INPUT_EVENT_WAKUP_MODE_OFF 4
#define INPUT_EVENT_WAKUP_MODE_ON 5
+#include
+
enum CPU_GOV_CHECK { CPU0 = 0, CPU1 = 1, CPU2 = 2, CPU3 = 3 };
+
+void power_init(void);
+void power_hint(power_hint_t hint, void *data);
+void set_interactive(int on);
+void set_feature(feature_t feature, int state);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__POWER_COMMON_H___
diff --git a/power/powerhintparser.h b/power/powerhintparser.h
index 48a9bb49a..28cd80d44 100644
--- a/power/powerhintparser.h
+++ b/power/powerhintparser.h
@@ -30,7 +30,7 @@
#ifndef __POWERHINTPARSER__
#define __POWERHINTPARSER__
-#define POWERHINT_XML "/vendor/etc/powerhint.xml"
+#define POWERHINT_XML "/system/etc/powerhint.xml"
#define MAX_HINT 6
#define MAX_PARAM 30
diff --git a/power/service.cpp b/power/service.cpp
new file mode 100644
index 000000000..26fe22dd7
--- /dev/null
+++ b/power/service.cpp
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2019, The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define LOG_TAG "android.hardware.power@1.2-service.xiaomi_sdm710"
+
+#include
+#include
+#include
+#include "Power.h"
+
+using android::sp;
+using android::status_t;
+using android::OK;
+
+// libhwbinder:
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+
+// Generated HIDL files
+using android::hardware::power::V1_2::IPower;
+using android::hardware::power::V1_2::implementation::Power;
+
+int main() {
+
+ status_t status;
+ android::sp service = nullptr;
+
+ ALOGI("Power HAL Service 1.2 is starting.");
+
+ service = new Power();
+ if (service == nullptr) {
+ ALOGE("Can not create an instance of Power HAL interface.");
+
+ goto shutdown;
+ }
+
+ configureRpcThreadpool(1, true /*callerWillJoin*/);
+
+ status = service->registerAsService();
+ if (status != OK) {
+ ALOGE("Could not register service for Power HAL(%d).", status);
+ goto shutdown;
+ }
+
+ ALOGI("Power Service is ready");
+ joinRpcThreadpool();
+ //Should not pass this line
+
+shutdown:
+ // In normal operation, we don't expect the thread pool to exit
+
+ ALOGE("Power Service is shutting down");
+ return 1;
+}
+
diff --git a/power/utils.c b/power/utils.c
index fc2bad4fe..0f9ff7e74 100644
--- a/power/utils.c
+++ b/power/utils.c
@@ -53,10 +53,11 @@ char scaling_gov_path[4][80] = {"sys/devices/system/cpu/cpu0/cpufreq/scaling_gov
#define PERF_HAL_PATH "libqti-perfd-client.so"
static void* qcopt_handle;
-static int (*perf_lock_acq)(unsigned long handle, int duration, int list[], int numArgs);
-static int (*perf_lock_rel)(unsigned long handle);
-static int (*perf_hint)(int, char*, int, int);
+static int (*perf_lock_acq)(int handle, int duration, int list[], int numArgs);
+static int (*perf_lock_rel)(int handle);
+static int (*perf_hint)(int, const char*, int, int);
static struct list_node active_hint_list_head;
+const char *pkg = "QTI PowerHAL";
static void* get_qcopt_handle() {
void* handle = NULL;
@@ -230,7 +231,7 @@ int perf_hint_enable(int hint_id, int duration) {
if (qcopt_handle) {
if (perf_hint) {
- lock_handle = perf_hint(hint_id, NULL, duration, -1);
+ lock_handle = perf_hint(hint_id, pkg, duration, -1);
if (lock_handle == -1)
ALOGE("Failed to acquire lock for hint_id: %X.", hint_id);
}
diff --git a/proprietary-files.txt b/proprietary-files.txt
index 8d899b409..a7c9f3874 100644
--- a/proprietary-files.txt
+++ b/proprietary-files.txt
@@ -42,8 +42,6 @@ lib/libdpmtcm.so
# Display postprocessing
lib64/vendor.display.color@1.0.so
-lib64/vendor.display.color@1.1.so
-lib64/vendor.display.color@1.2.so
# IMS
-app/uceShimService/uceShimService.apk
@@ -107,6 +105,8 @@ lib/android.hardware.soundtrigger@2.0-core.so
lib64/vendor.xiaomi.hardware.mfidoca@1.0.so
lib64/vendor.xiaomi.hardware.mlipay@1.0.so
lib64/vendor.xiaomi.hardware.mlipay@1.1.so
+lib64/vendor.xiaomi.hardware.misys@1.0.so
+lib64/vendor.xiaomi.hardware.misys@2.0.so
lib64/vendor.xiaomi.hardware.mtdservice@1.0.so
lib64/vendor.xiaomi.hardware.mtdservice@1.1.so
lib64/vendor.xiaomi.hardware.mtdservice@1.2.so
@@ -124,10 +124,10 @@ lib/vendor.qti.hardware.iop@2.0.so
lib/vendor.qti.hardware.perf@1.0.so
# Power-off charging daemon
--sbin/charger:sbin/chargeonlymode;rootfs|ee410de1d39143c4a7d3f2622a75b2e51a3dab2b
+-sbin/charger:sbin/chargeonlymode;rootfs|f048d2cc20783ba1a608b73d440b3053af6ec9fd
# QMI
-etc/permissions/qti_libpermissions.xml|ef3c88495f2f61a2d16e1445113a9d80f8db0e0a
+etc/permissions/qti_libpermissions.xml|92e5814133dbc1f82fce898374d042a42c9ecf9d
etc/permissions/qti_permissions.xml
# RIL
@@ -137,7 +137,6 @@ etc/permissions/telephonyservice.xml
framework/qcrilhook.jar
framework/qti-telephony-common.jar
framework/QtiTelephonyServicelibrary.jar
-lib64/vendor.qti.hardware.radio.atcmdfwd@1.0.so
-priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk
# SDM
diff --git a/recovery/recovery_updater.cpp b/recovery/recovery_updater.cpp
index cc446067e..37ee05ee7 100644
--- a/recovery/recovery_updater.cpp
+++ b/recovery/recovery_updater.cpp
@@ -224,8 +224,8 @@ Value* VerifyVendorFn(const char* name, State* state,
return ErrorAbort(state, kArgsParsingFailure, "%s() error parsing arguments", name);
}
- if (std::stoi(current_vendor_date) != std::stoi(args[0])) {
- // Fail immediately if build doesn't match the required one
+ if (std::stoi(current_vendor_date) < std::stoi(args[0])) {
+ // Fail immediately if build is older than required
return StringValue(strdup("0"));
}
diff --git a/releasetools.py b/releasetools.py
index c71f7e7f3..1140b7dd5 100644
--- a/releasetools.py
+++ b/releasetools.py
@@ -1,7 +1,6 @@
# Copyright (C) 2009 The Android Open Source Project
# Copyright (c) 2011, The Linux Foundation. All rights reserved.
# Copyright (C) 2017-2018 The LineageOS Project
-# Copyright (C) 2019 The XenonHD Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -27,16 +26,6 @@ def IncrementalOTA_InstallEnd(info):
OTA_InstallEnd(info)
return
-def FullOTA_Assertions(info):
- AddModemAssertion(info, info.input_zip)
- AddVendorAssertion(info, info.input_zip)
- return
-
-def IncrementalOTA_Assertions(info):
- AddModemAssertion(info, info.target_zip)
- AddVendorAssertion(info, info.target_zip)
- return
-
def AddImage(info, basename, dest):
path = "IMAGES/" + basename
if path not in info.input_zip.namelist():
@@ -50,31 +39,3 @@ def OTA_InstallEnd(info):
info.script.Print("Patching firmware images...")
AddImage(info, "dtbo.img", "/dev/block/bootdevice/by-name/dtbo")
return
-
-def AddModemAssertion(info, input_zip):
- android_info = info.input_zip.read("OTA/android-info.txt")
- m = re.search(r'require\s+version-modem\s*=\s*(.+)', android_info)
- miui_version = re.search(r'require\s+version-miui\s*=\s*(.+)', android_info)
- if m and miui_version:
- timestamp = m.group(1).rstrip()
- firmware_version = miui_version.group(1).rstrip()
- if ((len(timestamp) and '*' not in timestamp) and \
- (len(firmware_version) and '*' not in firmware_version)):
- cmd = 'assert(xiaomi.verify_modem("{}") == "1" || abort("ERROR: This package requires firmware from MIUI {} developer build or newer. Please upgrade firmware and retry!"););'
- info.script.AppendExtra(cmd.format(timestamp, firmware_version))
- return
-
-def AddVendorAssertion(info, input_zip):
- android_info = info.input_zip.read("OTA/android-info.txt")
- v = re.search(r'require\s+version-vendor\s*=\s*(.+)', android_info)
- miui_version = re.search(r'require\s+version-miui\s*=\s*(.+)', android_info)
- if v and miui_version:
- build_date_utc, vndk_version = v.group(1).rstrip().split(',')
- build_date_utcs = build_date_utc.split('|')
- firmware_version = miui_version.group(1).rstrip()
- cmd = 'assert('
- for date in range(0, len(build_date_utcs)):
- cmd += 'xiaomi.verify_vendor("' + build_date_utcs[date] + '", "{1}") == "1" || '
- cmd += 'abort("ERROR: This package requires vendor from MIUI {2} build. Please upgrade vendor image and retry!"););'
- info.script.AppendExtra(cmd.format(build_date_utcs, vndk_version, firmware_version))
- return
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index 860f094f4..67b612f89 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -1,9 +1,186 @@
LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.class_late.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.class_late.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.class_main.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.class_main.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.crda.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.crda.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.mdm.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.mdm.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.class_core.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.class_core.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.coex.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.coex.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.crashdata.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.crashdata.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.early_boot.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.early_boot.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.efs.sync.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.efs.sync.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.post_boot.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.sdio.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.sdio.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.sensors.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.usb.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qcom.usb.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qti.can.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qti.can.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qti.fm.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qti.fm.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qti.ims.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qti.ims.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qti.qseecomd.sh
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := bin/init.qti.qseecomd.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.msm.usb.configfs.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.msm.usb.configfs.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.rc
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/init
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.usb.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.usb.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.target.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.target.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := ueventd.qcom.rc
+LOCAL_MODULE_STEM := ueventd.rc
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/ueventd.qcom.rc
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
+include $(BUILD_PREBUILT)
\ No newline at end of file
diff --git a/rootdir/bin/init.class_late.sh b/rootdir/bin/init.class_late.sh
new file mode 100644
index 000000000..9f41be108
--- /dev/null
+++ b/rootdir/bin/init.class_late.sh
@@ -0,0 +1,44 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# start atfwd daemon
+#
+atfwd_status=`getprop persist.vendor.radio.atfwd.start`
+baseband=`getprop ro.baseband`
+
+#Do not start atfwd for sda, apq, qcs
+case "$baseband" in
+ "apq" | "sda" | "qcs" )
+ setprop persist.vendor.radio.atfwd.start false;;
+ *)
+ if [ "$atfwd_status" = "true" ]; then
+ start vendor.atfwd
+ fi
+esac
diff --git a/rootdir/bin/init.class_main.sh b/rootdir/bin/init.class_main.sh
new file mode 100644
index 000000000..cee656e1f
--- /dev/null
+++ b/rootdir/bin/init.class_main.sh
@@ -0,0 +1,170 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# start ril-daemon only for targets on which radio is present
+#
+baseband=`getprop ro.baseband`
+sgltecsfb=`getprop persist.vendor.radio.sglte_csfb`
+datamode=`getprop persist.vendor.data.mode`
+qcrild_status=true
+
+case "$baseband" in
+ "apq" | "sda" | "qcs" )
+ setprop ro.vendor.radio.noril yes
+ stop ril-daemon
+ stop vendor.ril-daemon
+ stop vendor.qcrild
+ start vendor.ipacm
+esac
+
+case "$baseband" in
+ "sa8")
+ start vendor.ipacm
+esac
+
+case "$baseband" in
+ "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
+ start vendor.qmuxd
+esac
+
+case "$baseband" in
+ "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6")
+
+ # For older modem packages launch ril-daemon.
+ if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then
+ modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1`
+ if [ "$modem" = "AT" ]; then
+ version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
+ if [ ! -z $version ]; then
+ if [ "$version" \< "3.1" ]; then
+ qcrild_status=false
+ fi
+ fi
+ elif [ "$modem" = "TA" ]; then
+ version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
+ if [ ! -z $version ]; then
+ if [ "$version" \< "3.0" ]; then
+ qcrild_status=false
+ fi
+ fi
+ elif [ "$modem" = "JO" ]; then
+ version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
+ sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
+ sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1`
+ if [ ! -z $version ]; then
+ if [ "$version" \< "3.2" ]; then
+ qcrild_status=false
+ fi
+ fi
+ elif [ "$modem" = "TH" ]; then
+ qcrild_status=false
+ fi
+ fi
+
+ if [ "$qcrild_status" = "true" ]; then
+ # Make sure both rild, qcrild are not running at same time.
+ # This is possible with vanilla aosp system image.
+ stop ril-daemon
+ stop vendor.ril-daemon
+
+ start vendor.qcrild
+ else
+ start ril-daemon
+ start vendor.ril-daemon
+ fi
+
+ start vendor.ipacm-diag
+ start vendor.ipacm
+ case "$baseband" in
+ "svlte2a" | "csfb")
+ start qmiproxy
+ ;;
+ "sglte" | "sglte2" )
+ if [ "x$sgltecsfb" != "xtrue" ]; then
+ start qmiproxy
+ else
+ setprop persist.vendor.radio.voice.modem.index 0
+ fi
+ ;;
+ esac
+
+ multisim=`getprop persist.radio.multisim.config`
+
+ if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
+ if [ "$qcrild_status" = "true" ]; then
+ start vendor.qcrild2
+ else
+ start vendor.ril-daemon2
+ fi
+ elif [ "$multisim" = "tsts" ]; then
+ if [ "$qcrild_status" = "true" ]; then
+ start vendor.qcrild2
+ start vendor.qcrild3
+ else
+ start vendor.ril-daemon2
+ start vendor.ril-daemon3
+ fi
+ fi
+
+ case "$datamode" in
+ "tethered")
+ start vendor.dataqti
+ start vendor.dataadpl
+ start vendor.port-bridge
+ ;;
+ "concurrent")
+ start vendor.dataqti
+ start vendor.dataadpl
+ start vendor.netmgrd
+ start vendor.port-bridge
+ ;;
+ *)
+ start vendor.netmgrd
+ ;;
+ esac
+esac
+
+#
+# Allow persistent faking of bms
+# User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity
+#
+fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity`
+case "$fake_batt_capacity" in
+ "") ;; #Do nothing here
+ * )
+ echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
+ ;;
+esac
diff --git a/rootdir/bin/init.crda.sh b/rootdir/bin/init.crda.sh
new file mode 100644
index 000000000..426478975
--- /dev/null
+++ b/rootdir/bin/init.crda.sh
@@ -0,0 +1,35 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2012, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+country=`getprop wlan.crda.country`
+# crda takes input in COUNTRY environment variable
+if [ $country != "" ]
+then
+COUNTRY="$country" /system/bin/crda
+fi
diff --git a/rootdir/bin/init.mdm.sh b/rootdir/bin/init.mdm.sh
new file mode 100644
index 000000000..3ed7ed5b5
--- /dev/null
+++ b/rootdir/bin/init.mdm.sh
@@ -0,0 +1,34 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2013, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+baseband=`getprop ro.baseband`
+if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then
+ start vendor.mdm_helper
+fi
+
diff --git a/rootdir/bin/init.qcom.class_core.sh b/rootdir/bin/init.qcom.class_core.sh
new file mode 100644
index 000000000..8f8265dfc
--- /dev/null
+++ b/rootdir/bin/init.qcom.class_core.sh
@@ -0,0 +1,216 @@
+#!/vendor/bin/sh
+
+# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Set platform variables
+target=`getprop ro.board.platform`
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
+else
+ soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/platform_version ]; then
+ soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
+else
+ soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
+fi
+
+
+# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
+# that can be used to plug in/out memory that has been configured as unstable.
+# This unstable memory can be in Active or In-Active State.
+# Each of which the userspace can request by writing to a sys file.
+#
+# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
+# property is set in the Android system properties file.
+#
+# If ro.dev.dmm.dpd.start_address is set here then the target has a memory
+# configuration that supports DynamicMemoryManagement.
+init_DMM()
+{
+ block=-1
+
+ case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960")
+ ;;
+ *)
+ return
+ ;;
+ esac
+
+ mem="/sys/devices/system/memory"
+ op=`cat $mem/movable_start_bytes`
+ case "$op" in
+ "0")
+ log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
+ ;;
+
+ "$mem/movable_start_bytes: No such file or directory ")
+ log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
+ ;;
+
+ *)
+ log -p i -t DMM DMM available. movable_start_bytes at $op
+ movable_start_bytes=0x`cat $mem/movable_start_bytes`
+ block_size_bytes=0x`cat $mem/block_size_bytes`
+ block=$((#${movable_start_bytes}/${block_size_bytes}))
+
+ chown -h system.system $mem/memory$block/state
+ chown -h system.system $mem/probe
+ chown -h system.system $mem/active
+ chown -h system.system $mem/remove
+
+ case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ echo $movable_start_bytes > $mem/probe
+ case "$?" in
+ "0")
+ log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
+ ;;
+ *)
+ log -p e -t DMM $movable_start_bytes to physical hotplug failed.
+ return
+ ;;
+ esac
+
+ echo online > $mem/memory$block/state
+ case "$?" in
+ "0")
+ log -p i -t DMM \'echo online\' to logical hotplug succeeded.
+ ;;
+ *)
+ log -p e -t DMM \'echo online\' to logical hotplug failed.
+ return
+ ;;
+ esac
+ ;;
+ esac
+
+ setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
+ setprop ro.dev.dmm.dpd.block $block
+ ;;
+ esac
+
+ case "$target" in
+ "msm8960")
+ return
+ ;;
+ esac
+
+ # For 7X30 targets:
+ # ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
+ # configuration. This is also used to indicate that the target is capable of
+ # setting EBI-1 to Deep Power Down or Self Refresh.
+ op=`cat $mem/low_power_memory_start_bytes`
+ case "$op" in
+ "0")
+ log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
+ ;;
+ "$mem/low_power_memory_start_bytes No such file or directory ")
+ log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
+ ;;
+ *)
+ log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
+ ;;
+ esac
+}
+
+#
+# For controlling console and shell on console on 8960 - perist.serial.enable 8960
+# On other target use default ro.debuggable property.
+#
+serial=`getprop persist.serial.enable`
+dserial=`getprop ro.debuggable`
+case "$target" in
+ "msm8960")
+ case "$serial" in
+ "0")
+ echo 0 > /sys/devices/platform/msm_serial_hsl.0/console
+ ;;
+ "1")
+ echo 1 > /sys/devices/platform/msm_serial_hsl.0/console
+ start console
+ ;;
+ *)
+ case "$dserial" in
+ "1")
+ start console
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ "msm8610" | "msm8974" | "msm8226")
+ case "$serial" in
+ "0")
+ echo 0 > /sys/devices/f991f000.serial/console
+ ;;
+ "1")
+ echo 1 > /sys/devices/f991f000.serial/console
+ start console
+ ;;
+ *)
+ case "$dserial" in
+ "1")
+ start console
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ case "$dserial" in
+ "1")
+ start console
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ insmod /system/lib/modules/ss_mfcinit.ko
+ insmod /system/lib/modules/ss_vencoder.ko
+ insmod /system/lib/modules/ss_vdecoder.ko
+ chmod -h 0666 /dev/ss_mfc_reg
+ chmod -h 0666 /dev/ss_vdec
+ chmod -h 0666 /dev/ss_venc
+
+ init_DMM
+ ;;
+
+ "msm8960")
+ init_DMM
+ ;;
+esac
diff --git a/rootdir/bin/init.qcom.coex.sh b/rootdir/bin/init.qcom.coex.sh
new file mode 100644
index 000000000..a9a22f175
--- /dev/null
+++ b/rootdir/bin/init.qcom.coex.sh
@@ -0,0 +1,115 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2009-2010, 2012, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+LOG_TAG="qcom-bt-wlan-coex"
+LOG_NAME="${0}:"
+
+coex_pid=""
+ath_wlan_supported=`getprop wlan.driver.ath`
+
+loge ()
+{
+ /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
+}
+
+logi ()
+{
+ /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
+}
+
+failed ()
+{
+ loge "$1: exit code $2"
+ exit $2
+}
+
+start_coex ()
+{
+ case "$ath_wlan_supported" in
+ "2")
+ echo "ATH WLAN Chip ID AR6004 is enabled"
+ /system/bin/abtfilt -d -z -n -m -a -w wlan0 &
+ ;;
+ "1")
+ echo "ATH WLAN Chip ID is enabled"
+ # Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
+ /system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
+ ;;
+ "0")
+ echo "WCN WLAN Chip ID is enabled"
+ # Must have -o turned on to avoid daemon (otherwise we cannot get pid)
+ /system/bin/btwlancoex -o $opt_flags &
+ ;;
+ *)
+ echo "NO WLAN Chip ID is enabled, so enabling ATH as default"
+ # Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
+ /system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
+ ;;
+ esac
+ coex_pid=$!
+ logi "start_coex: pid = $coex_pid"
+}
+
+kill_coex ()
+{
+ logi "kill_coex: pid = $coex_pid"
+ kill -TERM $coex_pid
+ # this shell doesn't exit now -- wait returns for normal exit
+}
+
+# mimic coex options parsing -- maybe a waste of effort
+USAGE="${0} [-o] [-c] [-r] [-i] [-h]"
+
+while getopts "ocrih" f
+do
+ case $f in
+ o | c | r | i | h) opt_flags="$opt_flags -$f" ;;
+ \?) echo $USAGE; exit 1;;
+ esac
+done
+
+# init does SIGTERM on ctl.stop for service
+trap "kill_coex" TERM INT
+
+#Selectively start coex module
+target=`getprop ro.board.platform`
+
+if [ "$target" == "msm8960" ] && [ "$ath_wlan_supported" != "2" ]; then
+ logi "btwlancoex/abtfilt is not needed"
+else
+ # Build settings may not produce the coex executable
+ if ls /system/bin/btwlancoex || ls /system/bin/abtfilt
+ then
+ start_coex
+ wait $coex_pid
+ logi "Coex stopped"
+ else
+ logi "btwlancoex/abtfilt not available"
+ fi
+fi
+exit 0
diff --git a/rootdir/bin/init.qcom.crashdata.sh b/rootdir/bin/init.qcom.crashdata.sh
new file mode 100644
index 000000000..59cf68d83
--- /dev/null
+++ b/rootdir/bin/init.qcom.crashdata.sh
@@ -0,0 +1,48 @@
+#!/vendor/bin/sh
+# Copyright (c) 2017, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+abnormalcnt="persist.vendor.crash.cnt"
+
+abnormal_cnt=`getprop $abnormalcnt`
+crash_detect=`getprop persist.vendor.crash.detect`
+
+if [ "$abnormal_cnt" = "" ]
+then
+setprop $abnormalcnt 0
+fi
+
+if [ "$crash_detect" = "true" ]
+then
+abnormal_cnt=`expr $abnormal_cnt + 1`
+setprop $abnormalcnt $abnormal_cnt
+elif [ "$crash_detect" = "false" ];then
+setprop persist.vendor.crash.detect true
+else
+setprop persist.vendor.crash.detect true
+fi
diff --git a/rootdir/bin/init.qcom.early_boot.sh b/rootdir/bin/init.qcom.early_boot.sh
new file mode 100644
index 000000000..8788a77cb
--- /dev/null
+++ b/rootdir/bin/init.qcom.early_boot.sh
@@ -0,0 +1,437 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2012-2013,2016,2018 The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+export PATH=/vendor/bin
+
+# Set platform variables
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
+else
+ soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/platform_version ]; then
+ soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
+else
+ soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
+fi
+
+if [ -f /sys/class/drm/card0-DSI-1/modes ]; then
+ echo "detect" > /sys/class/drm/card0-DSI-1/status
+ mode_file=/sys/class/drm/card0-DSI-1/modes
+ while read line; do
+ fb_width=${line%%x*};
+ break;
+ done < $mode_file
+elif [ -f /sys/class/graphics/fb0/virtual_size ]; then
+ res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
+ fb_width=${res%,*}
+fi
+
+log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
+
+#For drm based display driver
+vbfile=/sys/module/drm/parameters/vblankoffdelay
+if [ -w $vbfile ]; then
+ echo -1 > $vbfile
+else
+ log -t DRM_BOOT -p w "file: '$vbfile' or perms doesn't exist"
+fi
+
+function set_density_by_fb() {
+ #put default density based on width
+ if [ -z $fb_width ]; then
+ setprop vendor.display.lcd_density 320
+ else
+ if [ $fb_width -ge 1600 ]; then
+ setprop vendor.display.lcd_density 640
+ elif [ $fb_width -ge 1440 ]; then
+ setprop vendor.display.lcd_density 560
+ elif [ $fb_width -ge 1080 ]; then
+ setprop vendor.display.lcd_density 480
+ elif [ $fb_width -ge 720 ]; then
+ setprop vendor.display.lcd_density 320 #for 720X1280 resolution
+ elif [ $fb_width -ge 480 ]; then
+ setprop vendor.display.lcd_density 240 #for 480X854 QRD resolution
+ else
+ setprop vendor.display.lcd_density 160
+ fi
+ fi
+}
+
+target=`getprop ro.board.platform`
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ case "$soc_hwplatform" in
+ "FFA" | "SVLTE_FFA")
+ # linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
+ # the UI keyboard works fine.
+ ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
+ ;;
+ "Fluid")
+ setprop vendor.display.lcd_density 240
+ setprop qcom.bt.dev_power_class 2
+ ;;
+ *)
+ ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
+ ;;
+ esac
+ ;;
+
+ "msm8660")
+ case "$soc_hwplatform" in
+ "Fluid")
+ setprop vendor.display.lcd_density 240
+ ;;
+ "Dragon")
+ setprop ro.sound.alsa "WM8903"
+ ;;
+ esac
+ ;;
+
+ "sm6150")
+ case "$soc_hwplatform" in
+ "ADP")
+ setprop vendor.display.lcd_density 160
+ ;;
+ esac
+ case "$soc_hwid" in
+ 365|366)
+ sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.sm7150.version 1
+ fi
+ ;;
+ 355)
+ setprop vendor.media.sm6150.version 1
+ ;;
+ *)
+ esac
+ ;;
+
+ "msm8960")
+ # lcd density is write-once. Hence the separate switch case
+ case "$soc_hwplatform" in
+ "Liquid")
+ if [ "$soc_hwver" == "196608" ]; then # version 0x30000 is 3D sku
+ setprop ro.sf.hwrotation 90
+ fi
+
+ setprop vendor.display.lcd_density 160
+ ;;
+ "MTP")
+ setprop vendor.display.lcd_density 240
+ ;;
+ *)
+ case "$soc_hwid" in
+ "109")
+ setprop vendor.display.lcd_density 160
+ ;;
+ *)
+ setprop vendor.display.lcd_density 240
+ ;;
+ esac
+ ;;
+ esac
+
+ #Set up composition type based on the target
+ case "$soc_hwid" in
+ 87)
+ #8960
+ setprop debug.composition.type dyn
+ ;;
+ 153|154|155|156|157|138)
+ #8064 V2 PRIME | 8930AB | 8630AB | 8230AB | 8030AB | 8960AB
+ setprop debug.composition.type c2d
+ ;;
+ *)
+ esac
+ ;;
+
+ "msm8974")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop vendor.display.lcd_density 160
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ "Dragon")
+ setprop vendor.display.lcd_density 240
+ ;;
+ *)
+ setprop vendor.display.lcd_density 320
+ ;;
+ esac
+ ;;
+
+ "msm8226")
+ case "$soc_hwplatform" in
+ *)
+ setprop vendor.display.lcd_density 320
+ ;;
+ esac
+ ;;
+
+ "msm8610" | "apq8084" | "mpq8092")
+ case "$soc_hwplatform" in
+ *)
+ setprop vendor.display.lcd_density 240
+ ;;
+ esac
+ ;;
+ "apq8084")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop vendor.display.lcd_density 320
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ "SBC")
+ setprop vendor.display.lcd_density 200
+ # SBC do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop qemu.hw.mainkeys 0
+ ;;
+ *)
+ setprop vendor.display.lcd_density 480
+ ;;
+ esac
+ ;;
+ "msm8996")
+ case "$soc_hwplatform" in
+ "Dragon")
+ setprop vendor.display.lcd_density 240
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "ADP")
+ setprop vendor.display.lcd_density 160
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "SBC")
+ setprop vendor.display.lcd_density 240
+ setprop qemu.hw.mainkeys 0
+ ;;
+ *)
+ setprop vendor.display.lcd_density 560
+ ;;
+ esac
+ ;;
+ "msm8937" | "msm8940")
+ # Set vendor.opengles.version based on chip id.
+ # MSM8937 and MSM8940 variants supports OpenGLES 3.1
+ # 196608 is decimal for 0x30000 to report version 3.0
+ # 196609 is decimal for 0x30001 to report version 3.1
+ # 196610 is decimal for 0x30002 to report version 3.2
+ case "$soc_hwid" in
+ 294|295|296|297|298|313|353|354|363|364)
+ setprop vendor.opengles.version 196610
+ if [ $soc_hwid = 354 ]
+ then
+ setprop vendor.media.msm8937.version 1
+ log -t BOOT -p i "SDM429 early_boot prop set for: HwID '$soc_hwid'"
+ fi
+ ;;
+ 303|307|308|309|320)
+ # Vulkan is not supported for 8917 variants
+ setprop vendor.opengles.version 196608
+ setprop persist.graphics.vulkan.disable true
+ ;;
+ *)
+ setprop vendor.opengles.version 196608
+ ;;
+ esac
+ ;;
+ "msm8909")
+ case "$soc_hwplatform" in
+ *)
+ setprop persist.graphics.vulkan.disable true
+ ;;
+ esac
+ ;;
+ "msm8998" | "apq8098_latv")
+ case "$soc_hwplatform" in
+ *)
+ setprop vendor.display.lcd_density 560
+ ;;
+ esac
+ ;;
+ "sdm845")
+ case "$soc_hwplatform" in
+ *)
+ if [ $fb_width -le 1600 ]; then
+ setprop vendor.display.lcd_density 560
+ else
+ setprop vendor.display.lcd_density 640
+ fi
+ ;;
+ esac
+ ;;
+ "msmnile")
+ case "$soc_hwplatform" in
+ *)
+ if [ $fb_width -le 1600 ]; then
+ setprop vendor.display.lcd_density 560
+ else
+ setprop vendor.display.lcd_density 640
+ fi
+ ;;
+ esac
+ ;;
+ "sdm710" | "msmpeafowl")
+ case "$soc_hwplatform" in
+ *)
+ sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.sdm710.version 1
+ fi
+ ;;
+ esac
+ ;;
+ "msm8953")
+ cap_ver = 1
+ if [ -e "/sys/devices/platform/soc/1d00000.qcom,vidc/capability_version" ]; then
+ cap_ver=`cat /sys/devices/platform/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
+ else
+ cap_ver=`cat /sys/devices/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
+ fi
+
+ if [ $cap_ver -eq 1 ]; then
+ setprop vendor.media.msm8953.version 1
+ fi
+ ;;
+ #Set property to differentiate SDM660 & SDM455
+ #SOC ID for SDM455 is 385
+ "sdm660")
+ case "$soc_hwid" in
+ 385)
+ setprop vendor.media.sdm660.version 1
+ esac
+ ;;
+esac
+
+baseband=`getprop ro.baseband`
+#enable atfwd daemon all targets except sda, apq, qcs
+case "$baseband" in
+ "apq" | "sda" | "qcs" )
+ setprop persist.vendor.radio.atfwd.start false;;
+ *)
+ setprop persist.vendor.radio.atfwd.start true;;
+esac
+
+#set default lcd density
+#Since lcd density has read only
+#property, it will not overwrite previous set
+#property if any target is setting forcefully.
+set_density_by_fb
+
+
+# set Lilliput LCD density for ADP
+product=`getprop ro.build.product`
+
+case "$product" in
+ "msmnile_au")
+ setprop vendor.display.lcd_density 160
+ echo 864000000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 864000000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
+ echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/max_freq
+ ;;
+ *)
+ ;;
+esac
+case "$product" in
+ "msmnile_gvmq")
+ setprop vendor.display.lcd_density 160
+ echo 864000000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 864000000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
+ echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/max_freq
+ ;;
+ *)
+ ;;
+esac
+case "$product" in
+ "talos_au")
+ setprop vendor.display.lcd_density 160
+ ;;
+ *)
+ ;;
+esac
+
+# Setup display nodes & permissions
+# HDMI can be fb1 or fb2
+# Loop through the sysfs nodes and determine
+# the HDMI(dtv panel)
+
+function set_perms() {
+ #Usage set_perms
+ chown -h $2 $1
+ chmod $3 $1
+}
+
+# check for the type of driver FB or DRM
+fb_driver=/sys/class/graphics/fb0
+if [ -e "$fb_driver" ]
+then
+ # check for mdp caps
+ file=/sys/class/graphics/fb0/mdp/caps
+ if [ -f "$file" ]
+ then
+ setprop vendor.gralloc.disable_ubwc 1
+ cat $file | while read line; do
+ case "$line" in
+ *"ubwc"*)
+ setprop vendor.gralloc.enable_fb_ubwc 1
+ setprop vendor.gralloc.disable_ubwc 0
+ esac
+ done
+ fi
+else
+ set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
+fi
+
+boot_reason=`cat /proc/sys/kernel/boot_reason`
+reboot_reason=`getprop ro.boot.alarmboot`
+if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
+ setprop ro.vendor.alarm_boot true
+else
+ setprop ro.vendor.alarm_boot false
+fi
+
+# copy GPU frequencies to vendor property
+if [ -f /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies ]; then
+ gpu_freq=`cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies` 2> /dev/null
+ setprop vendor.gpu.available_frequencies "$gpu_freq"
+fi
diff --git a/rootdir/bin/init.qcom.efs.sync.sh b/rootdir/bin/init.qcom.efs.sync.sh
new file mode 100644
index 000000000..5e7bfa158
--- /dev/null
+++ b/rootdir/bin/init.qcom.efs.sync.sh
@@ -0,0 +1,35 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2012, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+PATH=/system/bin:$PATH
+export PATH
+cat /sys/devices/platform/rs300000a7.65536/force_sync
+cat /sys/devices/platform/rs300100a7.65536/force_sync
diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/bin/init.qcom.post_boot.sh
new file mode 100644
index 000000000..494ae3484
--- /dev/null
+++ b/rootdir/bin/init.qcom.post_boot.sh
@@ -0,0 +1,4416 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2012-2013, 2016-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+function 8953_sched_dcvs_eas()
+{
+ #governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1401600 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8953 and sdm450 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_load
+}
+
+function 8917_sched_dcvs_eas()
+{
+ #governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1094400 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8917 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpufreq/schedutil/hispeed_load
+}
+
+function 8937_sched_dcvs_eas()
+{
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8937 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ ## enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for 8937 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+
+}
+
+function 8953_sched_dcvs_hmp()
+{
+ #scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ #task packing settings
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_static_cpu_pwr_cost
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_static_cpu_pwr_cost
+ # spill load is set to 100% by default in the kernel
+ echo 3 > /proc/sys/kernel/sched_spill_nr_run
+ # Apply inter-cluster load balancer restrictions
+ echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill
+ # set sync wakee policy tunable
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+
+ #governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1401600:39000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 1401600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "85 1401600:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ echo 19 > /proc/sys/kernel/sched_upmigrate_min_nice
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif
+ echo 200000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 200000 > /proc/sys/kernel/sched_freq_dec_notify
+
+}
+
+function 8917_sched_dcvs_hmp()
+{
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 1 > /proc/sys/kernel/sched_restrict_tasks_spread
+ # HMP Task packing settings
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1094400:39000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 1094400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1094400:90" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+}
+
+function 8937_sched_dcvs_hmp()
+{
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ # HMP Task packing settings
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1094400 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1094400:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 768000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+}
+target=`getprop ro.board.platform`
+
+function configure_zram_parameters() {
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ low_ram=`getprop ro.config.low_ram`
+
+ # Zram disk - 75% for Go devices.
+ # For 512MB Go device, size = 384MB, set same for Non-Go.
+ # For 1GB Go device, size = 768MB, set same for Non-Go.
+ # For >=2GB Non-Go device, size = 1GB
+ # And enable lz4 zram compression for Go targets.
+
+ if [ "$low_ram" == "true" ]; then
+ echo lz4 > /sys/block/zram0/comp_algorithm
+ fi
+
+ if [ -f /sys/block/zram0/disksize ]; then
+ if [ $MemTotal -le 524288 ]; then
+ echo 402653184 > /sys/block/zram0/disksize
+ elif [ $MemTotal -le 1048576 ]; then
+ echo 805306368 > /sys/block/zram0/disksize
+ else
+ # Set Zram disk size=1GB for >=2GB Non-Go targets.
+ echo 1073741824 > /sys/block/zram0/disksize
+ fi
+ mkswap /dev/block/zram0
+ swapon /dev/block/zram0 -p 32758
+ fi
+}
+
+function configure_read_ahead_kb_values() {
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ # Set 128 for <= 3GB &
+ # set 512 for >= 4GB targets.
+ if [ $MemTotal -le 3145728 ]; then
+ echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb
+ echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
+ echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
+ echo 128 > /sys/block/dm-0/queue/read_ahead_kb
+ echo 128 > /sys/block/dm-1/queue/read_ahead_kb
+ echo 128 > /sys/block/dm-2/queue/read_ahead_kb
+ else
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
+ echo 512 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
+ echo 512 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
+ echo 512 > /sys/block/dm-0/queue/read_ahead_kb
+ echo 512 > /sys/block/dm-1/queue/read_ahead_kb
+ echo 512 > /sys/block/dm-2/queue/read_ahead_kb
+ fi
+}
+
+function disable_core_ctl() {
+ if [ -f /sys/devices/system/cpu/cpu0/core_ctl/enable ]; then
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+ else
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
+ fi
+}
+
+function enable_swap() {
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ SWAP_ENABLE_THRESHOLD=1048576
+ swap_enable=`getprop ro.vendor.qti.config.swap`
+
+ # Enable swap initially only for 1 GB targets
+ if [ "$MemTotal" -le "$SWAP_ENABLE_THRESHOLD" ] && [ "$swap_enable" == "true" ]; then
+ # Static swiftness
+ echo 1 > /proc/sys/vm/swap_ratio_enable
+ echo 70 > /proc/sys/vm/swap_ratio
+
+ # Swap disk - 200MB size
+ if [ ! -f /data/vendor/swap/swapfile ]; then
+ dd if=/dev/zero of=/data/vendor/swap/swapfile bs=1m count=200
+ fi
+ mkswap /data/vendor/swap/swapfile
+ swapon /data/vendor/swap/swapfile -p 32758
+ fi
+}
+
+function configure_memory_parameters() {
+ # Set Memory parameters.
+ #
+ # Set per_process_reclaim tuning parameters
+ # All targets will use vmpressure range 50-70,
+ # All targets will use 512 pages swap size.
+ #
+ # Set Low memory killer minfree parameters
+ # 32 bit Non-Go, all memory configurations will use 15K series
+ # 32 bit Go, all memory configurations will use uLMK + Memcg
+ # 64 bit will use Google default LMK series.
+ #
+ # Set ALMK parameters (usually above the highest minfree values)
+ # vmpressure_file_min threshold is always set slightly higher
+ # than LMK minfree's last bin value for all targets. It is calculated as
+ # vmpressure_file_min = (last bin - second last bin ) + last bin
+ #
+ # Set allocstall_threshold to 0 for all targets.
+ #
+
+ProductName=`getprop ro.product.name`
+low_ram=`getprop ro.config.low_ram`
+
+if [ "$ProductName" == "msmnile" ]; then
+ # Enable ZRAM
+ configure_zram_parameters
+ configure_read_ahead_kb_values
+ echo 0 > /proc/sys/vm/page-cluster
+ echo 100 > /proc/sys/vm/swappiness
+else
+ arch_type=`uname -m`
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ # Set parameters for 32-bit Go targets.
+ if [ $MemTotal -le 1048576 ] && [ "$low_ram" == "true" ]; then
+ # Disable KLMK, ALMK, PPR & Core Control for Go devices
+ echo 0 > /sys/module/lowmemorykiller/parameters/enable_lmk
+ echo 0 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
+ echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
+ disable_core_ctl
+ # Enable oom_reaper for Go devices
+ if [ -f /proc/sys/vm/reap_mem_on_sigkill ]; then
+ echo 1 > /proc/sys/vm/reap_mem_on_sigkill
+ fi
+ else
+
+ # Read adj series and set adj threshold for PPR and ALMK.
+ # This is required since adj values change from framework to framework.
+ adj_series=`cat /sys/module/lowmemorykiller/parameters/adj`
+ adj_1="${adj_series#*,}"
+ set_almk_ppr_adj="${adj_1%%,*}"
+
+ # PPR and ALMK should not act on HOME adj and below.
+ # Normalized ADJ for HOME is 6. Hence multiply by 6
+ # ADJ score represented as INT in LMK params, actual score can be in decimal
+ # Hence add 6 considering a worst case of 0.9 conversion to INT (0.9*6).
+ # For uLMK + Memcg, this will be set as 6 since adj is zero.
+ set_almk_ppr_adj=$(((set_almk_ppr_adj * 6) + 6))
+ echo $set_almk_ppr_adj > /sys/module/lowmemorykiller/parameters/adj_max_shift
+
+ # Calculate vmpressure_file_min as below & set for 64 bit:
+ # vmpressure_file_min = last_lmk_bin + (last_lmk_bin - last_but_one_lmk_bin)
+ if [ "$arch_type" == "aarch64" ]; then
+ minfree_series=`cat /sys/module/lowmemorykiller/parameters/minfree`
+ minfree_1="${minfree_series#*,}" ; rem_minfree_1="${minfree_1%%,*}"
+ minfree_2="${minfree_1#*,}" ; rem_minfree_2="${minfree_2%%,*}"
+ minfree_3="${minfree_2#*,}" ; rem_minfree_3="${minfree_3%%,*}"
+ minfree_4="${minfree_3#*,}" ; rem_minfree_4="${minfree_4%%,*}"
+ minfree_5="${minfree_4#*,}"
+
+ vmpres_file_min=$((minfree_5 + (minfree_5 - rem_minfree_4)))
+ echo $vmpres_file_min > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
+ if [ $MemTotal -gt 5505024 ]; then
+ echo "18432,23040,27648,32256,85296,120640" > /sys/module/lowmemorykiller/parameters/minfree
+ else
+ echo "18432,23040,27648,32256,55296,80640" > /sys/module/lowmemorykiller/parameters/minfree
+ fi
+ else
+ # Set LMK series, vmpressure_file_min for 32 bit non-go targets.
+ # Disable Core Control, enable KLMK for non-go 8909.
+ if [ "$ProductName" == "msm8909" ]; then
+ disable_core_ctl
+ echo 1 > /sys/module/lowmemorykiller/parameters/enable_lmk
+ fi
+ echo "15360,19200,23040,26880,34415,43737" > /sys/module/lowmemorykiller/parameters/minfree
+ echo 53059 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
+ fi
+
+ # Enable adaptive LMK for all targets &
+ # use Google default LMK series for all 64-bit targets >=2GB.
+ echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
+
+ # Enable oom_reaper
+ if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+ fi
+
+ # Set PPR parameters
+ 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
+
+ case "$soc_id" in
+ # Do not set PPR parameters for premium targets
+ # sdm845 - 321, 341
+ # msm8998 - 292, 319
+ # msm8996 - 246, 291, 305, 312
+ "321" | "341" | "292" | "319" | "246" | "291" | "305" | "312")
+ ;;
+ *)
+ #Set PPR parameters for all other targets.
+ echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
+ echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
+ echo 50 > /sys/module/process_reclaim/parameters/pressure_min
+ echo 70 > /sys/module/process_reclaim/parameters/pressure_max
+ echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
+ echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
+ ;;
+ esac
+ fi
+
+ # Set allocstall_threshold to 0 for all targets.
+ # Set swappiness to 100 for all targets
+ echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
+ echo 100 > /proc/sys/vm/swappiness
+
+ configure_zram_parameters
+
+ configure_read_ahead_kb_values
+
+ enable_swap
+fi
+}
+
+function enable_memory_features()
+{
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+
+ if [ $MemTotal -le 2097152 ]; then
+ #Enable B service adj transition for 2GB or less memory
+ setprop ro.vendor.qti.sys.fw.bservice_enable true
+ setprop ro.vendor.qti.sys.fw.bservice_limit 5
+ setprop ro.vendor.qti.sys.fw.bservice_age 5000
+
+ #Enable Delay Service Restart
+ setprop ro.vendor.qti.am.reschedule_service true
+ fi
+}
+
+function start_hbtp()
+{
+ # Start the Host based Touch processing but not in the power off mode.
+ bootmode=`getprop ro.bootmode`
+ if [ "charger" != $bootmode ]; then
+ start vendor.hbtp
+ fi
+}
+
+case "$target" in
+ "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a" | "msm7627_surf" | \
+ "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x")
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ ;;
+esac
+
+case "$target" in
+ "msm7201a_ffa" | "msm7201a_surf")
+ echo 500000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ echo 75000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 1 > /sys/module/pm2/parameters/idle_sleep_mode
+ ;;
+esac
+
+case "$target" in
+ "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627_surf" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm7627a" )
+ echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ ;;
+esac
+
+case "$target" in
+ "msm8660")
+ echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
+ echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
+ echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_dig
+ echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_mem
+ echo 1 > /sys/module/rpm_resources/enable_low_power/rpm_cpu
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ ;;
+esac
+
+case "$target" in
+ "msm8960")
+ echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
+ echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
+ echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_dig
+ echo 1 > /sys/module/rpm_resources/enable_low_power/vdd_mem
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 918000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 1026000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ chown -h system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 384000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ # set DCVS parameters for CPU
+ echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
+ echo 40000 > /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu0/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu0/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu0/disable_pc_threshold
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_max_us
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu1/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu1/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu1/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu1/disable_pc_threshold
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_max_us
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu2/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu2/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu2/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu2/disable_pc_threshold
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_max_us
+ echo 25000 > /sys/module/msm_dcvs/cores/cpu3/slack_time_min_us
+ echo 100000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_min_us
+ echo 500000 > /sys/module/msm_dcvs/cores/cpu3/em_win_size_max_us
+ echo 0 > /sys/module/msm_dcvs/cores/cpu3/slack_mode_dynamic
+ echo 1000000 > /sys/module/msm_dcvs/cores/cpu3/disable_pc_threshold
+ # set DCVS parameters for GPU
+ echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_max_us
+ echo 20000 > /sys/module/msm_dcvs/cores/gpu0/slack_time_min_us
+ echo 0 > /sys/module/msm_dcvs/cores/gpu0/slack_mode_dynamic
+ # set msm_mpdecision parameters
+ echo 45000 > /sys/module/msm_mpdecision/slack_time_max_us
+ echo 15000 > /sys/module/msm_mpdecision/slack_time_min_us
+ echo 100000 > /sys/module/msm_mpdecision/em_win_size_min_us
+ echo 1000000 > /sys/module/msm_mpdecision/em_win_size_max_us
+ echo 3 > /sys/module/msm_mpdecision/online_util_pct_min
+ echo 25 > /sys/module/msm_mpdecision/online_util_pct_max
+ echo 97 > /sys/module/msm_mpdecision/em_max_util_pct
+ echo 2 > /sys/module/msm_mpdecision/rq_avg_poll_ms
+ echo 10 > /sys/module/msm_mpdecision/mp_em_rounding_point_min
+ echo 85 > /sys/module/msm_mpdecision/mp_em_rounding_point_max
+ echo 50 > /sys/module/msm_mpdecision/iowait_threshold_pct
+ #set permissions for the nodes needed by display on/off hook
+ chown -h system /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
+ chown -h system /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
+ chown -h system /sys/module/msm_mpdecision/slack_time_max_us
+ chown -h system /sys/module/msm_mpdecision/slack_time_min_us
+ chmod -h 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_max_us
+ chmod -h 664 /sys/module/msm_dcvs/cores/cpu0/slack_time_min_us
+ chmod -h 664 /sys/module/msm_mpdecision/slack_time_max_us
+ chmod -h 664 /sys/module/msm_mpdecision/slack_time_min_us
+ 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
+ case "$soc_id" in
+ "130")
+ echo 230 > /sys/class/gpio/export
+ echo 228 > /sys/class/gpio/export
+ echo 229 > /sys/class/gpio/export
+ echo "in" > /sys/class/gpio/gpio230/direction
+ echo "rising" > /sys/class/gpio/gpio230/edge
+ echo "in" > /sys/class/gpio/gpio228/direction
+ echo "rising" > /sys/class/gpio/gpio228/edge
+ echo "in" > /sys/class/gpio/gpio229/direction
+ echo "rising" > /sys/class/gpio/gpio229/edge
+ echo 253 > /sys/class/gpio/export
+ echo 254 > /sys/class/gpio/export
+ echo 257 > /sys/class/gpio/export
+ echo 258 > /sys/class/gpio/export
+ echo 259 > /sys/class/gpio/export
+ echo "out" > /sys/class/gpio/gpio253/direction
+ echo "out" > /sys/class/gpio/gpio254/direction
+ echo "out" > /sys/class/gpio/gpio257/direction
+ echo "out" > /sys/class/gpio/gpio258/direction
+ echo "out" > /sys/class/gpio/gpio259/direction
+ chown -h media /sys/class/gpio/gpio253/value
+ chown -h media /sys/class/gpio/gpio254/value
+ chown -h media /sys/class/gpio/gpio257/value
+ chown -h media /sys/class/gpio/gpio258/value
+ chown -h media /sys/class/gpio/gpio259/value
+ chown -h media /sys/class/gpio/gpio253/direction
+ chown -h media /sys/class/gpio/gpio254/direction
+ chown -h media /sys/class/gpio/gpio257/direction
+ chown -h media /sys/class/gpio/gpio258/direction
+ chown -h media /sys/class/gpio/gpio259/direction
+ echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_dig
+ echo 0 > /sys/module/rpm_resources/enable_low_power/vdd_mem
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm8974")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ 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
+ case "$soc_id" in
+ "208" | "211" | "214" | "217" | "209" | "212" | "215" | "218" | "194" | "210" | "213" | "216")
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "cpubw_hwmon" > $devfreq_gov
+ done
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 1190400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 20 > /sys/module/cpu_boost/parameters/boost_ms
+ echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
+ echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ setprop ro.vendor.perf.cores_online 2
+ ;;
+ *)
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 3 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 960000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 1190400 > /sys/devices/system/cpu/cpufreq/ondemand/input_boost
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ ;;
+ esac
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate
+ ;;
+esac
+
+case "$target" in
+ "msm8916")
+ 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
+ case "$soc_id" in
+ "206")
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 2 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+ ;;
+ "247" | "248" | "249" | "250")
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ ;;
+ "239" | "241" | "263")
+ if [ -f /sys/devices/soc0/revision ]; then
+ revision=`cat /sys/devices/soc0/revision`
+ else
+ revision=`cat /sys/devices/system/soc/soc0/revision`
+ fi
+ echo 10 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+ 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" | "2")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ "MTP")
+ case "$platform_subtype_id" in
+ "3")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ "268" | "269" | "270" | "271")
+ echo 10 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+ ;;
+ "233" | "240" | "242")
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm8226")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "msm8610")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential
+ echo 70 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
+ echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
+ echo 787200 > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
+ echo 300000 > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
+ echo 80 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ setprop ro.qualcomm.perf.min_freq 7
+ echo 1 > /sys/kernel/mm/ksm/deferred_timer
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "msm8916")
+
+ 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
+
+ # HMP scheduler settings for 8916, 8936, 8939, 8929
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # Apply governor settings for 8916
+ case "$soc_id" in
+ "206" | "247" | "248" | "249" | "250")
+
+ # HMP scheduler load tracking settings
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # HMP Task packing settings for 8916
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
+
+ # disable thermal core_control to update scaling_min_freq
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ ;;
+ esac
+
+ # Apply governor settings for 8936
+ case "$soc_id" in
+ "233" | "240" | "242")
+
+ # HMP scheduler load tracking settings
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # HMP Task packing settings for 8936
+ echo 50 > /proc/sys/kernel/sched_small_task
+ echo 50 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 10 > /proc/sys/kernel/sched_mostly_idle_nr_run
+
+ # disable thermal core_control to update scaling_min_freq, interactive gov
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ echo "25000 1113600:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 800000:85 1113600:90 1267200:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ ;;
+ esac
+
+ # Apply governor settings for 8939
+ case "$soc_id" in
+ "239" | "241" | "263" | "268" | "269" | "270" | "271")
+
+ if [ `cat /sys/devices/soc0/revision` != "3.0" ]; then
+ # Apply 1.0 and 2.0 specific Sched & Governor settings
+
+ # HMP scheduler load tracking settings
+ echo 5 > /proc/sys/kernel/sched_ravg_hist_size
+
+ # HMP Task packing settings for 8939, 8929
+ echo 20 > /proc/sys/kernel/sched_small_task
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "20000 1113600:50000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo "25000 800000:50000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 75 > /proc/sys/kernel/sched_upmigrate
+ echo 60 > /proc/sys/kernel/sched_downmigrate
+
+ # cpu idle load threshold
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ # cpu idle nr run threshold
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ else
+ # Apply 3.0 specific Sched & Governor settings
+ # HMP scheduler settings for 8939 V3.0
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ # HMP Task packing settings for 8939 V3.0
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1113600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+ # Enable core control
+# insmod /system/lib/modules/core_ctl.ko
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ case "$revision" in
+ "3.0")
+ # Enable dynamic clock gatin
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "msm8952")
+
+ 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
+ case "$soc_id" in
+ "264" | "289")
+ # Apply Scheduler and Governor settings for 8952
+
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ # HMP Task packing settings
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle
+
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "19000 1113600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "1 960000:85 1113600:90 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "1 806400:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable Low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+ # Enable core control
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Enable dynamic clock gating
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ ;;
+ *)
+ panel=`cat /sys/class/graphics/fb0/modes`
+ if [ "${panel:5:1}" == "x" ]; then
+ panel=${panel:2:3}
+ else
+ panel=${panel:2:4}
+ fi
+
+ # Apply Scheduler and Governor settings for 8976
+ # SoC IDs are 266, 274, 277, 278
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+
+ echo 2 > /proc/sys/kernel/sched_window_stats_policy
+ echo 5 > /proc/sys/kernel/sched_ravg_hist_size
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_nr_run
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 691200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
+ echo 883200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 60000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+
+ if [ $panel -gt 1080 ]; then
+ #set texture cache size for resolution greater than 1080p
+ setprop ro.hwui.texture_cache_size 72
+ fi
+
+ echo 59000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo "1 691200:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 1382400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo "19000 1382400:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo "85 1382400:90 1747200:80" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ # HMP Task packing settings for 8976
+ echo 30 > /proc/sys/kernel/sched_small_task
+ echo 20 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu4/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu5/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu6/sched_mostly_idle_load
+ echo 20 > /sys/devices/system/cpu/cpu7/sched_mostly_idle_load
+
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ #Disable CPU retention modes for 32bit builds
+ ProductName=`getprop ro.product.name`
+ if [ "$ProductName" == "msm8952_32" ] || [ "$ProductName" == "msm8952_32_LMT" ]; then
+ echo N > /sys/module/lpm_levels/system/a72/cpu4/retention/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/cpu5/retention/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/cpu6/retention/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/cpu7/retention/idle_enabled
+ fi
+
+ if [ `cat /sys/devices/soc0/revision` == "1.0" ]; then
+ # Disable l2-pc and l2-gdhs low power modes
+ echo N > /sys/module/lpm_levels/system/a53/a53-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/a72-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a53/a53-l2-pc/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/a72-l2-pc/idle_enabled
+ fi
+
+ # Enable LPM Prediction
+ echo 1 > /sys/module/lpm_levels/parameters/lpm_prediction
+
+ # Enable Low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ # Disable L2 GDHS on 8976
+ echo N > /sys/module/lpm_levels/system/a53/a53-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/a72/a72-l2-gdhs/idle_enabled
+
+ # Enable sched guided freq control
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 50000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 50000 > /proc/sys/kernel/sched_freq_dec_notify
+
+ # Enable core control
+ #for 8976
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+
+ case "$soc_id" in
+ "277" | "278")
+ # Start energy-awareness for 8976
+ start energy-awareness
+ ;;
+ esac
+
+ #enable sched colocation and colocation inheritance
+ echo 130 > /proc/sys/kernel/sched_grp_upmigrate
+ echo 110 > /proc/sys/kernel/sched_grp_downmigrate
+ echo 1 > /proc/sys/kernel/sched_enable_thread_grouping
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ ;;
+ esac
+ #Enable Memory Features
+ enable_memory_features
+ restorecon -R /sys/devices/system/cpu
+ ;;
+esac
+
+case "$target" in
+ "msm8953")
+
+ 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
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ case "$soc_id" in
+ "293" | "304" | "338" | "351")
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ #if this directory is present, it means that a
+ #1200p panel is connected to the device.
+ dir="/sys/bus/i2c/devices/3-0038"
+ if [ ! -d "$dir" ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ if [ $soc_id -eq "338" ]; then
+ case "$hw_platform" in
+ "QRD" )
+ if [ $platform_subtype_id -eq "1" ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+ fi
+
+ #init task load, restrict wakeups to preferred cluster
+ echo 15 > /proc/sys/kernel/sched_init_task_load
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent
+ do
+ echo 34 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps
+ do
+ echo 0 > $cpu_guard_band
+ done
+ for cpu_hist_memory in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hist_memory
+ do
+ echo 20 > $cpu_hist_memory
+ done
+ for cpu_hyst_length in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/hyst_length
+ do
+ echo 10 > $cpu_hyst_length
+ done
+ for cpu_idle_mbps in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/idle_mbps
+ do
+ echo 1600 > $cpu_idle_mbps
+ done
+ for cpu_low_power_delay in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/low_power_delay
+ do
+ echo 20 > $cpu_low_power_delay
+ done
+ for cpu_low_power_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/low_power_io_percent
+ do
+ echo 34 > $cpu_low_power_io_percent
+ done
+ for cpu_mbps_zones in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/mbps_zones
+ do
+ echo "1611 3221 5859 6445 7104" > $cpu_mbps_zones
+ done
+ for cpu_sample_ms in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/sample_ms
+ do
+ echo 4 > $cpu_sample_ms
+ done
+ for cpu_up_scale in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/up_scale
+ do
+ echo 250 > $cpu_up_scale
+ done
+ for cpu_min_freq in /sys/class/devfreq/soc:qcom,cpubw/min_freq
+ do
+ echo 1611 > $cpu_min_freq
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ #if the kernel version >=4.9,use the schedutil governor
+ KernelVersionStr=`cat /proc/sys/kernel/osrelease`
+ KernelVersionS=${KernelVersionStr:2:2}
+ KernelVersionA=${KernelVersionStr:0:1}
+ KernelVersionB=${KernelVersionS%.*}
+ if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then
+ 8953_sched_dcvs_eas
+ else
+ 8953_sched_dcvs_hmp
+ fi
+ echo 652800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # SMP scheduler
+ echo 85 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ esac
+ case "$soc_id" in
+ "349" | "350")
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "1611 3221 5859 6445 7104" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ # Configure DCC module to capture critical register contents when device crashes
+ for DCC_PATH in /sys/bus/platform/devices/*.dcc*
+ do
+ echo 0 > $DCC_PATH/enable
+ echo cap > $DCC_PATH/func_type
+ echo sram > $DCC_PATH/data_sink
+ echo 1 > $DCC_PATH/config_reset
+
+ # Register specifies APC CPR closed-loop settled voltage for current voltage corner
+ echo 0xb1d2c18 1 > $DCC_PATH/config
+
+ # Register specifies SW programmed open-loop voltage for current voltage corner
+ echo 0xb1d2900 1 > $DCC_PATH/config
+
+ # Register specifies APM switch settings and APM FSM state
+ echo 0xb1112b0 1 > $DCC_PATH/config
+
+ # Register specifies CPR mode change state and also #online cores input to CPR HW
+ echo 0xb018798 1 > $DCC_PATH/config
+
+ echo 1 > $DCC_PATH/enable
+ done
+
+ # disable thermal & BCL core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # configure governor settings for little cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1363200 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for sdm632 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+
+ # configure governor settings for big cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ #default value for hispeed_load is 90, for sdm632 it should be 85
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+
+ echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+ # choose idle CPU for top app tasks
+ echo 1 > /dev/stune/top-app/schedtune.prefer_idle
+
+ # re-enable thermal & BCL core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Disable Core control
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+ echo 0 > /sys/devices/system/cpu/cpu4/core_ctl/enable
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Setting b.L scheduler parameters
+ echo 76 > /proc/sys/kernel/sched_downmigrate
+ echo 86 > /proc/sys/kernel/sched_upmigrate
+ echo 80 > /proc/sys/kernel/sched_group_downmigrate
+ echo 90 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # Enable min frequency adjustment for big cluster
+ if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then
+ echo "4-7" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster
+ fi
+ echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust
+
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "msm8937")
+
+ 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
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ # Socid 386 = Pukeena
+ case "$soc_id" in
+ "303" | "307" | "308" | "309" | "320" | "386" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" )
+ start_hbtp
+ ;;
+ esac
+
+ case "$hw_platform" in
+ "Surf" | "RCM" )
+ if [ $platform_subtype_id -ne "4" ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+ # Apply Scheduler and Governor settings for 8917 / 8920
+
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ #disable sched_boost in 8917
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # core_ctl is not needed for 8917. Disable it.
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ # disable thermal core_control to update interactive gov settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ KernelVersionStr=`cat /proc/sys/kernel/osrelease`
+ KernelVersionS=${KernelVersionStr:2:2}
+ KernelVersionA=${KernelVersionStr:0:1}
+ KernelVersionB=${KernelVersionS%.*}
+ if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then
+ 8917_sched_dcvs_eas
+ else
+ 8917_sched_dcvs_hmp
+ fi
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # re-enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Disable L2-GDHS low power modes
+ echo N > /sys/module/lpm_levels/perf/perf-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/perf/perf-l2-gdhs/suspend_enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # Set rps mask
+ echo 2 > /sys/class/net/rmnet0/queues/rx-0/rps_cpus
+
+ # Enable dynamic clock gating
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ *)
+ ;;
+ esac
+
+ case "$soc_id" in
+ "294" | "295" | "313" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ start_hbtp
+ ;;
+ esac
+
+ # Apply Scheduler and Governor settings for 8937/8940
+
+ # HMP scheduler settings
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ echo 20000000 > /proc/sys/kernel/sched_ravg_window
+
+ #disable sched_boost in 8937
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ for devfreq_gov in /sys/class/devfreq/qcom,mincpubw*/governor
+ do
+ echo "cpufreq" > $devfreq_gov
+ done
+
+ for devfreq_gov in /sys/class/devfreq/soc:qcom,cpubw/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_io_percent in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/io_percent
+ do
+ echo 20 > $cpu_io_percent
+ done
+ for cpu_guard_band in /sys/class/devfreq/soc:qcom,cpubw/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ # disable thermal core_control to update interactive gov and core_ctl settings
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ KernelVersionStr=`cat /proc/sys/kernel/osrelease`
+ KernelVersionS=${KernelVersionStr:2:2}
+ KernelVersionA=${KernelVersionStr:0:1}
+ KernelVersionB=${KernelVersionS%.*}
+ if [ $KernelVersionA -ge 4 ] && [ $KernelVersionB -ge 9 ]; then
+ 8937_sched_dcvs_eas
+ else
+ 8937_sched_dcvs_hmp
+ fi
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # Disable L2-GDHS low power modes
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # HMP scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+
+ # Enable core control
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+
+ # re-enable thermal core_control
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Enable dynamic clock gating
+ echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating
+ # Enable timer migration to little cluster
+ echo 1 > /proc/sys/kernel/power_aware_timer_migration
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ *)
+
+ ;;
+ esac
+
+ case "$soc_id" in
+ "354" | "364" | "353" | "363" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ # Apply settings for sdm429/sda429/sdm439/sda439
+
+ for cpubw in /sys/class/devfreq/*qcom,mincpubw*
+ do
+ echo "cpufreq" > $cpubw/governor
+ done
+
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 20 > $cpubw/bw_hwmon/io_percent
+ echo 30 > $cpubw/bw_hwmon/guard_band_mbps
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+
+ case "$soc_id" in
+ "353" | "363" )
+ # Apply settings for sdm439/sda439
+ # configure schedutil governor settings
+ # enable governor for perf cluster
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1497600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+
+ ## enable governor for power cluster
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+ echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+
+ # EAS scheduler (big.Little cluster related) settings
+ echo 93 > /proc/sys/kernel/sched_upmigrate
+ echo 83 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+
+ # cpuset settings
+ #echo 0-3 > /dev/cpuset/background/cpus
+ #echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # Enable core control
+ echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
+ echo 68 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+
+ # Big cluster min frequency adjust settings
+ if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then
+ echo "0-3" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster
+ fi
+ echo 1305600 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_floor
+ ;;
+ *)
+ # Apply settings for sdm429/sda429
+ # configure schedutil governor settings
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ #set the hispeed_freq
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # sched_load_boost as -6 is equivalent to target load as 85.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ ;;
+ esac
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ #disable sched_boost
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Disable L2-GDHS low power modes
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled
+
+ # Enable low power modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ case "$soc_id" in
+ "353" | "363" )
+ echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust
+ ;;
+ esac
+ ;;
+ esac
+
+ case "$soc_id" in
+ "386" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "QRD" )
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "sdm660")
+
+ # Set the default IRQ affinity to the primary cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo f > /proc/irq/default_smp_affinity
+
+ 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
+
+ panel=`cat /sys/class/graphics/fb0/modes`
+ if [ "${panel:5:1}" == "x" ]; then
+ panel=${panel:2:3}
+ else
+ panel=${panel:2:4}
+ fi
+
+ if [ $panel -gt 1080 ]; then
+ echo 2 > /proc/sys/kernel/sched_window_stats_policy
+ echo 5 > /proc/sys/kernel/sched_ravg_hist_size
+ else
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+ fi
+ #Apply settings for sdm660, sdm636,sda636
+ case "$soc_id" in
+ "317" | "324" | "325" | "326" | "345" | "346" )
+
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 96 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+ echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ 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 100000 > /proc/sys/kernel/sched_short_burst_ns
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+ echo 20 > /proc/sys/kernel/sched_small_wakee_task_load
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+
+ # online CPU0
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo "19000 1401600:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1401600 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "85 1747200:95" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/fast_ramp_down
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo "19000 1401600:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "85 1401600:90 2150400:95" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 59000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 1113600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/fast_ramp_down
+
+ # bring all cores online
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # configure LPM
+ echo N > /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-ret/idle_enabled
+ # enable LPM
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ echo "1525 3143 5859 7759 9887 10327 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ echo 100 > $cpubw/bw_hwmon/decay_rate
+ echo 50 > $cpubw/bw_hwmon/bw_step
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 34 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ # Start cdsprpcd only for sdm660 and disable for sdm630
+ if [ "$soc_id" -eq "317" ]; then
+ start vendor.cdsprpcd
+ fi
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+ #Apply settings for sdm630 and Tahaa
+ case "$soc_id" in
+ "318" | "327" | "385" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ esac
+
+ # Setting b.L scheduler parameters
+ echo 85 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+ echo 900 > /proc/sys/kernel/sched_group_upmigrate
+ echo 900 > /proc/sys/kernel/sched_group_downmigrate
+ echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ echo 3 > /proc/sys/kernel/sched_spill_nr_run
+
+ #init task load, restrict wakeups to preferred cluster
+ echo 15 > /proc/sys/kernel/sched_init_task_load
+ echo 1 > /proc/sys/kernel/sched_restrict_cluster_spill
+ echo 50000 > /proc/sys/kernel/sched_short_burst_ns
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # online CPU0
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ # configure governor settings for Big cluster(CPU0 to CPU3)
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo "19000 1344000:39000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1344000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "85 1344000:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 787200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for Little cluster(CPU4 to CPU7)
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo "19000 1094400:39000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1094400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "85 1094400:80" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 39000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 614400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
+
+ # bring all cores online
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+
+ # configure LPM
+ echo N > /sys/module/lpm_levels/system/perf/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled
+ # enable LPM
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ echo "1525 3143 4173 5195 5859 7759 9887 10327" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 100 > $cpubw/bw_hwmon/decay_rate
+ echo 50 > $cpubw/bw_hwmon/bw_step
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 50 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "sdm710")
+
+ #Apply settings for sdm710
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo 3f > /proc/irq/default_smp_affinity
+
+ 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
+ "336" | "337" | "347" | "360" | "393" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" | "QRD" | "HDK" )
+ start_hbtp
+ ;;
+ esac
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 96 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1344000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 150 > /sys/module/cpu_boost/parameters/input_boost_ms
+ echo "0:1209600 1:0 2:0 3:0 4:0 5:0 6:2054400 7:0" > /sys/module/cpu_boost/parameters/powerkey_input_boost_freq
+ echo 400 > /sys/module/cpu_boost/parameters/powerkey_input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for DDR scaling
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for L3 scaling
+ for memlat in /sys/class/devfreq/*qcom,l3-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in /sys/class/devfreq/*qcom,l3-cdsp*
+ do
+ echo "userspace" > $l3cdsp/governor
+ chown -h system $l3cdsp/userspace/set_freq
+ done
+
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ # Disable CPU Retention
+ echo N > /sys/module/lpm_levels/L3/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu7/ret/idle_enabled
+
+ # cpuset parameters
+ #echo 0-5 > /dev/cpuset/background/cpus
+ #echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+ esac
+ # set efficent safty barrier
+ esb=`getprop persist.sys.ext4.dataesb`
+
+ userdata_link=$(ls -l /dev/block/bootdevice/by-name/userdata)
+ userdata_block_name=${userdata_link##*/}
+
+ if [ "$esb" == "1" ]; then
+ echo 1 > /sys/fs/ext4/$userdata_block_name/esb
+ else
+ echo 0 > /sys/fs/ext4/$userdata_block_name/esb
+ fi
+
+ ;;
+esac
+
+case "$target" in
+ "sm6150")
+
+ #Apply settings for sm6150
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo 3f > /proc/irq/default_smp_affinity
+
+ 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
+
+ case "$soc_id" in
+ "355" | "369" )
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+ echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
+
+
+ # Setting b.L scheduler parameters
+ # default sched up and down migrate values are 90 and 85
+ echo 65 > /proc/sys/kernel/sched_downmigrate
+ echo 71 > /proc/sys/kernel/sched_upmigrate
+ # default sched up and down migrate values are 100 and 95
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # colocation v3 settings
+ echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
+
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Gold L3 ratio ceil
+ echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+ esac
+
+ #Apply settings for moorea
+ case "$soc_id" in
+ "365" | "366" )
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+ echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
+
+
+ # Setting b.L scheduler parameters
+ # default sched up and down migrate values are 71 and 65
+ echo 65 > /proc/sys/kernel/sched_downmigrate
+ echo 71 > /proc/sys/kernel/sched_upmigrate
+ # default sched up and down migrate values are 100 and 95
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1324600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ echo "0:1248000" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "qcs605")
+
+ #Apply settings for qcs605
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo 3f > /proc/irq/default_smp_affinity
+
+ 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
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "347" )
+
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "Surf" | "RCM" | "QRD" )
+ start_hbtp
+ ;;
+ "MTP" )
+ if [ $platform_subtype_id != 5 ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 96 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 140 > /proc/sys/kernel/sched_group_upmigrate
+ echo 120 > /proc/sys/kernel/sched_group_downmigrate
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/rate_limit_us
+ echo 1344000 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 825600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ echo "0:1209600" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 68 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for DDR scaling
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for L3 scaling
+ for memlat in /sys/class/devfreq/*qcom,l3-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
+ "apq8084")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "cpubw_hwmon" > $devfreq_gov
+ done
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "interactive" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo "20000 1400000:40000 1700000:20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 1497600 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 20 > /sys/module/cpu_boost/parameters/boost_ms
+ echo 1728000 > /sys/module/cpu_boost/parameters/sync_threshold
+ echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+ echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ echo 1 > /dev/cpuctl/apps/cpu.notify_on_migrate
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ setprop ro.vendor.perf.cores_online 2
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "mpq8092")
+ echo 4 > /sys/module/lpm_levels/enable_low_power/l2
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu0/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu1/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu2/retention/idle_enabled
+ echo 1 > /sys/module/msm_pm/modes/cpu3/retention/idle_enabled
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo "ondemand" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ echo 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown -h root.system /sys/devices/system/cpu/mfreq
+ chmod -h 220 /sys/devices/system/cpu/mfreq
+ chown -h root.system /sys/devices/system/cpu/cpu1/online
+ chown -h root.system /sys/devices/system/cpu/cpu2/online
+ chown -h root.system /sys/devices/system/cpu/cpu3/online
+ chmod -h 664 /sys/devices/system/cpu/cpu1/online
+ chmod -h 664 /sys/devices/system/cpu/cpu2/online
+ chmod -h 664 /sys/devices/system/cpu/cpu3/online
+ ;;
+esac
+
+case "$target" in
+ "msm8992")
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
+ bcl_hotplug_mask=`cat /sys/devices/soc.*/qcom,bcl.*/hotplug_mask`
+ echo 0 > /sys/devices/soc.*/qcom,bcl.*/hotplug_mask
+ echo -n enable > /sys/devices/soc.*/qcom,bcl.*/mode
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1536000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc.*/qcom,bcl.*/mode
+ echo $bcl_hotplug_mask > /sys/devices/soc.*/qcom,bcl.*/hotplug_mask
+ echo $bcl_soc_hotplug_mask > /sys/devices/soc.*/qcom,bcl.*/hotplug_soc_mask
+ echo -n enable > /sys/devices/soc.*/qcom,bcl.*/mode
+ # plugin remaining A57s
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ # input boost configuration
+ echo 0:1248000 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Enable task migration fixups in the scheduler
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ done
+ #enable rps static configuration
+ echo 8 > /sys/class/net/rmnet_ipa0/queues/rx-0/rps_cpus
+ echo 30 > /proc/sys/kernel/sched_small_task
+ ;;
+esac
+
+case "$target" in
+ "msm8994")
+ # ensure at most one A57 is online when thermal hotplug is disabled
+ echo 0 > /sys/devices/system/cpu/cpu5/online
+ echo 0 > /sys/devices/system/cpu/cpu6/online
+ echo 0 > /sys/devices/system/cpu/cpu7/online
+ # in case CPU4 is online, limit its frequency
+ echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ # Limit A57 max freq from msm_perf module in case CPU 4 is offline
+ echo "4:960000 5:960000 6:960000 7:960000" > /sys/module/msm_performance/parameters/cpu_max_freq
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ bcl_hotplug_mask=`cat $hotplug_mask`
+ echo 0 > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
+ echo 0 > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # Best effort limiting for first time boot if msm_performance module is absent
+ echo 960000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo "19000 1400000:39000 1700000:19000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1248000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "85 1500000:90 1800000:70" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 384000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ # restore A57's max
+ cat /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_max_freq > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n disable > $mode
+ done
+ for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
+ do
+ echo $bcl_hotplug_mask > $hotplug_mask
+ done
+ for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
+ do
+ echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
+ done
+ for mode in /sys/devices/soc.0/qcom,bcl.*/mode
+ do
+ echo -n enable > $mode
+ done
+ # plugin remaining A57s
+ echo 1 > /sys/devices/system/cpu/cpu5/online
+ echo 1 > /sys/devices/system/cpu/cpu6/online
+ echo 1 > /sys/devices/system/cpu/cpu7/online
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ # Restore CPU 4 max freq from msm_performance
+ echo "4:4294967295 5:4294967295 6:4294967295 7:4294967295" > /sys/module/msm_performance/parameters/cpu_max_freq
+ # input boost configuration
+ echo 0:1344000 > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Setting b.L scheduler parameters
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ echo 30 > /proc/sys/kernel/sched_small_task
+ echo 20 > /proc/sys/kernel/sched_mostly_idle_load
+ echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
+ echo 99 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ #enable rps static configuration
+ echo 8 > /sys/class/net/rmnet_ipa0/queues/rx-0/rps_cpus
+ for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ done
+ ;;
+esac
+
+case "$target" in
+ "msm8996")
+ # disable thermal bcl hotplug to switch governor
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode
+ bcl_hotplug_mask=`cat /sys/devices/soc/soc:qcom,bcl/hotplug_mask`
+ echo 0 > /sys/devices/soc/soc:qcom,bcl/hotplug_mask
+ bcl_soc_hotplug_mask=`cat /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask`
+ echo 0 > /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask
+ echo -n enable > /sys/devices/soc/soc:qcom,bcl/mode
+ # set sync wakee policy tunable
+ echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+ # online CPU2
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/use_migration_notif
+ echo "19000 1400000:39000 1700000:19000 2100000:79000" > /sys/devices/system/cpu/cpu2/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/timer_rate
+ echo 1248000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/io_is_busy
+ echo "85 1500000:90 1800000:70 2100000:95" > /sys/devices/system/cpu/cpu2/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/max_freq_hysteresis
+ echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu2/cpufreq/interactive/ignore_hispeed_on_notif
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+ echo -n disable > /sys/devices/soc/soc:qcom,bcl/mode
+ echo $bcl_hotplug_mask > /sys/devices/soc/soc:qcom,bcl/hotplug_mask
+ echo $bcl_soc_hotplug_mask > /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask
+ echo -n enable > /sys/devices/soc/soc:qcom,bcl/mode
+ # input boost configuration
+ echo "0:1324800 2:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Setting b.L scheduler parameters
+ echo 0 > /proc/sys/kernel/sched_boost
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ echo 45 > /proc/sys/kernel/sched_downmigrate
+ echo 45 > /proc/sys/kernel/sched_upmigrate
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
+ echo 3 > /proc/sys/kernel/sched_spill_nr_run
+ echo 100 > /proc/sys/kernel/sched_init_task_load
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 1525 > $cpubw/min_freq
+ echo "1525 5195 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 34 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ done
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+
+ soc_revision=`cat /sys/devices/soc0/revision`
+ if [ "$soc_revision" == "2.0" ]; then
+ #Disable suspend for v2.0
+ echo pwr_dbg > /sys/power/wake_lock
+ elif [ "$soc_revision" == "2.1" ]; then
+ # Enable C4.D4.E4.M3 LPM modes
+ # Disable D3 state
+ echo 0 > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
+ echo 0 > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
+ # Disable DEF-FPC mode
+ echo N > /sys/module/lpm_levels/system/pwr/cpu0/fpc-def/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu1/fpc-def/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu2/fpc-def/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu3/fpc-def/idle_enabled
+ else
+ # Enable all LPMs by default
+ # This will enable C4, D4, D3, E4 and M3 LPMs
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+ fi
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+ # Starting io prefetcher service
+ start iop
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "sdm845")
+
+ # Set the default IRQ affinity to the silver cluster. When a
+ # CPU is isolated/hotplugged, the IRQ affinity is adjusted
+ # to one of the CPU from the default IRQ affinity mask.
+ echo f > /proc/irq/default_smp_affinity
+
+ 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`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "321" | "341")
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "QRD" )
+ case "$platform_subtype_id" in
+ "32") #QVR845 do nothing
+ ;;
+ *)
+ start_hbtp
+ ;;
+ esac
+ ;;
+ *)
+ start_hbtp
+ ;;
+ esac
+ ;;
+ esac
+ # Core control parameters
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/pl
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
+ echo 1574400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/pl
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Limit the min frequency to 825MHz
+ echo 825000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ # Enable oom_reaper
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 6500 8132 9155 10681" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 50 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in /sys/class/devfreq/*qcom,llccbw*
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 50 > $llccbw/polling_interval
+ echo "1720 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 80 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 10 > $llccbw/bw_hwmon/hyst_length
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ #Enable mem_latency governor for DDR scaling
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for L3 scaling
+ for memlat in /sys/class/devfreq/*qcom,l3-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in /sys/class/devfreq/*qcom,l3-cdsp*
+ do
+ echo "userspace" > $l3cdsp/governor
+ chown -h system $l3cdsp/userspace/set_freq
+ done
+
+ #Gold L3 ratio ceil
+ echo 4000 > /sys/class/devfreq/soc:qcom,l3-cpu4/mem_latency/ratio_ceil
+
+ echo "compute" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+ echo 10 > /sys/class/devfreq/soc:qcom,mincpubw/polling_interval
+
+ # cpuset parameters
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+ # Disable CPU Retention
+ echo N > /sys/module/lpm_levels/L3/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/L3/l3-dyn-ret/idle_enabled
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ echo 100 > /proc/sys/vm/swappiness
+ echo 120 > /proc/sys/vm/watermark_scale_factor
+
+ # set lmk minfree for MemTotal greater than 6G
+ arch_type=`uname -m`
+ MemTotalStr=`cat /proc/meminfo | grep MemTotal`
+ MemTotal=${MemTotalStr:16:8}
+ if [ "$arch_type" == "aarch64" ] && [ $MemTotal -gt 5505024 ]; then
+ echo "18432,23040,27648,32256,85296,120640" > /sys/module/lowmemorykiller/parameters/minfree
+ fi
+ ;;
+esac
+
+case "$target" in
+ "msmnile")
+ # Core control parameters for gold
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 3 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Core control parameters for gold+
+ echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu7/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu7/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu7/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/task_thres
+ # Controls how many more tasks should be eligible to run on gold CPUs
+ # w.r.t number of gold CPUs available to trigger assist (max number of
+ # tasks eligible to run on previous cluster minus number of CPUs in
+ # the previous cluster).
+ #
+ # Setting to 1 by default which means there should be at least
+ # 4 tasks eligible to run on gold cluster (tasks running on gold cores
+ # plus misfit tasks on silver cores) to trigger assitance from gold+.
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
+
+ # Disable Core control on silver
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+
+ # Setting b.L scheduler parameters
+ echo 95 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 85 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # cpuset parameters
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # configure governor settings for silver cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
+
+ # configure governor settings for gold cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/rate_limit_us
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/pl
+
+ # configure governor settings for gold+ cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/rate_limit_us
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
+
+ # configure input boost settings
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ echo 120 > /proc/sys/vm/watermark_scale_factor
+
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Enable oom_reaper
+ if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+ else
+ echo 1 > /proc/sys/vm/reap_mem_on_sigkill
+ fi
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 40 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 50 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 30 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ echo 14236 > $cpubw/max_freq
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1720 2929 3879 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 80 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 10 > $llccbw/bw_hwmon/hyst_length
+ echo 30 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ echo 6881 > $llccbw/max_freq
+ done
+
+ for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1720 2929 3879 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 6 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ #Gold L3 ratio ceil
+ for l3gold in $device/*cpu4-cpu-l3-lat/devfreq/*cpu4-cpu-l3-lat
+ do
+ echo 4000 > $l3gold/mem_latency/ratio_ceil
+ done
+
+ #Prime L3 ratio ceil
+ for l3prime in $device/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat
+ do
+ echo 20000 > $l3prime/mem_latency/ratio_ceil
+ done
+ done
+
+ 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
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ # Start Host based Touch processing
+ case "$platform_subtype_id" in
+ "0" | "1")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ "HDK" )
+ if [ -d /sys/kernel/hbtpsensor ] ; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "msm8998" | "apq8098_latv")
+
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 1 > /proc/sys/kernel/sched_migration_fixup
+ echo 95 > /proc/sys/kernel/sched_upmigrate
+ echo 90 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 95 > /proc/sys/kernel/sched_group_downmigrate
+ echo 0 > /proc/sys/kernel/sched_select_prev_cpu_us
+ echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
+ 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
+
+ # online CPU0
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ # configure governor settings for little cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
+ echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
+ echo "83 1804800:95" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis
+ echo 518400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/ignore_hispeed_on_notif
+ # online CPU4
+ echo 1 > /sys/devices/system/cpu/cpu4/online
+ # configure governor settings for big cluster
+ echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif
+ echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
+ echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
+ echo 1574400 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
+ echo "83 1939200:90 2016000:95" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
+ echo 19000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
+ echo 79000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis
+ echo 806400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/ignore_hispeed_on_notif
+
+ # re-enable thermal and BCL hotplug
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ # Enable input boost configuration
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+ # Enable bus-dcvs
+ for cpubw in /sys/class/devfreq/*qcom,cpubw*
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 1525 > $cpubw/min_freq
+ echo "3143 5859 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 0 > $cpubw/bw_hwmon/low_power_ceil_mbps
+ echo 34 > $cpubw/bw_hwmon/low_power_io_percent
+ echo 20 > $cpubw/bw_hwmon/low_power_delay
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in /sys/class/devfreq/*qcom,memlat-cpu*
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+ echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
+ 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
+
+ if [ -f /sys/devices/soc0/platform_version ]; then
+ platform_version=`cat /sys/devices/soc0/platform_version`
+ platform_major_version=$((10#${platform_version}>>16))
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$soc_id" in
+ "292") #msm8998 apq8098_latv
+ # Start Host based Touch processing
+ case "$hw_platform" in
+ "QRD")
+ case "$platform_subtype_id" in
+ "0")
+ start_hbtp
+ ;;
+ "16")
+ if [ $platform_major_version -lt 6 ]; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ ;;
+ esac
+ ;;
+ esac
+
+ echo N > /sys/module/lpm_levels/system/pwr/cpu0/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu1/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu2/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/cpu3/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu4/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu5/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu6/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/cpu7/ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-ret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-dynret/idle_enabled
+ echo N > /sys/module/lpm_levels/system/perf/perf-l2-ret/idle_enabled
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Set Memory parameters
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "msm8909")
+
+ 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
+
+ # HMP scheduler settings for 8909 similiar to 8917
+ echo 3 > /proc/sys/kernel/sched_window_stats_policy
+ echo 3 > /proc/sys/kernel/sched_ravg_hist_size
+
+ echo 1 > /proc/sys/kernel/sched_restrict_tasks_spread
+
+ echo 20 > /proc/sys/kernel/sched_small_task
+ echo 30 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_load
+ echo 30 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_load
+
+ echo 3 > /sys/devices/system/cpu/cpu0/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu1/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu2/sched_mostly_idle_nr_run
+ echo 3 > /sys/devices/system/cpu/cpu3/sched_mostly_idle_nr_run
+
+ echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle
+ echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle
+
+ # Apply governor settings for 8909
+
+ # disable thermal core_control to update scaling_min_freq
+ echo 0 > /sys/module/msm_thermal/core_control/enabled
+ echo 1 > /sys/devices/system/cpu/cpu0/online
+ echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ # enable thermal core_control now
+ echo 1 > /sys/module/msm_thermal/core_control/enabled
+
+ echo "29000 1094400:49000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
+ echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
+ echo 30000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
+ echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
+ echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
+ echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
+
+ # Bring up all cores online
+ echo 1 > /sys/devices/system/cpu/cpu1/online
+ echo 1 > /sys/devices/system/cpu/cpu2/online
+ echo 1 > /sys/devices/system/cpu/cpu3/online
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
+ do
+ echo "bw_hwmon" > $devfreq_gov
+ for cpu_bimc_bw_step in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/bw_step
+ do
+ echo 60 > $cpu_bimc_bw_step
+ done
+ for cpu_guard_band_mbps in /sys/class/devfreq/*qcom,cpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $cpu_guard_band_mbps
+ done
+ done
+
+ for gpu_bimc_io_percent in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/io_percent
+ do
+ echo 40 > $gpu_bimc_io_percent
+ done
+ for gpu_bimc_bw_step in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/bw_step
+ do
+ echo 60 > $gpu_bimc_bw_step
+ done
+ for gpu_bimc_guard_band_mbps in /sys/class/devfreq/*qcom,gpubw*/bw_hwmon/guard_band_mbps
+ do
+ echo 30 > $gpu_bimc_guard_band_mbps
+ done
+
+ # Set Memory parameters
+ configure_memory_parameters
+ restorecon -R /sys/devices/system/cpu
+ ;;
+esac
+
+case "$target" in
+ "msm7627_ffa" | "msm7627_surf" | "msm7627_6x")
+ echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+case "$target" in
+ "qsd8250_surf" | "qsd8250_ffa" | "qsd8650a_st1x")
+ echo 50000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+case "$target" in
+ "qsd8650a_st1x")
+ mount -t debugfs none /sys/kernel/debug
+ ;;
+esac
+
+chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+chown -h system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+chown -h system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+
+emmc_boot=`getprop vendor.boot.emmc`
+case "$emmc_boot"
+ in "true")
+ chown -h system /sys/devices/platform/rs300000a7.65536/force_sync
+ chown -h system /sys/devices/platform/rs300000a7.65536/sync_sts
+ chown -h system /sys/devices/platform/rs300100a7.65536/force_sync
+ chown -h system /sys/devices/platform/rs300100a7.65536/sync_sts
+ ;;
+esac
+
+case "$target" in
+ "msm8960" | "msm8660" | "msm7630_surf")
+ echo 10 > /sys/devices/platform/msm_sdcc.3/idle_timeout
+ ;;
+ "msm7627a")
+ echo 10 > /sys/devices/platform/msm_sdcc.1/idle_timeout
+ ;;
+esac
+
+# Post-setup services
+case "$target" in
+ "msm8660" | "msm8960" | "msm8226" | "msm8610" | "mpq8092" )
+ start mpdecision
+ ;;
+ "msm8916")
+ setprop vendor.post_boot.parsed 1
+
+ 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
+ case $soc_id in
+ "239" | "241" | "263" | "268" | "269" | "270" | "271")
+ setprop vendor.min_freq_0 960000
+ setprop vendor.min_freq_4 800000
+ ;;
+ "206" | "247" | "248" | "249" | "250" | "233" | "240" | "242")
+ setprop vendor.min_freq_0 800000
+ ;;
+ esac
+ ;;
+ "msm8909")
+ setprop vendor.post_boot.parsed 1
+ ;;
+ "msm8952")
+ setprop vendor.post_boot.parsed 1
+ ;;
+ "msm8937" | "msm8953")
+ setprop vendor.post_boot.parsed 1
+
+ low_ram_enable=`getprop ro.config.low_ram`
+
+ if [ "$low_ram_enable" != "true" ]; then
+ start gamed
+ fi
+ ;;
+ "msm8974")
+ start mpdecision
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ ;;
+ "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "msmnile" | "qcs605" | "sm6150")
+ setprop vendor.post_boot.parsed 1
+ ;;
+ "apq8084")
+ rm /data/system/perfd/default_values
+ start mpdecision
+ echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
+ echo 512 > /sys/block/sda/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdb/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdc/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdd/bdi/read_ahead_kb
+ echo 512 > /sys/block/sde/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdf/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdg/bdi/read_ahead_kb
+ echo 512 > /sys/block/sdh/bdi/read_ahead_kb
+ ;;
+ "msm7627a")
+ 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
+ case "$soc_id" in
+ "127" | "128" | "129")
+ start mpdecision
+ ;;
+ esac
+ ;;
+esac
+
+# Enable Power modes and set the CPU Freq Sampling rates
+case "$target" in
+ "msm7627a")
+ start qosmgrd
+ echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/idle_enabled
+ echo 1 > /sys/module/pm2/modes/cpu0/standalone_power_collapse/suspend_enabled
+ echo 1 > /sys/module/pm2/modes/cpu1/standalone_power_collapse/suspend_enabled
+ #SuspendPC:
+ echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/suspend_enabled
+ #IdlePC:
+ echo 1 > /sys/module/pm2/modes/cpu0/power_collapse/idle_enabled
+ echo 25000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ ;;
+esac
+
+# Change adj level and min_free_kbytes setting for lowmemory killer to kick in
+case "$target" in
+ "msm7627a")
+ echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj
+ echo 5120 > /proc/sys/vm/min_free_kbytes
+ ;;
+esac
+
+# Install AdrenoTest.apk if not already installed
+if [ -f /data/prebuilt/AdrenoTest.apk ]; then
+ if [ ! -d /data/data/com.qualcomm.adrenotest ]; then
+ pm install /data/prebuilt/AdrenoTest.apk
+ fi
+fi
+
+# Install SWE_Browser.apk if not already installed
+if [ -f /data/prebuilt/SWE_AndroidBrowser.apk ]; then
+ if [ ! -d /data/data/com.android.swe.browser ]; then
+ pm install /data/prebuilt/SWE_AndroidBrowser.apk
+ fi
+fi
+
+# Change adj level and min_free_kbytes setting for lowmemory killer to kick in
+case "$target" in
+ "msm8660")
+ start qosmgrd
+ echo 0,1,2,4,9,12 > /sys/module/lowmemorykiller/parameters/adj
+ echo 5120 > /proc/sys/vm/min_free_kbytes
+ ;;
+esac
+
+# Let kernel know our image version/variant/crm_version
+if [ -f /sys/devices/soc0/select_image ]; then
+ image_version="10:"
+ image_version+=`getprop ro.build.id`
+ image_version+=":"
+ image_version+=`getprop ro.build.version.incremental`
+ image_variant=`getprop ro.product.name`
+ image_variant+="-"
+ image_variant+=`getprop ro.build.type`
+ oem_version=`getprop ro.build.version.codename`
+ echo 10 > /sys/devices/soc0/select_image
+ echo $image_version > /sys/devices/soc0/image_version
+ echo $image_variant > /sys/devices/soc0/image_variant
+ echo $oem_version > /sys/devices/soc0/image_crm_version
+fi
+
+# Parse misc partition path and set property
+misc_link=$(ls -l /dev/block/bootdevice/by-name/misc)
+real_path=${misc_link##*>}
+setprop persist.vendor.mmi.misc_dev_path $real_path
diff --git a/rootdir/bin/init.qcom.sdio.sh b/rootdir/bin/init.qcom.sdio.sh
new file mode 100644
index 000000000..df7774574
--- /dev/null
+++ b/rootdir/bin/init.qcom.sdio.sh
@@ -0,0 +1,78 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2010, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# For successful WLAN card detection, WLAN needs SDIO polling turned on.
+# This script can be used to turn on/off SDIO polling on appropriate
+# SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf).
+
+arg=$1
+target=`getprop ro.board.platform`
+
+case "$target" in
+ "msm7627_6x")
+ echo 1 > /sys/devices/platform/msm_sdcc.1/polling
+ echo 1 > /sys/devices/platform/msm_sdcc.2/polling
+ ;;
+
+ "msm7627_ffa")
+ echo 1 > /sys/devices/platform/msm_sdcc.2/polling
+ ;;
+
+ "msm7627_surf")
+ echo 1 > /sys/devices/platform/msm_sdcc.1/polling
+ echo 1 > /sys/devices/platform/msm_sdcc.2/polling
+ ;;
+
+ "msm7627a")
+ echo 1 > /sys/devices/platform/msm_sdcc.2/polling
+ ;;
+
+ "msm7630_surf")
+ echo 1 > /sys/devices/platform/msm_sdcc.3/polling
+ ;;
+
+ "msm7630_1x")
+ echo 1 > /sys/devices/platform/msm_sdcc.3/polling
+ ;;
+
+ "msm7630_fusion")
+ echo 1 > /sys/devices/platform/msm_sdcc.3/polling
+ ;;
+
+ "msm8660")
+ echo 1 > /sys/devices/platform/msm_sdcc.4/polling
+ ;;
+
+ "msm8660_csfb")
+ echo 1 > /sys/devices/platform/msm_sdcc.4/polling
+ ;;
+esac
+
+exit 0
diff --git a/rootdir/bin/init.qcom.sensors.sh b/rootdir/bin/init.qcom.sensors.sh
new file mode 100644
index 000000000..cb4d5b964
--- /dev/null
+++ b/rootdir/bin/init.qcom.sensors.sh
@@ -0,0 +1,45 @@
+#!/vendor/bin/sh
+# Copyright (c) 2015,2018 The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# Function to start sensors for SSC enabled platforms
+#
+start_sensors()
+{
+ sscrpcd_status=`getprop init.svc.vendor.sensors`
+ chmod -h 664 /persist/sensors/sensors_settings
+ chown -h -R system.system /persist/sensors
+ start vendor.sensors.qti
+
+ # Only for SLPI
+ if [ -c /dev/msm_dsps -o -c /dev/sensors ] && [ -z "$sscrpcd_status" ]; then
+ start vendor.sensors
+ fi
+}
+
+start_sensors
diff --git a/rootdir/bin/init.qcom.sh b/rootdir/bin/init.qcom.sh
new file mode 100644
index 000000000..50b25b092
--- /dev/null
+++ b/rootdir/bin/init.qcom.sh
@@ -0,0 +1,435 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+target=`getprop ro.board.platform`
+low_ram=`getprop ro.config.low_ram`
+if [ -f /sys/devices/soc0/soc_id ]; then
+ platformid=`cat /sys/devices/soc0/soc_id`
+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 /vendor/bin/msm_irqbalance ]; then
+ case "$platformid" in
+ "239" | "293" | "294" | "295" | "304" | "338" | "313" |"353")
+ start vendor.msm_irqbalance;;
+ "349" | "350" )
+ start vendor.msm_irqbal_lb;;
+ esac
+ fi
+}
+
+start_msm_irqbalance_msmnile()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
+start_msm_irqbalance660()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ case "$platformid" in
+ "317" | "324" | "325" | "326" | "345" | "346")
+ start vendor.msm_irqbalance;;
+ "318" | "327" | "385")
+ start vendor.msm_irqbl_sdm630;;
+ esac
+ fi
+}
+
+start_msm_irqbalance()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
+baseband=`getprop ro.baseband`
+echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
+
+case "$baseband" in
+ "svlte2a")
+ start bridgemgrd
+ ;;
+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" | "385" )
+ 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_irqbalance660
+ ;;
+ "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" | "sdm710" | "qcs605" | "sm6150" | "trinket")
+ 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
+ ;;
+ "msmnile")
+ start_msm_irqbalance_msmnile
+ ;;
+ "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
+ if [ "$low_ram" != "true" ]; then
+ case "$soc_id" in
+ "294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353" | "354" | "363" | "364")
+ 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
+ fi
+ ;;
+ "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" | "351" | "349" | "350" )
+ 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
+ ;;
+ "sdm710")
+ 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
+ "336" | "337" | "347" | "360" | "393" )
+ 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
+
+#
+# Make modem config folder and copy firmware config to that folder for RIL
+#
+if [ -f /data/vendor/modem_config/ver_info.txt ]; then
+ prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
+else
+ prev_version_info=""
+fi
+
+cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
+if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
+ # add W for group recursively before delete
+ chmod g+w -R /data/vendor/modem_config/*
+ rm -rf /data/vendor/modem_config/*
+ # preserve the read only mode for all subdir and files
+ cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
+ cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
+ cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
+ # the group must be root, otherwise this script could not add "W" for group recursively
+ chown -hR radio.root /data/vendor/modem_config/*
+fi
+chmod g-w /data/vendor/modem_config
+setprop ro.vendor.ril.mbn_copy_completed 1
+
+#check build variant for printk logging
+#current default minimum boot-time-default
+buildvariant=`getprop ro.build.type`
+case "$buildvariant" in
+ "userdebug" | "eng")
+ #set default loglevel to KERN_INFO
+ echo "6 6 1 7" > /proc/sys/kernel/printk
+ ;;
+ *)
+ #set default loglevel to KERN_WARNING
+ echo "4 4 1 4" > /proc/sys/kernel/printk
+ ;;
+esac
diff --git a/rootdir/bin/init.qcom.usb.sh b/rootdir/bin/init.qcom.usb.sh
new file mode 100644
index 000000000..f9db4bcf5
--- /dev/null
+++ b/rootdir/bin/init.qcom.usb.sh
@@ -0,0 +1,280 @@
+#!/vendor/bin/sh
+# Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+# Set platform variables
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+
+if [ -f /sys/devices/soc0/machine ]; then
+ soc_machine=`cat /sys/devices/soc0/machine` 2> /dev/null
+else
+ soc_machine=`cat /sys/devices/system/soc/soc0/machine` 2> /dev/null
+fi
+
+#
+# Check ESOC for external MDM
+#
+# Note: currently only a single MDM is supported
+#
+if [ -d /sys/bus/esoc/devices ]; then
+for f in /sys/bus/esoc/devices/*; do
+ if [ -d $f ]; then
+ if [ `grep -e "^MDM" -e "^SDX" $f/esoc_name` ]; then
+ esoc_link=`cat $f/esoc_link`
+ break
+ fi
+ fi
+done
+fi
+
+target=`getprop ro.board.platform`
+
+# soc_ids for 8937
+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/class/android_usb/f_mass_storage/lun/nofua ]; then
+ echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
+fi
+
+#
+# Override USB default composition
+#
+if [ -z "$(getprop ro.build.factorybuild)" ]; then
+debuggable=`getprop ro.debuggable`
+fi
+# If USB persist config not set, set default configuration
+if [ "$(getprop persist.vendor.usb.config)" == "" -a \
+ "$(getprop init.svc.vendor.usb-gadget-hal-1-0)" != "running" ]; then
+ if [ "$esoc_link" != "" ]; then
+ setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb
+ else
+ case "$(getprop ro.baseband)" in
+ "apq")
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ *)
+ case "$soc_hwplatform" in
+ "Dragon" | "SBC")
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ "SIRIUS" | "GRUS")
+ if [ -z "$debuggable" -o "$debuggable" = "1" ]; then
+ setprop persist.vendor.usb.config adb
+ else
+ setprop persist.vendor.usb.config none
+ fi
+ ;;
+ "PYXIS")
+ if [ "$(getprop ro.build.factorybuild)" == "1" ]; then
+ setprop persist.sys.usb.config diag,serial_cdev,rmnet,adb
+ else
+ if [ -z "$debuggable" -o "$debuggable" = "1" ]; then
+ setprop persist.vendor.usb.config adb
+ else
+ setprop persist.vendor.usb.config none
+ fi
+ fi
+ ;;
+ *)
+ soc_machine=${soc_machine:0:3}
+ case "$soc_machine" in
+ "SDA")
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ *)
+ case "$target" in
+ "msm8996")
+ setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
+ ;;
+ "msm8909")
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
+ ;;
+ "msm8937")
+ if [ -d /config/usb_gadget ]; then
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
+ else
+ case "$soc_id" in
+ "313" | "320")
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
+ ;;
+ *)
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
+ ;;
+ esac
+ fi
+ ;;
+ "msm8953")
+ if [ -d /config/usb_gadget ]; then
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
+ else
+ setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
+ fi
+ ;;
+ "msm8998" | "sdm660" | "apq8098_latv")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
+ ;;
+ "sdm845" | "sdm710")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
+ ;;
+ "msmnile" | "sm6150")
+ setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
+ ;;
+ *)
+ setprop persist.vendor.usb.config diag,adb
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+fi
+
+# set rndis transport to BAM2BAM_IPA for 8920 and 8940
+if [ "$target" == "msm8937" ]; then
+ if [ ! -d /config/usb_gadget ]; then
+ case "$soc_id" in
+ "313" | "320")
+ echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
+ ;;
+ *)
+ ;;
+ esac
+ fi
+fi
+
+# set device mode notification to USB driver for SA8150 Auto ADP
+product=`getprop ro.build.product`
+
+case "$product" in
+ "msmnile_au")
+ echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
+ ;;
+ *)
+ ;;
+esac
+case "$product" in
+ "msmnile_gvmq")
+ echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode
+ ;;
+ *)
+ ;;
+esac
+
+# check configfs is mounted or not
+if [ -d /config/usb_gadget ]; then
+ # ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy
+ serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber` 2> /dev/null
+ if [ "$serialnumber" == "" ]; then
+ serialno=1234567
+ echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber
+ fi
+fi
+
+#
+# Initialize RNDIS Diag option. If unset, set it to 'none'.
+#
+diag_extra=`getprop persist.vendor.usb.config.extra`
+if [ "$diag_extra" == "" ]; then
+ setprop persist.vendor.usb.config.extra none
+fi
+
+# enable rps cpus on msm8937 target
+setprop vendor.usb.rps_mask 0
+case "$soc_id" in
+ "294" | "295" | "353" | "354")
+ setprop vendor.usb.rps_mask 40
+ ;;
+esac
+
+#
+# Initialize UVC conifguration.
+#
+if [ -d /config/usb_gadget/g1/functions/uvc.0 ]; then
+ cd /config/usb_gadget/g1/functions/uvc.0
+
+ echo 3072 > streaming_maxpacket
+ echo 1 > streaming_maxburst
+ mkdir control/header/h
+ ln -s control/header/h control/class/fs/
+ ln -s control/header/h control/class/ss
+
+ mkdir -p streaming/uncompressed/u/360p
+ echo "666666\n1000000\n5000000\n" > streaming/uncompressed/u/360p/dwFrameInterval
+
+ mkdir -p streaming/uncompressed/u/720p
+ echo 1280 > streaming/uncompressed/u/720p/wWidth
+ echo 720 > streaming/uncompressed/u/720p/wWidth
+ echo 29491200 > streaming/uncompressed/u/720p/dwMinBitRate
+ echo 29491200 > streaming/uncompressed/u/720p/dwMaxBitRate
+ echo 1843200 > streaming/uncompressed/u/720p/dwMaxVideoFrameBufferSize
+ echo 5000000 > streaming/uncompressed/u/720p/dwDefaultFrameInterval
+ echo "5000000\n" > streaming/uncompressed/u/720p/dwFrameInterval
+
+ mkdir -p streaming/mjpeg/m/360p
+ echo "666666\n1000000\n5000000\n" > streaming/mjpeg/m/360p/dwFrameInterval
+
+ mkdir -p streaming/mjpeg/m/720p
+ echo 1280 > streaming/mjpeg/m/720p/wWidth
+ echo 720 > streaming/mjpeg/m/720p/wWidth
+ echo 29491200 > streaming/mjpeg/m/720p/dwMinBitRate
+ echo 29491200 > streaming/mjpeg/m/720p/dwMaxBitRate
+ echo 1843200 > streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
+ echo 5000000 > streaming/mjpeg/m/720p/dwDefaultFrameInterval
+ echo "5000000\n" > streaming/mjpeg/m/720p/dwFrameInterval
+
+ echo 0x04 > /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
+
+ mkdir -p streaming/h264/h/960p
+ echo 1920 > streaming/h264/h/960p/wWidth
+ echo 960 > streaming/h264/h/960p/wWidth
+ echo 40 > streaming/h264/h/960p/bLevelIDC
+ echo "333667\n" > streaming/h264/h/960p/dwFrameInterval
+
+ mkdir -p streaming/h264/h/1920p
+ echo "333667\n" > streaming/h264/h/1920p/dwFrameInterval
+
+ mkdir streaming/header/h
+ ln -s streaming/uncompressed/u streaming/header/h
+ ln -s streaming/mjpeg/m streaming/header/h
+ ln -s streaming/h264/h streaming/header/h
+ ln -s streaming/header/h streaming/class/fs/
+ ln -s streaming/header/h streaming/class/hs/
+ ln -s streaming/header/h streaming/class/ss/
+fi
diff --git a/rootdir/bin/init.qti.can.sh b/rootdir/bin/init.qti.can.sh
new file mode 100644
index 000000000..94a844b8d
--- /dev/null
+++ b/rootdir/bin/init.qti.can.sh
@@ -0,0 +1,32 @@
+#!/system/bin/sh
+# Copyright (c) 2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ip link set can0 type can bitrate 250000
+ip link set up can0
+
diff --git a/rootdir/bin/init.qti.fm.sh b/rootdir/bin/init.qti.fm.sh
new file mode 100644
index 000000000..e36801b8e
--- /dev/null
+++ b/rootdir/bin/init.qti.fm.sh
@@ -0,0 +1,90 @@
+#!/vendor/bin/sh
+# Copyright (c) 2009-2011, 2015, 2017 The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+setprop vendor.hw.fm.init 0
+
+mode=`getprop vendor.hw.fm.mode`
+version=199217
+
+LOG_TAG="qti-fm"
+LOG_NAME="${0}:"
+
+loge ()
+{
+ /vendor/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
+}
+
+logi ()
+{
+ /vendor/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
+}
+
+failed ()
+{
+ loge "$1: exit code $2"
+ exit $2
+}
+
+logi "In FM shell Script"
+logi "mode: $mode"
+logi "Version : $version"
+
+#$fm_qsoc_patches
+#
+case $mode in
+ "normal")
+ logi "inserting the radio transport module"
+ echo 1 > /sys/module/radio_iris_transport/parameters/fmsmd_set
+ /vendor/bin/fm_qsoc_patches $version 0
+ ;;
+ "wa_enable")
+ /vendor/bin/fm_qsoc_patches $version 1
+ ;;
+ "wa_disable")
+ /vendor/bin/fm_qsoc_patches $version 2
+ ;;
+ *)
+ logi "Shell: Default case"
+ /vendor/bin/fm_qsoc_patches $version 0
+ ;;
+esac
+
+exit_code_fm_qsoc_patches=$?
+
+case $exit_code_fm_qsoc_patches in
+ 0)
+ logi "FM QSoC calibration and firmware download succeeded"
+ ;;
+ *)
+ failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches
+ ;;
+esac
+
+setprop vendor.hw.fm.init 1
+
+exit 0
diff --git a/rootdir/bin/init.qti.ims.sh b/rootdir/bin/init.qti.ims.sh
new file mode 100644
index 000000000..26cd3962d
--- /dev/null
+++ b/rootdir/bin/init.qti.ims.sh
@@ -0,0 +1,57 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2014, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+dir0=/data
+trigger_file=$dir0/ims_disabled
+ims_disabled=`getprop persist.vendor.ims.disabled`
+target=`getprop ro.build.product`
+
+#if [ ! -e $trigger_file ]; then
+# for future use in doing conditional debugging
+#else
+#
+#fi
+echo "$ims_disabled"
+echo "$target"
+
+if [ "$ims_disabled" = "0" ]; then
+ echo "ims will be enabled"
+ setprop vendor.service.qti.ims.enabled 1
+ exit
+fi
+
+if [ "$ims_disabled" = "1" ] || [ "$target" = "msm8909_512" ]; then
+ echo "ims is disabled"
+ setprop vendor.service.qti.ims.enabled 0
+else
+ echo "ims is enabled"
+ setprop vendor.service.qti.ims.enabled 1
+fi
diff --git a/rootdir/bin/init.qti.qseecomd.sh b/rootdir/bin/init.qti.qseecomd.sh
new file mode 100644
index 000000000..eb2eec905
--- /dev/null
+++ b/rootdir/bin/init.qti.qseecomd.sh
@@ -0,0 +1,35 @@
+#!/vendor/bin/sh
+# Copyright (c) 2017, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+
+while [ "$registered" != "true" ]
+do
+ sleep 0.1
+ registered="`getprop vendor.sys.listeners.registered`"
+done
diff --git a/rootdir/etc/init.msm.usb.configfs.rc b/rootdir/etc/init.msm.usb.configfs.rc
new file mode 100644
index 000000000..7781a70f2
--- /dev/null
+++ b/rootdir/etc/init.msm.usb.configfs.rc
@@ -0,0 +1,1225 @@
+# Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# USB compositions
+on property:sys.usb.config=none && property:sys.usb.configfs=1
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+
+on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0xF000
+ symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb_msc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9015
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901D
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x900E
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default composition"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9091
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default comp without ADB"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9092
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:vendor.usb.tethering=true
+ write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask}
+
+on property:sys.usb.config=rndis
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra}
+
+on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF80
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,sec && property:sys.usb.configfs=1
+ write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis"
+ rm /config/usb_gadget/g2/configs/b.1/f1
+ write /config/usb_gadget/g2/idVendor 0x05C6
+ write /config/usb_gadget/g2/idProduct 0xF00E
+ symlink /config/usb_gadget/g2/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g2/configs/b.1/f1
+ write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,adb
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb
+
+on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xFF88
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x902C
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x902D
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_cdev && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B4
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B5
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90B6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901B
+ symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x903A
+ symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x904A
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9060
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9083
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9084
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9081
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9082
+ write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0xA4A1
+ symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x908C
+ symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9004
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb_dun"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901f
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90b7
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90b8
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90bf
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90c0
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=ccid && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CE
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CF
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ccid,diag && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D0
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D1
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,ccid && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D2
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D3
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D7
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90D8
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DD
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DE
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DC
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DB
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f6
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CA
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2 && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x901C
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CB
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uvc && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90DF
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f2
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90CC
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,uac2,uvc && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E0
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E4
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E5
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90E7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee7
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xff40
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xff48
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xff10
+
+on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x2717
+ write /config/usb_gadget/g1/idProduct 0xff18
+
+on property:sys.usb.config=accessory && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d00
+
+on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d01
+
+on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d02
+
+on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d03
+
+on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d04
+
+on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x2d05
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee8
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4ee9
+
+on property:vendor.usb.eud=1
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 1
+ write /sys/module/eud/parameters/enable 1
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 1
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 500
+
+on property:vendor.usb.eud=0
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 0
+ write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 0
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 0
+ write /sys/module/eud/parameters/enable 0
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 4aef220c6..3c0b11274 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -1,81 +1,1320 @@
+# Copyright (c) 2009-2012, 2014-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+import /vendor/etc/init/hw/init.qcom.usb.rc
+import /vendor/etc/init/hw/init.msm.usb.configfs.rc
+import /vendor/etc/init/hw/init.target.rc
+import /vendor/etc/init/hw/init.factory.rc
+
+on early-init
+ mount debugfs debugfs /sys/kernel/debug
+ chmod 0755 /sys/kernel/debug
+
+ # Change ownership of hw_recovery related nodes
+ chown system graphics /sys/kernel/debug/dri/0/debug/dump
+ chown system graphics /sys/kernel/debug/dri/0/debug/recovery_reg
+ chown system graphics /sys/kernel/debug/dri/0/debug/recovery_dbgbus
+ chown system graphics /sys/kernel/debug/dri/0/debug/recovery_vbif_dbgbus
+
+ chown root system /dev/kmsg
+ chmod 0620 /dev/kmsg
+ # Load WIGIG platform driver
+ # exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules msm_11ad_proxy
+
on init
- mount none /sbin/chargeonlymode /sbin/charger bind
- mount none /system/etc/audio_policy_configuration.xml /vendor/etc/audio/audio_policy_configuration.xml bind
- mount none /system/etc/placeholder /vendor/overlay/BluetoothResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CarrierConfigResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CellBroadcastReceiverResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/ChinaMobileFrameworksRes/ChinaMobileFrameworksRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CmccMmsRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CmccSettingsTheme/CmccSettingsRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CmccSystemUIRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CtFrameworksTheme/CtFrameworksRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CtNetworkSettingRes/CtNetworkSettingRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/CtSystemUITheme/CtSystemUIRes.apk bind
- mount none /system/etc/placeholder /vendor/overlay/DialerResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/FrameworksResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/MiuiBluetoothOverlay.apk bind
- mount none /system/etc/placeholder /vendor/overlay/OptInAppOverlay/OptInAppOverlay.apk bind
- mount none /system/etc/placeholder /vendor/overlay/SystemUIResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/TelecommResCommon.apk bind
- mount none /system/etc/placeholder /vendor/overlay/TelephonyResCommon.apk bind
- mount none /system/lib64/hw/power.qcom.so /vendor/lib64/hw/power.qcom.so bind
- mount none /system/lib64/soundfx/libvolumelistener.so /vendor/lib64/soundfx/libvolumelistener.so bind
- mount none /system/lib/soundfx/libvolumelistener.so /vendor/lib/soundfx/libvolumelistener.so bind
-
- # Boot time FS tune
- write /sys/block/sda/queue/iostats 0
- write /sys/block/sda/queue/scheduler cfq
- write /sys/block/sda/queue/iosched/slice_idle 0
- write /sys/block/sda/queue/read_ahead_kb 2048
- write /sys/block/sda/queue/nr_requests 256
- write /sys/block/sdf/queue/iostats 0
- write /sys/block/sdf/queue/scheduler cfq
- write /sys/block/sdf/queue/iosched/slice_idle 0
- write /sys/block/sdf/queue/read_ahead_kb 2048
- write /sys/block/sdf/queue/nr_requests 256
+ # Create cgroup mount point for memory
+ mkdir /sys/fs/cgroup/memory/bg 0750 root system
+ write /sys/fs/cgroup/memory/bg/memory.swappiness 140
+ write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1
+ chown root system /sys/fs/cgroup/memory/bg/tasks
+ chmod 0660 /sys/fs/cgroup/memory/bg/tasks
+
+on post-fs
+ chmod 0755 /sys/kernel/debug/tracing
+ insmod /vendor/lib/modules/exfat.ko
+
+on early-boot
+ # set RLIMIT_MEMLOCK to 64MB
+ setrlimit 8 67108864 67108864
+ # Allow subsystem (modem etc) debugging
+ write /sys/kernel/boot_adsp/boot 1
+ write /sys/kernel/boot_cdsp/boot 1
+ write /sys/kernel/boot_slpi/boot 1
+ exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
+
+ # for backward compatibility
+ chown system system /persist/sensors
+ chown system system /persist/sensors/registry
+ chown system system /persist/sensors/registry/registry
+ chown system system /persist/sensors/registry/registry/sensors_registry
+ chown system system /persist/sensors/sensors_settings
+ chown system system /persist/sensors/registry/config
+ chmod 0664 /persist/sensors/sensors_settings
+
+ chown system system /mnt/vendor/persist/sensors
+ chown system system /mnt/vendor/persist/sensors/sns.reg
+ chown system system /mnt/vendor/persist/sensors/sensors_list.txt
+ chown system system /mnt/vendor/persist/sensors/registry
+ chown system system /mnt/vendor/persist/sensors/registry/registry
+ chown system system /mnt/vendor/persist/sensors/registry/registry/sensors_registry
+ chown system system /mnt/vendor/persist/sensors/sensors_settings
+ chown system system /mnt/vendor/persist/sensors/registry/sns_reg_config
+ chown system system /mnt/vendor/persist/sensors/registry/sns_reg_version
+ chown system system /mnt/vendor/persist/sensors/registry/config
+ chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
+
+on property:ro.hardware.type=automotive
+ wait /sys/class/net/can0
+ start can
+
+on boot
+ chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
+ 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
+ chown system system /sys/module/sco/parameters/disable_esco
+ chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set
+ chown system system /sys/module/msm_core/parameters/polling_interval
+ chown system system /sys/module/msm_core/parameters/disabled
+ chown system system /sys/kernel/debug/msm_core/enable
+ chown system system /sys/kernel/debug/msm_core/ptable
+ chown system system /sys/kernel/boot_slpi/ssr
+ chown system system /sys/kernel/boot_adsp/ssr
+ chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
+ chmod 0660 /sys/module/bluetooth_power/parameters/power
+ chmod 0660 /sys/module/hci_smd/parameters/hcismd_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 net_bt /dev/ttyHS0
+ chmod 0660 /sys/module/hci_uart/parameters/ath_lpm
+ chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite
+ chmod 0660 /dev/ttyHS0
+ chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
+ chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
+
+ chmod 0660 /dev/ttyHS2
+ chown bluetooth bluetooth /dev/ttyHS2
+
+ chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
+ chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
+
+ #Create QMUX deamon socket area
+ mkdir /dev/socket/qmux_radio 0770 radio radio
+ chmod 2770 /dev/socket/qmux_radio
+ mkdir /dev/socket/qmux_audio 0770 media audio
+ chmod 2770 /dev/socket/qmux_audio
+ mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
+ chmod 2770 /dev/socket/qmux_bluetooth
+ mkdir /dev/socket/qmux_gps 0770 gps gps
+ chmod 2770 /dev/socket/qmux_gps
+
+ mkdir /persist/drm 0770 system system
+ mkdir /mnt/vendor/persist/bluetooth 0770 bluetooth bluetooth
+ mkdir /persist/misc 0770 system system
+ mkdir /mnt/vendor/persist/alarm 0770 system system
+ mkdir /mnt/vendor/persist/time 0770 system system
+ mkdir /mnt/vendor/persist/secnvm 0770 system system
+
+ #Create NETMGR daemon socket area
+ mkdir /dev/socket/netmgr 0750 radio radio
+
+ setprop wifi.interface wlan0
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576
+
+
+ setprop ro.telephony.call_ring.multiple false
+
+
+ #Remove SUID bit for iproute2 ip tool
+ chmod 0755 /system/bin/ip
+
+
+ chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
+
+# Define TCP buffer sizes for various networks
+# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
+ setprop net.tcp.buffersize.default 4096,87380,524288,4096,16384,110208
+ setprop net.tcp.buffersize.lte 2097152,4194304,8388608,262144,524288,1048576
+ setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
+ setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
+ setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
+ setprop net.tcp.buffersize.evdo 4094,87380,524288,4096,16384,262144
+
+ setprop net.tcp.2g_init_rwnd 10
+
+# 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 16777216
+ write /proc/sys/net/core/wmem_max 8388608
+
+ # To prevent out of order acknowledgements from making
+ # connection tracking to treat them as not belonging to
+ # the connection they belong to.
+ # Otherwise, a weird issue happens in which some long
+ # connections on high-throughput links get dropped when
+ # an ack packet comes out of order
+ write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
+
+ # Set the console loglevel to < KERN_INFO
+ # Set the default message loglevel to KERN_INFO
+ write /proc/sys/kernel/printk "6 6 1 7"
+
+ # Allow access for CCID command/response timeout configuration
+ chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout
+
+ # bond0 used by FST Manager
+ chown wifi wifi /sys/class/net/bond0/bonding/queue_id
+
+ # Allow access to emmc rawdump block partition and dload sysfs node
+ chown root system /dev/block/bootdevice/by-name/rawdump -p /dev/block/
+ chmod 0660 /dev/block/bootdevice/by-name/rawdump -p /dev/block/
+ chown root system /sys/kernel/dload/emmc_dload
+ chmod 0660 /sys/kernel/dload/emmc_dload
+ chown root system /dev/block/bootdevice/by-name/ramdump -p /dev/block/
+ chmod 0660 /dev/block/bootdevice/by-name/ramdump -p /dev/block/
+ chown root system /sys/kernel/dload/dload_mode
+ chmod 0660 /sys/kernel/dload/dload_mode
+
+ chown system system /sys/class/backlight/panel0-backlight/brightness
+ chown system system /sys/class/backlight/panel0-backlight/max_brightness
+
+ # Allow access to sensors device attributes
+ chown system system /sys/class/sensors/MPU6050-accel/enable
+ chown system system /sys/class/sensors/MPU6050-accel/poll_delay
+ chown system system /sys/class/sensors/MPU6050-gyro/enable
+ chown system system /sys/class/sensors/MPU6050-gyro/poll_delay
+ chown system system /sys/class/sensors/apds9930-light/enable
+ chown system system /sys/class/sensors/apds9930-light/poll_delay
+ chown system system /sys/class/sensors/apds9930-proximity/enable
+ chown system system /sys/class/sensors/apds9930-proximity/poll_delay
+
+ # Create directory used for display
+ # for backward compatibility
+ mkdir /persist/display 0770 system graphics
+ mkdir /mnt/vendor/persist/display 0770 system graphics
+
+ # Create vpp directory
+ mkdir /mnt/vendor/persist/vpp 0770 media media
+
+
+ # Create hvdcp_opti directory
+ mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
+
+ #Create camera directory
+ mkdir /mnt/vendor/persist/camera 0755 system cameraserver
+
+ # chmod 0666 show_traced_package show_windowsize package_runtime_disable develop_mode
+ chmod 0666 /proc/trace_package/show_traced_package
+ chmod 0666 /proc/trace_package/show_windowsize
+ chmod 0666 /proc/trace_package/package_runtime_disable
+ chmod 0666 /proc/trace_package/develop_mode
+
+# msm specific files that need to be created on /data
+on post-fs-data
+ mkdir /data/vendor/misc 01771 system system
+
+ # Create directory used for dump collection
+ mkdir /data/vendor/ssrdump 0770 root system
+
+ # Create directory used by display clients
+ mkdir /data/vendor/display 0770 system graphics
+
+ # Change lm related dirs
+ mkdir /data/vendor/lm 0700 root root
+
+ # Create directory used by media clients
+ mkdir /data/vendor/media 0770 mediacodec media
+
+ # create QDMA dropbox
+ mkdir /data/vendor/qdmastats 0700 system system
+ mkdir /data/vendor/qdma 0770 system system
+ mkdir /dev/socket/qdma 0777 system system
+ chmod 2777 /dev/socket/qdma
+
+ # Create /data/vendor/tzstorage directory for SFS listener
+ mkdir /data/vendor/tzstorage 0770 system system
+
+ # Create directory for apps access via QTEEConnector
+ mkdir /data/vendor/qtee 0770 system system
+
+ #Create folder of camera
+ mkdir /data/vendor/camera 0770 camera camera
+
+
+ #Create directory for tftp
+ mkdir /data/vendor/tombstones 0771 system system
+
+ mkdir /data/vendor/ramdump 0771 root system
+ mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
+ mkdir /data/vendor/ramdump/bluetooth 0770 bluetooth bluetooth
+
+ # Create the directories used by the Wireless subsystem
+ mkdir /data/vendor/wifi 0770 wifi wifi
+ mkdir /data/vendor/wifi/sockets 0770 wifi wifi
+ mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
+ mkdir /data/vendor/wifi/hostapd/ctrl 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa_supplicant 0770 wifi wifi
+ mkdir /data/vendor/wlan_logs 0770 system wifi
+ mkdir /data/vendor/mac_addr 0770 system wifi
+ mkdir /data/vendor/wifi/wigig_hostapd 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+
+ #create port-bridge log dir
+ mkdir /data/vendor/port_bridge 0770 radio radio
+ chmod 0770 /data/vendor/port_bridge
+
+ #create netmgr log dir
+ mkdir /data/vendor/netmgr 0770 radio radio
+ chmod 0770 /data/vendor/netmgr
+
+ #create ipacm log dir
+ mkdir /data/vendor/ipa 0770 radio radio
+ chmod 0770 /data/vendor/ipa
+
+ #Create QTI dir for logs
+ mkdir /data/vendor/dataqti 0770 radio radio
+ chmod 0770 /data/vendor/dataqti
+
+ # Create the directories used by CnE subsystem
+ mkdir /data/vendor/connectivity 0771 radio radio
+ chown radio radio /data/vendor/connectivity
+
+ # Create directory used by audio subsystem
+ mkdir /data/vendor/audio 0770 audio audio
+ # Create directory used by audio cit
+ mkdir /data/vendor/cit 0770 system system
+
+ # Create directory for audio delta files
+ mkdir /data/vendor/audio/acdbdata 0770 media audio
+ mkdir /data/vendor/audio/acdbdata/delta 0770 media audio
+
+ # Create directory for radio
+ mkdir /data/vendor/radio 0770 system radio
+
+ # Create directory for modem_config
+ mkdir /data/vendor/modem_config 0570 radio root
+
+ # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
+ # We chown/chmod /persist again so because mount is run as root + defaults
+ chown root system /persist
+ chmod 0771 /persist
+ chown system system /persist/WCNSS_qcom_wlan_nv.bin
+ chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
+ chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
+ chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
+ chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
+
+ # Chown polling nodes as needed from UI running on system server
+ chown system system /sys/devices/platform/msm_sdcc.1/polling
+ chown system system /sys/devices/platform/msm_sdcc.2/polling
+ chown system system /sys/devices/platform/msm_sdcc.3/polling
+ chown system system /sys/devices/platform/msm_sdcc.4/polling
+
+ #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
+ #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
+
+ #Create directories for Location services
+ mkdir /data/vendor/location 0770 gps gps
+ mkdir /data/vendor/location/mq 0770 gps gps
+ mkdir /data/vendor/location/xtwifi 0770 gps gps
+ mkdir /dev/socket/location 0770 gps gps
+ mkdir /dev/socket/location/mq 0770 gps gps
+ mkdir /dev/socket/location/xtra 0770 gps gps
+ mkdir /data/vendor/location-partner 0770 gps gps
+ mkdir /data/vendor/location-partner/dre 0770 gps gps
+ mkdir /data/vendor/location-partner/ppe 0770 gps gps
+ mkdir /dev/socket/location 0770 gps gps
+ mkdir /dev/socket/location/ehub 0770 gps gps
+
+ #Create directory from IMS services
+ mkdir /data/shared 0755
+ chown system system /data/shared
+
+ #Create directory for FOTA
+ mkdir /data/fota 0771
+ chown system system /data/fota
+
+ # Create /data/time folder for time-services
+ mkdir /data/vendor/time/ 0700 system system
+
+ setprop vold.post_fs_data_done 1
+
+ #Create a folder for SRS to be able to create a usercfg file
+ #mkdir /data/data/media 0770 media media
+
+ #Create FM dir for patchdownloader
+ mkdir /data/vendor/fm 0770 system system
+ chmod 0770 /data/vendor/fm
+
+ #Create PERFD deamon related dirs
+ mkdir /data/vendor/perfd 0770 root system
+ chmod 2770 /data/vendor/perfd
+ rm /data/vendor/perfd/default_values
+
+ #Create IOP deamon related dirs
+ mkdir /data/vendor/iop 0700 root system
+
+ # Mark the copy complete flag to not completed
+ write /data/vendor/radio/copy_complete 0
+ chown radio radio /data/vendor/radio/copy_complete
+ chmod 0660 /data/vendor/radio/copy_complete
+
+ # copy prebuilt qcril.db files always
+ copy /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db
+ chown radio radio /data/vendor/radio/qcril_prebuilt.db
+ chmod 0660 /data/vendor/radio/qcril_prebuilt.db
+ # File flags for prebuilt ril db file
+ write /data/vendor/radio/prebuilt_db_support 1
+ chown radio radio /data/vendor/radio/prebuilt_db_support
+ chmod 0400 /data/vendor/radio/prebuilt_db_support
+ write /data/vendor/radio/db_check_done 0
+ chown radio radio /data/vendor/radio/db_check_done
+ chmod 0660 /data/vendor/radio/db_check_done
+
+ # qti-logkit data
+ mkdir /data/vendor/qti-logkit/ 0771 system system
+ mkdir /data/vendor/qti-logkit/shared-privileged/ 2770 system system
+ mkdir /data/vendor/qti-logkit/shared-public/ 2770 system diag
+ mkdir /data/vendor/qti-logkit/socket-privileged/ 2770 system system
+ mkdir /data/vendor/qti-logkit/socket-public/ 2750 system diag
+ mkdir /data/vendor/qti-logkit/logdata/ 2750 system shell
+
+ #Create SWAP related dirs
+ mkdir /data/vendor/swap 0770 root system
+ chmod 2770 /data/vendor/swap
+
+ # set aggressive read ahead for dm-0 and dm-1 during boot up
write /sys/block/dm-0/queue/read_ahead_kb 2048
write /sys/block/dm-1/queue/read_ahead_kb 2048
write /sys/block/dm-2/queue/read_ahead_kb 2048
-on late-fs
- # Boot time FS tune
- write /sys/block/dm-3/queue/read_ahead_kb 2048
+ #add torch node for cit
+ chown system system /sys/class/leds/led:torch_0/brightness
+ chown system system /sys/class/leds/led:torch_1/brightness
+ chown system system /sys/class/leds/led:switch_0/brightness
+ chown system system /sys/class/leds/led:torch_2/brightness
+ chown system system /sys/class/leds/led:switch_1/brightness
+ chown system system /sys/class/leds/flashlight/brightness
+
+ # Create vpp directory
+ mkdir /data/vendor/vpp 0770 media media
-service vendor.ss_ramdump_local /vendor/bin/subsystem_ramdump
+ #Create dir for TUI
+ mkdir /data/vendor/tui 0700 system system
+
+ #Make MTU adjusting
+ write /proc/sys/net/ipv4/tcp_mtu_probing 1
+
+ #Start move time data to /data/vendor once post-fs-data done
+ start vendor.move_time_data
+
+service nqnfcinfo /system/vendor/bin/nqnfcinfo
class late_start
+ group nfc
user system
- group system
+ oneshot
+
+service iop /system/vendor/bin/iop
+ class main
+ user root
+ group root
+ disabled
+ socket iop seqpacket 0666 root system
+
+service qcomsysd /system/vendor/bin/qcom-system-daemon
+ class main
+ user root
+ group root diag oem_2901
disabled
-on property:init.svc.vendor.cnss_diag=running
- stop vendor.cnss_diag
+on property:persist.vendor.qcomsysd.enabled=1
+ enable qcomsysd
+
+on property:persist.vendor.qcomsysd.enabled=0
+ stop qcomsysd
+
+service vendor.ssr_setup /system/vendor/bin/ssr_setup
+ oneshot
+ disabled
+
+service vendor.ss_ramdump /system/bin/subsystem_ramdump_system 2
+ class late_start
+# user system
+ group system
+# disabled
+
+on property:ro.vendor.iocgrp.config=1
+ mkdir /dev/blkio
+ mount cgroup none /dev/blkio blkio
+ chown system system /dev/blkio
+ chown system system /dev/blkio/tasks
+ chmod 0664 /dev/blkio/tasks
+ mkdir /dev/blkio/bg 0755 system system
+ chown system system /dev/blkio/bg/tasks
+ chmod 0664 /dev/blkio/bg/tasks
+ write /dev/blkio/blkio.weight 1000
+ write /dev/blkio/bg/blkio.weight 100
+
+on property:persist.vendor.sys.ssr.enable_debug=*
+ write /sys/module/subsystem_restart/parameters/enable_debug ${persist.vendor.sys.ssr.enable_debug}
-on property:init.svc.vendor.ipacm-diag=running
- stop vendor.ipacm-diag
+on property:persist.vendor.sys.mba_boot_timeout=*
+ write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.vendor.sys.mba_boot_timeout}
-on property:persist.vendor.sys.ssr.enable_ramdumps=1
- start vendor.ss_ramdump_local
+on property:persist.vendor.sys.modem_auth_timeout=*
+ write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.vendor.sys.modem_auth_timeout}
-on property:persist.vendor.sys.ssr.enable_ramdumps=0
- stop vendor.ss_ramdump
- stop vendor.ss_ramdump_local
+on property:persist.vendor.sys.pil_proxy_timeout=*
+ write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.vendor.sys.pil_proxy_timeout}
+
+on property:persist.vendor.ssr.restart_level=*
+ start vendor.ssr_setup
+
+on property:persist.vendor.ssr.enable_ramdumps=1
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
+ mkdir /data/vendor/ramdump_ssr 770 system system
+# start vendor.ss_ramdump
+
+on property:persist.vendor.ssr.enable_ramdumps=0
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
on property:sys.boot_completed=1
- stop vendor.ss_ramdump
-
- # Runtime FS tuning: as we have init boottime setting and kernel patch setting
- # default readahead to 2048KB. We should adjust the setting upon boot_complete
- # for runtime performance
- write /sys/block/sda/queue/read_ahead_kb 128
- write /sys/block/sda/queue/nr_requests 128
- write /sys/block/sda/queue/iostats 1
- write /sys/block/sdf/queue/read_ahead_kb 128
- write /sys/block/sdf/queue/nr_requests 128
- write /sys/block/sdf/queue/iostats 1
- write /sys/block/dm-0/queue/read_ahead_kb 128
- write /sys/block/dm-1/queue/read_ahead_kb 128
- write /sys/block/dm-2/queue/read_ahead_kb 128
- write /sys/block/dm-3/queue/read_ahead_kb 128
+ write /dev/kmsg "Boot completed "
+ #Reset read ahead for dm-0 and dm-1 to 512kb
+ write /sys/block/dm-0/queue/read_ahead_kb 512
+ write /sys/block/dm-1/queue/read_ahead_kb 512
+ #WDSP FW boot sysfs node used by STHAL
+ chown media audio /sys/kernel/wdsp0/boot
+ chown media audio /sys/kernel/wcd_cpe0/fw_name
+
+on property:persist.vendor.radio.atfwd.start=false
+ stop vendor.atfwd
+
+on property:vendor.radio.atfwd.start=false
+ stop vendor.atfwd
+
+# corefile limit
+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:vendor.bluetooth.dun.status=running
+ start vendor.bt-dun
+
+on property:vendor.bluetooth.dun.status=stopped
+ stop vendor.bt-dun
+
+on property:ro.bluetooth.ftm_enabled=true
+ start ftmd
+
+on property:vendor.bluetooth.startbtsnoop=true
+ start vendor.btsnoop
+
+on property:vendor.bluetooth.startbtsnoop=false
+ stop vendor.btsnoop
+on property:vendor.bluetooth.startbtlogger=true
+ start vendor.bt_logger
+
+on property:vendor.bluetooth.startbtlogger=false
+ stop vendor.bt_logger
+
+on property:vendor.bluetooth.startwdsdaemon=true
+ start vendor.bt_wdsdaemon
+
+on property:vendor.bluetooth.startwdsdaemon=false
+ stop vendor.bt_wdsdaemon
+
+service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
+ class core
+ user root
+ oneshot
+
+service qcom-c_main-sh /vendor/bin/init.class_main.sh
+ class main
+ user root
+ oneshot
+
+service qcom-c_late-sh /vendor/bin/init.class_late.sh
+ class late_start
+ user root
+ oneshot
+
+#xiaomi bsp-wifi: start vendor.cnss_diag is added by bsp-wifi
on property:vold.decrypt=trigger_restart_framework
- restart vendor.audio-hal-2-0
+ start qcom-c_main-sh
+ start wcnss-service
+ start vendor.cnss_diag
+ start qcom-c_late-sh
+
+on property:persist.env.fastdorm.enabled=true
+ setprop persist.radio.data_no_toggle 1
+
+service vendor.cnd /system/vendor/bin/cnd
+ class main
+ user system
+ group system wifi inet radio wakelock net_admin
+
+service dpmQmiMgr /system/vendor/bin/dpmQmiMgr
+ class main
+ user system
+ group system
+
+service vendor.qrtr-ns /vendor/bin/qrtr-ns -f
+ class core
+ user vendor_qrtr
+ group vendor_qrtr
+ capabilities NET_BIND_SERVICE
+
+service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
+ class core
+ user root
+ oneshot
+
+service vendor.rmt_storage /vendor/bin/rmt_storage
+ class core
+ user root
+ shutdown critical
+ ioprio rt 0
+
+service vendor.tftp_server /vendor/bin/tftp_server
+ class core
+ user root
+
+on property:vendor.wc_transport.start_hci=true
+ start vendor.start_hci_filter
+
+on property:vendor.wc_transport.start_hci=false
+ stop vendor.start_hci_filter
+
+service vendor.start_hci_filter /system/vendor/bin/wcnss_filter
+ class late_start
+ user bluetooth
+ group bluetooth diag system wakelock
+ seclabel u:r:bluetooth:s0
+ disabled
+
+service vendor.bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
+ class late_start
+ user bluetooth
+ group bluetooth net_bt_admin inet
+ disabled
+ oneshot
+
+service vendor.btsnoop /system/bin/btsnoop
+ user bluetooth
+ group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw
+ class late_start
+ disabled
+ oneshot
+
+service vendor.bt_wdsdaemon /system/vendor/bin/wdsdaemon -su
+ class late_start
+ user root
+ group bluetooth diag system wakelock
+ disabled
+ oneshot
+
+service vendor.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 ftmd /system/bin/logwrapper /system/bin/ftmdaemon
+ class late_start
+ user root
+ group bluetooth net_bt_admin misc net_bt_stack diag net_bt
+ disabled
+ oneshot
+
+service vendor.port-bridge /system/vendor/bin/port-bridge
+ class main
+ user radio
+ group radio system inet
+ disabled
+ oneshot
+
+service qmiproxy /system/bin/qmiproxy
+ class main
+ user radio
+ group radio diag
+ disabled
+
+# QMUX must be in multiple groups to support external process connections
+service vendor.qmuxd /system/vendor/bin/qmuxd
+ class main
+ user root
+ group radio audio bluetooth gps nfc diag
+ disabled
+
+service vendor.netmgrd /system/vendor/bin/netmgrd
+ class main
+ disabled
+
+service vendor.ipacm-diag /system/vendor/bin/ipacm-diag
+ class main
+ user radio
+ socket ipacm_log_file dgram 660 radio radio
+ group radio diag oem_2901
+ disabled
+
+service vendor.ipacm /system/vendor/bin/ipacm
+ class main
+ user radio
+ group radio inet
+ disabled
+
+service vendor.dataqti /system/vendor/bin/qti
+ class main
+ user radio
+ group radio oem_2901 diag usb net_admin
+ disabled
+
+service vendor.dataadpl /system/vendor/bin/adpl
+ class main
+ user radio
+ group radio oem_2901 diag usb net_admin
+ disabled
+
+service vendor.sensors /vendor/bin/sscrpcd
+ class core
+ user system
+ group system
+ disabled
+
+service vendor.sensors.qti /vendor/bin/sensors.qti
+ class core
+ user system
+ group system
+ disabled
+
+on property:ro.vendor.use_data_netmgrd=false
+ # netmgr not supported on specific target
+ stop vendor.netmgrd
+
+# Adjust socket buffer to enlarge TCP receive window for high bandwidth
+# but only if ro.data.large_tcp_window_size property is set.
+on property:ro.data.large_tcp_window_size=true
+ write /proc/sys/net/ipv4/tcp_adv_win_scale 2
+
+on property:sys.sysctl.tcp_adv_win_scale=*
+ write /proc/sys/net/ipv4/tcp_adv_win_scale ${sys.sysctl.tcp_adv_win_scale}
+
+service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
+ -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
+ -g@android:vendor_wpa_wlan0
+# we will start as root and wpa_supplicant will switch to user wifi
+# after setting up the capabilities required for WEXT
+# user wifi
+# group wifi inet keystore
+ interface android.hardware.wifi.supplicant@1.0::ISupplicant default
+ interface android.hardware.wifi.supplicant@1.1::ISupplicant default
+ class main
+ socket vendor_wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
+ -iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
+ -m/data/vendor/wifi/wigig_p2p_supplicant.conf \
+ -O/data/vendor/wifi/wigig_sockets -dd \
+ -e/data/vendor/wifi/wigig_entropy.bin -g@android:wpa_wigig0 \
+ -S wigigsvc
+ # we will start as root and wpa_supplicant will switch to user wifi
+ # after setting up the capabilities required for WEXT
+ # user wifi
+ # group wifi inet keystore
+ class main
+ socket wpa_wigig0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+# Data Migration
+service vendor.move_wifi_data /system/bin/move_wifi_data.sh
+ class main
+ user wifi
+ group wifi
+ 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 -a 1
+ user wifi
+ group wifi
+ capabilities 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 \
+ -a 0 @android:vendor_wpa_wlan0
+ user wifi
+ group wifi
+ capabilities NET_ADMIN NET_RAW
+ class main
+ disabled
+ oneshot
+
+service wigighalsvc /vendor/bin/wigighalsvc
+ interface vendor.qti.hardware.wigig.supptunnel@1.0::ISuppTunnelProvider default
+ class hal
+ user system
+ group wifi
+ # needed for on-demand insmod/rmmod of wigig module
+ capabilities SYS_MODULE
+ disabled
+
+service wigignpt /vendor/bin/wigignpt
+ interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
+ class hal
+ socket wigignpt stream 660 system wifi
+ user system
+ group wifi
+ capabilities NET_ADMIN
+ disabled
+
+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 dhcpcd_wigig0 /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 iprenew_wigig0 /system/bin/dhcpcd -n
+ class late_start
+ disabled
+ oneshot
+
+service ptt_socket_app /system/vendor/bin/ptt_socket_app -d
+ class main
+ user wifi
+ group wifi system inet net_admin
+ capabilities NET_ADMIN
+ oneshot
+
+service ptt_ffbm /system/vendor/bin/ptt_socket_app -f -d
+ user root
+ group root
+ disabled
+ oneshot
+
+service wifi_ftmd /system/vendor/bin/wifi_ftmd
+ user system
+ group system inet net_admin
+ socket wififtmd_server dgram 0660 system system
+ disabled
+ oneshot
+
+on property:vendor.wifi.ftmd.load=true
+ insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
+
+service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f
+ class late_start
+ user system
+ group system wifi inet net_admin sdcard_rw media_rw diag
+ disabled
+ oneshot
+
+service vendor.tcpdump /vendor/bin/tcpdump -i any -W 2 -C 2 -s 134 -w /data/vendor/wlan_logs/tcpdump.pcap
+ class main
+ user root
+ group root wifi
+ disabled
+ oneshot
+
+service sniffer /vendor/bin/tcpdump -i wlan0 -w /sdcard/wlan_logs/sniffer.pcap
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+on property:sys.user.0.ce_available=true
+ start vendor.cnss_diag
+ start vendor.tcpdump
+
+service startpktlog /system/bin/iwpriv wlan0 pktlog 2
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+service stoppktlog /system/bin/iwpriv wlan0 pktlog 0
+ class main
+ user root
+ group root
+ disabled
+ oneshot
+
+on property:persist.vendor.data.shs_ko_load=1
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_shs
+
+on property:persist.vendor.data.shs_ko_load=0
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_shs
+
+on property:persist.vendor.data.perf_ko_load=1
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_perf
+
+on property:persist.vendor.data.perf_ko_load=0
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_perf
+
+service vendor.cnss-daemon /system/vendor/bin/cnss-daemon -n -l
+ class late_start
+ user system
+ group system inet net_admin wifi
+ capabilities NET_ADMIN
+
+on property:sys.shutdown.requested=*
+ stop vendor.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 mlid /vendor/bin/mlid
+ class late_start
+ user gps
+ group gps
+ socket mlid stream 0666 gps gps
+
+service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
+ class late_start
+ user system
+ group readproc system net_bw_stats radio vendor_rfs_shared
+
+service loc_launcher /system/vendor/bin/loc_launcher
+ class late_start
+ user gps
+ group gps
+
+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
+ group root system radio
+ oneshot
+
+service vendor-sensor-sh /vendor/bin/init.qcom.sensors.sh
+ class core
+ user root
+ oneshot
+
+service crashdata-sh /vendor/bin/init.qcom.crashdata.sh
+ class late_start
+ user root
+ oneshot
+
+service qcom-post-boot /vendor/bin/init.qcom.post_boot.sh
+ class late_start
+ user root
+ group root system wakelock graphics
+ disabled
+ oneshot
+
+service qti-testscripts /system/bin/sh /system/etc/init.qcom.testscripts.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+ seclabel u:r:qti-testscripts:s0
+
+service wifi-sdio-on /vendor/bin/init.qcom.sdio.sh
+ class late_start
+ group wifi inet
+ disabled
+ 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
+ start qti-testscripts
+
+on property:ro.vendor.ril.mbn_copy_completed=1
+ write /data/vendor/radio/copy_complete 1
+
+service qvop-daemon /vendor/bin/qvop-daemon
+ class late_start
+ user system
+ group system drmrpc
+
+service vendor.atfwd /vendor/bin/ATFWD-daemon
+ class late_start
+ user system
+ group system radio
+ disabled
+
+service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
+ interface android.hardware.wifi.hostapd@1.0::IHostapd default
+ class main
+ capabilities NET_ADMIN NET_RAW
+ user wifi
+ group wifi
+ disabled
+ oneshot
+
+service vendor.wigig_hostapd /vendor/bin/hw/hostapd -dd -j wigighostapd /data/vendor/wifi/hostapd/wigig_hostapd.conf
+ class late_start
+ capabilities NET_ADMIN NET_RAW
+ user wifi
+ group wifi inet keystore
+ 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 vendor.ril-daemon2 /vendor/bin/hw/rild -c 2
+ class main
+ 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 vendor.ril-daemon3 /vendor/bin/hw/rild -c 3
+ class main
+ 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 can /vendor/bin/init.qti.can.sh
+ class late_start
+ user root
+ disabled
+ oneshot
+
+service charger /charger
+ class charger
+ group system graphics
+ seclabel u:r:healthd:s0
+
+service vendor.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
+
+on property:sys.qbcharger.enable=true
+ start qbcharger
+
+on property:sys.qbcharger.enable=false
+ stop qbcharger
+
+service diag_mdlog_start /system/bin/diag_mdlog_system -n 20
+ class late_start
+ user shell
+ group system oem_2901 sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
+
+service diag_mdlog_stop /system/bin/diag_mdlog_system -k
+ class late_start
+ user shell
+ group system oem_2901 sdcard_rw sdcard_r media_rw
+ disabled
+ oneshot
+
+service qlogd /system/xbin/qlogd
+ socket qlogd stream 0662 system system
+ class main
+ disabled
+on property:persist.sys.qlogd=1
+ start qlogd
+on property:persist.sys.qlogd=0
+ stop qlogd
+
+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
+
+service vendor.msm_irqbal_lb /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_little_big.conf
+ class core
+ user root
+ group root
+ disabled
+
+service vendor.msm_irqbl_sdm630 /vendor/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance_sdm630.conf
+ class core
+ user root
+ group root
+ disabled
+
+# service for USERDEBUG
+service vendor.LKCore-dbg /vendor/bin/LKCore
+ class late_start
+ oneshot
+ disabled
+ user root
+ group root system log diag net_raw
+
+# service for USER
+service vendor.LKCore-rel /vendor/bin/LKCore
+ class late_start
+ oneshot
+ disabled
+ user system
+ group system log diag
+
+service qseeproxydaemon /system/vendor/bin/qseeproxydaemon
+ class late_start
+ user system
+ group system
+
+service esepmdaemon /system/vendor/bin/esepmdaemon
+ class core
+ user system
+ group nfc
+
+on charger
+ load_system_props
+ start qcom-post-boot
+ wait /dev/block/bootdevice/by-name/system
+ mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1
+ setprop sys.usb.config adb
+
+#add poweroffhandler
+service poweroffhandler /system/vendor/bin/poweroffhandler
+ class core
+ user media
+ group graphics audio
+ disabled
+ oneshot
+
+#Mixed HWC versions among targets
+on property:init.svc.surfaceflinger=restarting
+ stop vendor.hwcomposer-2-1
+ stop vendor.hwcomposer-2-2
+ start vendor.hwcomposer-2-1
+ start vendor.hwcomposer-2-2
+
+on property:vendor.display.lcd_density=*
+ setprop ro.sf.lcd_density ${vendor.display.lcd_density}
+
+service time_daemon /system/vendor/bin/time_daemon
+ class main
+ user root
+ group root
+
+service vendor.vppservice /vendor/bin/vppservice
+ class main
+ user media
+ group camera
+
+# Set vendor-ril lib path based on Meta version
+on property:vendor.rild.libpath=*
+ setprop rild.libpath ${vendor.rild.libpath}
+
+on property:ro.vendor.radio.noril=*
+ setprop ro.radio.noril ${ro.vendor.radio.noril}
+
+service seemp_healthd /vendor/bin/seemp_healthd
+ class late_start
+ user system
+ group system
+
+service vendor.power_off_alarm /vendor/bin/power_off_alarm
+ class core
+ group system
+ disabled
+ oneshot
+
+service vendor.move_time_data /system/bin/move_time_data.sh
+ class main
+ user system
+ group system
+ disabled
+ oneshot
+
+service vendor.hbtp /vendor/bin/hbtp_daemon
+ class main
+ user system
+ group system
+ capabilities SYS_NICE
+ disabled
+
+service chre /vendor/bin/chre
+ class late_start
+ user system
+ group system
+ socket chre seqpacket 0660 root system
+ shutdown critical
+
+service bugreport /system/bin/dumpstate -d -p -B -z -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
+ class main
+ disabled
+ oneshot
+ keycodes 114 115 116
+
+#Set GPU Opengles version
+on property:vendor.opengles.version=*
+ setprop ro.opengles.version ${vendor.opengles.version}
+
+#Set gpu available frequencies property
+on property:vendor.gpu.available_frequencies=*
+ setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}
+
+service vendor.wifilearner /system/vendor/bin/wifilearner
+ class main
+ user wifi
+ group wifi
+ oneshot
+
+service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
+ override
+ class hal
+ user audioserver
+ # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
+ group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
+ capabilities BLOCK_SUSPEND
+ ioprio rt 4
+ writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
+ # audioflinger restarts itself when it loses connection with the hal
+ # and its .rc file has an "onrestart restart audio-hal" rule, thus
+ # an additional auto-restart from the init process isn't needed.
+ socket audio_hw_socket seqpacket 0666 system system
+ oneshot
+ interface android.hardware.audio@4.0::IDevicesFactory default
+ interface android.hardware.audio@2.0::IDevicesFactory default
diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc
new file mode 100644
index 000000000..bd32fb26d
--- /dev/null
+++ b/rootdir/etc/init.qcom.usb.rc
@@ -0,0 +1,1680 @@
+# Copyright (c) 2011-2016, 2018 The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+on charger
+ mkdir /dev/usb-ffs 0770 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mkdir /config/usb_gadget/g1 0770 shell shell
+ mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/bcdUSB 0x0200
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ mkdir /config/usb_gadget/g1/functions/mass_storage.0
+ mkdir /config/usb_gadget/g1/functions/mtp.gs0
+ mkdir /config/usb_gadget/g1/functions/ptp.gs1
+ mkdir /config/usb_gadget/g1/functions/accessory.gs2
+ mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+ mkdir /config/usb_gadget/g1/functions/midi.gs5
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ mkdir /config/usb_gadget/g1/functions/diag.diag
+ mkdir /config/usb_gadget/g1/functions/cser.dun.0
+ mkdir /config/usb_gadget/g1/functions/cser.nmea.1
+ mkdir /config/usb_gadget/g1/functions/gsi.rmnet
+ mkdir /config/usb_gadget/g1/functions/gsi.rndis
+ mkdir /config/usb_gadget/g1/functions/gsi.dpl
+ mkdir /config/usb_gadget/g1/functions/qdss.qdss
+ mkdir /config/usb_gadget/g1/functions/rndis_bam.rndis
+ mkdir /config/usb_gadget/g1/functions/ncm.0
+ mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
+ mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+ setprop sys.usb.configfs 1
+ setprop sys.usb.controller "a600000.dwc3"
+ setprop sys.usb.state adb
+
+on boot
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1 0770
+ mkdir /config/usb_gadget/g2 0770
+ mkdir /config/usb_gadget/g1/strings/0x409 0770
+ mkdir /config/usb_gadget/g2/strings/0x409 0770
+ write /config/usb_gadget/g1/bcdUSB 0x0200
+ write /config/usb_gadget/g2/bcdUSB 0x0200
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g2/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g2/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ write /config/usb_gadget/g2/strings/0x409/product ${ro.product.model}
+ mkdir /config/usb_gadget/g1/functions/mass_storage.0
+ mkdir /config/usb_gadget/g1/functions/mtp.gs0
+ mkdir /config/usb_gadget/g1/functions/ptp.gs1
+ mkdir /config/usb_gadget/g1/functions/accessory.gs2
+ mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+ mkdir /config/usb_gadget/g1/functions/midi.gs5
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ mkdir /config/usb_gadget/g1/functions/diag.diag
+ mkdir /config/usb_gadget/g1/functions/diag.diag_mdm
+ mkdir /config/usb_gadget/g1/functions/cser.dun.0
+ mkdir /config/usb_gadget/g1/functions/cser.nmea.1
+ mkdir /config/usb_gadget/g1/functions/cser.dun.2
+ mkdir /config/usb_gadget/g1/functions/gsi.rmnet
+ mkdir /config/usb_gadget/g1/functions/gsi.rndis
+ mkdir /config/usb_gadget/g1/functions/gsi.dpl
+ mkdir /config/usb_gadget/g1/functions/qdss.qdss
+ mkdir /config/usb_gadget/g1/functions/qdss.qdss_mdm
+ mkdir /config/usb_gadget/g1/functions/rndis_bam.rndis
+ mkdir /config/usb_gadget/g1/functions/rndis.rndis
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet_bam_dmux
+ mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl_bam_dmux
+ mkdir /config/usb_gadget/g1/functions/ncm.0
+ mkdir /config/usb_gadget/g1/functions/ccid.ccid
+ mkdir /config/usb_gadget/g1/functions/uac2.0
+ mkdir /config/usb_gadget/g1/functions/uvc.0
+ mkdir /config/usb_gadget/g1/configs/b.1 0770
+ mkdir /config/usb_gadget/g2/configs/b.1 0770
+ mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770
+ mkdir /config/usb_gadget/g2/configs/b.1/strings/0x409 0770
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ mkdir /dev/usb-ffs 0775 shell system
+ mkdir /dev/usb-ffs/adb 0770 shell system
+ mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=1000,rmode=0770,fmode=0660
+ write /sys/class/android_usb/android0/f_ffs/aliases adb
+ setprop vendor.usb.controller ${sys.usb.controller}
+
+on load_persist_props_action
+ enable vendor.qcom-usb-sh
+
+service vendor.qcom-usb-sh /vendor/bin/init.qcom.usb.sh
+ class core
+ user root
+ oneshot
+ disabled
+
+on property:persist.vendor.usb.config=*
+ setprop persist.sys.usb.config ${persist.vendor.usb.config}
+
+on boot && property:ro.boot.usbconfigfs=true
+ setprop sys.usb.configfs 1
+
+# Following are the parameters required for usb functionality. They provide configurable options like
+# product_id/vendor id and allows specifying required functions:
+#
+# Required parameters:
+#
+# /sys/class/android_usb/android0/enable: Enables/disables usb composition
+# Value: 0 (disable), 1 (enable)
+#
+# /sys/class/android_usb/android0/idVendor: Stores Vendor ID
+# Value: 05c6 (Vendor id for Qualcomm Inc)
+#
+# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition
+# Value: 0x9xxx for composite interface, 0xFxxx for single interface
+#
+# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface.
+# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2]
+#
+# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition.
+# Value: Passed one per function driver. e.g. diag[,adb]
+#
+#Optional parameters:
+#
+# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to
+# communicate to serial interface.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. smd[,sdio,tty,hsic]
+# Only required if serial interface is present.
+#
+# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports
+# used to communicate to serial interface. This is used to distinguish between more than one interface
+# using same transport type.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. serial_hsic[,serial_hsusb]
+# Only required for transport type hsic, optional for other transport types.
+#
+# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to
+# communicate to rmnet interface.
+# Value: Passed two per interface as control, data transport type pair.
+# e.g. smd,bam[,hsuart,hsuart]
+# Only required if rmnet interface is present.
+#
+# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports
+# used to communicate to rmnet interface. This is used to distinguish between more than one interface
+# using same transport type.
+# Value: Passed one per interface. One value represents control and data transport together.
+# e.g. rmnet_hsic[,rmnet_hsusb]
+# Only required for transport type hsic, optional for other transport types.
+
+# USB compositions
+on property:sys.usb.config=diag,serial_tty,serial_smd && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9002
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,smd
+ write /sys/class/android_usb/android0/functions diag,serial
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_smd,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9020
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 901D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 900E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9091
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9091
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9092
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9092
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9037
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9038
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903C
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9031
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9032
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903C
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
+ write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903D
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ start vendor.port-bridge
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903E
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# RmNet using USB BAM to IPA BAM
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9026
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9091
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9092
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition
+on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9025
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition with diag_mdm and adb
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9031
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 composition with diag_mdm
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9032
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic,tty
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA composition with adb
+on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9065
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA composition without adb
+on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9066
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA2 composition with adb
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9065
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 3 DSDA2 composition without adb
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9066
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
+ write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
+ write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384
+ write /sys/module/mdm_bridge/parameters/max_rx_urbs 20
+ write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384
+ write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm and adb
+# Serial & RmNet bridged in userspace with tty and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm
+# Serial & RmNet bridged in userspace with tty and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion HSIC/PCIe Hybrid composition with diag_mdm and adb
+# RmNet is bridged over PCIe using qti,ether ctrl/data transports
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion HSIC/PCIe Hybrid composition with diag_mdm
+# RmNet is bridged over PCIe using qti,ether ctrl/data transports
+on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports hsic
+ write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion PCIe composition with diag_mdm
+# Serial & RmNet bridged in userspace with port bridge and qti/ether
+on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9036
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9035
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 2.2 composition with diag_qsc and adb
+on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9053
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# Fusion 2.2 composition with diag_qsc
+on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9054
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:vendor.usb.tethering=true
+ write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask}
+
+on property:sys.usb.config=rndis
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra}
+
+on property:sys.usb.config=rndis,none && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 2717
+ write /sys/class/android_usb/android0/idProduct FF80
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/functions rndis
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=0
+ setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb
+
+on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 2717
+ write /sys/class/android_usb/android0/idProduct FF88
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/functions rndis,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 902C
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 902D
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+# DPL is implemented using QDSS
+on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90BF
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+# DPL is implemented using QDSS
+on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90C0
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_smd && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B3
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_smd,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B4
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_smd,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B5
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_smd,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B6
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/functions rndis,serial,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B5
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/functions rndis,serial,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B6
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge
+ write /sys/class/android_usb/android0/functions rndis,serial,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag,diag_mdm && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9041
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9042
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9086
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions rndis,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9087
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions rndis,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 2717
+ write /sys/class/android_usb/android0/idProduct FF10
+ write /sys/class/android_usb/android0/functions ptp
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 2717
+ write /sys/class/android_usb/android0/idProduct FF18
+ write /sys/class/android_usb/android0/functions ptp,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 2717
+ write /sys/class/android_usb/android0/idProduct FF40
+ write /sys/class/android_usb/android0/functions mtp
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 2717
+ write /sys/class/android_usb/android0/idProduct FF48
+ write /sys/class/android_usb/android0/functions mtp,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 901B
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903A
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9040
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 903F
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9088
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions mtp,diag
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9089
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
+ write /sys/class/android_usb/android0/functions mtp,diag,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,ccid && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9045
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions diag,ccid
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,ccid,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9044
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/functions diag,adb,ccid
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9015
+ write /sys/class/android_usb/android0/functions adb,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+#Mass-storage only composition
+on property:sys.usb.config=mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F000
+ write /sys/class/android_usb/android0/functions mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 904A
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9060
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9099
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9098
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_qti_bam && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_qti_bam,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_ipa && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9083
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,qdss,rmnet_ipa,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9084
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 909B
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 909A
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90A3
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports bam,hsic
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic
+ write /sys/class/android_usb/android0/functions diag,qdss,rmnet
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90A2
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports bam,hsic
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic
+ write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9081
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 9082
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 1
+ write /sys/class/android_usb/android0/f_qdss/transports bam
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
+ write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# same as 9025, plus data packet logging (DPL) using QDSS
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AD
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+# same as 9026, plus data packet logging (DPL)
+on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B0
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AD
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B0
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 0525
+ write /sys/class/android_usb/android0/idProduct A4A1
+ write /sys/class/android_usb/android0/functions ncm
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 908C
+ write /sys/class/android_usb/android0/functions ncm,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=charging && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct F006
+ write /sys/class/android_usb/android0/functions charging
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B7
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B8
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B2
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,diag_cnss,adb,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B3
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss
+ write /sys/class/android_usb/android0/f_serial/transports smd,tty
+ write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
+ write /sys/class/android_usb/android0/functions diag,diag_cnss,serial,rmnet,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90BA
+ write /sys/class/android_usb/android0/functions midi
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90BB
+ write /sys/class/android_usb/android0/functions midi,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B7
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl,adb && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90B8
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/f_serial/transports smd
+# DPL is implemented using QDSS
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AE
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl
+ write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,qdss,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90AF
+ write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
+ write /sys/class/android_usb/android0/f_serial/transports tty
+ write /sys/class/android_usb/android0/f_rmnet/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/debug_intf 0
+ write /sys/class/android_usb/android0/f_qdss/transports qti,ether
+ write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl
+ write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,mass_storage
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,uac2
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90CA
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb,uac2_func
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,video && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90CB
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb,video
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,adb,uac2,video && property:sys.usb.configfs=0
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 05C6
+ write /sys/class/android_usb/android0/idProduct 90CC
+ write /sys/class/android_usb/android0/f_diag/clients diag
+ write /sys/class/android_usb/android0/functions diag,adb,uac2_func,video
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
new file mode 100644
index 000000000..8b4491d9e
--- /dev/null
+++ b/rootdir/etc/init.target.rc
@@ -0,0 +1,676 @@
+# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+# * Neither the name of The Linux Foundation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+import init.offline.log.rc
+import init.mishow.ctl.rc
+import init.batteryd.rc
+import /system/etc/init/init.factory.rc
+
+on early-init
+ exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules audio_apr audio_wglink audio_adsp_loader audio_q6_pdr audio_q6_notifier audio_q6 audio_usf audio_native audio_pinctrl_wcd audio_pinctrl_lpi audio_swr audio_platform audio_hdmi audio_wcd_spi audio_stub audio_digital_cdc audio_analog_cdc audio_msm_sdw audio_wcd_cpe audio_cpe_lsm audio_wcd9335 audio_machine_sdm710 audio_dbmdx audio_snd-soc-tas2557 audio_spk_id audio_tfa98xx audio_cs35l41 audio_tas2562
+ write /proc/sys/kernel/sched_boost 1
+ symlink /data/tombstones /tombstones
+
+on init
+ write /dev/stune/foreground/schedtune.sched_boost_no_override 1
+ write /dev/stune/top-app/schedtune.sched_boost_no_override 1
+ write /dev/stune/schedtune.colocate 0
+ write /dev/stune/background/schedtune.colocate 0
+ write /dev/stune/system-background/schedtune.colocate 0
+ write /dev/stune/foreground/schedtune.colocate 0
+ write /dev/stune/top-app/schedtune.colocate 1
+ write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
+ mkdir /dev/logfs 0771 system system
+
+on fs
+ wait /dev/block/platform/soc/${ro.boot.bootdevice}
+ symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
+ mkdir /mnt/vendor/persist 0771 root system
+ mount_all /vendor/etc/fstab.qcom
+ chown root system /mnt/vendor/persist
+ chmod 0771 /mnt/vendor/persist
+ restorecon_recursive /mnt/vendor/persist
+ mkdir /mnt/vendor/persist/data 0700 system system
+ mkdir /mnt/vendor/persist/wlan_bt 0755 system system
+ mkdir /mnt/vendor/persist/audio 0755 system system
+ chown system system /dev/tiload_node
+ chmod 660 /dev/tiload_node
+ mkdir /persist/subsys 0700 system system
+ mkdir /mnt/vendor/persist/stability 0755 system system
+
+ chown system system /dev/tiload_node
+ chmod 660 /dev/tiload_node
+ mount vfat /dev/block/bootdevice/by-name/logfs /dev/logfs noatime umask=006,uid=1000,gid=1000
+ chmod 644 /persist/audio/us_manual_cal
+
+ chown system system /proc/tp_selftest
+ chmod 0644 /proc/tp_selftest
+
+on post-fs
+ # set RLIMIT_MEMLOCK to 64MB
+ setrlimit 8 67108864 67108864
+
+ start vendor.qseecomd
+ exec - system system -- /vendor/bin/init.qti.qseecomd.sh
+ write /dev/ipa 1
+
+service sec_nvm /vendor/bin/sec_nvm
+ class core
+ user system
+ group system
+
+on post-fs-data
+ mkdir /data/vendor/diag 2770 root log
+ mkdir /data/tombstones 0771 system system
+ mkdir /tombstones/modem 0771 system system
+ mkdir /tombstones/lpass 0771 system system
+ mkdir /tombstones/wcnss 0771 system system
+ mkdir /tombstones/dsps 0771 system system
+ mkdir /data/vendor/hbtp 0750 system system
+ mkdir /data/vendor/tloc 0700 system drmrpc
+ mkdir /data/vendor/nnhal 0700 system system
+ mkdir /data/vendor/thermal 0771 root system
+ mkdir /data/vendor/thermal/config 0771 root system
+ mkdir /data/misc/touch 0771 root system
+
+ chmod 0644 /dev/elliptic0
+ chmod 0644 /dev/elliptic1
+ mkdir /data/vendor/charge_logger 0771 system system
+ mkdir /data/vendor/misc/display 0771 system system
+ chmod 666 /sys/class/drm/card0-DSI-1/disp_count
+
+#add charge_logger service for dump charge message
+service charge_logger /vendor/bin/charge_logger
+ class last_start
+ user system
+ group system system wakelock
+ disabled
+ oneshot
+
+on property:sys.boot_completed=1
+ start charge_logger
+
+# For cpusets initialize for Silver Only first and then Silver + Gold
+# Silver Only configuration cannot work with 0-7
+on boot
+ chown system system /sys/kernel/hbtp/display_pwr
+ chown system system /sys/class/leds/white/brightness
+ chown system system /sys/class/leds/white/blink
+ chown system system /sys/class/drm/card0-DSI-1/disp_param
+ start rmt_storage
+ start rfs_access
+ # replace cpuset logic(CAUTION: set child cpuset.cpus firstly)
+ write /dev/cpuset/top-app/boost/cpus 4-7
+ write /dev/cpuset/top-app/cpus 0-7
+ write /dev/cpuset/foreground/boost/cpus 0-6
+ write /dev/cpuset/foreground/cpus 0-6
+ write /dev/cpuset/background/cpus 0-1
+ write /dev/cpuset/system-background/cpus 0-3
+ # DBMDX character device
+ chmod 0660 /dev/lirc0
+ chown system system /dev/lirc0
+ chown media media /dev/dbmdx-1
+ chmod 0770 /dev/dbmdx-1
+ chown system system /sys/class/thermal/thermal_message/sconfig
+ chown system system /sys/class/touch/tp_dev/fod_status
+
+# Add a cpuset for the camera daemon
+# We want all cores for camera
+ mkdir /dev/cpuset/camera-daemon
+ write /dev/cpuset/camera-daemon/cpus 0-7
+ write /dev/cpuset/camera-daemon/mems 0
+ chown cameraserver cameraserver /dev/cpuset/camera-daemon
+ chown cameraserver cameraserver /dev/cpuset/camera-daemon/tasks
+ chmod 0660 /dev/cpuset/camera-daemon/tasks
+
+#Load WLAN driver
+ insmod /vendor/lib/modules/qca_cld3_wlan.ko
+
+ ####Regionalization config and prop files####
+ chmod 0644 /persist/speccfg/spec
+ chmod 0644 /persist/speccfg/devicetype
+ chmod 0644 /persist/speccfg/mbnversion
+ chmod 0644 /persist/speccfg/.not_triggered
+ chmod 0644 /persist/speccfg/vendor_ro.prop
+ chmod 0644 /persist/speccfg/vendor_persist.prop
+ chmod 0644 /persist/speccfg/submask
+ chmod 0644 /persist/speccfg/partition
+ chown system system /persist/speccfg/spec
+ chown system system /persist/speccfg/devicetype
+ chown system system /persist/speccfg/mbnversion
+ chown system system /persist/speccfg/.not_triggered
+ chown system system /persist/speccfg/vendor_ro.prop
+ chown system system /persist/speccfg/vendor_persist.prop
+ chown system system /persist/speccfg/submask
+ chown system system /persist/speccfg/partition
+#USB controller configuration
+ setprop vendor.usb.rndis.func.name "gsi"
+ setprop vendor.usb.rmnet.func.name "gsi"
+ setprop sys.usb.configfs 1
+
+#USB controller configuration
+ setprop vendor.usb.rndis.func.name "gsi"
+ setprop vendor.usb.rmnet.func.name "gsi"
+ setprop vendor.usb.rmnet.inst.name "rmnet"
+ setprop vendor.usb.dpl.inst.name "dpl"
+ setprop sys.usb.configfs 1
+
+#start camera server as daemon
+#service qcamerasvr /system/bin/mm-qcamera-daemon
+# class late_start
+# user camera
+# group camera system inet input graphics
+#pd-mapper
+service vendor.pd_mapper /vendor/bin/pd-mapper
+ class core
+ user system
+ group system
+
+#Peripheral manager
+service vendor.per_mgr /vendor/bin/pm-service
+ class core
+ user system
+ group system
+ ioprio rt 4
+
+service vendor.per_proxy /vendor/bin/pm-proxy
+ class core
+ user system
+ group system
+ disabled
+
+on property:init.svc.vendor.per_mgr=running
+ start vendor.per_proxy
+
+on property:sys.shutdown.requested=*
+ stop vendor.per_proxy
+ stop vendor.ims_rtp_daemon
+
+on boot
+ chown system system /sys/class/leds/red/blink
+ chown system system /sys/class/leds/green/blink
+ chown system system /sys/class/leds/blue/blink
+
+on charger
+ write /sys/module/lpm_levels/parameters/sleep_disabled 0
+ write /sys/module/lpm_levels/system/system-pc/idle_enabled 0
+ write /sys/devices/system/cpu/cpu0/online 1
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "userspace"
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 633600
+ write /sys/devices/system/cpu/cpu1/online 1
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "userspace"
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 633600
+ write /sys/devices/system/cpu/cpu2/online 0
+ write /sys/devices/system/cpu/cpu3/online 0
+ write /sys/devices/system/cpu/cpu4/online 0
+ write /sys/devices/system/cpu/cpu5/online 0
+ write /sys/devices/system/cpu/cpu6/online 0
+ write /sys/devices/system/cpu/cpu7/online 0
+ write /sys/module/msm_thermal/parameters/enabled "N"
+ symlink /dev/block/platform/soc/7c4000.sdhci /dev/block/bootdevice
+ mkdir /mnt/vendor/persist
+ chown root system /mnt/vendor/persist
+ chmod 0771 /mnt/vendor/persist
+ mount ext4 /dev/block/bootdevice/by-name/persist /persist nosuid nodev barrier=1
+ start poweroffm64
+ start vendor.hvdcp_opti
+ setprop sys.usb.configfs 1
+ start leds-sh
+
+ mount tmpfs tmpfs /data
+ start thermal-engine
+ mkdir /data/vendor/charge_logger 0771 system system
+
+## import cne init file
+#on post-fs
+# export LD_PRELOAD /vendor/lib/libNimsWrap.so
+#
+## 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 vendor.qseecomd /vendor/bin/qseecomd
+ class core
+ user root
+ group root
+
+service spdaemon /vendor/bin/spdaemon
+ class core
+ user system
+ group system
+
+#service mpdecision /system/vendor/bin/mpdecision --avg_comp
+# user root
+# disabled
+#
+#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
+# user system
+# group system
+# disabled
+#
+service thermal-engine /system/vendor/bin/thermal-engine -T
+ class main
+ user 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
+ socket thermal-send-rule stream 0660 system system
+ group root
+
+#service security-check1 /sbin/security_boot_check system
+# class core
+# oneshot
+#
+#service security-check2 /sbin/security_boot_check recovery
+# class core
+# oneshot
+#
+#service time_daemon /system/vendor/bin/time_daemon
+# class late_start
+# user root
+# group root
+
+service adsprpcd /vendor/bin/adsprpcd rootpd
+ class main
+ user system
+ group system
+
+service adsprpcd_audiopd /vendor/bin/adsprpcd audiopd
+ class main
+ user media
+ group media
+
+service adsprpcd_sensorspd /vendor/bin/adsprpcd sensorspd
+ class core
+ user system
+ group system
+
+service cdsprpcd /vendor/bin/cdsprpcd
+ class main
+ user system
+ group system
+
+#service audiod /vendor/bin/audiod
+# class late_start
+# user system
+# group system
+#
+#service usf_tester /vendor/bin/usf_tester
+# user system
+# group system inet
+# disabled
+#
+#service usf_epos /vendor/bin/usf_epos
+# user system
+# group system inet
+# disabled
+#
+#service usf_gesture /vendor/bin/usf_gesture
+# user system
+# group system inet
+# disabled
+#
+
+#service usf_sync_gesture /system/bin/usf_sync_gesture
+# user system
+# group system inet
+# disabled
+#
+
+#service usf_p2p /system/bin/usf_p2p
+# user system
+# group system inet
+# disabled
+#
+#service usf_hovering /vendor/bin/usf_hovering
+# user system
+# group system inet
+# disabled
+#
+#service usf_proximity /system/bin/usf_proximity
+# user system
+# group system inet
+# disabled
+#
+#service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
+# class late_start
+# user root
+# disabled
+# oneshot
+#
+#on property:init.svc.bootanim=stopped
+# start usf-post-boot
+#
+#
+#on boot
+# insmod /system/lib/modules/adsprpc.ko
+# insmod /system/lib/modules/mhi.ko
+## access permission for secure touch
+# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
+# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
+# chmod 0660 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
+# chmod 0440 /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch_enable
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-004a/secure_touch
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch_enable
+# chown system drmrpc /sys/devices/f9966000.i2c/i2c-1/1-0020/secure_touch
+#
+#
+#
+## imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
+service vendor.imsqmidaemon /system/vendor/bin/imsqmidaemon
+ class main
+ user system
+ socket ims_qmid stream 0660 system radio
+ group radio log diag
+
+# imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
+service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon
+ class main
+ user system
+ socket ims_datad stream 0660 system radio
+ group system wifi radio inet log diag
+ disabled
+
+#service mdm_helper /system/bin/mdm_helper
+# class core
+# onrestart setprop ro.service.mdm_helper_restarted "true"
+# disabled
+#
+#service mdm_helper_proxy /system/bin/mdm_helper_proxy
+# class core
+# disabled
+#
+#service mdm_launcher /system/bin/sh /init.mdm.sh
+# class main
+# oneshot
+#
+#service qcamerasvr /system/bin/mm-qcamera-daemon
+# class late_start
+# user camera
+# group camera system inet input graphics
+#
+# Stop mdm_helper_proxy in case of shutdown
+#on property:sys.shutdown.requested=*
+# stop mdm_helper_proxy
+#
+# Stop mdm_helper_proxy on APQ target
+#on property:ro.radio.noril=yes
+# stop mdm_helper_proxy
+#
+#on property:persist.airplane.mode.pwr.svg=enabled
+# setprop ro.mdm_helper_proxy_req false
+#
+#on property:init.svc.ril-daemon=running
+# setprop ro.mdm_helper_proxy_req true
+#
+## Start mdm_helper_proxy
+#on property:ro.mdm_helper_proxy_req=true
+# start mdm_helper_proxy
+#
+## QCA1530 SoC core detect
+#service gnss-detect /system/vendor/bin/gnss.qca1530.sh detect
+# class core
+# oneshot
+#
+## QCA1530 SoC late_start group trigger
+#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
+# class late_start
+# oneshot
+#
+## QCA1530 SoC Service Daemon
+#service gnss-svcd /system/vendor/bin/gnss.qca1530.sh start
+# class late_start
+# user root
+# group gps system qcom_diag diag log inet net_raw
+# disabled
+
+service vendor.imsrcsservice /system/vendor/bin/imsrcsd
+ class main
+ user system
+ group radio diag inet log wakelock
+
+on property:vendor.ims.QMI_DAEMON_STATUS=1
+ start vendor.imsdatadaemon
+
+on property:vold.decrypt=trigger_restart_framework
+ start cnss_diag
+
+service cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
+ class main
+ user system
+ group system wifi inet sdcard_rw media_rw diag
+ oneshot
+
+service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
+ class main
+ user system
+ group radio diag inet log
+
+on property:vendor.ims.DATA_DAEMON_STATUS=1
+ restart vendor.ims_rtp_daemon
+
+service leds-sh /system/vendor/bin/sh /vendor/etc/init.leds.sh
+ class core
+ user root
+ oneshot
+
+service panel-info-sh /system/vendor/bin/sh /vendor/etc/init.panel_info.sh
+ class core
+ user root
+ oneshot
+
+service ppd /vendor/bin/mm-pp-dpps
+ class late_start
+ user system
+ group system graphics
+ socket pps stream 0660 system system
+ disabled
+
+on property:init.svc.vendor.hwcomposer-2-1=stopped
+ stop ppd
+
+on property:init.svc.vendor.hwcomposer-2-1=running
+ start ppd
+
+on property:init.svc.vendor.hwcomposer-2-1=restarting
+ stop ppd
+
+#service nqs /system/bin/nqs
+# class late_start
+# socket nqs_qsb_comm stream 660 system system
+# user system
+# group drmrpc
+#
+#service adsprpcd /system/vendor/bin/adsprpcd
+# class main
+# user media
+# group media
+#
+##Start picture quality tuning service
+#service vqttoolservice /system/bin/vqttoolservice
+# class late_start
+# socket vqtss stream 0660 system system
+# user system
+# group system
+
+service mmbn-daemon /vendor/bin/mmbn-daemon
+ class main
+ disabled
+ oneshot
+
+service hbtp /system/vendor/bin/hbtp_daemon
+ class main
+ user system
+ group system
+ disabled
+
+service energy-awareness /system/vendor/bin/energy-awareness
+ class main
+ user system
+ group system
+ oneshot
+
+#minidump service
+service minidump64 /vendor/bin/minidump64
+ class late_start
+ oneshot
+ seclabel u:r:minidump64:s0
+
+#poweroff monitor service
+service poweroffm64 /vendor/bin/poweroffm64
+ class late_start
+ oneshot
+ seclabel u:r:poweroffm64:s0
+
+service vendor.hvdcp_opti /system/vendor/bin/hvdcp_opti
+ class main
+ user root
+ group system wakelock
+
+#service tlocd /vendor/bin/tloc_daemon
+# class late_start
+# user system
+# group drmrpc gps net_raw
+
+service touch_count_dump /vendor/bin/touch_count_dump
+ class late_start
+ user root
+ group root
+ oneshot
+
+service displaycount /vendor/bin/displaycount
+ class late_start
+ user system
+ group system
+ oneshot
+
+on property:adsp.restart=1
+ write /sys/module/subsystem_restart/parameters/enable_ramdumps 1
+ write /sys/bus/msm_subsys/devices/subsys3/restart_level related
+ write /sys/kernel/debug/msm_subsys/adsp restart
+
+
+service smcinvoked /system/bin/smcinvoked
+ class main
+ user system
+ group system
+
+service remosaic_daemon /system/vendor/bin/remosaic_daemon
+ class late_start
+ user camera
+ group camera
+
+service displayfeature /system/bin/displayfeature
+ class late_start
+ user root
+ group root
+
+on property:init.svc.surfaceflinger=stopped
+ stop displayfeature
+
+on property:init.svc.surfaceflinger=running
+ start displayfeature
+
+on property:init.svc.surfaceflinger=restarting
+ stop displayfeature
+
+on property:init.svc.zygote=stopped
+ stop displayfeature
+
+on property:init.svc.zygote=running
+ start displayfeature
+
+on property:init.svc.zygote=restarting
+ stop displayfeature
+
+on property:init.svc.zygote=stopped
+ stop ppd
+
+on property:init.svc.zygote=running
+ start ppd
+
+on property:vendor.audio.cit.spkcal.copy=true
+ copy /data/vendor/cit/tas2557_cal.bin /mnt/vendor/persist/audio/tas2557_cal.bin
+ copy /data/vendor/cit/tas2557_cal.txt /mnt/vendor/persist/audio/tas2557_cal.txt
+ copy /data/vendor/cit/tas2557_chk.txt /mnt/vendor/persist/audio/tas2557_chk.txt
+ chmod 666 /mnt/vendor/persist/audio/tas2557_cal.bin
+ chmod 666 /mnt/vendor/persist/audio/tas2557_cal.txt
+ chmod 666 /mnt/vendor/persist/audio/tas2557_chk.txt
+ copy /data/vendor/cit/cs35l41_cal.bin /mnt/vendor/persist/audio/cs35l41_cal.bin
+ copy /data/vendor/cit/cs35l41_cal.txt /mnt/vendor/persist/audio/cs35l41_cal.txt
+ chmod 666 /mnt/vendor/persist/audio/cs35l41_cal.bin
+ chmod 666 /mnt/vendor/persist/audio/cs35l41_cal.txt
+ copy /data/vendor/cit/tas2562_cal.bin /mnt/vendor/persist/audio/tas2562_cal.bin
+ copy /data/vendor/cit/tas2562_chk.txt /mnt/vendor/persist/audio/tas2562_chk.txt
+ chmod 666 /mnt/vendor/persist/audio/tas2562_cal.bin
+ chmod 666 /mnt/vendor/persist/audio/tas2562_chk.txt
+
+on property:init.svc.zygote=restarting
+ stop ppd
+
+service audioshell_service /vendor/bin/audioshell_service
+ oneshot
+ disabled
+
+on property:ro.vendor.miui.region=*
+ start audioshell_service
+
+service nv_mac /vendor/bin/nv_mac
+ class main
+ user system
+ group system inet net_admin wifi net_raw
+ oneshot
+
+service checknv /system/bin/checknv
+ class late_start
+ user root
+ oneshot
+ seclabel u:r:vendor_init:s0
+
+service ftc_update /vendor/bin/ftcupdate
+ user system
+ group system
+ oneshot
+ disabled
+
+on property:vendor.audio.pa.ftcupdate=0
+ start ftc_update
+
+on post-fs-data
+ chmod 0666 /dev/migt
+ restorecon /dev/migt
+ chmod 0777 /sys/module/migt/parameters/migt_freq
+ restorecon /sys/module/migt/parameters/migt_freq
+ chmod 0777 /sys/module/migt/parameters/migt_ms
+ restorecon /sys/module/migt/parameters/migt_ms
+ chmod 0777 /sys/module/migt/parameters/migt_thresh
+ restorecon /sys/module/migt/parameters/migt_thresh
diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc
new file mode 100644
index 000000000..736c88488
--- /dev/null
+++ b/rootdir/etc/ueventd.qcom.rc
@@ -0,0 +1,398 @@
+# Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# 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
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Firmware directory Path
+# Below macro will be read by uevent and path will
+# be added to search path for firmware loading
+firmware_directories /vendor/firmware_mnt/image/
+
+# the DIAG device node is not world writable/readable.
+/dev/diag 0660 system oem_2901
+
+/dev/genlock 0666 system system
+/dev/wlan 0660 wifi wifi
+/dev/kgsl 0666 system system
+/dev/kgsl-3d0 0666 system system
+/dev/kgsl-2d0 0666 root root
+/dev/kgsl-2d1 0666 root root
+/dev/ion 0664 system system
+/dev/rtc0 0660 system system
+/dev/smd0 0660 system system
+/dev/smd4 0660 system system
+/dev/smd_cxm_qmi 0640 radio radio
+/dev/smd5 0660 system system
+/dev/smd6 0660 system system
+/dev/smd7 0660 bluetooth bluetooth
+/dev/ccid_bridge 0660 system system
+/dev/ipa 0660 radio radio
+/dev/wwan_ioctl 0660 radio radio
+/dev/ipaNatTable 0660 radio radio
+/dev/rmnet_ctrl 0660 usb usb
+/dev/dpl_ctrl 0660 usb usb
+/dev/ipa_odl_ctl 0660 radio radio
+/dev/ipa_adpl 0660 system oem_2905
+
+#permissions for CSVT
+/dev/smd11 0660 radio radio
+
+#permsissions for BT/FM
+/dev/smd2 0660 bluetooth bluetooth
+/dev/smd3 0660 bluetooth bluetooth
+/dev/btpower 0660 bluetooth system
+
+#permissions for pta
+/dev/pta 0660 system system
+
+/dev/radio0 0640 system system
+/dev/rfcomm0 0660 bluetooth bluetooth
+/dev/ttyUSB0 0660 bluetooth bluetooth
+/dev/smdcntl0 0640 radio radio
+/dev/smdcntl1 0640 radio radio
+/dev/smdcntl2 0640 radio radio
+/dev/smdcntl3 0640 radio radio
+/dev/smdcntl4 0640 radio radio
+/dev/smdcntl5 0640 radio radio
+/dev/smdcntl6 0640 radio radio
+/dev/smdcntl7 0640 radio radio
+/dev/smdcntl8 0640 radio radio
+/dev/smdcnt_rev0 0640 radio radio
+/dev/smdcnt_rev1 0640 radio radio
+/dev/smdcnt_rev2 0640 radio radio
+/dev/smdcnt_rev3 0640 radio radio
+/dev/smdcnt_rev4 0640 radio radio
+/dev/smdcnt_rev5 0640 radio radio
+/dev/smdcnt_rev6 0640 radio radio
+/dev/smdcnt_rev7 0640 radio radio
+/dev/smdcnt_rev8 0640 radio radio
+/dev/smuxctl32 0640 radio radio
+/dev/sdioctl0 0640 radio radio
+/dev/sdioctl1 0640 radio radio
+/dev/sdioctl2 0640 radio radio
+/dev/sdioctl3 0640 radio radio
+/dev/sdioctl4 0640 radio radio
+/dev/sdioctl5 0640 radio radio
+/dev/sdioctl6 0640 radio radio
+/dev/sdioctl7 0640 radio radio
+/dev/sdioctl8 0640 radio radio
+/dev/rmnet_mux_ctrl 0640 radio radio
+/dev/hsicctl0 0640 radio radio
+/dev/hsicctl1 0640 radio radio
+/dev/hsicctl2 0640 radio radio
+/dev/hsicctl3 0640 radio radio
+/dev/hsicctl4 0640 radio radio
+/dev/hsicctl5 0640 radio radio
+/dev/hsicctl6 0640 radio radio
+/dev/hsicctl7 0640 radio radio
+/dev/hsicctl8 0640 radio radio
+/dev/hsicctl9 0640 radio radio
+/dev/hsicctl10 0640 radio radio
+/dev/hsicctl11 0640 radio radio
+/dev/hsicctl12 0640 radio radio
+/dev/hsicctl13 0640 radio radio
+/dev/hsicctl14 0640 radio radio
+/dev/hsicctl15 0640 radio radio
+/dev/hsicctl16 0640 radio radio
+/dev/mhi_*_pipe_14 0640 radio radio
+/dev/mhi_*_pipe_16 0640 radio radio
+/dev/mhi_*_pipe_32 0640 radio radio
+/dev/at_usb0 0640 radio radio
+/dev/at_mdm0 0640 radio radio
+/dev/video* 0660 system camera
+/dev/media* 0660 system camera
+/dev/v4l-subdev* 0660 system camera
+/dev/qseecom 0660 system drmrpc
+/dev/qce 0660 system drmrpc
+/dev/smcinvoke 0660 system system
+/dev/qsee_ipc_irq_spss 0660 system drmrpc
+/dev/seemplog 0660 system system
+/dev/pft 0660 system drmrpc
+/dev/spcom 0660 system system
+/dev/sp_kernel 0660 system system
+/dev/sp_ssr 0660 system system
+/dev/sp_keymaster 0660 system system
+/dev/sec_nvm_* 0660 system system
+/dev/cryptoapp 0660 system system
+/dev/spdaemon_ssr 0660 system system
+/dev/gemini0 0660 system camera
+/dev/jpeg0 0660 system camera
+/dev/jpeg1 0660 system camera
+/dev/jpeg2 0660 system camera
+/dev/jpeg3 0660 system camera
+/dev/adsprpc-smd 0664 system system
+/dev/adsprpc-smd-secure 0644 system system
+/dev/system_health_monitor 0644 radio system
+/dev/mdss_rotator 0664 system system
+
+#QDSS
+/dev/byte-cntr 0660 system oem_2902
+/dev/mhi_qdss 0660 system oem_2902
+/sys/class/qdss_bridge/mhi_qdss mode 0660 system oem_2902
+
+# wlan
+/dev/wcnss_wlan 0660 system system
+/dev/wcnss_ctrl 0660 system system
+/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
+/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
+/dev/spidev0.0 0660 system audio
+/dev/msm_camera/* 0660 system camera
+/dev/gemini/ 0660 system camera
+/dev/mercury0 0660 system camera
+/dev/msm_vidc_reg 0660 system audio
+/dev/msm_vidc_dec 0660 system audio
+/dev/msm_vidc_dec_sec 0660 system audio
+/dev/msm_vidc_enc 0660 system audio
+/dev/msm_rotator 0660 system system
+/dev/hw_random 0600 root root
+/dev/sdsprpc-smd 0660 system system
+
+#permissions for audio
+/dev/wcd_dsp0_control 0660 system audio
+/dev/wcd-dsp-glink 0660 system audio
+/dev/audio_slimslave 0660 system audio
+/dev/msm_qcelp 0660 system audio
+/dev/msm_evrc 0660 system audio
+/dev/msm_wma 0660 system audio
+/dev/msm_wmapro 0660 system audio
+/dev/msm_alac 0660 system audio
+/dev/msm_ape 0660 system audio
+/dev/msm_amrnb 0660 system audio
+/dev/msm_amrwb 0660 system audio
+/dev/msm_amrwbplus 0660 system audio
+/dev/msm_aac 0660 system audio
+/dev/msm_multi_aac 0660 system audio
+/dev/msm_aac_in 0660 system audio
+/dev/msm_qcelp_in 0660 system audio
+/dev/msm_evrc_in 0660 system audio
+/dev/msm_amrnb_in 0660 system audio
+/dev/msm_amrwb_in 0660 system audio
+/dev/msm_a2dp_in 0660 system audio
+/dev/msm_ac3 0660 system audio
+/dev/msm_audio_cal 0660 system audio
+/dev/msm_hweffects 0660 system audio
+/dev/msm_cad 0660 system audio
+/dev/msm_fm 0660 system audio
+/dev/msm_mvs 0660 system audio
+/dev/msm_pcm_lp_dec 0660 system audio
+/dev/msm_preproc_ctl 0660 system audio
+/dev/msm_rtac 0660 system audio
+/dev/msm_voicememo 0660 system audio
+/dev/ttyHSL1 0660 system system
+/dev/ttyHS1 0660 system system
+/dev/mdm 0660 system radio
+/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
+/dev/sdio_tty_ciq_00 0660 system system
+/dev/tty_sdio_00 0660 system system
+/dev/ttyGS0 0660 system system
+/dev/i2c-5 0660 media media
+/dev/avtimer 0660 system audio
+/dev/spidev2.0 0660 system audio
+
+# DVB devices
+/dev/dvb/adapter0/demux* 0440 media media
+/dev/dvb/adapter0/dvr* 0660 media media
+/dev/dvb/adapter0/video* 0660 media media
+
+# Broadcast devices
+/dev/tsc_mux0 0660 media media
+/dev/tsc_ci0 0660 media media
+
+# sensors
+/dev/sensors 0660 system system
+/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
+/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
+/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* max_latency 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* flush 0660 input system
+/sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibrate 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system
+/sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system
+/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
+/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
+/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
+/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
+/sys/devices/virtual/input/input* poll 0660 input system
+/sys/devices/virtual/input/input* pollrate_ms 0660 input system
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
+/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
+/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
+
+# native sensors input
+/sys/devices/virtual/input/input* enable_int 0660 system input
+/sys/devices/virtual/input/input* gyro_op_mode 0660 system input
+/sys/devices/virtual/input/input* acc_range 0660 system input
+/sys/devices/virtual/input/input* acc_value 0660 system input
+/sys/devices/virtual/input/input* gyro_odr 0660 system input
+/sys/devices/virtual/input/input* fifo_data_sel 0660 system input
+/sys/devices/virtual/input/input* fifo_watermark 0660 system input
+/sys/devices/virtual/input/input* enable 0660 system input
+/sys/devices/virtual/input/input* acc_odr 0660 system input
+/sys/devices/virtual/input/input* temperature 0660 system input
+/sys/devices/virtual/input/input* acc_op_mode 0660 system input
+/sys/devices/virtual/input/input* fifo_bytecount 0660 system input
+/sys/devices/virtual/input/input* gyro_range 0660 system input
+/sys/devices/virtual/input/input* gyro_value 0660 system input
+
+# GNSS PPS Device premissions
+/dev/pps* 0660 gps gps
+
+# laser sensor access
+/sys/devices/virtual/input/input* enable_ps_sensor 0660 system input
+/sys/devices/virtual/input/input* set_delay_ms 0660 system input
+/sys/devices/virtual/input/input* do_flush 0660 system input
+
+# vm_bms
+/dev/vm_bms 0660 system system
+/dev/battery_data 0660 system system
+
+# wlan
+/dev/wcnss_wlan 0660 system system
+/dev/wcnss_ctrl 0660 system system
+/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0/queues/rx-* rps_cpus 0660 system system
+/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/p2p0/queues/rx-* rps_cpus 0660 system system
+
+# wigig
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/snr_thresh 0660 wifi wifi
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
+/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
+/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system
+
+#nfc permissions
+/dev/nfc-nci 0660 nfc nfc
+/dev/nq-nci 0660 nfc nfc
+/dev/assd 0660 nfc nfc
+
+# UIO devices
+/dev/uio0 0660 system system
+/dev/uio1 0660 system system
+/dev/uio2 0660 system system
+
+# SSR devices
+/dev/subsys_* 0640 system system
+
+# Ultrasound device
+/dev/usf1 0660 system system
+
+# Ramdump devices
+/dev/ramdump* 0640 system system
+
+# Fingerprint device
+/dev/qbt1000 0660 system system
+
+#ImproveTouch device
+/dev/hbtp_input 0660 system system
+/dev/hbtp_vm 0660 system system
+
+# Add device block for FRP
+/dev/block/platform/soc/7824900.sdhci/by-name/config 0600 system system
+/dev/block/platform/soc/7464900.sdhci/by-name/frp 0600 system system
+/dev/block/platform/soc/624000.ufshc/by-name/frp 0600 system system
+/dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system
+/dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system
+/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system
+/dev/block/platform/soc/7c4000.sdhci/by-name/frp 0600 system system
+
+# This is temporary while using SD card for initial bring-up
+/dev/block/platform/soc/8804000.sdhci/by-name/frp 0600 system system
+
+# Kmsg device
+/dev/kmsg 0620 root system
+
+# LED class devices
+/sys/class/leds/red delay_on 0640 system system
+/sys/class/leds/red delay_off 0640 system system
+/sys/class/leds/red breath 0640 system system
+/sys/class/leds/green delay_on 0640 system system
+/sys/class/leds/green delay_off 0640 system system
+/sys/class/leds/green breath 0640 system system
+/sys/class/leds/blue delay_on 0640 system system
+/sys/class/leds/blue delay_off 0640 system system
+/sys/class/leds/blue breath 0640 system system
+
+# NPU device
+/dev/msm_npu 0644 system system
+
+# USB role switch
+/sys/class/dual_role_usb/* data_role 0660 system system
+/sys/class/dual_role_usb/* power_role 0660 system system
+/sys/class/dual_role_usb/* mode 0660 system system
+
+#Memory Offline
+/sys/devices/system/memory/memory* state 0660 system system
+
+# Elliptic
+/dev/elliptic0 0644 system system
+/dev/elliptic1 0644 system system
+# sys-fs display
+/sys/class/graphics/fb* hpd 0664 system graphics
+/sys/class/graphics/fb* res_info 0664 system graphics
+/sys/class/graphics/fb* vendor_name 0664 system graphics
+/sys/class/graphics/fb* product_description 0664 system graphics
+/sys/class/graphics/fb* video_mode 0664 system graphics
+/sys/class/graphics/fb* format_3d 0664 system graphics
+/sys/class/graphics/fb* s3d_mode 0664 system graphics
+/sys/class/graphics/fb* dynamic_fps 0664 system graphics
+/sys/class/graphics/fb* msm_fb_dfps_mode 0664 system graphics
+/sys/class/graphics/fb* hdr_stream 0664 system graphics
+/sys/class/graphics/fb* cec/enable 0664 system graphics
+/sys/class/graphics/fb* cec/logical_addr 0664 system graphics
+/sys/class/graphics/fb* cec/rd_msg 0664 system graphics
+/sys/class/graphics/fb* pa 0664 system graphics
+/sys/class/graphics/fb* cec/wr_msg 0600 system graphics
+/sys/class/graphics/fb* hdcp/tp 0664 system graphics
+/sys/class/graphics/fb* hdcp2p2/min_level_change 0660 system graphics
+/sys/class/graphics/fb* hdmi_audio_cb 0600 audioserver audio
+
+/sys/class/graphics/fb* lineptr_value 0664 system graphics
+/sys/class/graphics/fb* msm_fb_persist_mode 0664 system graphics
+
+/sys/class/graphics/fb0 idle_time 0664 system graphics
+/sys/class/graphics/fb0 dynamic_fps 0664 system graphics
+/sys/class/graphics/fb0 dyn_pu 0664 system graphics
+/sys/class/graphics/fb0 modes 0664 system graphics
+/sys/class/graphics/fb0 mode 0664 system graphics
+/sys/class/graphics/fb0 msm_cmd_autorefresh_en 0664 system graphics
+/sys/class/graphics/fb0 dynamic_bitclk 0664 system graphics
+
+/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
diff --git a/sdm710.mk b/sdm710.mk
index c67bd727b..ca275a6a4 100644
--- a/sdm710.mk
+++ b/sdm710.mk
@@ -9,16 +9,15 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
# Get non-open-source specific aspects
-$(call inherit-product-if-exists, vendor/xiaomi/sdm710-common/sdm710-common-vendor.mk)
+$(call inherit-product-if-exists, vendor/xiaomi/sdm710-common/sdm710-common-vendor.mk)
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
- $(LOCAL_PATH)/overlay-lineage \
- $(LOCAL_PATH)/overlay-xenonhd
+ $(LOCAL_PATH)/overlay-lineage
-PRODUCT_PACKAGES += \
- NoCutoutOverlay
+PRODUCT_ENFORCE_RRO_TARGETS := \
+ framework-res
# Properties
-include $(LOCAL_PATH)/common-props.mk
@@ -40,12 +39,38 @@ PRODUCT_PACKAGES += \
# Common init scripts
PRODUCT_PACKAGES += \
- init.qcom.rc
+ init.msm.usb.configfs.rc \
+ init.qcom.rc \
+ init.qcom.usb.rc \
+ init.target.rc \
+ ueventd.qcom.rc \
+ init.class_late.sh \
+ init.class_main.sh \
+ init.crda.sh \
+ init.mdm.sh \
+ init.qcom.class_core.sh \
+ init.qcom.coex.sh \
+ init.qcom.crashdata.sh \
+ init.qcom.early_boot.sh \
+ init.qcom.efs.sync.sh \
+ init.qcom.post_boot.sh \
+ init.qcom.sdio.sh \
+ init.qcom.sensors.sh \
+ init.qcom.sh \
+ init.qcom.usb.sh \
+ init.qti.can.sh \
+ init.qti.fm.sh \
+ init.qti.ims.sh \
+ init.qti.qseecomd.sh
# Device-specific settings
PRODUCT_PACKAGES += \
XiaomiParts
+# Dex
+PRODUCT_DEXPREOPT_SPEED_APPS += \
+ SystemUI
+
# Display
PRODUCT_PACKAGES += \
libvulkan \
@@ -53,7 +78,7 @@ PRODUCT_PACKAGES += \
# Fingerprint
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc:system/etc/init/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc
+ $(LOCAL_PATH)/fingerprint/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/android.hardware.biometrics.fingerprint@2.1-service.xiaomi_sdm710.rc
# HIDL
PRODUCT_PACKAGES += \
@@ -75,7 +100,7 @@ PRODUCT_PACKAGES += \
# Input
PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl
+ $(LOCAL_PATH)/keylayout/sdm710-tavil-snd-card_Button_Jack.kl:system/usr/keylayout/sdm710-tavil-snd-card_Button_Jack.kl
# Lights
PRODUCT_PACKAGES += \
@@ -83,24 +108,28 @@ PRODUCT_PACKAGES += \
# LiveDisplay
PRODUCT_PACKAGES += \
- lineage.livedisplay@2.0-service-sdm
+ vendor.lineage.livedisplay@2.0-service-sdm
+
+# Media
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/media_profiles_vendor.xml:system/etc/media_profiles_vendor.xml
# Net
PRODUCT_PACKAGES += \
netutils-wrapper-1.0
-# Placeholder
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/placeholder:system/etc/placeholder
-
# Power
PRODUCT_PACKAGES += \
- power.qcom:64
+ android.hardware.power@1.2-service.xiaomi_sdm710
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/power/configs/powerhint.xml:system/etc/powerhint.xml
# QTI
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/qti_whitelist.xml:system/etc/sysconfig/qti_whitelist.xml \
- $(LOCAL_PATH)/permissions/privapp-permissions-qti.xml:system/etc/permissions/privapp-permissions-qti.xml
+ $(LOCAL_PATH)/permissions/privapp-permissions-qti.xml:system/etc/permissions/privapp-permissions-qti.xml \
+ $(LOCAL_PATH)/permissions/privapp-permissions-hotword.xml:system/etc/permissions/privapp-permissions-hotword.xml
# RCS
PRODUCT_PACKAGES += \
@@ -118,6 +147,10 @@ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/seccomp/mediacodec-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
$(LOCAL_PATH)/seccomp/mediaextractor-seccomp.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy
+# Soong namespaces
+PRODUCT_SOONG_NAMESPACES += \
+ $(LOCAL_PATH)
+
# Telephony
PRODUCT_PACKAGES += \
telephony-ext
@@ -131,7 +164,7 @@ PRODUCT_PACKAGES += \
# Trust HAL
PRODUCT_PACKAGES += \
- lineage.trust@1.0-service
+ vendor.lineage.trust@1.0-service
# VNDK-SP
PRODUCT_PACKAGES += \
diff --git a/sepolicy/private/app.te b/sepolicy/private/app.te
deleted file mode 100644
index 9f418bdf9..000000000
--- a/sepolicy/private/app.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Allow appdomain to get vendor_camera_prop
-get_prop(appdomain, vendor_camera_prop)
diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te
deleted file mode 100644
index 8fcbede09..000000000
--- a/sepolicy/private/file.te
+++ /dev/null
@@ -1,10 +0,0 @@
-type adsprpcd_file, file_type;
-type bt_firmware_file, file_type;
-type display_data_file, data_file_type, core_data_file_type, file_type;
-type firmware_file, file_type;
-type persist_file, file_type;
-type pps_socket, file_type;
-type sysfs_fp_proximity, sysfs_type, fs_type;
-type sysfs_graphics, sysfs_type, fs_type;
-type sysfs_tp_fodstatus, sysfs_type, fs_type;
-type sysfs_white_led, sysfs_type, fs_type;
diff --git a/sepolicy/private/file_contexts b/sepolicy/private/file_contexts
deleted file mode 100644
index a1b3cdc7c..000000000
--- a/sepolicy/private/file_contexts
+++ /dev/null
@@ -1,39 +0,0 @@
-# Audio
-/system/etc/audio_policy_configuration.xml u:object_r:vendor_configs_file:s0
-/system/lib64/soundfx/libvolumelistener\.so u:object_r:vendor_file:s0
-/system/lib/soundfx/libvolumelistener\.so u:object_r:vendor_file:s0
-
-# Data files
-/data/display(/.*)? u:object_r:display_data_file:s0
-
-# Files in rootfs
-/bt_firmware(/.*)? u:object_r:bt_firmware_file:s0
-/dsp(/.*)? u:object_r:adsprpcd_file:s0
-/firmware(/.*)? u:object_r:firmware_file:s0
-/persist(/.*)? u:object_r:persist_file:s0
-
-# Fingerprint related nodes
-/sys/devices/platform/soc/soc:fingerprint_goodix/proximity_state u:object_r:sysfs_fp_proximity:s0
-/sys/devices/virtual/touch/tp_dev/fod_status u:object_r:sysfs_tp_fodstatus:s0
-
-# Fingerprint under display HAL
-/system/bin/hw/lineage\.biometrics\.fingerprint\.inscreen@1.0-service\.xiaomi_sdm710 u:object_r:hal_fod_sdm710_exec:s0
-
-# Graphics nodes
-/sys/devices/platform/soc/ae00000\.qcom,mdss_mdp/drm/card0/card0-DSI-1/hbm_status u:object_r:sysfs_graphics:s0
-
-# Lights HAL
-/system/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sdm710 u:object_r:hal_light_sdm710_exec:s0
-
-# LiveDisplay HAL
-/system/bin/hw/lineage\.livedisplay@2\.0-service-sdm u:object_r:shal_livedisplay_default_exec:s0
-/system/bin/hw/lineage\.livedisplay@2\.0-service\.xiaomi_sdm710 u:object_r:shal_livedisplay_default_exec:s0
-
-# Placeholder
-/system/etc/placeholder u:object_r:vendor_overlay_file:s0
-
-# Power HAL
-/system/lib64/hw/power\.qcom\.so u:object_r:vendor_file:s0
-
-# Trust HAL
-/system/bin/hw/lineage\.trust@1\.0-service u:object_r:shal_lineage_trust_default_exec:s0
diff --git a/sepolicy/private/hal_fingerprint_default.te b/sepolicy/private/hal_fingerprint_default.te
deleted file mode 100644
index e631d15af..000000000
--- a/sepolicy/private/hal_fingerprint_default.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# Ignore all logging requests
-dontaudit hal_fingerprint storage_file:dir search;
diff --git a/sepolicy/private/hal_fod_sdm710.te b/sepolicy/private/hal_fod_sdm710.te
deleted file mode 100644
index 52a084399..000000000
--- a/sepolicy/private/hal_fod_sdm710.te
+++ /dev/null
@@ -1,10 +0,0 @@
-type hal_fod_sdm710, coredomain, domain;
-hal_server_domain(hal_fod_sdm710, hal_lineage_fod)
-
-type hal_fod_sdm710_exec, exec_type, file_type;
-init_daemon_domain(hal_fod_sdm710)
-
-allow hal_fod_sdm710 hal_fingerprint_hwservice:hwservice_manager find;
-allow hal_fod_sdm710 sysfs_graphics:file rw_file_perms;
-allow hal_fod_sdm710 sysfs_tp_fodstatus:file rw_file_perms;
-binder_call(hal_fod_sdm710, hal_fingerprint)
diff --git a/sepolicy/private/hal_light_sdm710.te b/sepolicy/private/hal_light_sdm710.te
deleted file mode 100644
index dfcf9468e..000000000
--- a/sepolicy/private/hal_light_sdm710.te
+++ /dev/null
@@ -1,20 +0,0 @@
-type hal_light_sdm710, coredomain, domain;
-
-# Allow a base set of permissions required for a domain to offer a
-# HAL implementation of the specified type over HwBinder.
-typeattribute hal_light_sdm710 halserverdomain;
-typeattribute hal_light_sdm710 hal_light_server;
-
-# HwBinder IPC from client to server, and callbacks
-binder_call(hal_light_client, hal_light_server)
-binder_call(hal_light_server, hal_light_client)
-
-add_hwservice(hal_light_server, hal_light_hwservice)
-allow hal_light_client hal_light_hwservice:hwservice_manager find;
-
-type hal_light_sdm710_exec, exec_type, file_type;
-init_daemon_domain(hal_light_sdm710)
-
-allow hal_light_sdm710 { sysfs_graphics sysfs_white_led }:lnk_file read;
-allow hal_light_sdm710 { sysfs_graphics sysfs_white_led }:file rw_file_perms;
-allow hal_light_sdm710 { sysfs_graphics sysfs_leds sysfs_white_led }:dir r_dir_perms;
diff --git a/sepolicy/private/hal_lineage_trust_default.te b/sepolicy/private/hal_lineage_trust_default.te
deleted file mode 100644
index fae29e8f0..000000000
--- a/sepolicy/private/hal_lineage_trust_default.te
+++ /dev/null
@@ -1,8 +0,0 @@
-type shal_lineage_trust_default, coredomain, domain;
-hal_server_domain(shal_lineage_trust_default, hal_lineage_trust)
-
-type shal_lineage_trust_default_exec, exec_type, file_type;
-init_daemon_domain(shal_lineage_trust_default)
-
-# Talk to the binder device node
-allow shal_lineage_trust_default binder_device:chr_file rw_file_perms;
diff --git a/sepolicy/private/hal_livedisplay_default.te b/sepolicy/private/hal_livedisplay_default.te
deleted file mode 100644
index 8bdc1d42e..000000000
--- a/sepolicy/private/hal_livedisplay_default.te
+++ /dev/null
@@ -1,29 +0,0 @@
-type shal_livedisplay_default, coredomain, domain;
-hal_server_domain(shal_livedisplay_default, hal_lineage_livedisplay)
-
-type shal_livedisplay_default_exec, exec_type, file_type;
-init_daemon_domain(shal_livedisplay_default)
-
-# Allow LiveDisplay to perform binder IPC to vendor.display.color::IDisplayColor
-type hal_display_color_default, domain;
-binder_call(shal_livedisplay_default, hal_display_color_default)
-
-allow shal_livedisplay_default hal_display_color_hwservice:hwservice_manager find;
-
-# Talk to the binder device node
-allow shal_livedisplay_default binder_device:chr_file rw_file_perms;
-
-# Allow LiveDisplay to store files under /data/display and access them
-allow shal_livedisplay_default display_data_file:dir rw_dir_perms;
-allow shal_livedisplay_default display_data_file:file create_file_perms;
-
-# Allow LiveDisplay to access pps socket
-type mm-pp-daemon, domain;
-typeattribute mm-pp-daemon socket_between_core_and_vendor_violators;
-unix_socket_connect(shal_livedisplay_default, pps, mm-pp-daemon)
-
-# Allow LiveDisplay to read display props
-get_prop(shal_livedisplay_default, vendor_display_prop)
-
-# Grant LiveDisplay access over the control nodes
-allow shal_livedisplay_default sysfs_graphics:file rw_file_perms;
diff --git a/sepolicy/private/hal_power.te b/sepolicy/private/hal_power.te
deleted file mode 100644
index 54fe46d1b..000000000
--- a/sepolicy/private/hal_power.te
+++ /dev/null
@@ -1,2 +0,0 @@
-allow hal_power input_device:dir search;
-allow hal_power input_device:chr_file rw_file_perms;
diff --git a/sepolicy/private/hwservice.te b/sepolicy/private/hwservice.te
deleted file mode 100644
index 17ca6fcea..000000000
--- a/sepolicy/private/hwservice.te
+++ /dev/null
@@ -1 +0,0 @@
-type hal_display_color_hwservice, hwservice_manager_type;
diff --git a/sepolicy/private/hwservice_contexts b/sepolicy/private/hwservice_contexts
deleted file mode 100644
index 8e793b3ac..000000000
--- a/sepolicy/private/hwservice_contexts
+++ /dev/null
@@ -1 +0,0 @@
-vendor.display.color::IDisplayColor u:object_r:hal_display_color_hwservice:s0
diff --git a/sepolicy/private/init.te b/sepolicy/private/init.te
deleted file mode 100644
index cfa50779a..000000000
--- a/sepolicy/private/init.te
+++ /dev/null
@@ -1,17 +0,0 @@
-# Allow init to chown/chmod on pseudo files in /sys
-allow init {
- sysfs_fp_proximity
- sysfs_graphics
-}:file { open read setattr };
-
-# Allow init to mount soundfx libs
-allow init vendor_file:file mounton;
-
-# Allow init to mount offmode charging daemon
-allow init rootfs:file mounton;
-
-# Allow init to mount vendor configs
-allow init vendor_configs_file:file mounton;
-
-# Allow init to mount overlay files
-allow init vendor_overlay_file:file mounton;
diff --git a/sepolicy/private/pocketmode_app.te b/sepolicy/private/pocketmode_app.te
index f2637977d..b56db7a66 100644
--- a/sepolicy/private/pocketmode_app.te
+++ b/sepolicy/private/pocketmode_app.te
@@ -9,5 +9,5 @@ allow pocketmode_app app_api_service:service_manager find;
allow pocketmode_app system_app_data_file:dir create_dir_perms;
allow pocketmode_app system_app_data_file:{ file lnk_file } create_file_perms;
-# Allow pocketmode_app to write to sysfs_fp_proximity
-allow pocketmode_app sysfs_fp_proximity:file { w_file_perms getattr };
+# Allow pocketmode_app to write to sysfs fingerprint nodes
+allow pocketmode_app sysfs_fingerprint:file { w_file_perms getattr };
diff --git a/sepolicy/private/property.te b/sepolicy/private/property.te
deleted file mode 100644
index f65f933f0..000000000
--- a/sepolicy/private/property.te
+++ /dev/null
@@ -1,2 +0,0 @@
-type vendor_camera_prop, property_type;
-type vendor_display_prop, property_type;
diff --git a/sepolicy/private/property_contexts b/sepolicy/private/property_contexts
deleted file mode 100644
index cba3a1387..000000000
--- a/sepolicy/private/property_contexts
+++ /dev/null
@@ -1 +0,0 @@
-vendor.camera.aux.packageblacklist u:object_r:vendor_camera_prop:s0
diff --git a/sepolicy/private/system_app.te b/sepolicy/private/system_app.te
new file mode 100644
index 000000000..c9f1b37e4
--- /dev/null
+++ b/sepolicy/private/system_app.te
@@ -0,0 +1 @@
+hal_client_domain(system_app, hal_mlipay)
diff --git a/sepolicy/private/system_server.te b/sepolicy/private/system_server.te
deleted file mode 100644
index 135faa79c..000000000
--- a/sepolicy/private/system_server.te
+++ /dev/null
@@ -1 +0,0 @@
-get_prop(system_server, vendor_camera_prop)
diff --git a/sepolicy/public/attributes b/sepolicy/public/attributes
new file mode 100644
index 000000000..cdc595c12
--- /dev/null
+++ b/sepolicy/public/attributes
@@ -0,0 +1,3 @@
+hal_attribute(displayfeature)
+
+hal_attribute(mlipay)
diff --git a/sepolicy/public/file.te b/sepolicy/public/file.te
new file mode 100644
index 000000000..0218b4630
--- /dev/null
+++ b/sepolicy/public/file.te
@@ -0,0 +1 @@
+type sysfs_fingerprint, sysfs_type, fs_type;
diff --git a/sepolicy/vendor/app.te b/sepolicy/vendor/app.te
new file mode 100644
index 000000000..6ea187989
--- /dev/null
+++ b/sepolicy/vendor/app.te
@@ -0,0 +1,2 @@
+get_prop({ appdomain -isolated_app }, vendor_fp_prop)
+get_prop({ appdomain -isolated_app }, vendor_tee_listener_prop)
diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te
new file mode 100644
index 000000000..843d61af8
--- /dev/null
+++ b/sepolicy/vendor/device.te
@@ -0,0 +1,5 @@
+type fingerprint_device, dev_type;
+
+type gps_device, dev_type;
+
+type sound_device, dev_type;
diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te
new file mode 100644
index 000000000..f5b674ea0
--- /dev/null
+++ b/sepolicy/vendor/file.te
@@ -0,0 +1,14 @@
+type audio_socket, file_type;
+
+type fingerprint_data_file, data_file_type, file_type;
+type gps_data_file, data_file_type, file_type;
+type gps_socket, file_type;
+type thermal_data_file, data_file_type, file_type;
+
+type proc_tp, proc_type, fs_type;
+
+type sysfs_gps, sysfs_type, fs_type;
+type sysfs_wireless_supply, sysfs_type, fs_type;
+
+type persist_audio_file, file_type, vendor_persist_type;
+type persist_camera_file, file_type, vendor_persist_type;
diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts
new file mode 100644
index 000000000..3a056b425
--- /dev/null
+++ b/sepolicy/vendor/file_contexts
@@ -0,0 +1,61 @@
+# Audio devices
+/dev/elliptic(.*)? u:object_r:sound_device:s0
+
+# Camera
+/(vendor|system/vendor)/bin/remosaic_daemon u:object_r:remosaic_daemon_exec:s0
+
+# Data files
+/data/vendor/fpc(/.*)? u:object_r:fingerprint_data_file:s0
+/data/vendor/goodix(/.*)? u:object_r:fingerprint_data_file:s0
+/data/vendor/gps(/.*)? u:object_r:gps_data_file:s0
+/data/vendor/syna(/.*)? u:object_r:fingerprint_data_file:s0
+/data/vendor/mac_addr(/.*)? u:object_r:wifi_vendor_data_file:s0
+/data/vendor/thermal(/.*)? u:object_r:thermal_data_file:s0
+
+# Executables
+/vendor/bin/glgps u:object_r:glgps_exec:s0
+/vendor/bin/ignss_1_1 u:object_r:hal_gnss_default_exec:s0
+/vendor/bin/lhd u:object_r:lhd_exec:s0
+/vendor/bin/mlipayd@1\.1 u:object_r:hal_mlipay_default_exec:s0
+/vendor/bin/nv_mac u:object_r:wcnss_service_exec:s0
+
+# Fingerprint devices
+/dev/goodix_fp u:object_r:fingerprint_device:s0
+/dev/vfsspi u:object_r:fingerprint_device:s0
+
+# GPS devices
+/dev/bbd_control u:object_r:gps_device:s0
+/dev/bbd_patch u:object_r:gps_device:s0
+/dev/bbd_sensor u:object_r:gps_device:s0
+/dev/ttyBCM u:object_r:gps_device:s0
+
+# GPS nodes
+/sys/devices/platform/soc/[0-9]+\.spi/spi_master/spi[0-9]+/spi[0-9]+\.0/nstandby u:object_r:sysfs_gps:s0
+
+# Graphics nodes
+/sys/devices/platform/soc/[a-z0-9]+.qcom,mdss_mdp/drm/card([0-3])+/card([0-3])+-DSI-1/disp_param u:object_r:sysfs_graphics:s0
+/sys/devices/platform/soc/[a-z0-9]+.qcom,mdss_mdp/drm/card([0-3])+/card([0-3])+-DSI-1/hbm_status u:object_r:sysfs_graphics:s0
+/sys/devices/platform/soc/[a-z0-9]+.qcom,mdss_mdp/drm/card([0-3])+/card([0-3])+-DSI-1/panel_info u:object_r:sysfs_graphics:s0
+
+# Health
+/sys/devices/platform/soc/[a-z0-9]+.i2c/i2c-[0-9]/[0-9]-[a-z0-9]+/power_supply/idt(/.*)? u:object_r:sysfs_wireless_supply:s0
+/sys/devices/platform/soc/[a-z0-9]+.qcom,spmi/spmi-[0-9]/spmi[0-9]-0[0-9]/[a-z0-9]+.qcom,spmi:qcom,[a-z0-9]+@[0-9]:qcom,qpnp-smb2/power_supply/dc(/.*)? u:object_r:sysfs_wireless_supply:s0
+/sys/devices/platform/soc/[a-z0-9]+.qcom,spmi/spmi-[0-9]/spmi[0-9]-0[0-9]/[a-z0-9]+.qcom,spmi:qcom,[a-z0-9]+@[0-9]:qcom,qpnp-smb2/power_supply/wireless(/.*)? u:object_r:sysfs_wireless_supply:s0
+
+# Leds nodes
+/sys/devices/platform/soc/[a-z0-9]+.i2c/i2c-[0-9]/[0-9]-[a-z0-9]+/leds/ir(/.*)? u:object_r:sysfs_leds:s0
+
+# HALs
+/vendor/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sdm710 u:object_r:hal_fingerprint_default_exec:s0
+/vendor/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sdm710 u:object_r:hal_light_default_exec:s0
+/vendor/bin/hw/android\.hardware\.power@1\.2-service\.xiaomi_sdm710 u:object_r:hal_power_default_exec:s0
+/vendor/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.xiaomi_sdm710 u:object_r:hal_lineage_livedisplay_qti_exec:s0
+/vendor/bin/hw/vendor\.xiaomi\.hardware\.displayfeature@1\.0-service u:object_r:hal_displayfeature_default_exec:s0
+
+# Persist files
+/mnt/vendor/persist/audio(/.*)? u:object_r:persist_audio_file:s0
+/mnt/vendor/persist/camera(/.*)? u:object_r:persist_camera_file:s0
+
+# Sockets
+/dev/socket/audio_hw_socket u:object_r:audio_socket:s0
+/dev/socket/gps u:object_r:gps_socket:s0
diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts
new file mode 100644
index 000000000..c22d42dd2
--- /dev/null
+++ b/sepolicy/vendor/genfs_contexts
@@ -0,0 +1,8 @@
+genfscon proc /tp_fw_version u:object_r:proc_tp:s0
+genfscon proc /tp_lockdown_info u:object_r:proc_tp:s0
+
+genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/device_prepare u:object_r:sysfs_fingerprint:s0
+genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/fingerdown_wait u:object_r:sysfs_fingerprint:s0
+genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/irq u:object_r:sysfs_fingerprint:s0
+genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/wakeup_enable u:object_r:sysfs_fingerprint:s0
+genfscon sysfs /devices/platform/soc/soc:fingerprint_goodix/proximity_state u:object_r:sysfs_fingerprint:s0
diff --git a/sepolicy/vendor/glgps.te b/sepolicy/vendor/glgps.te
new file mode 100644
index 000000000..9cc5983e1
--- /dev/null
+++ b/sepolicy/vendor/glgps.te
@@ -0,0 +1,24 @@
+type glgps, domain;
+type glgps_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(glgps)
+net_domain(glgps)
+
+allow glgps fwk_sensor_hwservice:hwservice_manager find;
+
+allow glgps gps_data_file:dir create_dir_perms;
+allow glgps gps_data_file:fifo_file create_file_perms;
+allow glgps gps_data_file:file create_file_perms;
+allow glgps gps_data_file:lnk_file create_file_perms;
+allow glgps gps_data_file:sock_file create_file_perms;
+
+allow glgps gps_device:chr_file rw_file_perms;
+
+allow glgps self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
+allow glgps gps_socket:sock_file create_file_perms;
+
+binder_call(glgps, system_server)
+
+typeattribute glgps halclientdomain;
+
+wakelock_use(glgps)
diff --git a/sepolicy/vendor/hal_audio_default.te b/sepolicy/vendor/hal_audio_default.te
new file mode 100644
index 000000000..a10834540
--- /dev/null
+++ b/sepolicy/vendor/hal_audio_default.te
@@ -0,0 +1,6 @@
+allow hal_audio_default mnt_vendor_file:dir search;
+r_dir_file(hal_audio_default, persist_audio_file)
+
+set_prop(hal_audio_default, vendor_audio_prop)
+
+allow hal_audio_default audio_socket:sock_file rw_file_perms;
diff --git a/sepolicy/vendor/hal_bluetooth_qti.te b/sepolicy/vendor/hal_bluetooth_qti.te
new file mode 100644
index 000000000..5e2d1c4e1
--- /dev/null
+++ b/sepolicy/vendor/hal_bluetooth_qti.te
@@ -0,0 +1,2 @@
+allow hal_bluetooth_qti wifi_vendor_data_file:dir search;
+allow hal_bluetooth_qti wifi_vendor_data_file:file r_file_perms;
diff --git a/sepolicy/vendor/hal_camera_default.te b/sepolicy/vendor/hal_camera_default.te
new file mode 100644
index 000000000..0a2a83abb
--- /dev/null
+++ b/sepolicy/vendor/hal_camera_default.te
@@ -0,0 +1,14 @@
+allow hal_camera_default gpu_device:chr_file rw_file_perms;
+
+allow hal_camera_default remosaic_daemon_service:service_manager find;
+
+allow hal_camera_default sysfs_kgsl:dir search;
+allow hal_camera_default sysfs_kgsl:file r_file_perms;
+
+allow hal_camera_default sysfs_leds:dir r_dir_perms;
+allow hal_camera_default sysfs_leds:file rw_file_perms;
+allow hal_camera_default sysfs_leds:lnk_file read;
+
+get_prop(hal_camera_default, vendor_camera_prop)
+
+r_dir_file(hal_camera_default, persist_camera_file)
diff --git a/sepolicy/vendor/hal_displayfeature_default.te b/sepolicy/vendor/hal_displayfeature_default.te
new file mode 100644
index 000000000..995783640
--- /dev/null
+++ b/sepolicy/vendor/hal_displayfeature_default.te
@@ -0,0 +1,28 @@
+type hal_displayfeature_default, domain;
+hal_server_domain(hal_displayfeature_default, hal_displayfeature)
+
+type hal_displayfeature_default_exec, exec_type, vendor_file_type, file_type;
+init_daemon_domain(hal_displayfeature_default)
+
+binder_call(hal_displayfeature_client, hal_displayfeature_server)
+
+add_hwservice(hal_displayfeature_server, hal_displayfeature_hwservice)
+allow hal_displayfeature_client hal_configstore_ISurfaceFlingerConfigs:hwservice_manager find;
+allow hal_displayfeature_client hal_displayfeature_hwservice:hwservice_manager find;
+
+allow hal_displayfeature_default sysfs_graphics:dir r_dir_perms;
+allow hal_displayfeature_default sysfs_graphics:file rw_file_perms;
+allow hal_displayfeature_default sysfs_graphics:lnk_file read;
+
+set_prop(hal_displayfeature_default, vendor_displayfeature_prop)
+
+vndbinder_use(hal_displayfeature_default)
+
+hal_client_domain(hal_displayfeature_default, hal_display_color)
+hal_client_domain(hal_displayfeature_default, hal_display_postproc)
+
+get_prop(hal_displayfeature_default, vendor_dpps_prop)
+
+allow hal_displayfeature_default qdisplay_service:service_manager find;
+
+binder_call(hal_displayfeature_default, hal_graphics_composer_default)
diff --git a/sepolicy/vendor/hal_fingerprint_default.te b/sepolicy/vendor/hal_fingerprint_default.te
new file mode 100644
index 000000000..7dbc69ae1
--- /dev/null
+++ b/sepolicy/vendor/hal_fingerprint_default.te
@@ -0,0 +1,13 @@
+allow hal_fingerprint_default fingerprint_device:chr_file rw_file_perms;
+allow hal_fingerprint_default fingerprint_data_file:dir create_dir_perms;
+allow hal_fingerprint_default fingerprint_data_file:file create_file_perms;
+allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl;
+allow hal_fingerprint_default sysfs_fingerprint:file rw_file_perms;
+allow hal_fingerprint_default tee_device:chr_file rw_file_perms;
+allow hal_fingerprint_default uhid_device:chr_file rw_file_perms;
+
+set_prop(hal_fingerprint_default, vendor_fp_prop)
+hal_client_domain(hal_fingerprint_default, hal_perf)
+
+# Ignore all logging requests
+dontaudit hal_fingerprint storage_file:dir search;
diff --git a/sepolicy/vendor/hal_gnss_default.te b/sepolicy/vendor/hal_gnss_default.te
new file mode 100644
index 000000000..c2346f2bf
--- /dev/null
+++ b/sepolicy/vendor/hal_gnss_default.te
@@ -0,0 +1,2 @@
+allow hal_gnss_default gps_data_file:dir rw_dir_perms;
+allow hal_gnss_default gps_data_file:fifo_file create_file_perms;
diff --git a/sepolicy/vendor/hal_graphics_composer_default.te b/sepolicy/vendor/hal_graphics_composer_default.te
new file mode 100644
index 000000000..117639f64
--- /dev/null
+++ b/sepolicy/vendor/hal_graphics_composer_default.te
@@ -0,0 +1,5 @@
+get_prop(hal_graphics_composer_default, vendor_displayfeature_prop)
+
+hal_client_domain(hal_graphics_composer_default, hal_displayfeature)
+
+binder_call(hal_graphics_composer_default, hal_configstore_default)
diff --git a/sepolicy/vendor/hal_health_default.te b/sepolicy/vendor/hal_health_default.te
new file mode 100644
index 000000000..878b5a568
--- /dev/null
+++ b/sepolicy/vendor/hal_health_default.te
@@ -0,0 +1,2 @@
+allow hal_health_default sysfs_wireless_supply:dir search;
+allow hal_health_default sysfs_wireless_supply:file r_file_perms;
diff --git a/sepolicy/vendor/hal_lineage_livedisplay_qti.te b/sepolicy/vendor/hal_lineage_livedisplay_qti.te
new file mode 100644
index 000000000..c2e74fb4a
--- /dev/null
+++ b/sepolicy/vendor/hal_lineage_livedisplay_qti.te
@@ -0,0 +1,2 @@
+# Grant LiveDisplay access over the control nodes
+allow hal_lineage_livedisplay_qti sysfs_graphics:file rw_file_perms;
diff --git a/sepolicy/vendor/hal_mlipay.te b/sepolicy/vendor/hal_mlipay.te
new file mode 100644
index 000000000..3e9ef84c8
--- /dev/null
+++ b/sepolicy/vendor/hal_mlipay.te
@@ -0,0 +1,5 @@
+# HwBinder IPC from client to server
+binder_call(hal_mlipay_client, hal_mlipay_server)
+
+add_hwservice(hal_mlipay_server, hal_mlipay_hwservice)
+allow hal_mlipay_client hal_mlipay_hwservice:hwservice_manager find;
diff --git a/sepolicy/vendor/hal_mlipay_default.te b/sepolicy/vendor/hal_mlipay_default.te
new file mode 100644
index 000000000..1b36f1024
--- /dev/null
+++ b/sepolicy/vendor/hal_mlipay_default.te
@@ -0,0 +1,13 @@
+type hal_mlipay_default, domain;
+hal_server_domain(hal_mlipay_default, hal_mlipay)
+
+type hal_mlipay_default_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(hal_mlipay_default)
+
+allow hal_mlipay_default ion_device:chr_file rw_file_perms;
+allow hal_mlipay_default tee_device:chr_file rw_file_perms;
+r_dir_file(hal_mlipay_default, firmware_file)
+
+get_prop(hal_mlipay_default, vendor_fp_prop)
+set_prop(hal_mlipay_default, vendor_tee_listener_prop)
diff --git a/sepolicy/vendor/hal_power_default.te b/sepolicy/vendor/hal_power_default.te
new file mode 100644
index 000000000..0a5dbfb25
--- /dev/null
+++ b/sepolicy/vendor/hal_power_default.te
@@ -0,0 +1,2 @@
+allow hal_power_default input_device:dir search;
+allow hal_power_default input_device:chr_file rw_file_perms;
diff --git a/sepolicy/vendor/hal_sensors_default.te b/sepolicy/vendor/hal_sensors_default.te
new file mode 100644
index 000000000..c82102e03
--- /dev/null
+++ b/sepolicy/vendor/hal_sensors_default.te
@@ -0,0 +1,5 @@
+allow hal_sensors_default mnt_vendor_file:file r_file_perms;
+allow hal_sensors_default sound_device:chr_file rw_file_perms;
+
+allow hal_sensors_default audio_socket:sock_file rw_file_perms;
+unix_socket_connect(hal_sensors_default, audio, hal_audio_default)
diff --git a/sepolicy/vendor/healthd.te b/sepolicy/vendor/healthd.te
new file mode 100644
index 000000000..af4c1401e
--- /dev/null
+++ b/sepolicy/vendor/healthd.te
@@ -0,0 +1 @@
+allow healthd sysfs_wireless_supply:file r_file_perms;
diff --git a/sepolicy/vendor/hwservice.te b/sepolicy/vendor/hwservice.te
new file mode 100644
index 000000000..f1363abd2
--- /dev/null
+++ b/sepolicy/vendor/hwservice.te
@@ -0,0 +1,3 @@
+type hal_displayfeature_hwservice, hwservice_manager_type;
+
+type hal_mlipay_hwservice, hwservice_manager_type;
diff --git a/sepolicy/vendor/hwservice_contexts b/sepolicy/vendor/hwservice_contexts
new file mode 100644
index 000000000..d476d508f
--- /dev/null
+++ b/sepolicy/vendor/hwservice_contexts
@@ -0,0 +1,16 @@
+com.fingerprints.extension::IFingerprintEngineering u:object_r:hal_fingerprint_hwservice:s0
+com.fingerprints.extension::IFingerprintSensorTest u:object_r:hal_fingerprint_hwservice:s0
+com.fingerprints.extension::IFingerprintNavigation u:object_r:hal_fingerprint_hwservice:s0
+com.fingerprints.extension::IFingerprintCalibration u:object_r:hal_fingerprint_hwservice:s0
+com.fingerprints.extension::IFingerprintSenseTouch u:object_r:hal_fingerprint_hwservice:s0
+vendor.goodix.hardware.fingerprintextension::IGoodixBiometricsFingerprint u:object_r:hal_fingerprint_hwservice:s0
+vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0
+vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemonExt u:object_r:hal_fingerprint_hwservice:s0
+vendor.synaptics.fingerprints.interfaces.extensions::ISensorTest u:object_r:hal_fingerprint_hwservice:s0
+vendor.synaptics.fingerprints.interfaces.extensions::INavigation u:object_r:hal_fingerprint_hwservice:s0
+vendor.synaptics.fingerprints.interfaces.extensions::IFpCollection u:object_r:hal_fingerprint_hwservice:s0
+vendor.xiaomi.hardware.fingerprintextension::IXiaomiFingerprint u:object_r:hal_fingerprint_hwservice:s0
+
+vendor.xiaomi.hardware.displayfeature::IDisplayFeature u:object_r:hal_displayfeature_hwservice:s0
+
+vendor.xiaomi.hardware.mlipay::IMlipayService u:object_r:hal_mlipay_hwservice:s0
diff --git a/sepolicy/vendor/lhd.te b/sepolicy/vendor/lhd.te
new file mode 100644
index 000000000..f12506ff6
--- /dev/null
+++ b/sepolicy/vendor/lhd.te
@@ -0,0 +1,14 @@
+type lhd, domain;
+type lhd_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(lhd)
+net_domain(lhd)
+
+allow lhd gps_data_file:dir create_dir_perms;
+allow lhd gps_data_file:fifo_file create_file_perms;
+allow lhd gps_data_file:file create_file_perms;
+
+allow lhd gps_device:chr_file rw_file_perms;
+allow lhd sysfs_gps:file rw_file_perms;
+
+wakelock_use(lhd)
diff --git a/sepolicy/vendor/mm-pp-daemon.te b/sepolicy/vendor/mm-pp-daemon.te
new file mode 100644
index 000000000..733fe6edd
--- /dev/null
+++ b/sepolicy/vendor/mm-pp-daemon.te
@@ -0,0 +1 @@
+get_prop(mm-pp-daemon, vendor_dpps_prop)
diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te
new file mode 100644
index 000000000..c8079750d
--- /dev/null
+++ b/sepolicy/vendor/property.te
@@ -0,0 +1,6 @@
+type thermal_engine_prop, property_type;
+
+type vendor_displayfeature_prop, property_type;
+type vendor_dpps_prop, property_type;
+
+type vendor_fp_prop, property_type;
diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts
new file mode 100644
index 000000000..7cf562de6
--- /dev/null
+++ b/sepolicy/vendor/property_contexts
@@ -0,0 +1,39 @@
+# Camera
+camera. u:object_r:camera_prop:s0
+persist.camera. u:object_r:camera_prop:s0
+persist.vendor.camera. u:object_r:camera_prop:s0
+vendor.camera. u:object_r:camera_prop:s0
+vidhance. u:object_r:camera_prop:s0
+
+# Display feature
+init.svc.displayfeature-hal-1-0 u:object_r:vendor_displayfeature_prop:s0
+persist.vendor.df.extcolor.proc u:object_r:vendor_displayfeature_prop:s0
+persist.vendor.max.brightness u:object_r:vendor_displayfeature_prop:s0
+ro.displayfeature.histogram.enable u:object_r:vendor_displayfeature_prop:s0
+ro.eyecare.brightness.threshold u:object_r:vendor_displayfeature_prop:s0
+ro.eyecare.brightness.level u:object_r:vendor_displayfeature_prop:s0
+ro.hist.brightness.threshold u:object_r:vendor_displayfeature_prop:s0
+ro.resolution_switch.enabled u:object_r:vendor_displayfeature_prop:s0
+ro.vendor.df.effect.conflict u:object_r:vendor_displayfeature_prop:s0
+ro.whitepoint_calibration_enable u:object_r:vendor_displayfeature_prop:s0
+sys.displayfeature.entry.enable u:object_r:vendor_displayfeature_prop:s0
+sys.displayfeature.hbm.enable u:object_r:vendor_displayfeature_prop:s0
+
+# Display post processing
+init.svc.ppd u:object_r:vendor_dpps_prop:s0
+ro.vendor.display.ad u:object_r:vendor_dpps_prop:s0
+ro.vendor.display.ad.sdr_calib_data u:object_r:vendor_dpps_prop:s0
+ro.vendor.display.ad.hdr_calib_data u:object_r:vendor_dpps_prop:s0
+ro.vendor.display.sensortype u:object_r:vendor_dpps_prop:s0
+
+# Fingerprint
+persist.vendor.sys.fp. u:object_r:vendor_fp_prop:s0
+ro.boot.fpsensor u:object_r:vendor_fp_prop:s0
+ro.hardware.fp u:object_r:vendor_fp_prop:s0
+vendor.fps_hal. u:object_r:vendor_fp_prop:s0
+
+# Mlipay
+persist.vendor.sys.pay.ifaa u:object_r:vendor_tee_listener_prop:s0
+
+# Thermal
+sys.thermal. u:object_r:thermal_engine_prop:s0
diff --git a/sepolicy/vendor/remosaic_daemon.te b/sepolicy/vendor/remosaic_daemon.te
new file mode 100644
index 000000000..b70df91b3
--- /dev/null
+++ b/sepolicy/vendor/remosaic_daemon.te
@@ -0,0 +1,8 @@
+type remosaic_daemon, domain;
+type remosaic_daemon_exec, exec_type, vendor_file_type, file_type;
+
+init_daemon_domain(remosaic_daemon)
+
+vndbinder_use(remosaic_daemon)
+
+allow remosaic_daemon remosaic_daemon_service:service_manager add;
diff --git a/sepolicy/vendor/sensors.te b/sepolicy/vendor/sensors.te
new file mode 100644
index 000000000..f406084eb
--- /dev/null
+++ b/sepolicy/vendor/sensors.te
@@ -0,0 +1 @@
+allow sensors proc_tp:file r_file_perms;
diff --git a/sepolicy/vendor/system_server.te b/sepolicy/vendor/system_server.te
new file mode 100644
index 000000000..e975d9e66
--- /dev/null
+++ b/sepolicy/vendor/system_server.te
@@ -0,0 +1 @@
+binder_call(system_server, glgps)
diff --git a/sepolicy/vendor/tee.te b/sepolicy/vendor/tee.te
new file mode 100644
index 000000000..84237157a
--- /dev/null
+++ b/sepolicy/vendor/tee.te
@@ -0,0 +1,2 @@
+allow tee fingerprint_data_file:dir create_dir_perms;
+allow tee fingerprint_data_file:file create_file_perms;
diff --git a/sepolicy/vendor/thermal-engine.te b/sepolicy/vendor/thermal-engine.te
new file mode 100644
index 000000000..55bc48e8b
--- /dev/null
+++ b/sepolicy/vendor/thermal-engine.te
@@ -0,0 +1,3 @@
+allow thermal-engine thermal_data_file:dir rw_dir_perms;
+allow thermal-engine thermal_data_file:file create_file_perms;
+set_prop(thermal-engine, thermal_engine_prop)
diff --git a/sepolicy/vendor/vndservice.te b/sepolicy/vendor/vndservice.te
new file mode 100644
index 000000000..b6d04631b
--- /dev/null
+++ b/sepolicy/vendor/vndservice.te
@@ -0,0 +1 @@
+type remosaic_daemon_service, vndservice_manager_type;
diff --git a/sepolicy/vendor/vndservice_contexts b/sepolicy/vendor/vndservice_contexts
new file mode 100644
index 000000000..2110b4cd0
--- /dev/null
+++ b/sepolicy/vendor/vndservice_contexts
@@ -0,0 +1 @@
+android.IRemosaicDaemon u:object_r:remosaic_daemon_service:s0
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
old mode 100755
new mode 100644
index 251e384d1..162b5a690
--- a/setup-makefiles.sh
+++ b/setup-makefiles.sh
@@ -1,22 +1,21 @@
#!/bin/bash
#
# Copyright (C) 2018-2019 The LineageOS Project
-# Copyright (C) 2019 The XenonHD Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
-INITIAL_COPYRIGHT_YEAR=2019
+INITIAL_COPYRIGHT_YEAR=2018
# Load extract_utils and do some sanity checks
MY_DIR="${BASH_SOURCE%/*}"
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
-XENONHD_ROOT="${MY_DIR}/../../.."
+LINEAGE_ROOT="${MY_DIR}/../../.."
-HELPER="${XENONHD_ROOT}/vendor/xenonhd/build/tools/extract_utils.sh"
+HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
if [ ! -f "${HELPER}" ]; then
echo "Unable to find helper script at ${HELPER}"
exit 1
@@ -24,10 +23,10 @@ fi
source "${HELPER}"
# Initialize the helper for common
-setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${XENONHD_ROOT}" true
+setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true
# Copyright headers and guards
-write_headers "grus sirius"
+write_headers "sirius"
# The standard common blobs
write_makefiles "${MY_DIR}/proprietary-files.txt" true
@@ -38,7 +37,7 @@ write_footers
if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
# Reinitialize the helper for device
INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
- setup_vendor "${DEVICE}" "${VENDOR}" "${XENONHD_ROOT}" false
+ setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false
# Copyright headers and guards
write_headers
diff --git a/soong/Android.bp b/soong/Android.bp
deleted file mode 100644
index 4408cd845..000000000
--- a/soong/Android.bp
+++ /dev/null
@@ -1,16 +0,0 @@
-bootstrap_go_package {
- name: "soong-fod-hal-binary",
- pkgPath: "device/xiaomi/sdm710-common",
- deps: [
- "blueprint",
- "blueprint-pathtools",
- "soong",
- "soong-android",
- "soong-cc",
- "soong-genrule",
- ],
- srcs: [
- "fod.go",
- ],
- pluginFor: ["soong_build"],
-}
diff --git a/soong/fod.go b/soong/fod.go
deleted file mode 100644
index 7a5e5f526..000000000
--- a/soong/fod.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package fod
-
-import (
- "android/soong/android"
- "android/soong/cc"
- "strings"
-)
-
-func deviceFlags(ctx android.BaseContext) []string {
- var cflags []string
-
- var config = ctx.AConfig().VendorConfig("XIAOMI_SDM710_FOD")
- var posX = strings.TrimSpace(config.String("POS_X"))
- var posY = strings.TrimSpace(config.String("POS_Y"))
- var size = strings.TrimSpace(config.String("SIZE"))
-
- cflags = append(cflags, "-DFOD_POS_X=" + posX, "-DFOD_POS_Y=" + posY, "-DFOD_SIZE=" + size)
- return cflags
-}
-
-func fodHalBinary(ctx android.LoadHookContext) {
- type props struct {
- Target struct {
- Android struct {
- Cflags []string
- }
- }
- }
-
- p := &props{}
- p.Target.Android.Cflags = deviceFlags(ctx)
- ctx.AppendProperties(p)
-}
-
-func fodHalBinaryFactory() android.Module {
- module, _ := cc.NewBinary(android.HostAndDeviceSupported)
- newMod := module.Init()
- android.AddLoadHook(newMod, fodHalBinary)
- return newMod
-}
-
-func init() {
- android.RegisterModuleType("xiaomi_sdm710_fod_hal_binary", fodHalBinaryFactory)
-}
diff --git a/xenonhd.dependencies b/xenonhd.dependencies
deleted file mode 100644
index 7de07c5c6..000000000
--- a/xenonhd.dependencies
+++ /dev/null
@@ -1,11 +0,0 @@
-[
- {
- "repository": "grus-dev/android_kernel_xiaomi_sdm710",
- "target_path": "kernel/xiaomi/sdm710",
- "revision": "pie"
- },
- {
- "repository": "grus-dev/proprietary_vendor_xiaomi_sdm710-common",
- "target_path": "vendor/xiaomi/sdm710-common"
- }
-]