Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable/cm 13.0 znh5 y #4

Open
wants to merge 7 commits into
base: cm-14.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ BOARD_CHARGER_ENABLE_SUSPEND := true
BOARD_HARDWARE_CLASS += \
hardware/cyanogen/cmhw \
$(DEVICE_PATH)/cmhw
BOARD_USES_CYANOGEN_HARDWARE := true
TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable"

# CNE and DPM
Expand Down
3 changes: 0 additions & 3 deletions cm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ $(call inherit-product, device/xiaomi/gemini/device.mk)
# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

# Enhanced NFC
$(call inherit-product, vendor/cm/config/nfc_enhanced.mk)

# Device identifier. This must come after all inclusions.
PRODUCT_NAME := cm_gemini
PRODUCT_DEVICE := gemini
Expand Down
5 changes: 5 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ PRODUCT_PACKAGES += \
init.qcom.rc \
init.qcom.power.rc \
init.qcom.usb.rc \
init.qcom.usb.diag.rc \
init.target.rc \
ueventd.qcom.rc \
init.qcom.sh
Expand Down Expand Up @@ -206,6 +207,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
lights.msm8996

# LiveDisplay native
PRODUCT_PACKAGES += \
libjni_livedisplay

# Media
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \
Expand Down
2 changes: 1 addition & 1 deletion overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
64 - Volume rocker
For example, a device with Home, Back and Menu keys would set this
config to 7. -->
<integer name="config_deviceHardwareWakeKeys">65</integer>
<integer name="config_deviceHardwareWakeKeys">64</integer>

<!-- Control the behavior when the user long presses the home button.
0 - Nothing
Expand Down
8 changes: 8 additions & 0 deletions rootdir/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ LOCAL_SRC_FILES := init.qcom.usb.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.diag.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := init.qcom.usb.diag.rc
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE := init.target.rc
LOCAL_MODULE_TAGS := optional eng
Expand Down
2 changes: 1 addition & 1 deletion rootdir/init.qcom.power.rc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ on enable-low-power
write /sys/module/msm_thermal/core_control/enabled 1
write /sys/devices/soc/soc:qcom,bcl/mode "disable"
write /sys/devices/soc/soc:qcom,bcl/hotplug_mask 12
write /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask 15
write /sys/devices/soc/soc:qcom,bcl/hotplug_soc_mask 8
write /sys/devices/soc/soc:qcom,bcl/mode "enable"

# Input boost config
Expand Down
1 change: 1 addition & 0 deletions rootdir/init.qcom.rc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import init.qcom.power.rc
import init.qcom.usb.rc
import init.qcom.usb.diag.rc
import init.target.rc

on init
Expand Down
88 changes: 88 additions & 0 deletions rootdir/init.qcom.usb.diag.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Copyright (c) 2011-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.
#

# USB diag compositions
on property:sys.usb.config=rndis,diag
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 902C
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 ${sys.usb.config}

on property:sys.usb.config=rndis,diag,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 902D
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 ${sys.usb.config}

on property:sys.usb.config=diag
write /sys/class/android_usb/android0/enable 0
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,adb
write /sys/class/android_usb/android0/enable 0
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,serial_cdev,serial_tty,rmnet_ipa,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 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_cdev,serial_tty,rmnet_ipa,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 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}
79 changes: 8 additions & 71 deletions rootdir/init.qcom.usb.rc
Original file line number Diff line number Diff line change
Expand Up @@ -28,65 +28,21 @@
on init
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}

on fs
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/f_ffs/aliases adb

write /sys/class/android_usb/f_mass_storage/lun/nofua 1

write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports "BAM2BAM_IPA"
write /sys/module/g_android/parameters/mtp_tx_req_len 131072
write /sys/module/g_android/parameters/mtp_rx_req_len 131072

# 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.tethering=true
write /sys/class/net/rndis0/queues/rx-0/rps_cpus 0
Expand All @@ -97,7 +53,7 @@ on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/idProduct ff80
write /sys/class/android_usb/android0/functions rndis
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state rndis
setprop sys.usb.state ${sys.usb.config}

on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
Expand All @@ -106,26 +62,7 @@ on property:sys.usb.config=rndis,adb
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,serial_smd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 90B3
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
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 90B4
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
setprop sys.usb.state ${sys.usb.config}

on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/enable 0
Expand All @@ -147,15 +84,15 @@ on property:sys.usb.config=ptp,adb
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 2717
write /sys/class/android_usb/android0/idProduct ff60
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
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 2717
write /sys/class/android_usb/android0/idProduct ff68
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
Expand Down
5 changes: 1 addition & 4 deletions system_prop.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ PRODUCT_PROPERTY_OVERRIDES += \

# Perf
PRODUCT_PROPERTY_OVERRIDES += \
ro.am.reschedule_service=true \
ro.min_freq_0=307200 \
ro.min_freq_4=307200 \
ro.sys.fw.bg_apps_limit=60 \
Expand Down Expand Up @@ -165,10 +166,6 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.data.df.iwlan_mux=9 \
persist.data.df.dev_name=rmnet_usb0

# Storage
PRODUCT_PROPERTY_OVERRIDES += \
ro.sdcardfs.enable=true

# TimeService
PRODUCT_PROPERTY_OVERRIDES += \
persist.timed.enable=true
Expand Down