diff --git a/AndroidBoard.mk b/AndroidBoard.mk index 4f2703f..98dae25 100644 --- a/AndroidBoard.mk +++ b/AndroidBoard.mk @@ -2,7 +2,5 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET) - # include the non-open-source counterpart to this file --include vendor/lg/w7ds/AndroidBoardVendor.mk +-include vendor/lge/w7/AndroidBoardVendor.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index b0bc03f..6fd1643 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -1,2 +1,2 @@ PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/device_w7ds.mk + $(LOCAL_DIR)/full_w7.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index 6d81976..4737c2b 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -1,37 +1,156 @@ -USE_CAMERA_STUB := true +# +# Copyright (C) 2014 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. -# inherit from the proprietary version --include vendor/lg/w7ds/BoardConfigVendor.mk +# +# This file sets variables that control the way modules are built +# thorughout the system. It should not be used to conditionally +# disable makefiles (the proper mechanism to control what gets +# included in a build is to use PRODUCT_PACKAGES in a product +# definition file). +# -TARGET_ARCH := arm +USE_CAMERA_STUB := false TARGET_NO_BOOTLOADER := true +TARGET_SPECIFIC_HEADER_PATH += device/lge/w7/include + +# Vendor Init +TARGET_UNIFIED_DEVICE := true +TARGET_INIT_VENDOR_LIB := libinit_msm +TARGET_LIBINIT_DEFINES_FILE := device/lge/w7/init/init_w7.c + +# Platform +TARGET_ARCH := arm TARGET_BOARD_PLATFORM_GPU := qcom-adreno305 TARGET_BOARD_PLATFORM := msm8226 -TARGET_BOOTLOADER_BOARD_NAME := MSM8226 TARGET_CPU_VARIANT := krait TARGET_USE_KINGFISHER_OPTIMIZATION := true TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_ABI2 := armeabi TARGET_ARCH_VARIANT := armv7-a-neon ARCH_ARM_HAVE_TLS_REGISTER := true +TARGET_BOOTLOADER_BOARD_NAME := w7 -TARGET_BOOTLOADER_BOARD_NAME := w7ds - +# Kernel image +BOARD_KERNEL_SEPARATED_DT := true +BOARD_CUSTOM_BOOTIMG_MK := device/lge/w7/mkbootimg.mk +TARGET_KERNEL_SOURCE := kernel/lge/msm8226 +TARGET_KERNEL_CONFIG := cm11_msm8226_defconfig BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 msm_rtb.filter=0x37 androidboot.hardware=w7ds BOARD_KERNEL_BASE := 0x00000000 BOARD_KERNEL_PAGESIZE := 2048 +BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x01000000 --tags_offset 0x00000100 + +# Global flags +COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DLG_CAMERA_HARDWARE + +# QCOM BSP +TARGET_USES_QCOM_BSP := true +COMMON_GLOBAL_CFLAGS += -DQCOM_BSP + +# Audio +AUDIO_FEATURE_DISABLED_FM := false +AUDIO_FEATURE_DISABLED_SSR := true +BOARD_HAVE_QCOM_FM := true +AUDIO_FEATURE_DISABLED_ANC_HEADSET := true +AUDIO_FEATURE_DISABLED_DS1_DOLBY_DDP := true +BOARD_USES_ALSA_AUDIO := true +BOARD_USES_FLUENCE_INCALL := true +BOARD_USES_SEPERATED_AUDIO_INPUT := true +BOARD_USES_SEPERATED_VOICE_SPEAKER := true +TARGET_QCOM_AUDIO_VARIANT := caf +TARGET_USES_QCOM_COMPRESSED_AUDIO := true +TARGET_QCOM_MEDIA_VARIANT := caf-new + +# GPS +TARGET_NO_RPC := true + +# Graphics +BOARD_EGL_CFG := device/lge/w7/prebuilt/egl.cfg +TARGET_DISPLAY_USE_RETIRE_FENCE := true +TARGET_QCOM_DISPLAY_VARIANT := caf-new +USE_OPENGL_RENDERER := true +TARGET_USES_C2D_COMPOSITION := true +TARGET_USES_ION := true +NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 +OVERRIDE_RS_DRIVER := libRSDriver_adreno.so + +# Use qcom power hal +TARGET_POWERHAL_VARIANT := qcom +TARGET_USES_CPU_BOOST_HINT := true + +TARGET_HW_DISK_ENCRYPTION := true + +# Hardware tunables framework +BOARD_HARDWARE_CLASS := device/lge/w7/cmhw/ + +# Bluetooth +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/lge/w7/bluetooth +BOARD_HAVE_BLUETOOTH := true +BOARD_HAVE_BLUETOOTH_QCOM := true +BLUETOOTH_HCI_USE_MCT := true -# fix this up by examining /proc/mtd on a running device -BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000 -BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000 -BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000 +# Wifi +BOARD_HAS_QCOM_WLAN := true +BOARD_WLAN_DEVICE := qcwcn +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) +BOARD_HOSTAPD_DRIVER := NL80211 +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) +TARGET_USES_WCNSS_CTRL := true +TARGET_USES_QCOM_WCNSS_QMI := true +WIFI_DRIVER_FW_PATH_STA := "sta" +WIFI_DRIVER_FW_PATH_AP := "ap" + +# Enable WEBGL in WebKit +ENABLE_WEBGL := true +TARGET_FORCE_CPU_UPLOAD := true + +# QCOM hardware +BOARD_USES_QCOM_HARDWARE := true + +# QCOM enhanced A/V +TARGET_ENABLE_QC_AV_ENHANCEMENTS := true + +# Camera +USE_DEVICE_SPECIFIC_CAMERA := true +TARGET_DISPLAY_INSECURE_MM_HEAP := true + +# Number of supplementary service groups allowed by init +TARGET_NR_SVC_SUPP_GIDS := 28 +TARGET_BOOTANIMATION_PRELOAD := true +TARGET_BOOTANIMATION_TEXTURE_CACHE := false + +# Time services +BOARD_USES_QC_TIME_SERVICES := true + +# Storage +BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true +BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS := true +BOARD_VOLD_MAX_PARTITIONS := 40 +TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file +BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00D00000 +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00D00000 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1560281088 BOARD_FLASH_BLOCK_SIZE := 131072 +BOARD_HAS_LARGE_FILESYSTEM := true # TWRP Recovery BOARD_HAS_NO_SELECT_BUTTON := true -TARGET_RECOVERY_FSTAB := device/lg/w7ds/recovery.fstab +TARGET_RECOVERY_FSTAB := device/lge/w7/recovery.fstab RECOVERY_FSTAB_VERSION := 2 TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" DEVICE_RESOLUTION := 540x960 @@ -40,9 +159,73 @@ TW_EXTERNAL_STORAGE_PATH := "/sdcard" TW_EXTERNAL_STORAGE_MOUNT_POINT := "sdcard" TW_DEFAULT_EXTERNAL_STORAGE := true TW_FLASH_FROM_STORAGE := true -TW_ALWAYS_RMRF := true +BOARD_UMS_LUNFILE := /sys/devices/platform/msm_hsusb/gadget/lun0/file +TW_INTERNAL_STORAGE_PATH := "/data/media" +TW_INTERNAL_STORAGE_MOUNT_POINT := "data" TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_USE_F2FS := true +BOARD_HAS_NO_SELECT_BUTTON := true +BOARD_RECOVERY_SWIPE := true +BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\" +BOARD_SUPPRESS_EMMC_WIPE := true +RECOVERY_GRAPHICS_USE_LINELENGTH := true +RECOVERY_SDCARD_ON_DATA := true +HAVE_SELINUX := true +BOARD_HAS_NO_MISC_PARTITION := true +TARGET_RECOVERY_QCOM_RTC_FIX := true -TARGET_PREBUILT_KERNEL := device/lg/w7ds/kernel +# Nfc +BOARD_NFC_HAL_SUFFIX := w7 +BOARD_NFC_CHIPSET := pn547 + +# SELinux +BOARD_SEPOLICY_DIRS += \ + device/lge/w7/sepolicy + +BOARD_SEPOLICY_UNION += \ + adbd.te \ + app.te \ + bluetooth_loader.te \ + bridge.te \ + camera.te \ + device.te \ + dhcp.te \ + dnsmasq.te \ + domain.te \ + drmserver.te \ + file_contexts \ + file.te \ + hostapd.te \ + init_shell.te \ + init.te \ + libqc-opt.te \ + mediaserver.te \ + mpdecision.te \ + netd.te \ + netmgrd.te \ + nfc.te \ + property_contexts \ + property.te \ + qcom.te \ + qmux.te \ + radio.te \ + rild.te \ + rmt.te \ + sdcard_internal.te \ + sdcardd.te \ + sensors.te \ + shell.te \ + surfaceflinger.te \ + system.te \ + tee.te \ + te_macros \ + thermald.te \ + ueventd.te \ + vold.te \ + wpa_supplicant.te \ + zygote.te + +ifneq ($(TARGET_BUILD_VARIANT),user) + BOARD_SEPOLICY_UNION += su.te +endif -BOARD_HAS_NO_SELECT_BUTTON := true diff --git a/README b/README deleted file mode 100644 index 855c0a0..0000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -./mkbootimg --kernel zImage --dt devtree --ramdisk ramdisk-recovery.img --cmdline "console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 msm_rtb.filter=0x37 androidboot.hardware=w7ds" --base 0x00000000 --ramdisk_offset 0x01000000 -o new_recovery.img diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h new file mode 100644 index 0000000..3906a37 --- /dev/null +++ b/bluetooth/bdroid_buildcfg.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2012 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BDROID_BUILDCFG_H +#define _BDROID_BUILDCFG_H + +#define BTM_DEF_LOCAL_NAME "LG L90" +#define BTA_DISABLE_DELAY 1000 /* in milliseconds */ +#define BLUETOOTH_QCOM_SW TRUE +#define BLUETOOTH_QCOM_LE_INTL_SCAN TRUE +#define BTC_INCLUDED TRUE +#endif diff --git a/cm.dependencies b/cm.dependencies new file mode 100644 index 0000000..e2caa76 --- /dev/null +++ b/cm.dependencies @@ -0,0 +1,18 @@ +[ + { + "repository": "android_device_qcom_common", + "target_path": "device/qcom/common" + }, + { + "repository": "android_hardware_qcom_fm", + "target_path": "hardware/qcom/fm" + }, + { + "repository": "android_hardware_qcom_display-caf-new", + "target_path": "hardware/qcom/display-caf-new" + }, + { + "repository": "android_hardware_qcom_media-caf-new", + "target_path": "hardware/qcom/media-caf-new" + } +] diff --git a/cm.mk b/cm.mk index 038726b..cf3d1bf 100644 --- a/cm.mk +++ b/cm.mk @@ -1,18 +1,12 @@ -## Specify phone tech before including full_phone -$(call inherit-product, vendor/cm/config/gsm.mk) - -# Release name -PRODUCT_RELEASE_NAME := w7ds - # Inherit some common CM stuff. $(call inherit-product, vendor/cm/config/common_full_phone.mk) -# Inherit device configuration -$(call inherit-product, device/lg/w7ds/device_w7ds.mk) +# Boot animation +TARGET_SCREEN_WIDTH := 540 +TARGET_SCREEN_HEIGHT := 960 + +# Release name +PRODUCT_RELEASE_NAME := LG L90 +PRODUCT_NAME := cm_w7 -## Device identifier. This must come after all inclusions -PRODUCT_DEVICE := w7ds -PRODUCT_NAME := cm_w7ds -PRODUCT_BRAND := lg -PRODUCT_MODEL := w7ds -PRODUCT_MANUFACTURER := lg +$(call inherit-product, device/lge/w7/full_w7.mk) diff --git a/cmhw/org/cyanogenmod/hardware/DisplayColorCalibration.java b/cmhw/org/cyanogenmod/hardware/DisplayColorCalibration.java new file mode 100644 index 0000000..722d46a --- /dev/null +++ b/cmhw/org/cyanogenmod/hardware/DisplayColorCalibration.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2013 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cyanogenmod.hardware; + +import org.cyanogenmod.hardware.util.FileUtils; + +public class DisplayColorCalibration { + private static final String COLOR_FILE = "/sys/devices/platform/kcal_ctrl.0/kcal"; + private static final String COLOR_FILE_CTRL = "/sys/devices/platform/kcal_ctrl.0/kcal_ctrl"; + + public static boolean isSupported() { + return true; + } + + public static int getMaxValue() { + return 255; + } + public static int getDefValue() { + return getMaxValue(); + } + public static int getMinValue() { + return 0; + } + public static String getCurColors() { + return FileUtils.readOneLine(COLOR_FILE); + } + public static boolean setColors(String colors) { + if (!FileUtils.writeLine(COLOR_FILE, colors)) { + return false; + } + return FileUtils.writeLine(COLOR_FILE_CTRL, "1"); + } +} diff --git a/cmhw/org/cyanogenmod/hardware/TapToWake.java b/cmhw/org/cyanogenmod/hardware/TapToWake.java new file mode 100644 index 0000000..3a3bfe9 --- /dev/null +++ b/cmhw/org/cyanogenmod/hardware/TapToWake.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2014 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cyanogenmod.hardware; + +import org.cyanogenmod.hardware.util.FileUtils; + +public class TapToWake { + + private static String CONTROL_PATH = "/sys/devices/virtual/input/lge_touch/touch_gesture"; + private static boolean mEnabled = true; + + public static boolean isSupported() { + return true; + } + + public static boolean isEnabled() { + return mEnabled; + } + + public static boolean setEnabled(boolean state) { + mEnabled = state; + return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0")); + } +} diff --git a/cmhw/org/cyanogenmod/hardware/VibratorHW.java_disabled b/cmhw/org/cyanogenmod/hardware/VibratorHW.java_disabled new file mode 100644 index 0000000..e27dcac --- /dev/null +++ b/cmhw/org/cyanogenmod/hardware/VibratorHW.java_disabled @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2013 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cyanogenmod.hardware; + +import org.cyanogenmod.hardware.util.FileUtils; + +public class VibratorHW { + + private static String NFORCE_PATH = "/sys/devices/platform/tspdrv/nforce_timed"; + + public static boolean isSupported() { + return true; + } + + public static int getMaxIntensity() { + return 127; + } + public static int getMinIntensity() { + return 1; + } + public static int getWarningThreshold() { + return 90; + } + public static int getCurIntensity() { + return Integer.parseInt(FileUtils.readOneLine(NFORCE_PATH)); + } + public static int getDefaultIntensity() { + return 65; + } + public static boolean setIntensity(int intensity) { + return FileUtils.writeLine(NFORCE_PATH, String.valueOf(intensity)); + } +} diff --git a/device_w7.mk b/device_w7.mk new file mode 100644 index 0000000..8b65c01 --- /dev/null +++ b/device_w7.mk @@ -0,0 +1,386 @@ +# +# Copyright (C) 2013 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk) + +$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) + +# Specific overlay +DEVICE_PACKAGE_OVERLAYS += device/lge/w7/overlay + +# Permissions +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ + frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \ + frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ + frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ + frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ + frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ + frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ + frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ + frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ + frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ + frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:system/etc/permissions/android.hardware.sensor.stepcounter.xml \ + frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:system/etc/permissions/android.hardware.sensor.stepdetector.xml \ + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ + frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ + frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ + frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ + frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ + frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ + frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ + frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \ + frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ + frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ + frameworks/native/data/etc/android.hardware.nfc.hce.xml:system/etc/permissions/android.hardware.nfc.hce.xml \ + frameworks/native/data/etc/com.android.nfc_extras.xml:system/etc/permissions/com.android.nfc_extras.xml + +# Configs +PRODUCT_COPY_FILES += \ + device/lge/w7/prebuilt/etc/wifi/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \ + device/lge/w7/prebuilt/etc/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \ + kernel/lge/msm8226/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \ + kernel/lge/msm8226/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini \ + kernel/lge/msm8226/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/wifi/WCNSS_qcom_wlan_nv.bin \ + device/lge/w7/prebuilt/etc/hostapd/hostapd.accept:system/etc/hostapd/hostapd.accept \ + device/lge/w7/prebuilt/etc/hostapd/hostapd.deny:system/etc/hostapd/hostapd.deny \ + device/lge/w7/prebuilt/etc/hostapd/hostapd_default.conf:system/etc/hostapd/hostapd_default.conf \ + device/lge/w7/prebuilt/etc/audio_policy.conf:system/etc/audio_policy.conf \ + device/lge/w7/prebuilt/etc/audio_effects.conf:system/etc/audio_effects.conf \ + device/lge/w7/prebuilt/etc/media_codecs.xml:system/etc/media_codecs.xml \ + device/lge/w7/prebuilt/etc/media_profiles.xml:system/etc/media_profiles.xml \ + device/lge/w7/prebuilt/etc/mixer_paths.xml:system/etc/mixer_paths.xml \ + device/lge/w7/prebuilt/etc/thermal-engine-8226.conf:system/etc/thermal-engine-8226.conf \ + device/lge/w7/prebuilt/usr/idc/touch_dev.idc:system/usr/idc/touch_dev.idc \ + device/lge/w7/prebuilt/usr/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ + device/lge/w7/prebuilt/etc/init.zetaw.fm.sh:system/etc/init.zetaw.fm.sh \ + device/lge/w7/prebuilt/etc/init.zetaw.ssr.wifi.sh:system/etc/init.zetaw.ssr.wifi.sh \ + device/lge/w7/prebuilt/etc/init.zetaw.wifi.sh:system/etc/init.zetaw.wifi.sh \ + device/lge/w7/prebuilt/etc/init.crda.sh:system/etc/init.crda.sh \ + device/lge/w7/prebuilt/etc/init.zetaw.post_boot.sh:system/etc/init.zetaw.post_boot.sh \ + device/lge/w7/prebuilt/etc/sap.conf:system/etc/sap.conf \ + device/lge/w7/prebuilt/etc/gps.conf:system/etc/gps.conf \ + device/lge/w7/prebuilt/etc/msap.conf:system/etc/msap.conf \ + device/lge/w7/prebuilt/etc/clatd.conf:system/etc/clatd.conf \ + device/lge/w7/prebuilt/etc/sec_config:system/etc/sec_config \ + device/lge/w7/prebuilt/etc/izat.conf:system/etc/izat.conf \ + device/lge/w7/prebuilt/etc/boot_fixup:system/etc/boot_fixup \ + device/lge/w7/prebuilt/etc/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \ + device/lge/w7/prebuilt/etc/nfc-nci.conf:system/etc/nfc-nci.conf \ + device/lge/w7/prebuilt/etc/libnfc-nxp.conf:system/etc/libnfc-nxp.conf \ + device/lge/w7/prebuilt/etc/nfcee_access.xml:system/etc/nfcee_access.xml \ + device/lge/w7/prebuilt/etc/quipc.conf:system/etc/quipc.conf \ + device/lge/w7/prebuilt/etc/init.d/10nfc_checker:system/etc/init.d/10nfc_checker + +# Ramdisk +PRODUCT_COPY_FILES += \ + device/lge/w7/rootdir/fstab.w7ds:root/fstab.w7ds \ + device/lge/w7/rootdir/fstab_f2fs.w7ds:root/fstab_f2fs.w7ds \ + device/lge/w7/rootdir/init.class_main.sh:root/init.class_main.sh \ + device/lge/w7/rootdir/init.lge.early.rc:root/init.lge.early.rc \ + device/lge/w7/rootdir/init.lge.log.rc:root/init.lge.log.rc \ + device/lge/w7/rootdir/init.lge.rc:root/init.lge.rc \ + device/lge/w7/rootdir/init.mdm.sh:root/init.mdm.sh \ + device/lge/w7/rootdir/init.usb.rc:root/init.usb.rc \ + device/lge/w7/rootdir/init.w7ds.rc:root/init.w7ds.rc \ + device/lge/w7/rootdir/init.w7ds.usb.rc:root/init.w7ds.usb.rc \ + device/lge/w7/rootdir/init.w7ds_product.rc:root/init.w7ds_product.rc \ + device/lge/w7/rootdir/init.zetaw.bt_vendor.rc:root/init.zetaw.bt_vendor.rc \ + device/lge/w7/rootdir/init.zetaw.class_core.sh:root/init.zetaw.class_core.sh \ + device/lge/w7/rootdir/init.zetaw.cmm.usb.sh:root/init.zetaw.cmm.usb.sh \ + device/lge/w7/rootdir/init.zetaw.early_boot.sh:root/init.zetaw.early_boot.sh \ + device/lge/w7/rootdir/init.zetaw.factory.sh:root/init.zetaw.factory.sh \ + device/lge/w7/rootdir/init.zetaw.rc:root/init.zetaw.rc \ + device/lge/w7/rootdir/init.zetaw.ril.sh:root/init.zetaw.ril.sh \ + device/lge/w7/rootdir/init.zetaw.sh:root/init.zetaw.sh \ + device/lge/w7/rootdir/init.zetaw.ssr.sh:root/init.zetaw.ssr.sh \ + device/lge/w7/rootdir/init.zetaw.syspart_fixup.sh:root/init.zetaw.syspart_fixup.sh \ + device/lge/w7/rootdir/init.zetaw.usb.rc:root/init.zetaw.usb.rc \ + device/lge/w7/rootdir/init.zetaw.usb.sh:root/init.zetaw.usb.sh \ + device/lge/w7/rootdir/ueventd.w7ds.rc:root/ueventd.w7ds.rc \ + device/lge/w7/rootdir/sbin/bbx:root/sbin/bbx \ + device/lge/w7/rootdir/fscheck.sh:root/fscheck.sh + +# TWRP +PRODUCT_COPY_FILES += \ + device/lge/w7/rootdir/twrp.fstab:recovery/root/etc/twrp.fstab + +# Audio +PRODUCT_PACKAGES += \ + audio_policy.msm8226 \ + audio.a2dp.default \ + audio.usb.default \ + audio.r_submix.default \ + libaudio-resampler \ + libaudioparameter \ + libqcomvisualizer \ + libqcompostprocbundle \ + libqcomvoiceprocessing \ + tinycap \ + tinymix \ + tinypcminfo \ + tinyplay \ + libalsa-intf \ + libaudio-resampler \ + libaudioutils \ + aplay \ + amix \ + arec \ + alsaucm_test + +# Misc +PRODUCT_PACKAGES += \ + curl \ + libbson \ + libcurl \ + tcpdump \ + Torch + +# Misc +PRODUCT_PACKAGES += \ + com.android.future.usb.accessory + +# Crda +PRODUCT_PACKAGES += \ + crda \ + linville.key.pub.pem \ + regdbdump \ + regulatory.bin + +# Qcom SoftAP +PRODUCT_PACKAGES += \ + libQWiFiSoftApCfg + +# Live Wallpapers +PRODUCT_PACKAGES += \ + LiveWallpapers \ + LiveWallpapersPicker \ + MagicSmokeWallpapers \ + HoloSpiralWallpaper \ + VisualizationWallpapers \ + librs_jni + +# Wifi +PRODUCT_PACKAGES += \ + p2p_supplicant_overlay.conf \ + wpa_supplicant_overlay.conf \ + libwcnss_qmi \ + +# Charger +PRODUCT_PACKAGES += charger charger_res_images + +# QRNGD +PRODUCT_PACKAGES += qrngd + +# Ebtables +PRODUCT_PACKAGES += \ + ebtables \ + ethertypes \ + libebtc + +# FM radio +PRODUCT_PACKAGES += \ + qcom.fmradio \ + libqcomfm_jni \ + FM2 \ + FMRecord + +# GPS +PRODUCT_PACKAGES += \ + gps.msm8226 + +# HAL +PRODUCT_PACKAGES += \ + copybit.msm8226\ + gralloc.msm8226 \ + hwcomposer.msm8226 \ + keystore.msm8226 \ + lights.msm8226 \ + memtrack.msm8226 \ + power.msm8226 + +# QRNG +PRODUCT_PACKAGES += qrngp + +# Utilities +PRODUCT_PACKAGES += \ + charge_only_mode \ + mkfs.f2fs \ + fsck.f2fs \ + fibmap.f2fs \ + wcnss_service + +# EGL config +PRODUCT_COPY_FILES += \ + device/lge/w7/prebuilt/egl.cfg:system/lib/egl/egl.cfg + +# Opengles version 3 +PRODUCT_PROPERTY_OVERRIDES += \ + ro.opengles.version=196608 + +# QCOM Display +PRODUCT_PROPERTY_OVERRIDES += \ + debug.egl.hw=1 \ + debug.sf.hw=1 \ + debug.composition.type=dyn \ + persist.hwc.mdpcomp.enable=true \ + debug.mdpcomp.logs=0 \ + debug.enabletr=0 + +# QCOM Display +PRODUCT_PACKAGES += \ + libgenlock \ + libmemalloc \ + liboverlay \ + libqdutils \ + libtilerenderer + +# Omx +PRODUCT_PACKAGES += \ + libdivxdrmdecrypt \ + libmm-omxcore \ + libOmxCore \ + libstagefrighthw \ + libOmxVdec \ + libOmxVenc \ + libOmxAacEnc \ + libOmxAmrEnc \ + libOmxEvrcEnc \ + libOmxQcelp13Enc \ + libdashplayer \ + qcmediaplayer + +# Filesystem management tools +PRODUCT_PACKAGES += \ + make_ext4fs \ + e2fsck \ + resize2fs \ + setup_fs + +#wifi +PRODUCT_PACKAGES += \ + hostapd.accept \ + hostapd.deny \ + hostapd_default.conf \ + libnetcmdiface + +# QCOM +PRODUCT_PROPERTY_OVERRIDES += \ + com.qc.hardware=true + +# Audio +PRODUCT_PROPERTY_OVERRIDES += \ + persist.audio.fluence.mode=endfire \ + persist.audio.vr.enable=false \ + persist.audio.handset.mic=digital \ + ro.qc.sdk.audio.ssr=false + +# Bluetooth +PRODUCT_PROPERTY_OVERRIDES += \ + ro.bluetooth.hfp.ver=1.6 \ + ro.qualcomm.bluetooth.sap=true \ + ro.qualcomm.bt.hci_transport=smd \ + ro.bluetooth.request.master=true \ + ro.bluetooth.remote.autoconnect=true + +# Media +PRODUCT_PROPERTY_OVERRIDES += \ + lpa.decode=true \ + qcom.hw.aac.encoder=true \ + af.resampler.quality=255 \ + persist.audio.lowlatency.rec=false + +# WiFi +PRODUCT_PROPERTY_OVERRIDES += \ + persist.sys.qc.sub.rstrtlvl=3 \ + persist.sys.qc.sub.rdump.on=1 \ + persist.sys.qc.sub.rdump.max=20 \ + wifi.interface=wlan0 \ + wifi.supplicant_scan_interval=15 + +# Media +PRODUCT_PROPERTY_OVERRIDES += \ + media.stagefright.enable-player=true \ + media.stagefright.enable-http=true \ + media.stagefright.enable-aac=true \ + media.stagefright.enable-qcp=true \ + media.stagefright.enable-fma2dp=true \ + media.stagefright.enable-scan=true \ + mmp.enable.3g2=true \ + ro.audio.fm_max_volume=4096 \ + ro.qualcomm.cabl=0 \ + use.voice.path.for.pcm.voip=true \ + qcom.bt.le_dev_pwr_class=1 \ + ro.qc.sdk.audio.ssr=false \ + persist.audio.fluence.voicecall=false \ + persist.audio.fluence.voicerec=false \ + ro.qc.sdk.audio.fluencetype=none \ + persist.audio.fluence.speaker=false \ + use.voice.path.for.pcm.voip=true \ + use.dedicated.device.for.voip=true \ + audio.offload.buffer.size.kb=32 \ + audio.offload.gapless.enabled=false \ + av.offload.enable=false \ + av.streaming.offload.enable=false \ + audio.offload.pcm.enable=false \ + mm.enable.smoothstreaming=true \ + qcom.hw.aac.encoder=true \ + persist.audio.calfile0=/etc/ACDB/Bluetooth_cal.acdb \ + persist.audio.calfile1=/etc/ACDB/General_cal.acdb \ + persist.audio.calfile2=/etc/ACDB/Global_cal.acdb \ + persist.audio.calfile3=/etc/ACDB/Handset_cal.acdb \ + persist.audio.calfile4=/etc/ACDB/Hdmi_cal.acdb \ + persist.audio.calfile5=/etc/ACDB/Headset_cal.acdb \ + persist.audio.calfile6=/etc/ACDB/Speaker_cal.acdb + +# Radio and Telephony +PRODUCT_PROPERTY_OVERRIDES += \ + ro.use_data_netmgrd=true \ + ro.ril.transmitpower=true \ + persist.radio.apm_sim_not_pwdn=1 \ + persist.radio.call_type=1 \ + ro.config.vc_call_vol_steps=7 \ + ro.modem.no_wdog_chk=1 + +# NFC packages +PRODUCT_PACKAGES += \ + NfcNci \ + Tag \ + nfc_nci.w7 \ + com.android.nfc_extras + +NFCEE_ACCESS_PATH := device/lge/w7/prebuilt/etc/nfcee_access.xml + +# QC time services +PRODUCT_PROPERTY_OVERRIDES += \ + persist.timed.enable=true + +# Enable KSM by default +PRODUCT_PROPERTY_OVERRIDES += \ + ro.ksm.default=1 + +PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 + +PRODUCT_LOCALES := en_US +PRODUCT_LOCALES += hdpi +PRODUCT_AAPT_CONFIG := normal hdpi +PRODUCT_AAPT_PREF_CONFIG := hdpi + +$(call inherit-product, vendor/lge/w7/w7-vendor.mk) + diff --git a/device_w7ds.mk b/device_w7ds.mk deleted file mode 100644 index 31e4780..0000000 --- a/device_w7ds.mk +++ /dev/null @@ -1,28 +0,0 @@ -$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk) - -# The gps config appropriate for this device -$(call inherit-product, device/common/gps/gps_us_supl.mk) - -$(call inherit-product-if-exists, vendor/lg/w7ds/w7ds-vendor.mk) - -DEVICE_PACKAGE_OVERLAYS += device/lg/w7ds/overlay - -LOCAL_PATH := device/lg/w7ds -ifeq ($(TARGET_PREBUILT_KERNEL),) - LOCAL_KERNEL := $(LOCAL_PATH)/kernel -else - LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) -endif - -PRODUCT_COPY_FILES += \ - $(LOCAL_KERNEL):kernel - -# TWRP -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/twrp.fstab:recovery/root/etc/twrp.fstab - -$(call inherit-product, build/target/product/full.mk) - -PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 -PRODUCT_NAME := full_w7ds -PRODUCT_DEVICE := w7ds diff --git a/devtree b/devtree deleted file mode 100644 index f326cc6..0000000 Binary files a/devtree and /dev/null differ diff --git a/full_w7.mk b/full_w7.mk new file mode 100644 index 0000000..f792c51 --- /dev/null +++ b/full_w7.mk @@ -0,0 +1,26 @@ +# +# Copyright (C) 2014 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) +$(call inherit-product, device/lge/w7/device_w7.mk) + +## Device identifier. This must come after all inclusions +PRODUCT_DEVICE := w7 +PRODUCT_NAME := full_w7 +PRODUCT_BRAND := lge +PRODUCT_MODEL := w7 +PRODUCT_MANUFACTURER := LGE diff --git a/init/init_w7.c b/init/init_w7.c new file mode 100644 index 0000000..9549b7f --- /dev/null +++ b/init/init_w7.c @@ -0,0 +1,134 @@ +/* + 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. + */ + +#include +#include +#include + +#include "vendor_init.h" +#include "property_service.h" +#include "log.h" +#include "util.h" + +#include "init_msm.h" + +#define CHUNK 2048 /* read 2048 bytes at a time */ + +int check_cmdline(char param[]) { + + char buf[CHUNK]; + FILE *file; + size_t nread; + file = fopen("/proc/cmdline", "r"); + if (file) { + while ((nread = fread(buf, 1, sizeof buf, file)) > 0) { + /* fwrite(buf, 1, nread, stdout); */ + char delims[] = " "; + char *word = NULL; + word = strtok(buf, delims); + + while(word != NULL) { + if (!strcmp(param,word)) { + fclose(file); + return 1; + } + word = strtok(NULL, delims); + } + } + } + fclose(file); + return 0; +} + + +void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type) +{ + char serial[PROP_VALUE_MAX]; + char device[PROP_VALUE_MAX]; + char devicename[PROP_VALUE_MAX]; + + UNUSED(msm_id); + UNUSED(msm_ver); + UNUSED(board_type); + + property_get("ro.boot.serialno", serial); + if (strncmp(serial, "LGD410", 6) == 0) { + /* D415, D410n (is this exist!?) */ + if (check_cmdline("model.name=LG-D410hn") == 1) { + property_set("ro.product.device", "w7nds"); + property_set("ro.product.model", "LG-D410hn"); + property_set("ro.nfc.port", "I2C"); + } else { + property_set("ro.product.device", "w7ds"); + property_set("ro.product.model", "LG-D410"); + } + property_set("ro.build.description", "w7ds_global_com-user 4.4.2 KOT49I.A1398228431 1398228431 release-keys"); + property_set("ro.build.fingerprint", "lge/w7ds_global_com/w7ds:4.4.2/KOT49I.A1398228431/1398228431:user/release-keys"); + property_set("persist.radio.multisim.config", "dsds"); + property_set("telephony.lteOnCdmaDevice", "0"); + } else if (strncmp(serial, "LGD405", 6) == 0) { + /* D405, D405n */ + if (check_cmdline("model.name=LG-D405n") == 1) { + property_set("ro.product.model", "LG-D405n"); + property_set("ro.product.device", "w7n"); + property_set("ro.nfc.port", "I2C"); + } else { + property_set("ro.product.model", "LG-D405"); + property_set("ro.product.device", "w7"); + } + property_set("ro.build.description", "w7_global_com-user 4.4.2 KOT49I.A1402966338 1402966338 release-keys"); + property_set("ro.build.fingerprint", "lge/w7_global_com/w7:4.4.2/KOT49I.A1402966338/1402966338:user/release-keys"); + property_set("persist.radio.multisim.config", ""); + property_set("telephony.lteOnCdmaDevice", "0"); + } else if (strncmp(serial, "LGD415", 6) == 0) { + /* D415, D415n (is this exist!?) */ + if (check_cmdline("model.name=LG-D415n") == 1) { + property_set("ro.product.device", "w7nds"); + property_set("ro.product.model", "LG-D415n"); + property_set("persist.radio.multisim.config", "dsds"); + } else { + property_set("ro.product.device", "w7"); + property_set("ro.product.model", "LG-D415"); + property_set("persist.radio.multisim.config", ""); + } + property_set("ro.nfc.port", "I2C"); + property_set("ro.build.description", "w7_tmo_us-user 4.4.2 KOT49I.D41510c D41510c.1393916607 release-keys"); + property_set("ro.build.fingerprint", "lge/w7_tmo_us/w7:4.4.2/KOT49I.D41510c/D41510c.1393916607:user/release-keys"); + property_set("telephony.lteOnCdmaDevice", "0"); + } else { + /* XXX */ + property_set("ro.product.device", "w7"); + property_set("ro.product.model", "Please write your model name to agent00791@gmail.com"); + property_set("persist.radio.multisim.config", ""); + property_set("telephony.lteOnCdmaDevice", "0"); + } + property_get("ro.product.device", device); + strlcpy(devicename, device, sizeof(devicename)); + ERROR("Found hardware id: %s setting build properties for %s device\n", serial, devicename); +} diff --git a/kernel b/kernel deleted file mode 100644 index ea1e90b..0000000 Binary files a/kernel and /dev/null differ diff --git a/libwcnss_qmi/Android.mk b/libwcnss_qmi/Android.mk new file mode 100644 index 0000000..5488388 --- /dev/null +++ b/libwcnss_qmi/Android.mk @@ -0,0 +1,32 @@ +# +# Copyright (C) 2014 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := libwcnss_qmi.c + +LOCAL_C_INCLUDES += hardware/qcom/wlan/wcnss_service +LOCAL_CFLAGS += -Wall + +LOCAL_SHARED_LIBRARIES := libc libcutils libutils liblog + +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE := libwcnss_qmi + +include $(BUILD_SHARED_LIBRARY) diff --git a/libwcnss_qmi/libwcnss_qmi.c b/libwcnss_qmi/libwcnss_qmi.c new file mode 100644 index 0000000..0a212b6 --- /dev/null +++ b/libwcnss_qmi/libwcnss_qmi.c @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2014, The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +//#define LOG_NDEBUG 0 + +#define LOG_TAG "wcnss_w7" + +#include +#include +#include +#include +#include + + +int wcnss_init_qmi(void) +{ + /* empty */ + return 0; +} + +int wcnss_qmi_get_wlan_address(unsigned char *pBdAddr) +{ + int fd1, fd2, fd3; + unsigned char macbyte; + + int i; + + fd1 = open("/dev/block/platform/msm_sdcc.1/by-name/misc",O_RDONLY); + + for (i = 0; i < 6; i++) { + lseek(fd1,0x4000+i,SEEK_SET); + lseek(fd3,0,SEEK_END); + read(fd1,&pBdAddr[i],1); + } + ALOGI("Found MAC address: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n", + pBdAddr[0], + pBdAddr[1], + pBdAddr[2], + pBdAddr[3], + pBdAddr[4], + pBdAddr[5]); + close(fd1); + return 0; +} + +void wcnss_qmi_deinit(void) +{ + /* empty */ +} diff --git a/mkbootimg.mk b/mkbootimg.mk new file mode 100644 index 0000000..5a5c97f --- /dev/null +++ b/mkbootimg.mk @@ -0,0 +1,53 @@ +LOCAL_PATH := $(call my-dir) + +## Don't change anything under here. The variables are named MSM8226_whatever +## on purpose, to avoid conflicts with similarly named variables at other +## parts of the build environment + +## Imported from the original makefile... +KERNEL_CONFIG := $(KERNEL_OUT)/.config +MSM8226_DTS_NAMES := msm8226 + +MSM8226_DTS_FILES = $(wildcard $(TOP)/$(TARGET_KERNEL_SOURCE)/arch/arm/boot/dts/msm8226-w7*.dts) +MSM8226_DTS_FILE = $(lastword $(subst /, ,$(1))) +DTB_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%.dtb,$(call MSM8226_DTS_FILE,$(1)))) +ZIMG_FILE = $(addprefix $(KERNEL_OUT)/arch/arm/boot/,$(patsubst %.dts,%-zImage,$(call MSM8226_DTS_FILE,$(1)))) +KERNEL_ZIMG = $(KERNEL_OUT)/arch/arm/boot/zImage +DTC = $(KERNEL_OUT)/scripts/dtc/dtc + +define append-msm8226-dtb +mkdir -p $(KERNEL_OUT)/arch/arm/boot;\ +$(foreach MSM8226_DTS_NAME, $(MSM8226_DTS_NAMES), \ + $(foreach d, $(MSM8226_DTS_FILES), \ + $(DTC) -p 1024 -O dtb -o $(call DTB_FILE,$(d)) $(d); \ + cat $(KERNEL_ZIMG) $(call DTB_FILE,$(d)) > $(call ZIMG_FILE,$(d));)) +endef + + +## Build and run dtbtool +DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX) +INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img + +$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET) + @echo -e ${CL_CYN}"Start DT image: $@"${CL_RST} + $(call append-msm8226-dtb) + $(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)") + $(hide) $(DTBTOOL) -2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/ + @echo -e ${CL_CYN}"Made DT image: $@"${CL_RST} + + +## Overload bootimg generation: Same as the original, + --dt arg +$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET) + $(call pretty,"Target boot image: $@") + $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@ + $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) + @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST} + +## Overload recoveryimg generation: Same as the original, + --dt arg +$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \ + $(recovery_ramdisk) \ + $(recovery_kernel) + @echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST} + $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@ + $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) + @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST} diff --git a/overlay/frameworks/base/core/res/res/values/arrays.xml b/overlay/frameworks/base/core/res/res/values/arrays.xml new file mode 100644 index 0000000..cadf707 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/arrays.xml @@ -0,0 +1,37 @@ + + + + + + + @string/reboot_reboot + @string/reboot_recovery + @string/reboot_bootloader + + + + + + recovery + bootloader + + + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..4066557 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,308 @@ + + + + + + + + + 0 + 20 + + + + + 0 + 15 + + + + + 0 + 13 + + + + + 0 + 15 + + + 0 + 15 + 200 + + + + + 0 + 13 + 17 + 13 + + + + + 0 + 230 + 170 + 230 + + + + + 0 + 75 + 130 + 75 + + + + + 0 + 30 + 75 + 30 + + + + sys.perf.profile + 1 + + + true + + + true + + + true + + + false + com.qualcomm.location + false + com.qualcomm.location + + + true + + + false + + true + + + false + + + rmnet0 + + + + + + + + "default" + "dun" + "mms" + "supl" + + + + + "rndis\\d" + + + + + "wlan\\d" + "softap.*" + + + + + "bt-pan" + + + + + + 0 + 1 + 4 + 5 + 7 + + + + true + + + + true + + + false + + + false + + + false + + + true + + + true + + + false + + + 5 + + + 0 + 40 + + + 0 + 33 + + + 0 + 25 + + + 0 + 40 + + + 0 + 40 + 600 + + + 0 + 33 + 60 + 33 + + + 10 + 11 + 12 + + + 1,1 + 0,1 + 7,1 + 9,1 + + + 0 + 2 + 3 + 4 + 5 + 10 + 11 + 12 + + + wifi,1,1,1,-1,true + mobile,0,0,0,-1,true + mobile_mms,2,0,2,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,-1,true + mobile_cbs,12,0,2,60000,true + bluetooth,7,7,1,-1,true + ethernet,9,9,1,-1,true + wifi_p2p,13,1,0,-1,true + + + + 0 + 1 + + + false + + + false + + + true + + 90 + + + true + + + 0 + + + true + + + true + diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml new file mode 100644 index 0000000..8d75a42 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -0,0 +1,42 @@ + + + 0 + 86 + 229 + 30 + 3 + 2 + 50 + 100 + 70 + 250 + 10 + + 10 + 8 + 6 + 4 + 2 + + + 300000 + 384000 + 600000 + 787200 + 998400 + 1094400 + 1190400 + + 3 + 22 + + 72 + 78 + 107 + 120 + 150 + 157 + 164 + + 2070 + \ No newline at end of file diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml new file mode 100644 index 0000000..2530d76 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml new file mode 100644 index 0000000..d008bce --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml @@ -0,0 +1,23 @@ + + + + true + false + + diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 0000000..e4ea8a8 --- /dev/null +++ b/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,26 @@ + + + + + + + false + + diff --git a/overlay/packages/apps/Phone b/overlay/packages/apps/Phone new file mode 120000 index 0000000..0f8d39e --- /dev/null +++ b/overlay/packages/apps/Phone @@ -0,0 +1 @@ +../services/Telephony/ \ No newline at end of file diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml new file mode 100644 index 0000000..f7c3451 --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/config.xml @@ -0,0 +1,11 @@ + + + true + + + true + + true + + diff --git a/overlay/packages/apps/Torch/res/values/config.xml b/overlay/packages/apps/Torch/res/values/config.xml new file mode 100644 index 0000000..1f2e380 --- /dev/null +++ b/overlay/packages/apps/Torch/res/values/config.xml @@ -0,0 +1,33 @@ + + + + + false + + + /sys/class/leds/led:flash_torch/brightness + + + 90 + + 150 + + 200 + + diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml new file mode 100644 index 0000000..efb8372 --- /dev/null +++ b/overlay/packages/services/Telephony/res/values/config.xml @@ -0,0 +1,36 @@ + + + + + + + true + + + true + + + true + + + false + + + false + diff --git a/prebuilt/egl.cfg b/prebuilt/egl.cfg new file mode 100644 index 0000000..2a11ba2 --- /dev/null +++ b/prebuilt/egl.cfg @@ -0,0 +1,2 @@ +0 0 android +0 1 adreno diff --git a/prebuilt/etc/audio_effects.conf b/prebuilt/etc/audio_effects.conf new file mode 100644 index 0000000..ead3303 --- /dev/null +++ b/prebuilt/etc/audio_effects.conf @@ -0,0 +1,177 @@ +# List of effect libraries to load. Each library element must contain a "path" element +# giving the full path of the library .so file. +# libraries { +# { +# path +# } +# } +libraries { + bundle { + path /system/lib/soundfx/libbundlewrapper.so + } + cm { + path /system/lib/soundfx/libcyanogen-dsp.so + } + reverb { + path /system/lib/soundfx/libreverbwrapper.so + } + qcbassboost { + path /vendor/lib/soundfx/libqcbassboost.so + } + qcvirt { + path /vendor/lib/soundfx/libqcvirt.so + } + qcreverb { + path /vendor/lib/soundfx/libqcreverb.so + } + visualizer_sw { + path /system/lib/soundfx/libvisualizer.so + } + visualizer_hw { + path /system/lib/soundfx/libqcomvisualizer.so + } + downmix { + path /system/lib/soundfx/libdownmix.so + } + proxy { + path /system/lib/soundfx/libeffectproxy.so + } + offload_bundle { + path /system/lib/soundfx/libqcompostprocbundle.so + } + audio_pre_processing { + path /system/lib/soundfx/libqcomvoiceprocessing.so + } +} + +# Default pre-processing library. Add to audio_effect.conf "libraries" section if +# audio HAL implements support for default software audio pre-processing effects +# +# pre_processing { +# path /system/lib/soundfx/libaudiopreprocessing.so +# } + +# list of effects to load. Each effect element must contain a "library" and a "uuid" element. +# The value of the "library" element must correspond to the name of one library element in the +# "libraries" element. +# The name of the effect element is indicative, only the value of the "uuid" element +# designates the effect. +# The uuid is the implementation specific UUID as specified by the effect vendor. This is not the +# generic effect type UUID. +# effects { +# { +# library +# uuid +# } +# ... +# } + +effects { + compression { + library cm + uuid f27317f4-c984-4de6-9a90-545759495bf2 + } + bassboost { +# library bundle +# uuid 8631f300-72e2-11df-b57e-0002a5d5c51b + library cm + uuid 42b5cbf5-4dd8-4e79-a5fb-cceb2cb54e13 + } + virtualizer { +# library bundle +# uuid 1d4033c0-8557-11df-9f2d-0002a5d5c51b + library cm + uuid 7c6cc5f8-6f34-4449-a282-bed84f1a5b5a + } + equalizer { +# library bundle +# uuid ce772f20-847d-11df-bb17-0002a5d5c51b + library cm + uuid 58bc9000-0d7f-462e-90d2-035eddd8b434 + } + volume { + library bundle + uuid 119341a0-8469-11df-81f9-0002a5d5c51b + } + reverb_env_aux { + library reverb + uuid 4a387fc0-8ab3-11df-8bad-0002a5d5c51b + } + reverb_env_ins { + library reverb + uuid c7a511a0-a3bb-11df-860e-0002a5d5c51b + } + reverb_pre_aux { + library reverb + uuid f29a1400-a3bb-11df-8ddc-0002a5d5c51b + } + reverb_pre_ins { + library reverb + uuid 172cdf00-a3bc-11df-a72f-0002a5d5c51b + } + visualizer { + library proxy + uuid 1d0a1a53-7d5d-48f2-8e71-27fbd10d842c + + libsw { + library visualizer_sw + uuid d069d9e0-8329-11df-9168-0002a5d5c51b + } + + libhw { + library visualizer_hw + uuid 7a8044a0-1a71-11e3-a184-0002a5d5c51b + } + } + downmix { + library downmix + uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f + } + aec { + library audio_pre_processing + uuid 0f8d0d2a-59e5-45fe-b6e4-248c8a799109 + } + ns { + library audio_pre_processing + uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306f8 + } +} +# Audio preprocessor configurations. +# The pre processor configuration consists in a list of elements each describing +# pre processor settings for a given input source. Valid input source names are: +# "mic", "camcorder", "voice_recognition", "voice_communication" +# Each input source element contains a list of effects elements. The name of the effect +# element must be the name of one of the effects in the "effects" list of the file. +# Each effect element may optionally contain a list of parameters and their +# default value to apply when the pre processor effect is created. +# A parameter is defined by a "param" element and a "value" element. Each of these elements +# consists in one or more elements specifying a type followed by a value. +# The types defined are: "int", "short", "float", "bool" and "string" +# When both "param" and "value" are a single int, a simple form is allowed where just +# the param and value pair is present in the parameter description +# pre_processing { +# { +# { +# { +# param { +# int|short|float|bool|string +# [ int|short|float|bool|string ] +# ... +# } +# value { +# int|short|float|bool|string +# [ int|short|float|bool|string ] +# ... +# } +# } +# { } +# ... +# } +# ... +# } +# ... +# } + +# +# TODO: add default audio pre processor configurations after debug and tuning phase +# diff --git a/prebuilt/etc/audio_policy.conf b/prebuilt/etc/audio_policy.conf new file mode 100644 index 0000000..6e6ca72 --- /dev/null +++ b/prebuilt/etc/audio_policy.conf @@ -0,0 +1,114 @@ +# Global configuration section: lists input and output devices always present on the device +# as well as the output device selected by default. +# Devices are designated by a string that corresponds to the enum in audio.h + +global_configuration { + attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER + default_output_device AUDIO_DEVICE_OUT_SPEAKER + attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX +} + +# audio hardware module section: contains descriptors for all audio hw modules present on the +# device. Each hw module node is named after the corresponding hw module library base name. +# For instance, "primary" corresponds to audio.primary..so. +# The "primary" module is mandatory and must include at least one output with +# AUDIO_OUTPUT_FLAG_PRIMARY flag. +# Each module descriptor contains one or more output profile descriptors and zero or more +# input profile descriptors. Each profile lists all the parameters supported by a given output +# or input stream category. +# The "channel_masks", "formats", "devices" and "flags" are specified using strings corresponding +# to enums in audio.h and audio_policy.h. They are concatenated by use of "|" without space or "\n". + +audio_hw_modules { + primary { + outputs { + primary { + sampling_rates 44100|48000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM|AUDIO_DEVICE_OUT_FM_TX + flags AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST + } + multichannel { + sampling_rates 44100|48000 + channel_masks dynamic + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_PROXY + flags AUDIO_OUTPUT_FLAG_DIRECT + } + compress_offload { + sampling_rates 8000|11025|16000|22050|32000|44100|48000 + channel_masks AUDIO_CHANNEL_OUT_MONO|AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_2POINT1|AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_PENTA|AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_6POINT1|AUDIO_CHANNEL_OUT_7POINT1 + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_AC3|AUDIO_FORMAT_EAC3 + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_FM_TX + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING + } + incall_music { + sampling_rates 8000|16000|48000 + channel_masks AUDIO_CHANNEL_OUT_MONO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_USB|AUDIO_DEVICE_OUT_ALL_SCO + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC + } + voip_rx { + sampling_rates 8000|16000 + channel_masks AUDIO_CHANNEL_OUT_MONO + formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW + devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_SCO + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX + } + } + inputs { + primary { + sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000 + channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK|AUDIO_CHANNEL_IN_5POINT1 + formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_AMR_NB|AUDIO_FORMAT_AMR_WB|AUDIO_FORMAT_QCELP|AUDIO_FORMAT_EVRC|AUDIO_FORMAT_EVRCB|AUDIO_FORMAT_EVRCWB|AUDIO_FORMAT_EVRCNW + devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET|AUDIO_DEVICE_IN_FM_RX|AUDIO_DEVICE_IN_FM_RX_A2DP|AUDIO_DEVICE_IN_VOICE_CALL + } + } + } + a2dp { + outputs { + a2dp { + sampling_rates 44100 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_ALL_A2DP + } + } + } + usb { + outputs { + usb_accessory { + sampling_rates 44100 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_USB_ACCESSORY + } + usb_device { + sampling_rates 44100 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_USB_DEVICE + } + } + } + r_submix { + outputs { + submix { + sampling_rates 48000 + channel_masks AUDIO_CHANNEL_OUT_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX + } + } + inputs { + submix { + sampling_rates 48000 + channel_masks AUDIO_CHANNEL_IN_STEREO + formats AUDIO_FORMAT_PCM_16_BIT + devices AUDIO_DEVICE_IN_REMOTE_SUBMIX + } + } + } +} diff --git a/prebuilt/etc/boot_fixup b/prebuilt/etc/boot_fixup new file mode 100644 index 0000000..e69de29 diff --git a/prebuilt/etc/clatd.conf b/prebuilt/etc/clatd.conf new file mode 100644 index 0000000..086d39a --- /dev/null +++ b/prebuilt/etc/clatd.conf @@ -0,0 +1,15 @@ +# host ID to use as the source of CLAT traffic +# this is a /128 taken out of the /64 routed to the phone +ipv6_host_id ::464 + +# ipv4 subnet for the local traffic to use. This is a /32 host address +ipv4_local_subnet 192.0.0.4 + +# get the plat_subnet from dns lookups (requires DNS64) +plat_from_dns64 yes +# hostname to use to lookup plat subnet. must contain only A records +plat_from_dns64_hostname ipv4.google.com + +# plat subnet to send ipv4 traffic to. This is a /96 subnet. +# This setting only makes sense with: plat_from_dns64 no +#plat_subnet 2001:db8:1:2:3:4:: diff --git a/prebuilt/etc/gps.conf b/prebuilt/etc/gps.conf new file mode 100644 index 0000000..55acdab --- /dev/null +++ b/prebuilt/etc/gps.conf @@ -0,0 +1,156 @@ +#Test +#NTP_SERVER=time.gpsonextra.net +#Asia +# NTP_SERVER=asia.pool.ntp.org +#Europe +NTP_SERVER=europe.pool.ntp.org +NTP_SERVER_SCA=south-america.pool.ntp.org +NTP_SERVER_AME=asia.pool.ntp.org +NTP_SERVER_AU=oceania.pool.ntp.org +NTP_SERVER_CN=cn.pool.ntp.org +#North America +# NTP_SERVER=north-america.pool.ntp.org +#Korea +#NTP_SERVER=0.kr.pool.ntp.org +#JP +# NTP_SERVER=3.jp.pool.ntp.org + +XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin +XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin +XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin + +# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info +# 4 - Debug, 5 - Verbose +#DEBUG_LEVEL = 3 +DEBUG_LEVEL = 5 + +# Intermediate position report, 1=enable, 0=disable +INTERMEDIATE_POS=0 + +# supl version 1.0 +SUPL_VER=0x10000 +# supl version 2.0 +#SUPL_VER=0x20000 + +#VDF supl version +SUPL_VER_262_2=0x20000 +SUPL_VER_214_1=0x20000 +SUPL_VER_222_10=0x20000 + +# Error Estimate +# _SET = 1 +# _CLEAR = 0 +ERR_ESTIMATE=0 + +# GPS Capabilities bit mask +# SCHEDULING = 1 +# MSB = 2 +# MSA = 4 +# ON_DEMAND_TIME=0x10 +# ULP = 0x20 +# default = MSA | MSB | SCHEDULING | ULP | ON_DEMAND_TIME +# CAPABILITIES=0x37 +CAPABILITIES=0x37 + +# Accuracy threshold for intermediate positions +# less accurate positions are ignored, 0 for passing all positions +# ACCURACY_THRES=5000 + +################################ +##### AGPS server settings ##### +################################ + +# FOR SUPL SUPPORT, set the following +# SUPL_HOST=supl.host.com or IP +# SUPL_PORT=1234 +SUPL_HOST=supl.google.com +SUPL_PORT=7276 + +#VDF supl server and port +SUPL_HOST_262_2=supl.vodafone.com +SUPL_PORT_262_2=7275 +SUPL_HOST_214_1=supl.vodafone.com +SUPL_PORT_214_1=7275 +SUPL_HOST_222_10=supl.vodafone.com +SUPL_PORT_222_10=7275 +SUPL_HOST_204_4=supl.vodafone.com +SUPL_PORT_204_4=7275 +SUPL_HOST_268_1=supl.vodafone.com +SUPL_PORT_268_1=7275 +SUPL_HOST_226_1=supl.vodafone.com +SUPL_PORT_226_1=7275 +SUPL_HOST_202_5=supl.vodafone.com +SUPL_PORT_202_5=7275 +SUPL_HOST_530_1=supl.vodafone.com +SUPL_PORT_530_1=7275 + +#UNF host,port +SUPL_HOST_UNF=supl.iusacell.com +SUPL_PORT_UNF=7275 + +#SFR supl server and port +SUPL_PORT_208_10=7275 + +# FOR C2K PDE SUPPORT, set the following +# C2K_HOST=c2k.pde.com or IP +# C2K_PORT=1234 + +################################ +# Indoor Positioning Settings +################################ +# 0: QUIPC disabled, 1: QUIPC enabled, 2: forced QUIPC only +QUIPC_ENABLED = 0 + +################################ +# EXTRA SETTINGS +################################ +# Enable or Disable Wiper (1=Enable, 0=Disable) +#ENABLE_WIPER=1 +ENABLE_WIPER=0 +# NMEA provider (1=Modem Processor, 0=Application Processor) +#NMEA_PROVIDER=0 +NMEA_PROVIDER=1 + +#################################### +# LTE Positioning Profile Settings +#################################### +# 0: Enable RRLP on LTE(Default) +# 1: Enable LPP_User_Plane on LTE +# 2: Enable LPP_Control_Plane +# 3: Enable both LPP_User_Plane and LPP_Control_Plane +LPP_PROFILE = 0 + +################################################## +# Select Positioning Protocol on A-GLONASS system +################################################## +# 0x1: RRC CPlane +# 0x2: RRLP UPlane +# 0x4: LLP Uplane +A_GLONASS_POS_PROTOCOL_SELECT = 0 + +################################ +# LGE EXTRA SETTINGS +################################ +VENDOR=GLOBAL +LGE_TLS_MODE=0 + +#VDF tls mode +LGE_TLS_MODE_262_2=1 +LGE_TLS_MODE_214_1=1 +LGE_TLS_MODE_222_10=1 +LGE_TLS_MODE_204_4=1 +LGE_TLS_MODE_268_1=1 +LGE_TLS_MODE_226_1=1 +LGE_TLS_MODE_202_5=1 +LGE_TLS_MODE_530_1=1 + +#UNF tls mode +LGE_TLS_MODE_UNF=1 + +#SFR tls mode +LGE_TLS_MODE_208_10=1 + +LGE_GPS_POSITION_MODE=1 + +#UNF position mode +LGE_GPS_POSITION_MODE_UNF=0 diff --git a/prebuilt/etc/hostapd/hostapd.accept b/prebuilt/etc/hostapd/hostapd.accept new file mode 100644 index 0000000..923eab6 --- /dev/null +++ b/prebuilt/etc/hostapd/hostapd.accept @@ -0,0 +1,3 @@ +# List of MAC addresses that are allowed to authenticate (IEEE 802.11) +# with the AP. Optional VLAN ID can be assigned for clients based on the +# MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used. diff --git a/prebuilt/etc/hostapd/hostapd.deny b/prebuilt/etc/hostapd/hostapd.deny new file mode 100644 index 0000000..e4b6c09 --- /dev/null +++ b/prebuilt/etc/hostapd/hostapd.deny @@ -0,0 +1,2 @@ +# List of MAC addresses that are not allowed to authenticate (IEEE 802.11) +# with the AP. diff --git a/prebuilt/etc/hostapd/hostapd_default.conf b/prebuilt/etc/hostapd/hostapd_default.conf new file mode 100644 index 0000000..17c329d --- /dev/null +++ b/prebuilt/etc/hostapd/hostapd_default.conf @@ -0,0 +1,1043 @@ +##### hostapd configuration file ############################################## +# Empty lines and lines starting with # are ignored + +# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for +# management frames); ath0 for madwifi +interface=wlan0 + +# In case of madwifi and nl80211 driver interfaces, an additional configuration +# parameter, bridge, must be used to notify hostapd if the interface is +# included in a bridge. This parameter is not used with Host AP driver. +#bridge=br0 + +# Driver interface type (hostap/wired/madwifi/prism54/test/none/nl80211/bsd); +# default: hostap). nl80211 is used with all Linux mac80211 drivers. +# Use driver=none if building hostapd as a standalone RADIUS server that does +# not control any wireless/wired driver. +driver=nl80211 + +# hostapd event logger configuration +# +# Two output method: syslog and stdout (only usable if not forking to +# background). +# +# Module bitfield (ORed bitfield of modules that will be logged; -1 = all +# modules): +# bit 0 (1) = IEEE 802.11 +# bit 1 (2) = IEEE 802.1X +# bit 2 (4) = RADIUS +# bit 3 (8) = WPA +# bit 4 (16) = driver interface +# bit 5 (32) = IAPP +# bit 6 (64) = MLME +# +# Levels (minimum value for logged events): +# 0 = verbose debugging +# 1 = debugging +# 2 = informational messages +# 3 = notification +# 4 = warning +# +logger_syslog=-1 +logger_syslog_level=2 +logger_stdout=-1 +logger_stdout_level=2 + +# Dump file for state information (on SIGUSR1) +dump_file=/tmp/hostapd.dump + +# Interface for separate control program. If this is specified, hostapd +# will create this directory and a UNIX domain socket for listening to requests +# from external programs (CLI/GUI, etc.) for status information and +# configuration. The socket file will be named based on the interface name, so +# multiple hostapd processes/interfaces can be run at the same time if more +# than one interface is used. +# /var/run/hostapd is the recommended directory for sockets and by default, +# hostapd_cli will use it when trying to connect with hostapd. +ctrl_interface=/data/misc/wifi/hostapd + + +# Access control for the control interface can be configured by setting the +# directory to allow only members of a group to use sockets. This way, it is +# possible to run hostapd as root (since it needs to change network +# configuration and open raw sockets) and still allow GUI/CLI components to be +# run as non-root users. However, since the control interface can be used to +# change the network configuration, this access needs to be protected in many +# cases. By default, hostapd is configured to use gid 0 (root). If you +# want to allow non-root users to use the contron interface, add a new group +# and change this value to match with that group. Add users that should have +# control interface access to this group. +# +# This variable can be a group name or gid. +#ctrl_interface_group=wheel +#ctrl_interface_group=0 + + +##### IEEE 802.11 related configuration ####################################### + +# SSID to be used in IEEE 802.11 management frames +ssid=QualcommSoftAP + +# Country code (ISO/IEC 3166-1). Used to set regulatory domain. +# Set as needed to indicate country in which device is operating. +# This can limit available channels and transmit power. +#country_code=US + +# Enable IEEE 802.11d. This advertises the country_code and the set of allowed +# channels and transmit power levels based on the regulatory limits. The +# country_code setting must be configured with the correct country for +# IEEE 802.11d functions. +# (default: 0 = disabled) +#ieee80211d=1 + +# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g, +# n = IEEE 802.11n, g_only = IEEE 802.11g_only, n_only = IEEE 802.11n_only, +# Default: IEEE 802.11n +hw_mode=g + +# Channel number (IEEE 802.11) +# (default: 0, i.e., not set) +# Please note that some drivers (e.g., madwifi) do not use this value from +# hostapd and the channel will need to be configuration separately with +# iwconfig. +channel=6 + +# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535) +beacon_int=100 + +# DTIM (delivery trafic information message) period (range 1..255): +# number of beacons between DTIMs (1 = every beacon includes DTIM element) +# (default: 2) +dtim_period=2 + +# Maximum number of stations allowed in station table. New stations will be +# rejected after the station table is full. IEEE 802.11 has a limit of 2007 +# different association IDs, so this number should not be larger than that. +# (default: 2007) +max_num_sta=255 + +# RTS/CTS threshold; 2347 = disabled (default); range 0..2347 +# If this field is not included in hostapd.conf, hostapd will not control +# RTS threshold and 'iwconfig wlan# rts ' can be used to set it. +#rts_threshold=2347 + +# Fragmentation threshold; 2346 = disabled (default); range 256..2346 +# If this field is not included in hostapd.conf, hostapd will not control +# fragmentation threshold and 'iwconfig wlan# frag ' can be used to set +# it. +#fragm_threshold=2346 + +# Rate configuration +# Default is to enable all rates supported by the hardware. This configuration +# item allows this list be filtered so that only the listed rates will be left +# in the list. If the list is empty, all rates are used. This list can have +# entries that are not in the list of rates the hardware supports (such entries +# are ignored). The entries in this list are in 100 kbps, i.e., 11 Mbps = 110. +# If this item is present, at least one rate have to be matching with the rates +# hardware supports. +# default: use the most common supported rate setting for the selected +# hw_mode (i.e., this line can be removed from configuration file in most +# cases) +#supported_rates=10 20 55 110 60 90 120 180 240 360 480 540 + +# Basic rate set configuration +# List of rates (in 100 kbps) that are included in the basic rate set. +# If this item is not included, usually reasonable default set is used. +# This basic rates set is currently used for g-only profile +#basic_rates=60 + +# Short Preamble +# This parameter can be used to enable optional use of short preamble for +# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance. +# This applies only to IEEE 802.11b-compatible networks and this should only be +# enabled if the local hardware supports use of short preamble. If any of the +# associated STAs do not support short preamble, use of short preamble will be +# disabled (and enabled when such STAs disassociate) dynamically. +# 0 = do not allow use of short preamble (default) +# 1 = allow use of short preamble +#preamble=1 + +# Station MAC address -based authentication +# Please note that this kind of access control requires a driver that uses +# hostapd to take care of management frame processing and as such, this can be +# used with driver=hostap or driver=nl80211, but not with driver=madwifi. +# 0 = accept unless in deny list +# 1 = deny unless in accept list +# 2 = use external RADIUS server (accept/deny lists are searched first) +macaddr_acl=0 + +# Accept/deny lists are read from separate files (containing list of +# MAC addresses, one per line). Use absolute path name to make sure that the +# files can be read on SIGHUP configuration reloads. +accept_mac_file=/data/hostapd/hostapd.accept +deny_mac_file=/data/hostapd/hostapd.deny + +# IEEE 802.11 specifies two authentication algorithms. hostapd can be +# configured to allow both of these or only one. Open system authentication +# should be used with IEEE 802.1X. +# Bit fields of allowed authentication algorithms: +# bit 0 = Open System Authentication +# bit 1 = Shared Key Authentication (requires WEP) +auth_algs=3 + +# Send empty SSID in beacons and ignore probe request frames that do not +# specify full SSID, i.e., require stations to know SSID. +# default: disabled (0) +# 1 = send empty (length=0) SSID in beacon and ignore probe request for +# broadcast SSID +# 2 = clear SSID (ASCII 0), but keep the original length (this may be required +# with some clients that do not support empty SSID) and ignore probe +# requests for broadcast SSID +ignore_broadcast_ssid=0 + +# TX queue parameters (EDCF / bursting) +# default for all these fields: not set, use hardware defaults +# tx_queue__ +# queues: data0, data1, data2, data3, after_beacon, beacon +# (data0 is the highest priority queue) +# parameters: +# aifs: AIFS (default 2) +# cwmin: cwMin (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023) +# cwmax: cwMax (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023); cwMax >= cwMin +# burst: maximum length (in milliseconds with precision of up to 0.1 ms) for +# bursting +# +# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e): +# These parameters are used by the access point when transmitting frames +# to the clients. +# +# Low priority / AC_BK = background +#tx_queue_data3_aifs=7 +#tx_queue_data3_cwmin=15 +#tx_queue_data3_cwmax=1023 +#tx_queue_data3_burst=0 +# Note: for IEEE 802.11b mode: cWmin=31 cWmax=1023 burst=0 +# +# Normal priority / AC_BE = best effort +#tx_queue_data2_aifs=3 +#tx_queue_data2_cwmin=15 +#tx_queue_data2_cwmax=63 +#tx_queue_data2_burst=0 +# Note: for IEEE 802.11b mode: cWmin=31 cWmax=127 burst=0 +# +# High priority / AC_VI = video +#tx_queue_data1_aifs=1 +#tx_queue_data1_cwmin=7 +#tx_queue_data1_cwmax=15 +#tx_queue_data1_burst=3.0 +# Note: for IEEE 802.11b mode: cWmin=15 cWmax=31 burst=6.0 +# +# Highest priority / AC_VO = voice +#tx_queue_data0_aifs=1 +#tx_queue_data0_cwmin=3 +#tx_queue_data0_cwmax=7 +#tx_queue_data0_burst=1.5 +# Note: for IEEE 802.11b mode: cWmin=7 cWmax=15 burst=3.3 +# +# Special queues; normally not user configurable +# +#tx_queue_after_beacon_aifs=2 +#tx_queue_after_beacon_cwmin=15 +#tx_queue_after_beacon_cwmax=1023 +#tx_queue_after_beacon_burst=0 +# +#tx_queue_beacon_aifs=2 +#tx_queue_beacon_cwmin=3 +#tx_queue_beacon_cwmax=7 +#tx_queue_beacon_burst=1.5 + +# 802.1D Tag (= UP) to AC mappings +# WMM specifies following mapping of data frames to different ACs. This mapping +# can be configured using Linux QoS/tc and sch_pktpri.o module. +# 802.1D Tag 802.1D Designation Access Category WMM Designation +# 1 BK AC_BK Background +# 2 - AC_BK Background +# 0 BE AC_BE Best Effort +# 3 EE AC_BE Best Effort +# 4 CL AC_VI Video +# 5 VI AC_VI Video +# 6 VO AC_VO Voice +# 7 NC AC_VO Voice +# Data frames with no priority information: AC_BE +# Management frames: AC_VO +# PS-Poll frames: AC_BE + +# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e): +# for 802.11a or 802.11g networks +# These parameters are sent to WMM clients when they associate. +# The parameters will be used by WMM clients for frames transmitted to the +# access point. +# +# note - txop_limit is in units of 32microseconds +# note - acm is admission control mandatory flag. 0 = admission control not +# required, 1 = mandatory +# note - here cwMin and cmMax are in exponent form. the actual cw value used +# will be (2^n)-1 where n is the value given here +# +wmm_enabled=1 +# +# Low priority / AC_BK = background +wmm_ac_bk_cwmin=4 +wmm_ac_bk_cwmax=10 +wmm_ac_bk_aifs=7 +wmm_ac_bk_txop_limit=0 +wmm_ac_bk_acm=0 +# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10 +# +# Normal priority / AC_BE = best effort +wmm_ac_be_aifs=3 +wmm_ac_be_cwmin=4 +wmm_ac_be_cwmax=10 +wmm_ac_be_txop_limit=0 +wmm_ac_be_acm=0 +# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7 +# +# High priority / AC_VI = video +wmm_ac_vi_aifs=2 +wmm_ac_vi_cwmin=3 +wmm_ac_vi_cwmax=4 +wmm_ac_vi_txop_limit=94 +wmm_ac_vi_acm=0 +# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188 +# +# Highest priority / AC_VO = voice +wmm_ac_vo_aifs=2 +wmm_ac_vo_cwmin=2 +wmm_ac_vo_cwmax=3 +wmm_ac_vo_txop_limit=47 +wmm_ac_vo_acm=0 +# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102 + +# Static WEP key configuration +# +# The key number to use when transmitting. +# It must be between 0 and 3, and the corresponding key must be set. +# default: not set +#wep_default_key=0 +# The WEP keys to use. +# A key may be a quoted string or unquoted hexadecimal digits. +# The key length should be 5, 13, or 16 characters, or 10, 26, or 32 +# digits, depending on whether 40-bit (64-bit), 104-bit (128-bit), or +# 128-bit (152-bit) WEP is used. +# Only the default key must be supplied; the others are optional. +# default: not set +#wep_key0=1234567890 +#wep_key1=1234567890 +#wep_key2=1234567890 +#wep_key3=1234567890 + +# Station inactivity limit +# +# If a station does not send anything in ap_max_inactivity seconds, an +# empty data frame is sent to it in order to verify whether it is +# still in range. If this frame is not ACKed, the station will be +# disassociated and then deauthenticated. This feature is used to +# clear station table of old entries when the STAs move out of the +# range. +# +# The station can associate again with the AP if it is still in range; +# this inactivity poll is just used as a nicer way of verifying +# inactivity; i.e., client will not report broken connection because +# disassociation frame is not sent immediately without first polling +# the STA with a data frame. +# default: 300 (i.e., 5 minutes) +#ap_max_inactivity=300 + +# Enable/disable internal bridge for packets between associated stations. +# +# When IEEE 802.11 is used in managed mode, packets are usually send through +# the AP even if they are from a wireless station to another wireless station. +# This functionality requires that the AP has a bridge functionality that sends +# frames back to the same interface if their destination is another associated +# station. In addition, broadcast/multicast frames from wireless stations will +# be sent both to the host system net stack (e.g., to eventually wired network) +# and back to the wireless interface. +# +# The internal bridge is implemented within the wireless kernel module and it +# bypasses kernel filtering (netfilter/iptables/ebtables). If direct +# communication between the stations needs to be prevented, the internal +# bridge can be disabled by setting bridge_packets=0. +# +# Note: If this variable is not included in hostapd.conf, hostapd does not +# change the configuration and iwpriv can be used to set the value with +# 'iwpriv wlan# param 10 0' command. If the variable is in hostapd.conf, +# hostapd will override possible iwpriv configuration whenever configuration +# file is reloaded. +# +# default: do not control from hostapd (80211.o defaults to 1=enabled) +#bridge_packets=1 + +# Maximum allowed Listen Interval (how many Beacon periods STAs are allowed to +# remain asleep). Default: 65535 (no limit apart from field size) +#max_listen_interval=100 + +# Client isolation can be used to prevent low-level bridging of frames between +# associated stations in the BSS. By default, this bridging is allowed. +#ap_isolate=1 + +##### IEEE 802.11n related configuration ###################################### + +# ieee80211n: Whether IEEE 802.11n (HT) is enabled +# 0 = disabled (default) +# 1 = enabled +# Note: You will also need to enable WMM for full HT functionality. +ieee80211n=1 + +#require_ht=1 + +# ht_capab: HT capabilities (list of flags) +# LDPC coding capability: [LDPC] = supported +# Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary +# channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz +# with secondary channel below the primary channel +# (20 MHz only if neither is set) +# Note: There are limits on which channels can be used with HT40- and +# HT40+. Following table shows the channels that may be available for +# HT40- and HT40+ use per IEEE 802.11n Annex J: +# freq HT40- HT40+ +# 2.4 GHz 5-13 1-7 (1-9 in Europe/Japan) +# 5 GHz 40,48,56,64 36,44,52,60 +# (depending on the location, not all of these channels may be available +# for use) +# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC] +# (SMPS disabled if neither is set) +# HT-greenfield: [GF] (disabled if not set) +# Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set) +# Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set) +# Tx STBC: [TX-STBC] (disabled if not set) +# Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial +# streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC +# disabled if none of these set +# HT-delayed Block Ack: [DELAYED-BA] (disabled if not set) +# Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not +# set) +# DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set) +# PSMP support: [PSMP] (disabled if not set) +# L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set) +# QcHostapd: +# LOWER byte for associated stations +# UPPER byte for overlapping stations +# each byte will have the following info +# bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 +# OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A +# bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 +# OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A +#ht_capab=[HT40-] [SHORT-GI-20] [SHORT-GI-40] +ht_capab=[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT] +#ht_capab=[LDPC] [HT40-] [HT40+] [SMPS-STATIC] [SMPS-DYNAMIC] [GF] [SHORT-GI-20] [SHORT-GI-40] [TX-STBC] [RX-STBC1] [RX-STBC12] [RX-STBC123] [DELAYED-BA] [MAX-AMSDU-7935] [DSSS_CCK-40] [PSMP] [LSIG-TXOP-PROT] + +##### IEEE 802.1X-2004 related configuration ################################## + +# Require IEEE 802.1X authorization +#ieee8021x=1 + +# IEEE 802.1X/EAPOL version +# hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL +# version 2. However, there are many client implementations that do not handle +# the new version number correctly (they seem to drop the frames completely). +# In order to make hostapd interoperate with these clients, the version number +# can be set to the older version (1) with this configuration value. +#eapol_version=2 + +# Optional displayable message sent with EAP Request-Identity. The first \0 +# in this string will be converted to ASCII-0 (nul). This can be used to +# separate network info (comma separated list of attribute=value pairs); see, +# e.g., RFC 4284. +#eap_message=hello +#eap_message=hello\0networkid=netw,nasid=foo,portid=0,NAIRealms=example.com + +# WEP rekeying (disabled if key lengths are not set or are set to 0) +# Key lengths for default/broadcast and individual/unicast keys: +# 5 = 40-bit WEP (also known as 64-bit WEP with 40 secret bits) +# 13 = 104-bit WEP (also known as 128-bit WEP with 104 secret bits) +#wep_key_len_broadcast=5 +#wep_key_len_unicast=5 +# Rekeying period in seconds. 0 = do not rekey (i.e., set keys only once) +#wep_rekey_period=300 + +# EAPOL-Key index workaround (set bit7) for WinXP Supplicant (needed only if +# only broadcast keys are used) +eapol_key_index_workaround=0 + +# EAP reauthentication period in seconds (default: 3600 seconds; 0 = disable +# reauthentication). +#eap_reauth_period=3600 + +# Use PAE group address (01:80:c2:00:00:03) instead of individual target +# address when sending EAPOL frames with driver=wired. This is the most common +# mechanism used in wired authentication, but it also requires that the port +# is only used by one station. +#use_pae_group_addr=1 + +##### Integrated EAP server ################################################### + +# Optionally, hostapd can be configured to use an integrated EAP server +# to process EAP authentication locally without need for an external RADIUS +# server. This functionality can be used both as a local authentication server +# for IEEE 802.1X/EAPOL and as a RADIUS server for other devices. + +# Use integrated EAP server instead of external RADIUS authentication +# server. This is also needed if hostapd is configured to act as a RADIUS +# authentication server. +eap_server=1 + +# Path for EAP server user database +#eap_user_file=/etc/hostapd.eap_user + +# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS +#ca_cert=/etc/hostapd.ca.pem + +# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS +#server_cert=/etc/hostapd.server.pem + +# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS +# This may point to the same file as server_cert if both certificate and key +# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be +# used by commenting out server_cert and specifying the PFX file as the +# private_key. +#private_key=/etc/hostapd.server.prv + +# Passphrase for private key +#private_key_passwd=secret passphrase + +# Enable CRL verification. +# Note: hostapd does not yet support CRL downloading based on CDP. Thus, a +# valid CRL signed by the CA is required to be included in the ca_cert file. +# This can be done by using PEM format for CA certificate and CRL and +# concatenating these into one file. Whenever CRL changes, hostapd needs to be +# restarted to take the new CRL into use. +# 0 = do not verify CRLs (default) +# 1 = check the CRL of the user certificate +# 2 = check all CRLs in the certificate path +#check_crl=1 + +# dh_file: File path to DH/DSA parameters file (in PEM format) +# This is an optional configuration file for setting parameters for an +# ephemeral DH key exchange. In most cases, the default RSA authentication does +# not use this configuration. However, it is possible setup RSA to use +# ephemeral DH key exchange. In addition, ciphers with DSA keys always use +# ephemeral DH keys. This can be used to achieve forward secrecy. If the file +# is in DSA parameters format, it will be automatically converted into DH +# params. This parameter is required if anonymous EAP-FAST is used. +# You can generate DH parameters file with OpenSSL, e.g., +# "openssl dhparam -out /etc/hostapd.dh.pem 1024" +#dh_file=/etc/hostapd.dh.pem + +# Configuration data for EAP-SIM database/authentication gateway interface. +# This is a text string in implementation specific format. The example +# implementation in eap_sim_db.c uses this as the UNIX domain socket name for +# the HLR/AuC gateway (e.g., hlr_auc_gw). In this case, the path uses "unix:" +# prefix. +#eap_sim_db=unix:/tmp/hlr_auc_gw.sock + +# Encryption key for EAP-FAST PAC-Opaque values. This key must be a secret, +# random value. It is configured as a 16-octet value in hex format. It can be +# generated, e.g., with the following command: +# od -tx1 -v -N16 /dev/random | colrm 1 8 | tr -d ' ' +#pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f + +# EAP-FAST authority identity (A-ID) +# A-ID indicates the identity of the authority that issues PACs. The A-ID +# should be unique across all issuing servers. In theory, this is a variable +# length field, but due to some existing implementations required A-ID to be +# 16 octets in length, it is strongly recommended to use that length for the +# field to provided interoperability with deployed peer implementation. This +# field is configured in hex format. +#eap_fast_a_id=101112131415161718191a1b1c1d1e1f + +# EAP-FAST authority identifier information (A-ID-Info) +# This is a user-friendly name for the A-ID. For example, the enterprise name +# and server name in a human-readable format. This field is encoded as UTF-8. +#eap_fast_a_id_info=test server + +# Enable/disable different EAP-FAST provisioning modes: +#0 = provisioning disabled +#1 = only anonymous provisioning allowed +#2 = only authenticated provisioning allowed +#3 = both provisioning modes allowed (default) +#eap_fast_prov=3 + +# EAP-FAST PAC-Key lifetime in seconds (hard limit) +#pac_key_lifetime=604800 + +# EAP-FAST PAC-Key refresh time in seconds (soft limit on remaining hard +# limit). The server will generate a new PAC-Key when this number of seconds +# (or fewer) of the lifetime remains. +#pac_key_refresh_time=86400 + +# EAP-SIM and EAP-AKA protected success/failure indication using AT_RESULT_IND +# (default: 0 = disabled). +#eap_sim_aka_result_ind=1 + +# Trusted Network Connect (TNC) +# If enabled, TNC validation will be required before the peer is allowed to +# connect. Note: This is only used with EAP-TTLS and EAP-FAST. If any other +# EAP method is enabled, the peer will be allowed to connect without TNC. +#tnc=1 + + +##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) ####################### + +# Interface to be used for IAPP broadcast packets +#iapp_interface=eth0 + + +##### RADIUS client configuration ############################################# +# for IEEE 802.1X with external Authentication Server, IEEE 802.11 +# authentication with external ACL for MAC addresses, and accounting + +# The own IP address of the access point (used as NAS-IP-Address) +own_ip_addr=127.0.0.1 + +# Optional NAS-Identifier string for RADIUS messages. When used, this should be +# a unique to the NAS within the scope of the RADIUS server. For example, a +# fully qualified domain name can be used here. +# When using IEEE 802.11r, nas_identifier must be set and must be between 1 and +# 48 octets long. +#nas_identifier=ap.example.com + +# RADIUS authentication server +#auth_server_addr=127.0.0.1 +#auth_server_port=1812 +#auth_server_shared_secret=secret + +# RADIUS accounting server +#acct_server_addr=127.0.0.1 +#acct_server_port=1813 +#acct_server_shared_secret=secret + +# Secondary RADIUS servers; to be used if primary one does not reply to +# RADIUS packets. These are optional and there can be more than one secondary +# server listed. +#auth_server_addr=127.0.0.2 +#auth_server_port=1812 +#auth_server_shared_secret=secret2 +# +#acct_server_addr=127.0.0.2 +#acct_server_port=1813 +#acct_server_shared_secret=secret2 + +# Retry interval for trying to return to the primary RADIUS server (in +# seconds). RADIUS client code will automatically try to use the next server +# when the current server is not replying to requests. If this interval is set, +# primary server will be retried after configured amount of time even if the +# currently used secondary server is still working. +#radius_retry_primary_interval=600 + + +# Interim accounting update interval +# If this is set (larger than 0) and acct_server is configured, hostapd will +# send interim accounting updates every N seconds. Note: if set, this overrides +# possible Acct-Interim-Interval attribute in Access-Accept message. Thus, this +# value should not be configured in hostapd.conf, if RADIUS server is used to +# control the interim interval. +# This value should not be less 600 (10 minutes) and must not be less than +# 60 (1 minute). +#radius_acct_interim_interval=600 + +# Dynamic VLAN mode; allow RADIUS authentication server to decide which VLAN +# is used for the stations. This information is parsed from following RADIUS +# attributes based on RFC 3580 and RFC 2868: Tunnel-Type (value 13 = VLAN), +# Tunnel-Medium-Type (value 6 = IEEE 802), Tunnel-Private-Group-ID (value +# VLANID as a string). vlan_file option below must be configured if dynamic +# VLANs are used. Optionally, the local MAC ACL list (accept_mac_file) can be +# used to set static client MAC address to VLAN ID mapping. +# 0 = disabled (default) +# 1 = option; use default interface if RADIUS server does not include VLAN ID +# 2 = required; reject authentication if RADIUS server does not include VLAN ID +#dynamic_vlan=0 + +# VLAN interface list for dynamic VLAN mode is read from a separate text file. +# This list is used to map VLAN ID from the RADIUS server to a network +# interface. Each station is bound to one interface in the same way as with +# multiple BSSIDs or SSIDs. Each line in this text file is defining a new +# interface and the line must include VLAN ID and interface name separated by +# white space (space or tab). +#vlan_file=/etc/hostapd.vlan + +# Interface where 802.1q tagged packets should appear when a RADIUS server is +# used to determine which VLAN a station is on. hostapd creates a bridge for +# each VLAN. Then hostapd adds a VLAN interface (associated with the interface +# indicated by 'vlan_tagged_interface') and the appropriate wireless interface +# to the bridge. +#vlan_tagged_interface=eth0 + + +##### RADIUS authentication server configuration ############################## + +# hostapd can be used as a RADIUS authentication server for other hosts. This +# requires that the integrated EAP server is also enabled and both +# authentication services are sharing the same configuration. + +# File name of the RADIUS clients configuration for the RADIUS server. If this +# commented out, RADIUS server is disabled. +#radius_server_clients=/etc/hostapd.radius_clients + +# The UDP port number for the RADIUS authentication server +#radius_server_auth_port=1812 + +# Use IPv6 with RADIUS server (IPv4 will also be supported using IPv6 API) +#radius_server_ipv6=1 + + +##### WPA/IEEE 802.11i configuration ########################################## + +# Enable WPA. Setting this variable configures the AP to require WPA (either +# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either +# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK. +# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys), +# RADIUS authentication server must be configured, and WPA-EAP must be included +# in wpa_key_mgmt. +# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0) +# and/or WPA2 (full IEEE 802.11i/RSN): +# bit0 = WPA +# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) +#wpa=1 + +# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit +# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase +# (8..63 characters) that will be converted to PSK. This conversion uses SSID +# so the PSK changes when ASCII passphrase is used and the SSID is changed. +# wpa_psk (dot11RSNAConfigPSKValue) +# wpa_passphrase (dot11RSNAConfigPSKPassPhrase) +#wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef +#wpa_passphrase=qualcomm + +# Optionally, WPA PSKs can be read from a separate text file (containing list +# of (PSK,MAC address) pairs. This allows more than one PSK to be configured. +# Use absolute path name to make sure that the files can be read on SIGHUP +# configuration reloads. +#wpa_psk_file=/etc/hostapd.wpa_psk + +# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The +# entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be +# added to enable SHA256-based stronger algorithms. +# (dot11RSNAConfigAuthenticationSuitesTable) +#wpa_key_mgmt=WPA-PSK +#wpa_key_mgmt=WPA-EAP + +# Set of accepted cipher suites (encryption algorithms) for pairwise keys +# (unicast packets). This is a space separated list of algorithms: +# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] +# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] +# Group cipher suite (encryption algorithm for broadcast and multicast frames) +# is automatically selected based on this configuration. If only CCMP is +# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise, +# TKIP will be used as the group cipher. +# (dot11RSNAConfigPairwiseCiphersTable) +# Pairwise cipher for WPA (v1) (default: TKIP) +#wpa_pairwise=TKIP CCMP +# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) +#rsn_pairwise=CCMP + +# Time interval for rekeying GTK (broadcast/multicast encryption keys) in +# seconds. (dot11RSNAConfigGroupRekeyTime) +wpa_group_rekey=86400 + +# Rekey GTK when any STA that possesses the current GTK is leaving the BSS. +# (dot11RSNAConfigGroupRekeyStrict) +#wpa_strict_rekey=1 + +# Time interval for rekeying GMK (master key used internally to generate GTKs +# (in seconds). +#wpa_gmk_rekey=86400 + +# Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of +# PTK to mitigate some attacks against TKIP deficiencies. +#wpa_ptk_rekey=600 + +# Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up +# roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN +# authentication and key handshake before actually associating with a new AP. +# (dot11RSNAPreauthenticationEnabled) +#rsn_preauth=1 +# +# Space separated list of interfaces from which pre-authentication frames are +# accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all +# interface that are used for connections to other APs. This could include +# wired interfaces and WDS links. The normal wireless data interface towards +# associated stations (e.g., wlan0) should not be added, since +# pre-authentication is only used with APs other than the currently associated +# one. +#rsn_preauth_interfaces=eth0 + +# peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e) is +# allowed. This is only used with RSN/WPA2. +# 0 = disabled (default) +# 1 = enabled +#peerkey=1 + +# ieee80211w: Whether management frame protection (MFP) is enabled +# 0 = disabled (default) +# 1 = optional +# 2 = required +#ieee80211w=0 + +# Association SA Query maximum timeout (in TU = 1.024 ms; for MFP) +# (maximum time to wait for a SA Query response) +# dot11AssociationSAQueryMaximumTimeout, 1...4294967295 +#assoc_sa_query_max_timeout=1000 + +# Association SA Query retry timeout (in TU = 1.024 ms; for MFP) +# (time between two subsequent SA Query requests) +# dot11AssociationSAQueryRetryTimeout, 1...4294967295 +#assoc_sa_query_retry_timeout=201 + + +# okc: Opportunistic Key Caching (aka Proactive Key Caching) +# Allow PMK cache to be shared opportunistically among configured interfaces +# and BSSes (i.e., all configurations within a single hostapd process). +# 0 = disabled (default) +# 1 = enabled +#okc=1 + + +##### IEEE 802.11r configuration ############################################## + +# Mobility Domain identifier (dot11FTMobilityDomainID, MDID) +# MDID is used to indicate a group of APs (within an ESS, i.e., sharing the +# same SSID) between which a STA can use Fast BSS Transition. +# 2-octet identifier as a hex string. +#mobility_domain=a1b2 + +# PMK-R0 Key Holder identifier (dot11FTR0KeyHolderID) +# 1 to 48 octet identifier. +# This is configured with nas_identifier (see RADIUS client section above). + +# Default lifetime of the PMK-RO in minutes; range 1..65535 +# (dot11FTR0KeyLifetime) +#r0_key_lifetime=10000 + +# PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID) +# 6-octet identifier as a hex string. +#r1_key_holder=000102030405 + +# Reassociation deadline in time units (TUs / 1.024 ms; range 1000..65535) +# (dot11FTReassociationDeadline) +#reassociation_deadline=1000 + +# List of R0KHs in the same Mobility Domain +# format: <128-bit key as hex string> +# This list is used to map R0KH-ID (NAS Identifier) to a destination MAC +# address when requesting PMK-R1 key from the R0KH that the STA used during the +# Initial Mobility Domain Association. +#r0kh=02:01:02:03:04:05 r0kh-1.example.com 000102030405060708090a0b0c0d0e0f +#r0kh=02:01:02:03:04:06 r0kh-2.example.com 00112233445566778899aabbccddeeff +# And so on.. One line per R0KH. + +# List of R1KHs in the same Mobility Domain +# format: <128-bit key as hex string> +# This list is used to map R1KH-ID to a destination MAC address when sending +# PMK-R1 key from the R0KH. This is also the list of authorized R1KHs in the MD +# that can request PMK-R1 keys. +#r1kh=02:01:02:03:04:05 02:11:22:33:44:55 000102030405060708090a0b0c0d0e0f +#r1kh=02:01:02:03:04:06 02:11:22:33:44:66 00112233445566778899aabbccddeeff +# And so on.. One line per R1KH. + +# Whether PMK-R1 push is enabled at R0KH +# 0 = do not push PMK-R1 to all configured R1KHs (default) +# 1 = push PMK-R1 to all configured R1KHs whenever a new PMK-R0 is derived +#pmk_r1_push=1 + +##### Passive scanning ######################################################## +# Scan different channels every N seconds. 0 = disable passive scanning. +#passive_scan_interval=60 + +# Listen N usecs on each channel when doing passive scanning. +# This value plus the time needed for changing channels should be less than +# 32 milliseconds (i.e. 32000 usec) to avoid interruptions to normal +# operations. Time needed for channel changing varies based on the used wlan +# hardware. +# default: disabled (0) +#passive_scan_listen=10000 + +# Passive scanning mode: +# 0 = scan all supported modes (802.11a/b/g/Turbo) (default) +# 1 = scan only the mode that is currently used for normal operations +#passive_scan_mode=1 + +# Maximum number of entries kept in AP table (either for passive scanning or +# for detecting Overlapping Legacy BSS Condition). The oldest entry will be +# removed when adding a new entry that would make the list grow over this +# limit. Note! Wi-Fi certification for IEEE 802.11g requires that OLBC is +# enabled, so this field should not be set to 0 when using IEEE 802.11g. +# default: 255 +#ap_table_max_size=255 + +# Number of seconds of no frames received after which entries may be deleted +# from the AP table. Since passive scanning is not usually performed frequently +# this should not be set to very small value. In addition, there is no +# guarantee that every scan cycle will receive beacon frames from the +# neighboring APs. +# default: 60 +#ap_table_expiration_time=3600 + + +##### Wi-Fi Protected Setup (WPS) ############################################# + +# WPS state +# 0 = WPS disabled (default) +# 1 = WPS enabled, not configured +# 2 = WPS enabled, configured +wps_state=0 + +# AP can be configured into a locked state where new WPS Registrar are not +# accepted, but previously authorized Registrars (including the internal one) +# can continue to add new Enrollees. +ap_setup_locked=1 + +# Universally Unique IDentifier (UUID; see RFC 4122) of the device +# This value is used as the UUID for the internal WPS Registrar. If the AP +# is also using UPnP, this value should be set to the device's UPnP UUID. +# If not configured, UUID will be generated based on the local MAC address. +#uuid=12345678-9abc-def0-1234-56789abcdef0 + +# Note: If wpa_psk_file is set, WPS is used to generate random, per-device PSKs +# that will be appended to the wpa_psk_file. If wpa_psk_file is not set, the +# default PSK (wpa_psk/wpa_passphrase) will be delivered to Enrollees. Use of +# per-device PSKs is recommended as the more secure option (i.e., make sure to +# set wpa_psk_file when using WPS with WPA-PSK). + +# When an Enrollee requests access to the network with PIN method, the Enrollee +# PIN will need to be entered for the Registrar. PIN request notifications are +# sent to hostapd ctrl_iface monitor. In addition, they can be written to a +# text file that could be used, e.g., to populate the AP administration UI with +# pending PIN requests. If the following variable is set, the PIN requests will +# be written to the configured file. +#wps_pin_requests=/var/run/hostapd_wps_pin_requests + +# Device Name +# User-friendly description of device; up to 32 octets encoded in UTF-8 +#device_name=Wireless AP + +# Manufacturer +# The manufacturer of the device (up to 64 ASCII characters) +#manufacturer=Qualcomm + +# Model Name +# Model of the device (up to 32 ASCII characters) +#model_name=QualcommSoftAP + +# Model Number +# Additional device description (up to 32 ASCII characters) +#model_number=123 + +# Serial Number +# Serial number of the device (up to 32 characters) +#serial_number=12345 + +# Primary Device Type +# Used format: -- +# categ = Category as an integer value +# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for +# default WPS OUI +# subcateg = OUI-specific Sub Category as an integer value +# Examples: +# 1-0050F204-1 (Computer / PC) +# 1-0050F204-2 (Computer / Server) +# 5-0050F204-1 (Storage / NAS) +# 6-0050F204-1 (Network Infrastructure / AP) +#device_type=6-0050F204-1 + +# OS Version +# 4-octet operating system version number (hex string) +#os_version=01020300 + +# Config Methods +# List of the supported configuration methods +config_methods=label display push_button keypad + +# Access point PIN for initial configuration and adding Registrars +# If not set, hostapd will not allow external WPS Registrars to control the +# access point. +#ap_pin=12345670 + +# Skip building of automatic WPS credential +# This can be used to allow the automatically generated Credential attribute to +# be replaced with pre-configured Credential(s). +#skip_cred_build=1 + +# Additional Credential attribute(s) +# This option can be used to add pre-configured Credential attributes into M8 +# message when acting as a Registrar. If skip_cred_build=1, this data will also +# be able to override the Credential attribute that would have otherwise been +# automatically generated based on network configuration. This configuration +# option points to an external file that much contain the WPS Credential +# attribute(s) as binary data. +#extra_cred=hostapd.cred + +# Credential processing +# 0 = process received credentials internally (default) +# 1 = do not process received credentials; just pass them over ctrl_iface to +# external program(s) +# 2 = process received credentials internally and pass them over ctrl_iface +# to external program(s) +# Note: With wps_cred_processing=1, skip_cred_build should be set to 1 and +# extra_cred be used to provide the Credential data for Enrollees. +# +# wps_cred_processing=1 will disabled automatic updates of hostapd.conf file +# both for Credential processing and for marking AP Setup Locked based on +# validation failures of AP PIN. An external program is responsible on updating +# the configuration appropriately in this case. +wps_cred_processing=0 + +# AP Settings Attributes for M7 +# By default, hostapd generates the AP Settings Attributes for M7 based on the +# current configuration. It is possible to override this by providing a file +# with pre-configured attributes. This is similar to extra_cred file format, +# but the AP Settings attributes are not encapsulated in a Credential +# attribute. +#ap_settings=hostapd.ap_settings + +# WPS UPnP interface +# If set, support for external Registrars is enabled. +#upnp_iface=br0 + +# Friendly Name (required for UPnP) +# Short description for end use. Should be less than 64 characters. +#friendly_name=Qualcomm Access Point + +# Manufacturer URL (optional for UPnP) +#manufacturer_url=http://www.qualcomm.com/ + +# Model Description (recommended for UPnP) +# Long description for end user. Should be less than 128 characters. +#model_description=Wireless Access Point + +# Model URL (optional for UPnP) +#model_url=http://www.qualcomm.com/ + +# Universal Product Code (optional for UPnP) +# 12-digit, all-numeric code that identifies the consumer package. +#upc=123456789012 + +##### Multiple BSSID support ################################################## +# +# Above configuration is using the default interface (wlan#, or multi-SSID VLAN +# interfaces). Other BSSIDs can be added by using separator 'bss' with +# default interface name to be allocated for the data packets of the new BSS. +# +# hostapd will generate BSSID mask based on the BSSIDs that are +# configured. hostapd will verify that dev_addr & MASK == dev_addr. If this is +# not the case, the MAC address of the radio must be changed before starting +# hostapd (ifconfig wlan0 hw ether ). +# +# BSSIDs are assigned in order to each BSS, unless an explicit BSSID is +# specified using the 'bssid' parameter. +# If an explicit BSSID is specified, it must be chosen such that it: +# - results in a valid MASK that covers it and the dev_addr +# - is not the same as the MAC address of the radio +# - is not the same as any other explicitly specified BSSID +# +# Please note that hostapd uses some of the values configured for the first BSS +# as the defaults for the following BSSes. However, it is recommended that all +# BSSes include explicit configuration of all relevant configuration items. +# +#bss=wlan0_0 +#ssid=test2 +# most of the above items can be used here (apart from radio interface specific +# items, like channel) + +#bss=wlan0_1 +#bssid=00:13:10:95:fe:0b +# ... diff --git a/prebuilt/etc/init.crda.sh b/prebuilt/etc/init.crda.sh new file mode 100644 index 0000000..d1a4b58 --- /dev/null +++ b/prebuilt/etc/init.crda.sh @@ -0,0 +1,34 @@ +#!/system/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/prebuilt/etc/init.d/10nfc_checker b/prebuilt/etc/init.d/10nfc_checker new file mode 100644 index 0000000..dd2741b --- /dev/null +++ b/prebuilt/etc/init.d/10nfc_checker @@ -0,0 +1,13 @@ +#!/system/bin/sh + +model=`getprop ro.product.model` + +if [ "$model" = "LG-D410" ] || ["$model" = "LG-D405" ] || ["$model" = "LG-D405n" ]; then + mount -o remount,rw /system + rm -rf /system/etc/permissions/android.hardware.nfc.xml + rm -rf /system/etc/permissions/android.hardware.nfc.hce.xml + rm -rf /system/lib/hw/nfc_nci.w7.so + rm -rf /system/app/NfcNci.apk + rm -rf /system/etc/init.d/10nfc_checker + mount -o remount,ro /system +fi diff --git a/prebuilt/etc/init.zetaw.fm.sh b/prebuilt/etc/init.zetaw.fm.sh new file mode 100644 index 0000000..481e06f --- /dev/null +++ b/prebuilt/etc/init.zetaw.fm.sh @@ -0,0 +1,106 @@ +#!/system/bin/sh +# Copyright (c) 2009-2011, 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 hw.fm.init 0 + +mode=`getprop hw.fm.mode` +version=`getprop hw.fm.version` +isAnalog=`getprop hw.fm.isAnalog` + +#find the transport type +TRANSPORT=`getprop ro.qualcomm.bt.hci_transport` + +LOG_TAG="qcom-fm" +LOG_NAME="${0}:" + +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 +} + +logi "In FM shell Script" +logi "mode: $mode" +logi "isAnalog: $isAnalog" +logi "Transport : $TRANSPORT" +logi "Version : $version" + +#$fm_qsoc_patches +# +case $mode in + "normal") + case $TRANSPORT in + "smd") + logi "inserting the radio transport module" + insmod /system/lib/modules/radio-iris-transport.ko + ;; + *) + logi "default transport case " + ;; + esac + /system/bin/fm_qsoc_patches $version 0 + ;; + "wa_enable") + /system/bin/fm_qsoc_patches $version 1 + ;; + "wa_disable") + /system/bin/fm_qsoc_patches $version 2 + ;; + "config_dac") + /system/bin/fm_qsoc_patches $version 3 $isAnalog + ;; + *) + logi "Shell: Default case" + /system/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 hw.fm.init 1 + +exit 0 diff --git a/prebuilt/etc/init.zetaw.post_boot.sh b/prebuilt/etc/init.zetaw.post_boot.sh new file mode 100644 index 0000000..3089008 --- /dev/null +++ b/prebuilt/etc/init.zetaw.post_boot.sh @@ -0,0 +1,629 @@ +#!/system/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. +# + +target=`getprop ro.board.platform` +debuggable=`getprop ro.debuggable` +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/pm_8x60/modes/cpu0/power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/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/pm_8x60/modes/cpu0/retention/idle_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu2/power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu3/power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/suspend_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu2/standalone_power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/modes/cpu3/standalone_power_collapse/idle_enabled + echo 1 > /sys/module/pm_8x60/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.qualcomm.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 + "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_show_resume_irq/parameters/debug_mask + 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 "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 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay + echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + echo 998000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq + echo 1 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy + echo 90 > /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 998000 > /sys/module/cpu_boost/parameters/sync_threshold + echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor + echo 1094000 > /sys/module/cpu_boost/parameters/input_boost_freq + echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms + 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 + # add read permission to max cpu frequency interface + case "$debuggable" in + "1") + chmod -h 664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + ;; + esac + 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_show_resume_irq/parameters/debug_mask + 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 + "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/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 2 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor + 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.qualcomm.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 + "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 ro.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") + start mpdecision + ;; + "msm8974") + start mpdecision + echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb + ;; + "apq8084") + rm /data/system/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 + +case "$target" in + "msm8226" | "msm8974" | "msm8610" | "apq8084" | "mpq8092" | "msm8610") + # Let kernel know our image version/variant/crm_version + 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 + ;; +esac diff --git a/prebuilt/etc/init.zetaw.ssr.wifi.sh b/prebuilt/etc/init.zetaw.ssr.wifi.sh new file mode 100644 index 0000000..76c18fc --- /dev/null +++ b/prebuilt/etc/init.zetaw.ssr.wifi.sh @@ -0,0 +1,104 @@ +#!/system/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 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. +# + +ssr_str="$1" +IFS=, +ssr_array=($ssr_str) +declare -i subsys_mask=0 + +# check user input subsystem with system device +ssr_check_subsystem_name() +{ + declare -i i=0 + subsys=`cat /sys/bus/msm_subsys/devices/subsys$i/name` + while [ "$subsys" != "" ] + do + if [ "$subsys" == "$ssr_name" ]; then + return 1 + fi + i=$i+1 + subsys=`cat /sys/bus/msm_subsys/devices/subsys$i/name` + done + return 0 +} + +# set subsystem mask to indicate which subsystem needs to be enabled +for num in "${!ssr_array[@]}" +do + case "${ssr_array[$num]}" in + "1") + subsys_mask=0 + ;; + "riva") + subsys_mask=$subsys_mask+1 + ;; + "3") + subsys_mask=63 + ;; + "adsp") + ssr_name=adsp + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+2 + fi + ;; + "modem") + ssr_name=modem + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+4 + fi + ;; + "wcnss") + ssr_name=wcnss + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+8 + fi + ;; + "venus") + ssr_name=venus + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+16 + fi + ;; + "external_modem") + ssr_name=external_modem + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+32 + fi + ;; + esac +done + +# enable selected subsystem restart + +# place SSR for Wifi handle to init.{$targetname}.ssr.wifi.sh -- bluetooth.kang@lge.com +if [ $((subsys_mask & 8)) == 8 ]; then + echo "related" > /sys/bus/msm_subsys/devices/subsys2/restart_level +else + echo "system" > /sys/bus/msm_subsys/devices/subsys2/restart_level +fi + diff --git a/prebuilt/etc/init.zetaw.wifi.sh b/prebuilt/etc/init.zetaw.wifi.sh new file mode 100644 index 0000000..d05e55d --- /dev/null +++ b/prebuilt/etc/init.zetaw.wifi.sh @@ -0,0 +1,143 @@ +#!/system/bin/sh +# Copyright (c) 2010-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 "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. +# +# This script will load and unload the wifi driver to put the wifi in +# in deep sleep mode so that there won't be voltage leakage. +# Loading/Unloading the driver only incase if the Wifi GUI is not going +# to Turn ON the Wifi. In the Script if the wlan driver status is +# ok(GUI loaded the driver) or loading(GUI is loading the driver) then +# the script won't do anything. Otherwise (GUI is not going to Turn On +# the Wifi) the script will load/unload the driver +# This script will get called after post bootup. + +target="$1" +serialno="$2" + +btsoc="" + +# No path is set up at this point so we have to do it here. +PATH=/sbin:/system/sbin:/system/bin:/system/xbin +export PATH + +# Trigger WCNSS platform driver +trigger_wcnss() +{ + # We need to trigger WCNSS platform driver, WCNSS driver + # will export a file which we must touch so that the + # driver knows that userspace is ready to handle firmware + # download requests. + + # See if an appropriately named device file is present + wcnssnode=`ls /dev/wcnss*` + case "$wcnssnode" in + *wcnss*) + # Before triggering wcnss, let it know that + # caldata is available at userspace. + if [ -e /data/misc/wifi/WCNSS_qcom_wlan_cal.bin ]; then + calparm=`ls /sys/module/wcnsscore/parameters/has_calibrated_data` + if [ -e $calparm ] && [ ! -e /data/misc/wifi/WCN_FACTORY ]; then + echo 1 > $calparm + fi + fi + # There is a device file. Write to the file + # so that the driver knows userspace is + # available for firmware download requests + echo 1 > $wcnssnode + ;; + + *) + # There is not a device file present, so + # the driver must not be available + echo "No WCNSS device node detected" + ;; + esac + + # Plumb down the device serial number + if [ -f /sys/devices/*wcnss-wlan/serial_number ]; then + cd /sys/devices/*wcnss-wlan + echo $serialno > serial_number + cd / + elif [ -f /sys/devices/platform/wcnss_wlan.0/serial_number ]; then + echo $serialno > /sys/devices/platform/wcnss_wlan.0/serial_number + fi +} + +#case "$target" in +# msm8974* | msm8226* | msm8610*) + + wlanchip="" + + echo "The WLAN Chip ID is $wlanchip" +# case "$wlanchip" in + +# *) + echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **" + echo "*** Use the default WCN driver. **" + setprop wlan.driver.ath 0 + rm /system/lib/modules/wlan.ko + ln -s /system/lib/modules/pronto/pronto_wlan.ko \ + /system/lib/modules/wlan.ko + + # Populate the writable driver configuration file + #if [ ! -e /data/misc/wifi/WCNSS_qcom_cfg.ini ]; then + rm /data/misc/wifi/WCNSS_qcom_cfg.ini + cp /system/etc/wifi/WCNSS_qcom_cfg.ini \ + /data/misc/wifi/WCNSS_qcom_cfg.ini + chown system:wifi /data/misc/wifi/WCNSS_qcom_cfg.ini + chmod 660 /data/misc/wifi/WCNSS_qcom_cfg.ini + #fi + rm /data/misc/wifi/WCNSS_qcom_wlan_nv.bin + cp /system/etc/wifi/WCNSS_qcom_wlan_nv.bin \ + /data/misc/wifi/WCNSS_qcom_wlan_nv.bin + chown system:wifi /data/misc/wifi/WCNSS_qcom_wlan_nv.bin + chmod 660 /data/misc/wifi/WCNSS_qcom_wlan_nv.bin + + + # The property below is used in Qcom SDK for softap to determine + # the wifi driver config file + setprop wlan.driver.config /data/misc/wifi/WCNSS_qcom_cfg.ini + + rm /etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin + ln -s /data/misc/wifi/WCNSS_qcom_wlan_nv.bin \ + /etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin + + rm /etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini + ln -s /data/misc/wifi/WCNSS_qcom_cfg.ini \ + /etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini + + # Trigger WCNSS platform driver + trigger_wcnss & +# ;; +# esac +# ;; +# *) +# ;; +#esac + +# Run audio init script +/system/bin/sh /system/etc/init.zetaw.audio.sh "$target" "$btsoc" diff --git a/prebuilt/etc/izat.conf b/prebuilt/etc/izat.conf new file mode 100644 index 0000000..48ce3dc --- /dev/null +++ b/prebuilt/etc/izat.conf @@ -0,0 +1,47 @@ +######################################## +# NLP/WIFI positioning options bit mask +######################################## +# Enable NLP fixes for WIPER/ODCPI feature => WIPER = 0x1 +# Enable free wifi scan injections for GEOFENCE => FREE_WIFI = 0x2 +# Enable SUPL2 MLD wifi => SUPL_WIFI = 0x4 +# default = WIPER | FREE_WIFI | SUPL_WIFI +#LGE_UPDATE_CHANGE jdoc.kim@lge.com, to disable wiper feature +#NLP_WIFI_LISTENER_MODE = 7 +NLP_WIFI_LISTENER_MODE = 0 + +################################################## +# Select WIFI Wait Timeout value in seconds for SUPL +################################################## +WIFI_WAIT_TIMEOUT_SELECT = 0 + +################################ +# Indoor Positioning Settings +################################ +# 0: QUIPC disabled, 1: QUIPC enabled, 2: forced QUIPC only +#LGE_UPDATE_CHANGE lgetaewon.kim, to disable quipc feature +#QUIPC_ENABLED = 1 +QUIPC_ENABLED = 0 + +################################ +# NLP Settings +################################ +# NLP_MODE 1: GNP Only, 2: QNP Only, 3: Combo +# NLP_TOLERANCE_TIME_FIRST: Time in ms used in Combo mode +# to determine how much Tolerance for first position +# NLP_TOLERANCE_TIME_AFTER: Time in ms used in Combo mode +# to determine how much Tolerance for positions after first +# NLP_THRESHOLD: Sets how many failures needed before +# switching preferred NLP in Combo mode +# NLP_ACCURACY_MULTIPLE: Determines how far off the accuracy +# must be, in multiples, between two NLP location reports to +# be considered much worse accuracy. Used in switching logic +#LGE_UPDATE_CHANGE jdoc.kim@lge.com, to disable QLP/GLP feature +NLP_MODE = 0 +NLP_TOLERANCE_TIME_FIRST = 5000 +NLP_TOLERANCE_TIME_AFTER = 20000 +NLP_THRESHOLD = 3 +NLP_ACCURACY_MULTIPLE = 2 + +# Threshold period for ZPP triggers +#LGE_UPDATAE_CHAGE wonkyum.kim, To change the interval. 10 sec -> 24 hour +ZPP_TRIGGER_THRESHOLD=86400000 diff --git a/prebuilt/etc/libnfc-brcm.conf b/prebuilt/etc/libnfc-brcm.conf new file mode 100644 index 0000000..ce161b0 --- /dev/null +++ b/prebuilt/etc/libnfc-brcm.conf @@ -0,0 +1,313 @@ +## this file is used by Broadcom's Hardware Abstraction Layer at external/libnfc-nci/halimpl/ + +############################################################################### +# Application options +APPL_TRACE_LEVEL=0xFF +PROTOCOL_TRACE_LEVEL=0xFFFFFFFF + +############################################################################### +# performance measurement +# Change this setting to control how often USERIAL log the performance (throughput) +# data on read/write/poll +# defailt is to log performance dara for every 100 read or write +#REPORT_PERFORMANCE_MEASURE=100 + +############################################################################### +# File used for NFA storage +NFA_STORAGE="/data/nfc" + +############################################################################### +# Snooze Mode Settings +# +# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0 +# to disable. +# +# If SNOOZE_MODE_CFG is not provided, the default settings are used: +# They are as follows: +# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C) +# 0 Idle Threshold Host +# 0 Idle Threshold HC +# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh) +# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh) +# +#SNOOZE_MODE_CFG={08:00:00:00:01} + +############################################################################### +# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC +NFC_WAKE_DELAY=20 + +############################################################################### +# Various Delay settings (in ms) used in USERIAL +# POWER_ON_DELAY +# Delay after turning on chip, before writing to transport (default 300) +# PRE_POWER_OFF_DELAY +# Delay after deasserting NFC-Wake before turn off chip (default 0) +# POST_POWER_OFF_DELAY +# Delay after turning off chip, before USERIAL_close returns (default 0) +# +#POWER_ON_DELAY=300 +#PRE_POWER_OFF_DELAY=0 +#POST_POWER_OFF_DELAY=0 + +############################################################################### +# LPTD mode configuration +# byte[0] is the length of the remaining bytes in this value +# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled). +# byte[1] is the param id it should be set to B9. +# byte[2] is the length of the LPTD parameters +# byte[3] indicates if LPTD is enabled +# if set to 0, LPTD will be disabled (parameters will still be sent). +# byte[4-n] are the LPTD parameters. +# By default, LPTD is enabled and default settings are used. +# See nfc_hal_dm_cfg.c for defaults +LPTD_CFG={23:B9:21:01:02:FF:FF:04:A0:0F:40:00:80:02:02:10:00:00:00:31:0C:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00} + +############################################################################### +# Startup Configuration (100 bytes maximum) +# +# For the 0xCA parameter, byte[9] (marked by 'AA') is for UICC0, and byte[10] (marked by BB) is +# for UICC1. The values are defined as: +# 0 : UICCx only supports ISO_DEP in low power mode. +# 2 : UICCx only supports Mifare in low power mode. +# 3 : UICCx supports both ISO_DEP and Mifare in low power mode. +# +# AA BB +NFA_DM_START_UP_CFG={1F:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00:00:00:00:00:00:00:00:00:00:80:01:01} + +############################################################################### +# Startup Vendor Specific Configuration (100 bytes maximum); +# byte[0] TLV total len = 0x5 +# byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f +# byte[2] NCI_MSG_FRAME_LOG = 0x9 +# byte[3] 2 +# byte[4] 0=turn off RF frame logging; 1=turn on +# byte[5] 0=turn off SWP frame logging; 1=turn on +# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01} + +############################################################################### +# Antenna Configuration - This data is used when setting 0xC8 config item +# at startup (before discovery is started). If not used, no value is sent. +# +# The settings for this value are documented here: +# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/ +# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx +# This document is maintained by Paul Forshaw. +# +# The values marked as ?? should be tweaked per antenna or customer/app: +# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04} +# array[0] = 0x20 is length of the payload from array[1] to the end +# array[1] = 0xC8 is PREINIT_DSP_CFG +#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0F:03:3C:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04} + +############################################################################### +# Configure crystal frequency when internal LPO can't detect the frequency. +#XTAL_FREQUENCY=0 +############################################################################### +# Configure the default Destination Gate used by HCI (the default is 4, which +# is the ETSI loopback gate. +NFA_HCI_DEFAULT_DEST_GATE=0xF0 + +############################################################################### +# Configure the single default SE to use. The default is to use the first +# SE that is detected by the stack. This value might be used when the phone +# supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use +# one of them (e.g. 0xF4). +#ACTIVE_SE=0xF3 + +############################################################################### +# Configure the NFC Extras to open and use a static pipe. If the value is +# not set or set to 0, then the default is use a dynamic pipe based on a +# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value +# for each UICC (where F3="UICC0" and F4="UICC1") +#NFA_HCI_STATIC_PIPE_ID_F3=0x70 +#NFA_HCI_STATIC_PIPE_ID_01=0x19 +NFA_HCI_STATIC_PIPE_ID_C0=0x19 +############################################################################### +# When disconnecting from Oberthur secure element, perform a warm-reset of +# the secure element to deselect the applet. +# The default hex value of the command is 0x3. If this variable is undefined, +# then this feature is not used. +OBERTHUR_WARM_RESET_COMMAND=0x03 + +############################################################################### +# Force UICC to only listen to the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F +UICC_LISTEN_TECH_MASK=0xC7 + +############################################################################### +# Allow UICC to be powered off if there is no traffic. +# Timeout is in ms. If set to 0, then UICC will not be powered off. +#UICC_IDLE_TIMEOUT=30000 +UICC_IDLE_TIMEOUT=0 + +############################################################################### +# AID for Empty Select command +# If specified, this AID will be substituted when an Empty SELECT command is +# detected. The first byte is the length of the AID. Maximum length is 16. +AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00} +############################################################################### +# Maximum Number of Credits to be allowed by the NFCC +# This value overrides what the NFCC specifices allowing the host to have +# the control to work-around transport limitations. If this value does +# not exist or is set to 0, the NFCC will provide the number of credits. +MAX_RF_DATA_CREDITS=1 + +############################################################################### +# This setting allows you to disable registering the T4t Virtual SE that causes +# the NFCC to send PPSE requests to the DH. +# The default setting is enabled (i.e. T4t Virtual SE is registered). +#REGISTER_VIRTUAL_SE=1 + +############################################################################### +# When screen is turned off, specify the desired power state of the controller. +# 0: power-off-sleep state; DEFAULT +# 1: full-power state +# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) +SCREEN_OFF_POWER_STATE=1 + +############################################################################### +# Firmware patch file +# If the value is not set then patch download is disabled. +FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd" + +############################################################################### +# Firmware pre-patch file (sent before the above patch file) +# If the value is not set then pre-patch is not used. +FW_PRE_PATCH="/vendor/firmware/bcm2079x_pre_firmware.ncd" + +############################################################################### +# Firmware patch format +# 1 = HCD +# 2 = NCD (default) +#NFA_CONFIG_FORMAT=2 + +############################################################################### +# SPD Debug mode +# If set to 1, any failure of downloading a patch will trigger a hard-stop +#SPD_DEBUG=0 + +############################################################################### +# SPD Max Retry Count +# The number of attempts to download a patch before giving up (defualt is 3). +# Note, this resets after a power-cycle. +#SPD_MAX_RETRY_COUNT=3 + +############################################################################### +# transport driver +# +# TRANSPORT_DRIVER= +# +# where can be, for example: +# "/dev/ttyS" (UART) +# "/dev/bcmi2cnfc" (I2C) +# "hwtun" (HW Tunnel) +# "/dev/bcmspinfc" (SPI) +# "/dev/btusb0" (BT USB) +TRANSPORT_DRIVER="/dev/bcm2079x" + +############################################################################### +# power control driver +# Specify a kernel driver that support ioctl commands to control NFC_EN and +# NFC_WAKE gpio signals. +# +# POWER_CONTRL_DRIVER= +# where can be, for example: +# "/dev/nfcpower" +# "/dev/bcmi2cnfc" (I2C) +# "/dev/bcmspinfc" (SPI) +# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal +POWER_CONTROL_DRIVER="/dev/bcm2079x" + +############################################################################### +# I2C transport driver options +# +BCMI2CNFC_ADDRESS=0 + +############################################################################### +# I2C transport driver try to read multiple packets in read() if data is available +# remove the comment below to enable this feature +#READ_MULTIPLE_PACKETS=1 + +############################################################################### +# SPI transport driver options +#SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00} + +############################################################################### +# UART transport driver options +# +# PORT=1,2,3,... +# BAUD=115200, 19200, 9600, 4800, +# DATABITS=8, 7, 6, 5 +# PARITY="even" | "odd" | "none" +# STOPBITS="0" | "1" | "1.5" | "2" + +#UART_PORT=2 +#UART_BAUD=115200 +#UART_DATABITS=8 +#UART_PARITY="none" +#UART_STOPBITS="1" + +############################################################################### +# Insert a delay in microseconds per byte after a write to NFCC. +# after writing a block of data to the NFCC, delay this an amopunt of time before +# writing next block of data. the delay is calculated as below +# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds +# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write +NFC_WRITE_DELAY=20 + +############################################################################### +# Maximum Number of Credits to be allowed by the NFCC +# This value overrides what the NFCC specifices allowing the host to have +# the control to work-around transport limitations. If this value does +# not exist or is set to 0, the NFCC will provide the number of credits. +MAX_RF_DATA_CREDITS=1 + +############################################################################### +# Antenna Configuration - This data is used when setting 0xC8 config item +# at startup (before discovery is started). If not used, no value is sent. +# +# The settings for this value are documented here: +# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/ +# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx +# This document is maintained by Paul Forshaw. +# +# The values marked as ?? should be tweaked per antenna or customer/app: +# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04} +# array[0] = 0x20 is length of the payload from array[1] to the end +# array[1] = 0xC8 is PREINIT_DSP_CFG +#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0F:03:3C:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04} + + +############################################################################### +# Force tag polling for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | +# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | +# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO | +# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE. +# +# Notable bits: +# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ +# NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */ +# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ +# NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */ +# NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */ +# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ +# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ +POLLING_TECH_MASK=0xEF + +############################################################################### +# Force P2P to only listen for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | +# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE +# +# Notable bits: +# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ +# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ +# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ +# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ +P2P_LISTEN_TECH_MASK=0xC4 + +PRESERVE_STORAGE=0x01 diff --git a/prebuilt/etc/libnfc-nxp.conf b/prebuilt/etc/libnfc-nxp.conf new file mode 100644 index 0000000..2972add --- /dev/null +++ b/prebuilt/etc/libnfc-nxp.conf @@ -0,0 +1,338 @@ +## This file is used by NFC NXP NCI HAL(external/libnfc-nci/halimpl/pn547) +## and NFC Service Java Native Interface Extensions (packages/apps/Nfc/nci/jni/extns/pn547) + +############################################################################### +# Application options +# Logging Levels +# NXPLOG_DEFAULT_LOGLEVEL 0x01 +# ANDROID_LOG_DEBUG 0x03 +# ANDROID_LOG_WARN 0x02 +# ANDROID_LOG_ERROR 0x01 +# ANDROID_LOG_SILENT 0x00 +# +NXPLOG_EXTNS_LOGLEVEL=0x03 +NXPLOG_NCIHAL_LOGLEVEL=0x03 +NXPLOG_NCIX_LOGLEVEL=0x03 +NXPLOG_NCIR_LOGLEVEL=0x03 +NXPLOG_FWDNLD_LOGLEVEL=0x03 +NXPLOG_TML_LOGLEVEL=0x03 + +############################################################################### +# Extension for Mifare reader enable +# 0x00 - Disabled +# 0x01 - Enabled +MIFARE_READER_ENABLE=0x01 + +############################################################################### +# File location for Firmware +#FW_STORAGE="/vendor/firmware/libpn547_fw.so" + +############################################################################### +# System clock source selection configuration +# CLK_SRC_XTAL - 0x01 +# CLK_SRC_PLL - 0x02 +NXP_SYS_CLK_SRC_SEL=0x02 + +############################################################################### +# System clock frequency selection configuration for PLL +# CLK_FREQ_13MHZ - 0x01 +# CLK_FREQ_19_2MHZ - 0x02 +# CLK_FREQ_24MHZ - 0x03 +# CLK_FREQ_26MHZ - 0x04 +# CLK_FREQ_38_4MHZ - 0x05 +# CLK_FREQ_52MHZ - 0x06 +NXP_SYS_CLK_FREQ_SEL=0x02 + +############################################################################### +# The timeout value to be used for clock request acknowledgment +# min value = 0x01 to max = 0x0A +NXP_SYS_CLOCK_TO_CFG=0x02 + +############################################################################### +# NXP proprietary settings +NXP_ACT_PROP_EXTN={2F, 02, 00} + +############################################################################### +# NFC forum profile settings +NXP_NFC_PROFILE_EXTN={20, 02, 05, 01, A0, 44, 01, 00} +############################################################################### +# Standby enable settings +# 0x00 - Disabled +# 0x01 - Enabled +NXP_CORE_STANDBY={2F, 00, 01, 01} + +############################################################################### +# NXP RF configuration settings for ALM/PLM settings +NXP_RF_CONF_BLK_1={ + 20, 02, F7, 21, + A0, 0E, 01, 01, + A0, 0D, 03, 00, 40, 04, + A0, 0D, 03, 04, 43, 20, + A0, 0D, 03, 04, FF, 05, + A0, 0D, 06, 06, 44, A3, 90, 03, 00, + A0, 0D, 06, 06, 30, CF, 00, 08, 00, + A0, 0D, 06, 06, 2F, 8F, 05, 80, 0C, + A0, 0D, 04, 06, 03, 00, 6E, + A0, 0D, 03, 06, 48, 1A, + A0, 0D, 03, 06, 43, A0, + A0, 0D, 06, 06, 42, 00, 00, F6, FA, + A0, 0D, 06, 06, 41, 80, 00, 00, 00, + A0, 0D, 03, 06, 37, 18, + A0, 0D, 03, 06, 16, 00, + A0, 0D, 03, 06, 15, 00, + A0, 0D, 06, 06, FF, 05, 00, 00, 00, + A0, 0D, 06, 08, 44, 00, 00, 00, 00, + A0, 0D, 06, 20, 4A, 00, 00, 00, 00, + A0, 0D, 06, 20, 42, 88, 10, FF, FF, + A0, 0D, 03, 20, 16, 00, + A0, 0D, 03, 20, 15, 00, + A0, 0D, 06, 22, 44, 22, 00, 02, 00, + A0, 0D, 06, 22, 2D, 50, 44, 0C, 00, + A0, 0D, 04, 32, 03, 40, 3D, + A0, 0D, 06, 32, 42, 00, 00, FF, FF, + A0, 0D, 03, 32, 16, 00, + A0, 0D, 03, 32, 15, 01, + A0, 0D, 03, 32, 0D, 22, + A0, 0D, 03, 32, 14, 22, + A0, 0D, 06, 32, 4A, 30, 0F, 01, 1F, + A0, 0D, 06, 34, 2D, 24, 77, 0C, 00, + A0, 0D, 06, 34, 44, 21, 00, 02, 00, + A0, 0D, 06, 35, 44, 21, 00, 02, 00 +} + +NXP_RF_CONF_BLK_2={ + 20, 02, F4, 1F, + A0, 0D, 06, 38, 4A, 53, 07, 01, 1B, + A0, 0D, 06, 38, 42, 68, 10, FF, FF, + A0, 0D, 03, 38, 16, 00, + A0, 0D, 03, 38, 15, 00, + A0, 0D, 06, 3A, 2D, 15, 47, 0D, 00, + A0, 0D, 06, 3C, 4A, 52, 07, 01, 1B, + A0, 0D, 06, 3C, 42, 68, 10, FF, FF, + A0, 0D, 03, 3C, 16, 00, + A0, 0D, 03, 3C, 15, 00, + A0, 0D, 06, 3E, 2D, 15, 47, 0D, 00, + A0, 0D, 06, 40, 42, F0, 10, FF, FF, + A0, 0D, 03, 40, 0D, 02, + A0, 0D, 03, 40, 14, 02, + A0, 0D, 06, 40, 4A, 12, 07, 00, 00, + A0, 0D, 03, 40, 16, 00, + A0, 0D, 03, 40, 15, 00, + A0, 0D, 06, 42, 2D, 15, 47, 0D, 00, + A0, 0D, 06, 46, 44, 21, 00, 02, 00, + A0, 0D, 06, 46, 2D, 05, 47, 0E, 00, + A0, 0D, 06, 44, 4A, 33, 07, 01, 07, + A0, 0D, 06, 44, 42, 88, 10, FF, FF, + A0, 0D, 03, 44, 16, 00, + A0, 0D, 03, 44, 15, 00, + A0, 0D, 06, 4A, 44, 22, 00, 02, 00, + A0, 0D, 06, 4A, 2D, 05, 37, 0C, 00, + A0, 0D, 06, 48, 4A, 33, 07, 01, 07, + A0, 0D, 06, 48, 42, 88, 10, FF, FF, + A0, 0D, 03, 48, 16, 00, + A0, 0D, 03, 48, 15, 00, + A0, 0D, 06, 4E, 44, 22, 00, 02, 00, + A0, 0D, 06, 4E, 2D, 05, 37, 0C, 00 +} +NXP_RF_CONF_BLK_3={ + 20, 02, F7, 1E, + A0, 0D, 06, 4C, 4A, 33, 07, 01, 07, + A0, 0D, 06, 4C, 42, 88, 10, FF, FF, + A0, 0D, 03, 4C, 16, 00, + A0, 0D, 03, 4C, 15, 00, + A0, 0D, 06, 52, 44, 22, 00, 02, 00, + A0, 0D, 06, 52, 2D, 05, 25, 0C, 00, + A0, 0D, 06, 50, 42, 90, 10, FF, FF, + A0, 0D, 06, 50, 4A, 11, 0F, 01, 07, + A0, 0D, 03, 50, 16, 00, + A0, 0D, 03, 50, 15, 00, + A0, 0D, 06, 56, 2D, 05, 9E, 0C, 00, + A0, 0D, 06, 56, 44, 22, 00, 02, 00, + A0, 0D, 06, 5C, 2D, 05, 69, 0C, 00, + A0, 0D, 06, 5C, 44, 21, 00, 02, 00, + A0, 0D, 06, 54, 42, 88, 10, FF, FF, + A0, 0D, 06, 54, 4A, 33, 07, 01, 07, + A0, 0D, 03, 54, 16, 00, + A0, 0D, 03, 54, 15, 00, + A0, 0D, 06, 5A, 42, 90, 10, FF, FF, + A0, 0D, 06, 5A, 4A, 31, 07, 01, 07, + A0, 0D, 03, 5A, 16, 00, + A0, 0D, 03, 5A, 15, 00, + A0, 0D, 06, 98, 2F, AF, 05, 80, 0F, + A0, 0D, 06, 9A, 42, 00, 00, FF, FF, + A0, 0D, 06, 30, 44, A3, 90, 03, 00, + A0, 0D, 06, 6C, 44, A3, 90, 03, 00, + A0, 0D, 06, 6C, 30, CF, 00, 08, 00, + A0, 0D, 06, 6C, 2F, 8F, 05, 80, 0C, + A0, 0D, 06, 70, 2F, 8F, 05, 80, 12, + A0, 0D, 06, 70, 30, CF, 00, 08, 00 +} +NXP_RF_CONF_BLK_4={ + 20, 02, F7, 1E, + A0, 0D, 06, 74, 2F, 8F, 05, 80, 12, + A0, 0D, 06, 74, 30, DF, 00, 07, 00, + A0, 0D, 06, 78, 2F, 1F, 06, 80, 01, + A0, 0D, 06, 78, 30, 3F, 00, 04, 00, + A0, 0D, 06, 78, 44, A2, 90, 03, 00, + A0, 0D, 03, 78, 47, 00, + A0, 0D, 06, 7C, 2F, AF, 05, 80, 0F, + A0, 0D, 06, 7C, 30, CF, 00, 07, 00, + A0, 0D, 06, 7C, 44, A3, 90, 03, 00, + A0, 0D, 06, 7D, 30, CF, 00, 08, 00, + A0, 0D, 06, 80, 2F, AF, 05, 80, 90, + A0, 0D, 06, 80, 44, A3, 90, 03, 00, + A0, 0D, 06, 84, 2F, AF, 05, 80, 92, + A0, 0D, 06, 84, 44, A3, 90, 03, 00, + A0, 0D, 06, 88, 2F, 7F, 04, 80, 10, + A0, 0D, 06, 88, 30, 5F, 00, 16, 00, + A0, 0D, 03, 88, 47, 00, + A0, 0D, 06, 88, 44, A1, 90, 03, 00, + A0, 0D, 03, 0C, 48, 1A, + A0, 0D, 03, 10, 43, 20, + A0, 0D, 06, 6A, 42, F8, 10, FF, FF, + A0, 0D, 03, 6A, 16, 00, + A0, 0D, 03, 6A, 15, 01, + A0, 0D, 06, 6A, 4A, 30, 0F, 01, 1F, + A0, 0D, 06, 8C, 42, 88, 10, FF, FF, + A0, 0D, 06, 8C, 4A, 33, 07, 01, 07, + A0, 0D, 03, 8C, 16, 00, + A0, 0D, 03, 8C, 15, 00, + A0, 0D, 06, 92, 42, 90, 10, FF, FF, + A0, 0D, 06, 92, 4A, 31, 07, 01, 07 +} + +############################################################################### +# Core configuration extensions +# It includes +# A002 - Clock Request +# 0x00 - Disabled +# 0x01 - Enabled +# A003 - Clock Selection +# Please refer to User Manual +# A004 - Clock Time Out +# Defined in ms +# A00E - Load Modulation Mode +# 0x00 - PLM +# 0x01 - ALM +# A012 - SWP interface 2 configuration +# 0x00 - SWP +# 0x02 - DWP +# Please refer to User Manual +# A040-A043 - Ultra Low Power Tag Detector +# Please refer to Application Note of ULPTD +# A05E - Jewel Reader +# Please refer to User Manual +# A0CD - SWP S1 line behavior +# Defined S1 High time out during Activation sequence +# A0EC - SWP1 interface +# 0x00 - Disabled +# 0x01 - Enabled +# A0ED - SWP2 interface +# 0x00 - Disabled +# 0x01 - Enabled +NXP_CORE_CONF_EXTN_PM={20, 02, 30, 0B, + A0, 02, 01, 01, + A0, 03, 01, 11, + A0, 04, 01, 02, + A0, 06, 01, 01, + A0, 11, 04, CD, 67, 22, 01, + A0, 5E, 01, 01, + A0, CD, 01, 0F, + A0, EC, 01, 01, + A0, ED, 01, 00, + A0, CB, 01, 78, + A0, CE, 01, 7F +} + +NXP_CORE_CONF_EXTN_XTAL={20, 02, 30, 0B, + A0, 02, 01, 00, + A0, 03, 01, 08, + A0, 04, 01, 02, + A0, 06, 01, 01, + A0, 11, 04, 14, 0B, B8, 14, + A0, 5E, 01, 01, + A0, CD, 01, 0F, + A0, EC, 01, 01, + A0, ED, 01, 00, + A0, CB, 01, 78, + A0, CE, 01, 7F +} + +NXP_CORE_CONF_EXTN={20, 02, 2C, 0A, + A0, 02, 01, 01, + A0, 03, 01, 11, + A0, 04, 01, 02, + A0, 11, 04, CD, 67, 22, 01, + A0, 5E, 01, 01, + A0, CD, 01, 0F, + A0, EC, 01, 01, + A0, ED, 01, 00, + A0, CB, 01, 78, + A0, CE, 01, 7F +} + +############################################################################### +# apply Low Power Polling(LPM) Algorithm, detecting RF field using short-term single carrier +# NORMAL Polling : {20, 02, 11, 04, A0, 40, 01, 00, A0, 41, 01, 04, A0, 42, 01, 19, A0, 43, 01, 50} +# LPM Polling : {20, 02, 11, 04, A0, 40, 01, 01, A0, 41, 01, 04, A0, 42, 01, 19, A0, 43, 01, 00} +# HYBRID Polling : {20, 02, 11, 04, A0, 40, 01, 01, A0, 41, 01, 04, A0, 42, 01, 19, A0, 43, 01, 04} + +NXP_POLLING_MODE={20, 02, 11, 04, + A0, 40, 01, 01, + A0, 41, 01, 04, + A0, 42, 01, 19, + A0, 43, 01, 04 +} + +############################################################################### +# Core configuration settings +NXP_CORE_CONF={ 20, 02, 2B, 0D, + 18, 01, 01, + 21, 01, 00, + 28, 01, 00, + 30, 01, 08, + 31, 01, 03, + 33, 04, 01, 02, 03, 04, + 50, 01, 02, + 54, 01, 06, + 5B, 01, 02, + 60, 01, 0E, + 80, 01, 01, + 81, 01, 01, + 82, 01, 0E + } + +############################################################################### +# Mifare Classic Key settings +#NXP_CORE_MFCKEY_SETTING={20, 02, 25,04, A0, 51, 06, A0, A1, A2, A3, A4, A5, +# A0, 52, 06, D3, F7, D3, F7, D3, F7, +# A0, 53, 06, FF, FF, FF, FF, FF, FF, +# A0, 54, 06, 00, 00, 00, 00, 00, 00} + +############################################################################### +# Default SE Options +# No secure element 0x00 +# eSE 0x01 +# UICC 0x02 + +NXP_DEFAULT_SE=0x02 + +############################################################################### +NXP_DEFAULT_NFCEE_TIMEOUT=0x06 + +############################################################################### +#Enable SWP full power mode when phone is power off +NXP_SWP_FULL_PWR_ON=0x00 + +############################################################################### +#Chip type +#PN547C2 0x01 +#PN65T 0x02 +NXP_NFC_CHIP=0x01 + +############################################################################### +#SWP Reader feature +#Timeout in seconds +NXP_SWP_RD_START_TIMEOUT=0x0A +#Timeout in seconds +NXP_SWP_RD_TAG_OP_TIMEOUT=0x01 diff --git a/prebuilt/etc/media_codecs.xml b/prebuilt/etc/media_codecs.xml new file mode 100644 index 0000000..0404ee2 --- /dev/null +++ b/prebuilt/etc/media_codecs.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prebuilt/etc/media_profiles.xml b/prebuilt/etc/media_profiles.xml new file mode 100644 index 0000000..2706fb4 --- /dev/null +++ b/prebuilt/etc/media_profiles.xml @@ -0,0 +1,420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prebuilt/etc/mixer_paths.xml b/prebuilt/etc/mixer_paths.xml new file mode 100644 index 0000000..2e732df --- /dev/null +++ b/prebuilt/etc/mixer_paths.xml @@ -0,0 +1,1230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/prebuilt/etc/msap.conf b/prebuilt/etc/msap.conf new file mode 100644 index 0000000..796a1af --- /dev/null +++ b/prebuilt/etc/msap.conf @@ -0,0 +1,34 @@ +#*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* +# +# MSAP Config file +# +# GENERAL DESCRIPTION +# This file contains the config params for MSAP +# +# Copyright (c) 2013 Qualcomm Atheros, Inc. +# All Rights Reserved. +# Qualcomm Atheros Confidential and Proprietary. +# +# Export of this technology or software is regulated by the U.S. Government. +# Diversion contrary to U.S. law prohibited. +#=============================================================================*/ + +# X86 ONLY - UBUNTU: +# Copy this file in the same directory where the executable is + +# MSAP supported +MSAP_ENABLED = 1 + +# Password for secured MSAP-enabled AP +SSID_PWD = qu1pspsk + +# Prefix before hostname to use in MSAP DNS SRV request +DNS_SRV_PREFIX = _msap._tcp + +PSA_LIST_DOWNLOAD_RETRY_COUNT = 4 + +# LOG LEVEL for MSAP +# OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5, LOG_ALL = 100 +MSAP_LOG_LEVEL = 4 + +USE_L3_ONLY = 0 \ No newline at end of file diff --git a/prebuilt/etc/nfc-nci.conf b/prebuilt/etc/nfc-nci.conf new file mode 100644 index 0000000..d0dbf1e --- /dev/null +++ b/prebuilt/etc/nfc-nci.conf @@ -0,0 +1,90 @@ +## this file is used by NFC Hardware Abstraction Layer at external/libnfc-nci/halimpl/ + +############################################################################### +#chip hardware version +#supported features +NFC_BUILD_ID = V2.1.S.01.01.01.01.1105000707.1112132050 +# Application logging mask +APPL_TRACE_LEVEL=0x00 +PROTOCOL_TRACE_LEVEL=0x00000000 + +##################################################################################### +# File used for NFA storage +NFA_STORAGE="/data/nfc" + +NFC_WAKE_DELAY=20 + +#default +NFA_DM_START_UP_CFG={17:80:01:00:08:01:01:11:01:01:AF:02:00:07:AF:02:01:07:C0:01:01:BF:01:02} +##################################################################################### +# listen to the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B. + +UICC_LISTEN_TECH_MASK=0x07 +# Protocol mask for NFC-A technology protocols(T1T,T2T and 4A). +# The bits (for NFC A protocol mask)are defined in nfa_api.h. +# Default is T4AT +# 0x01- T1T, 0x02- T2T, 0x04- T4AT +NFCA_PROTOCOL_MASK=0x04 +############################################################################### +# Force tag polling for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | +# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | +# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_A_ACTIVE | +# NFA_TECHNOLOGY_MASK_F_ACTIVE. +# +# 0x01- A, 0x02- B, 0x04- F, 0x20- Kovio +POLLING_TECH_MASK=0x27 + +# Force P2P to only listen for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | +# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE +# 0x01- NFC DEP A , 0x04:- NFC DEP F +P2P_LISTEN_TECH_MASK=0x05 + +############################################################################### +# Firmware patch file +# If the value is not set then patch download is disabled. +FW_PATCH="/system/etc/firmware/Signedrompatch.bin" +############################################################################### +# Firmware patch file +#FW_PRE_PATCH="/system/etc/firmware/Signedromprepatch.bin" +NVM_FILE_PATH="/system/etc/firmware/nfc_test.bin" +FUSED_NVM_FILE_PATH="/system/etc/firmware/fused_nvm.bin" +############################################################################### + +# +TRANSPORT_DRIVER="/dev/nfc-nci" + +############################################################################### +# power control driver + +POWER_CONTROL_DRIVER="/dev/nfc-nci" + +############################################################################### +# Maximum Number of Credits to be allowed by the NFCC +MAX_RF_DATA_CREDITS=1 +############################################################################### +#Patch and nvm update flags +# These flags needs to be set to enable the patch update and nvm update mechanism +# of middleware +############################################################################### +PATCH_UPDATE_ENABLE_FLAG=0x01 +NVM_UPDATE_ENABLE_FLAG=0x00 +FUSED_NVM_UPDATE_ENABLE_FLAG=0x00 +PM_ENABLE_FLAG=0x01 +SCREEN_OFF_POWER_STATE=0x01 +############################################################################### +# Time out value for closing the connection opened for patch download +############################################################################### +PATCH_DNLD_NFC_HAL_CMD_TOUT=4000 +PATCH_VERSION=21 +############################################################################### +#Default listen mode routing table +# This is the default listen mode routing configuration for NFCC. +# Default is for ISO DEP and NFC DEP +DEFAULT_LISTEN_MODE_ROUTING={00:02:0A:01:03:01:01:04:01:03:00:01:05} +############################################################################### diff --git a/prebuilt/etc/nfcee_access.xml b/prebuilt/etc/nfcee_access.xml new file mode 100644 index 0000000..d9821fd --- /dev/null +++ b/prebuilt/etc/nfcee_access.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/prebuilt/etc/quipc.conf b/prebuilt/etc/quipc.conf new file mode 100644 index 0000000..94f96ac --- /dev/null +++ b/prebuilt/etc/quipc.conf @@ -0,0 +1,12 @@ +# X86 ONLY - UBUNTU: +# Set QUIPC_CONF_PATH environment variable to indicate the path of this file, e.g: +# export QUIPC_CONF_PATH="/usr2/arahmat/quipc.conf" + +# URL for QUIPS server (N3) +QUIPS_SERVER_URL = https://n3.indoor.izat-location.net/quipsds/LookupService + +# URL for RAS server +RAS_SERVER_URL = https://r1.indoor.izat-location.net/ras/DeviceRegistration + +# Password for secured MSAP-enabled AP +SSID_PWD = qu1pspsk diff --git a/prebuilt/etc/sap.conf b/prebuilt/etc/sap.conf new file mode 100644 index 0000000..d66ff5d --- /dev/null +++ b/prebuilt/etc/sap.conf @@ -0,0 +1,44 @@ +################################ +# Sensor Settings +################################ + +# Needs to be set explicitly based on sensor +# There is no default value. +# used in loc_eng_reinit +#GYRO_BIAS_RANDOM_WALK= +#ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= +#ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= +#RATE_RANDOM_WALK_SPECTRAL_DENSITY= +#VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= + +# Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) +# used in loc_eng_reinit +SENSOR_ACCEL_BATCHES_PER_SEC=2 +SENSOR_ACCEL_SAMPLES_PER_BATCH=5 +SENSOR_GYRO_BATCHES_PER_SEC=2 +SENSOR_GYRO_SAMPLES_PER_BATCH=5 +# Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) +SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 +SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 +SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 +SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 + +# Sensor Control Mode (0=AUTO, 1=FORCE_ON) +# used in loc_eng_reinit +SENSOR_CONTROL_MODE=0 + +# Enable or Disable Sensors for GPS use (0=Enable, 1=Disable) +# used in loc_eng_reinit +#LGE_UPDATE_CHANGE jdoc.kim@lge.com, to disable sap feature +#SENSOR_USAGE=0 +SENSOR_USAGE=1 + +# Choose GSIFF sensor provider (1=Snapdragon Sensors Core, 2=Android NDK) +SENSOR_PROVIDER=1 + +# Bit mask used to define which sensor algorithms are used. +# Setting each bit has the following definition: +# 0x1 - DISABLE_INS_POSITIONING_FILTER +# 0x0 - ENABLE_INS_POSITIONING_FILTER +SENSOR_ALGORITHM_CONFIG_MASK=0x0 + diff --git a/prebuilt/etc/sec_config b/prebuilt/etc/sec_config new file mode 100644 index 0000000..62e5097 --- /dev/null +++ b/prebuilt/etc/sec_config @@ -0,0 +1,5 @@ +/* IPC Security Config */ +/* :: */ +16:4294967295:1000:3004 +/* Allow SS CTL service to be used by system and net_raw processes */ +43:4294967295:1000:3004 diff --git a/prebuilt/etc/thermal-engine-8226.conf b/prebuilt/etc/thermal-engine-8226.conf new file mode 100644 index 0000000..097f93f --- /dev/null +++ b/prebuilt/etc/thermal-engine-8226.conf @@ -0,0 +1,53 @@ +sampling 5000 + +[MONITOR_CPU_GPU_LCD] +algo_type monitor +sensor pa_therm0 +sampling 5000 +thresholds 43000 45000 47000 +thresholds_clr 41000 43000 45000 +actions cpu+gpu+lcd cpu+gpu+lcd cpu+gpu+lcd +action_info 1094400+320000000+231 998400+320000000+199 998400+320000000+159 + +[MONITOR_BATTERY] +algo_type monitor +sensor pa_therm0 +sampling 5000 +thresholds 43000 45000 47000 +thresholds_clr 41000 43000 45000 +actions battery battery battery +action_info 500 400 400 + +[PID-CPU0] +disable 1 + +[PID-CPU1] +disable 1 + +[PID-CPU2] +disable 1 + +[PID-CPU3] +disable 1 + +[PID-POPMEM] +disable 1 + +[CPU0-1_MONITOR] +algo_type monitor +sensor cpu0-1 +sampling 1000 +thresholds 115000 +thresholds_clr 110000 +actions shutdown +action_info 3000 + +[CPU2-3_MONITOR] +algo_type monitor +sensor cpu2-3 +sampling 1000 +thresholds 115000 +thresholds_clr 110000 +actions shutdown +action_info 3000 + diff --git a/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini b/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini new file mode 100644 index 0000000..a5b4882 --- /dev/null +++ b/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini @@ -0,0 +1,371 @@ +# This file allows user to override the factory + +# defaults for the WLAN Driver + + +# Enable IMPS or not +gEnableImps=1 + +# Enable/Disable Idle Scan + +gEnableIdleScan=0 + + +# Increase sleep duration (seconds) during IMPS +# 0 implies no periodic wake up from IMPS. Periodic wakeup is +# unnecessary if Idle Scan is disabled. +gImpsModSleepTime=0 + + +# Enable BMPS or not +gEnableBmps=1 + +# Enable suspend or not + +# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter + +gEnableSuspend=3 + + +# Phy Mode (auto, b, g, n, etc) +# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac +gDot11Mode=0 + + +# CSR Roaming Enable(1) Disable(0) + +gRoamingTime=0 + + +# Assigned MAC Addresses - This will be used until NV items are in place + +# Each byte of MAC address is represented in Hex format as XX + +Intf0MacAddress=000AF58989FF +Intf1MacAddress=000AF58989FE +Intf2MacAddress=000AF58989FD + +Intf3MacAddress=000AF58989FC + + +# UAPSD service interval for VO,VI, BE, BK traffic + +InfraUapsdVoSrvIntv=0 + +InfraUapsdViSrvIntv=0 + +InfraUapsdBeSrvIntv=0 + +InfraUapsdBkSrvIntv=0 + + +# Make 1x1 the default antenna configuration + +gNumRxAnt=1 + + +# Beacon filtering frequency (unit in beacon intervals) + +gNthBeaconFilter=50 + + +# Enable WAPI or not + +# WAPIIsEnabled=0 + + +# Flags to filter Mcast abd Bcast RX packets. + +# Value 0: No filtering, 1: Filter all Multicast. + +# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast + +McastBcastFilter=0 + + +#Flag to enable HostARPOffload feature or not + +hostArpOffload=1 + +# Flag to enable Host IPv6 NS Offload feature or not +hostNSOffload=1 + +#SoftAP Related Parameters + +# AP MAc addr + +gAPMacAddr=000AF589dcab + + +# 802.11n Protection flag + +gEnableApProt=1 + + +#Enable OBSS protection + +gEnableApOBSSProt=0 + + +#Enable/Disable UAPSD for SoftAP + +gEnableApUapsd=0 + + +# Fixed Rate + +gFixedRate=0 + + +# Maximum Tx power + +# gTxPowerCap=30 + + +# Fragmentation Threshold + +# gFragmentationThreshold=2346 + + +# RTS threshold + +RTSThreshold=2347 + + +# Intra-BSS forward + +gDisableIntraBssFwd=0 + + +# WMM Enable/Disable + +WmmIsEnabled=0 + + +# 802.11d support + +g11dSupportEnabled=0 + +# CCX Support and fast transition +CcxEnabled=0 +FastTransitionEnabled=1 +ImplicitQosIsEnabled=1 +gNeighborScanTimerPeriod=200 + +gNeighborLookupThreshold=78 + +gNeighborScanChannelMinTime=20 +gNeighborScanChannelMaxTime=30 + +# Legacy (non-CCX, non-802.11r) Fast Roaming Support +FastRoamEnabled=1 +gEnableFWRssiMonitoring=1 +# To enable, set FastRoamEnabled=1, gEnableFWRssiMonitoring=1, FastTransitionEnabled=1 +# To disable, set FastRoamEnabled=0, gEnableFWRssiMonitoring=0, FastTransitionEnabled=0 + +#Check if the AP to which we are roaming is better than current AP in terms of RSSI. +#Checking is disabled if set to Zero.Otherwise it will use this value as to how better +#the RSSI of the new/roamable AP should be for roaming +RoamRssiDiff=15 + +# SAP Country code + +# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door. + +# Example + +# US Indoor, USI + +# Korea Outdoor, KRO + +# Japan without optional byte, JP + +# France without optional byte, FR + +#gAPCntryCode=USI + + +#Short Guard Interval Enable/disable + +gShortGI20Mhz=1 + +gShortGI40Mhz=1 + + +#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled + +gAPAutoShutOff=0 + + +# SAP auto channel selection configuration + +# 0 = disable auto channel selection + +# 1 = enable auto channel selection, channel provided by supplicant will be ignored + +gApAutoChannelSelection=0 + + +# Listen Energy Detect Mode Configuration + +# Valid values 0-128 + +# 128 means disable Energy Detect feature + +# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled. + +# 10-128 are reserved. + +# The EDET threshold mapping is as follows in 3dB step: + +# 0 = -60 dBm + +# 1 = -63 dBm + +# 2 = -66 dBm + +# ... + +# 7 = -81 dBm + +# 8 = -84 dBm + +# 9 = -87 dBm + +# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as: + +# + +# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm. + +# + +gEnablePhyAgcListenMode=128 + + +#Preferred channel to start BT AMP AP mode (0 means, any channel) + +BtAmpPreferredChannel=0 + + +#Preferred band (both or 2.4 only or 5 only) + +BandCapability=1 + + +#Beacon Early Termination (1 = enable the BET feature, 0 = disable) + +enableBeaconEarlyTermination=1 + +beaconEarlyTerminationWakeInterval=11 + + +#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable) + +gEnableBtAmp=0 + + +#SOFTAP Channel Range selection + +gAPChannelSelectStartChannel=1 + +gAPChannelSelectEndChannel=11 + + +#SOFTAP Channel Range selection Operating band + +# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND + +gAPChannelSelectOperatingBand=0 + + +#Channel Bonding +gChannelBondingMode5GHz=1 + + +#Enable Keep alive with non-zero period value + +gStaKeepAlivePeriod = 30 + +#AP LINK MONITOR TIMEOUT is used for both SAP and GO mode. +#It is used to change the frequency of keep alive packets in the AP Link Monitor period which is by +#default 20s. Currently the keep alive packets are sent as an interval of 3s but after this change +#the keep alive packet frequency can be changed. + +#gApLinkMonitorPeriod = 3 + + +#If set will start with active scan after driver load, otherwise will start with + +#passive scan to find out the domain + +gEnableBypass11d=1 + + +#If set to 0, will not scan DFS channels + +gEnableDFSChnlScan=1 + + +gVhtChannelWidth=2 +gEnableLogp=1 + + +# Enable Automatic Tx Power control + +gEnableAutomaticTxPowerControl=1 + +# 0 for OLPC 1 for CLPC and SCPC +gEnableCloseLoop=1 + +#Data Inactivity Timeout when in powersave (in ms) +gDataInactivityTimeout=200 + +# VHT Tx/Rx MCS values +# Valid values are 0,1,2. If commented out, the default value is 0. +# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 +gVhtRxMCS=2 +gVhtTxMCS=2 + +gEnableLpwrImgTransition=1 + +# Enable Tx beamforming +gTxBFEnable=0 + +# Enable Tx LDPC +#gTxLdpcEnable = 1 for HT mode, 2 for VHT mode,3 for both HT and VHT +gTxLdpcEnable=3 + +# Oxygen network (prop IE for IBSS) +gEnableOxygenNwk=0 + +# Valid values are 2048,4096,8192 and so on +# Please don't use values other than the ones mentioned above +gMaxMediumTime=4096 + +# LGE_CHANGE_S, [WiFi][jaeoh.oh@lge.com], 2013-10-23, To improve running current consumption +# Set Listen Interval +gBmpsMinListenInterval=1 +gBmpsMaxListenInterval=10 +gBmpsModListenInterval=5 +gPowerUsage=Mod + +#DTIM Skip +gEnableModulatedDTIM=3 +# LGE_CHANGE_E, [WiFi][jaeoh.oh@lge.com], 2013-10-23, To improve running current consumption + +# LGE_CHANGE_S, [WiFi][cheolsook.lee@lge.com], 2013-10-25, P2p connection issue . +isP2pDeviceAddrAdministrated=1 +# LGE_CHANGE_E, [WiFi][cheolsook.lee@lge.com], 2013-10-25, P2p connection issue . + +gScanResultAgeCount=1 + +gApLinkMonitorPeriod=30 + +#enable/disable PNO scan support.(background) +gPNOScanSupport=0 + +END + +# Note: Configuration parser would not read anything past the END marker + diff --git a/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin b/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin new file mode 100644 index 0000000..ea827ec Binary files /dev/null and b/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin differ diff --git a/prebuilt/etc/wifi/p2p_supplicant_overlay.conf b/prebuilt/etc/wifi/p2p_supplicant_overlay.conf new file mode 100644 index 0000000..2d12ecb --- /dev/null +++ b/prebuilt/etc/wifi/p2p_supplicant_overlay.conf @@ -0,0 +1,4 @@ +disable_scan_offload=1 +config_methods=virtual_display virtual_push_button keypad +device_name=Android +manufacturer=LG diff --git a/prebuilt/etc/wifi/wpa_supplicant_overlay.conf b/prebuilt/etc/wifi/wpa_supplicant_overlay.conf new file mode 100644 index 0000000..b200dc3 --- /dev/null +++ b/prebuilt/etc/wifi/wpa_supplicant_overlay.conf @@ -0,0 +1,6 @@ +disable_scan_offload=1 +tdls_external_control=1 +p2p_disabled=1 +config_methods=virtual_display virtual_push_button keypad +device_name=Android +manufacturer=LG diff --git a/prebuilt/usr/idc/touch_dev.idc b/prebuilt/usr/idc/touch_dev.idc new file mode 100644 index 0000000..65544f3 --- /dev/null +++ b/prebuilt/usr/idc/touch_dev.idc @@ -0,0 +1,49 @@ +# Copyright (C) 2011 The Android Open Source 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. + +# +# Input Device Calibration File for the Tuna touch screen. +# + +device.internal = 1 + +# Basic Parameters +touch.deviceType = touchScreen +touch.orientationAware = 1 + +# Gesture Mode Parameters +touch.gestureMode = spots + + +# Size +touch.size.calibration = geometric +touch.size.scale = 1 +touch.size.bias = 0 +touch.size.isSummed = 0 + +# Pressure +# Driver reports signal strength as pressure. +# +# A normal thumb touch typically registers about 200 signal strength +# units although we don't expect these values to be accurate. +touch.pressure.calibration = physical +touch.pressure.scale = 0.004 + +# Orientation +touch.orientation.calibration = none + +touch.distance.calibration = none +touch.distance.scale = 1 + +keyboard.layout = gpio-keys \ No newline at end of file diff --git a/prebuilt/usr/keylayout/AVRCP.kl b/prebuilt/usr/keylayout/AVRCP.kl new file mode 100644 index 0000000..736b43c --- /dev/null +++ b/prebuilt/usr/keylayout/AVRCP.kl @@ -0,0 +1,23 @@ +# Copyright (C) 2010 The Android Open Source 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. + +# Key layout used for Bluetooth AVRCP support. + +key 200 MEDIA_PLAY WAKE +key 201 MEDIA_PAUSE WAKE +key 166 MEDIA_STOP WAKE +key 163 MEDIA_NEXT WAKE +key 165 MEDIA_PREVIOUS WAKE +key 168 MEDIA_REWIND WAKE +key 208 MEDIA_FAST_FORWARD WAKE diff --git a/prebuilt/usr/keylayout/Generic.kl b/prebuilt/usr/keylayout/Generic.kl new file mode 100644 index 0000000..1413319 --- /dev/null +++ b/prebuilt/usr/keylayout/Generic.kl @@ -0,0 +1,425 @@ +# Copyright (C) 2010 The Android Open Source 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. + +# +# Generic key layout file for full alphabetic US English PC style external keyboards. +# +# This file is intentionally very generic and is intended to support a broad rang of keyboards. +# Do not edit the generic key layout to support a specific keyboard; instead, create +# a new key layout file with the required keyboard configuration. +# + +key 1 ESCAPE +key 2 1 +key 3 2 +key 4 3 +key 5 4 +key 6 5 +key 7 6 +key 8 7 +key 9 8 +key 10 9 +key 11 0 +key 12 MINUS +key 13 EQUALS +key 14 DEL +key 15 TAB +key 16 Q +key 17 W +key 18 E +key 19 R +key 20 T +key 21 Y +key 22 U +key 23 I +key 24 O +key 25 P +key 26 LEFT_BRACKET +key 27 RIGHT_BRACKET +key 28 ENTER +key 29 CTRL_LEFT +key 30 A +key 31 S +key 32 D +key 33 F +key 34 G +key 35 H +key 36 J +key 37 K +key 38 L +key 39 SEMICOLON +key 40 APOSTROPHE +key 41 GRAVE +key 42 SHIFT_LEFT +key 43 BACKSLASH +key 44 Z +key 45 X +key 46 C +key 47 V +key 48 B +key 49 N +key 50 M +key 51 COMMA +key 52 PERIOD +key 53 SLASH +key 54 SHIFT_RIGHT +key 55 NUMPAD_MULTIPLY +key 56 ALT_LEFT +key 57 SPACE +key 58 CAPS_LOCK +key 59 F1 +key 60 F2 +key 61 F3 +key 62 F4 +key 63 F5 +key 64 F6 +key 65 F7 +key 66 F8 +key 67 F9 +key 68 F10 +key 69 NUM_LOCK +key 70 SCROLL_LOCK +key 71 NUMPAD_7 +key 72 NUMPAD_8 +key 73 NUMPAD_9 +key 74 NUMPAD_SUBTRACT +key 75 NUMPAD_4 +key 76 NUMPAD_5 +key 77 NUMPAD_6 +key 78 NUMPAD_ADD +key 79 NUMPAD_1 +key 80 NUMPAD_2 +key 81 NUMPAD_3 +key 82 NUMPAD_0 +key 83 NUMPAD_DOT +# key 84 (undefined) +key 85 ZENKAKU_HANKAKU +key 86 BACKSLASH +key 87 F11 +key 88 F12 +key 89 RO +# key 90 "KEY_KATAKANA" +# key 91 "KEY_HIRAGANA" +key 92 HENKAN +key 93 KATAKANA_HIRAGANA +key 94 MUHENKAN +key 95 NUMPAD_COMMA +key 96 NUMPAD_ENTER +key 97 CTRL_RIGHT +key 98 NUMPAD_DIVIDE +key 99 SYSRQ +key 100 ALT_RIGHT +# key 101 "KEY_LINEFEED" +key 102 MOVE_HOME +key 103 DPAD_UP +key 104 PAGE_UP +key 105 DPAD_LEFT +key 106 DPAD_RIGHT +key 107 MOVE_END +key 108 DPAD_DOWN +key 109 PAGE_DOWN +key 110 INSERT +key 111 FORWARD_DEL +# key 112 "KEY_MACRO" +key 113 VOLUME_MUTE +key 114 VOLUME_DOWN +key 115 VOLUME_UP +key 116 POWER WAKE +key 117 NUMPAD_EQUALS +# key 118 "KEY_KPPLUSMINUS" +key 119 BREAK +# key 120 (undefined) +key 121 NUMPAD_COMMA +key 122 KANA +key 123 EISU +key 124 YEN +key 125 META_LEFT +key 126 META_RIGHT +key 127 MENU WAKE_DROPPED +key 128 MEDIA_STOP +# key 129 "KEY_AGAIN" +# key 130 "KEY_PROPS" +# key 131 "KEY_UNDO" +# key 132 "KEY_FRONT" +# key 133 "KEY_COPY" +# key 134 "KEY_OPEN" +# key 135 "KEY_PASTE" +# key 136 "KEY_FIND" +# key 137 "KEY_CUT" +# key 138 "KEY_HELP" +key 139 MENU WAKE_DROPPED +key 140 CALCULATOR +# key 141 "KEY_SETUP" +key 142 POWER WAKE +key 143 POWER WAKE +# key 144 "KEY_FILE" +# key 145 "KEY_SENDFILE" +# key 146 "KEY_DELETEFILE" +# key 147 "KEY_XFER" +# key 148 "KEY_PROG1" +# key 149 "KEY_PROG2" +key 150 EXPLORER +# key 151 "KEY_MSDOS" +key 152 POWER WAKE +# key 153 "KEY_DIRECTION" +# key 154 "KEY_CYCLEWINDOWS" +key 155 ENVELOPE +key 156 BOOKMARK +# key 157 "KEY_COMPUTER" +key 158 BACK WAKE_DROPPED +key 159 FORWARD +key 160 MEDIA_CLOSE +key 161 MEDIA_EJECT +key 162 MEDIA_EJECT +key 163 MEDIA_NEXT +key 164 MEDIA_PLAY_PAUSE +key 165 MEDIA_PREVIOUS +key 166 MEDIA_STOP +key 167 MEDIA_RECORD +key 168 MEDIA_REWIND +key 169 CALL +# key 170 "KEY_ISO" +key 171 MUSIC +key 172 HOME +# key 173 "KEY_REFRESH" +# key 174 "KEY_EXIT" +# key 175 "KEY_MOVE" +# key 176 "KEY_EDIT" +key 177 PAGE_UP +key 178 PAGE_DOWN +key 179 NUMPAD_LEFT_PAREN +key 180 NUMPAD_RIGHT_PAREN +# key 181 "KEY_NEW" +# key 182 "KEY_REDO" +# key 183 F13 +# key 184 F14 +# key 185 F15 +# key 186 F16 +# key 187 F17 +# key 188 F18 +# key 189 F19 +# key 190 F20 +# key 191 F21 +# key 192 F22 +# key 193 F23 +# key 194 F24 +# key 195 (undefined) +# key 196 (undefined) +# key 197 (undefined) +# key 198 (undefined) +# key 199 (undefined) +key 200 MEDIA_PLAY +key 201 MEDIA_PAUSE +# key 202 "KEY_PROG3" +# key 203 "KEY_PROG4" +# key 204 (undefined) +# key 205 "KEY_SUSPEND" +# key 206 "KEY_CLOSE" +key 207 MEDIA_PLAY +key 208 MEDIA_FAST_FORWARD +# key 209 "KEY_BASSBOOST" +# key 210 "KEY_PRINT" +# key 211 "KEY_HP" +key 212 CAMERA +key 213 MUSIC +# key 214 "KEY_QUESTION" +key 215 ENVELOPE +# key 216 "KEY_CHAT" +key 217 SEARCH +# key 218 "KEY_CONNECT" +# key 219 "KEY_FINANCE" +# key 220 "KEY_SPORT" +# key 221 "KEY_SHOP" +# key 222 "KEY_ALTERASE" +# key 223 "KEY_CANCEL" +key 224 BRIGHTNESS_DOWN +key 225 BRIGHTNESS_UP +key 226 HEADSETHOOK + +key 256 BUTTON_1 +key 257 BUTTON_2 +key 258 BUTTON_3 +key 259 BUTTON_4 +key 260 BUTTON_5 +key 261 BUTTON_6 +key 262 BUTTON_7 +key 263 BUTTON_8 +key 264 BUTTON_9 +key 265 BUTTON_10 +key 266 BUTTON_11 +key 267 BUTTON_12 +key 268 BUTTON_13 +key 269 BUTTON_14 +key 270 BUTTON_15 +key 271 BUTTON_16 + +key 288 BUTTON_1 +key 289 BUTTON_2 +key 290 BUTTON_3 +key 291 BUTTON_4 +key 292 BUTTON_5 +key 293 BUTTON_6 +key 294 BUTTON_7 +key 295 BUTTON_8 +key 296 BUTTON_9 +key 297 BUTTON_10 +key 298 BUTTON_11 +key 299 BUTTON_12 +key 300 BUTTON_13 +key 301 BUTTON_14 +key 302 BUTTON_15 +key 303 BUTTON_16 + + +key 304 BUTTON_A +key 305 BUTTON_B +key 306 BUTTON_C +key 307 BUTTON_X +key 308 BUTTON_Y +key 309 BUTTON_Z +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 312 BUTTON_L2 +key 313 BUTTON_R2 +key 314 BUTTON_SELECT +key 315 BUTTON_START +key 316 BUTTON_MODE +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + + +# key 352 "KEY_OK" +key 353 DPAD_CENTER +# key 354 "KEY_GOTO" +# key 355 "KEY_CLEAR" +# key 356 "KEY_POWER2" +# key 357 "KEY_OPTION" +# key 358 "KEY_INFO" +# key 359 "KEY_TIME" +# key 360 "KEY_VENDOR" +# key 361 "KEY_ARCHIVE" +key 362 GUIDE +# key 363 "KEY_CHANNEL" +# key 364 "KEY_FAVORITES" +# key 365 "KEY_EPG" +key 366 DVR +# key 367 "KEY_MHP" +# key 368 "KEY_LANGUAGE" +# key 369 "KEY_TITLE" +# key 370 "KEY_SUBTITLE" +# key 371 "KEY_ANGLE" +# key 372 "KEY_ZOOM" +# key 373 "KEY_MODE" +# key 374 "KEY_KEYBOARD" +# key 375 "KEY_SCREEN" +# key 376 "KEY_PC" +key 377 TV +# key 378 "KEY_TV2" +# key 379 "KEY_VCR" +# key 380 "KEY_VCR2" +# key 381 "KEY_SAT" +# key 382 "KEY_SAT2" +# key 383 "KEY_CD" +# key 384 "KEY_TAPE" +# key 385 "KEY_RADIO" +# key 386 "KEY_TUNER" +# key 387 "KEY_PLAYER" +# key 388 "KEY_TEXT" +# key 389 "KEY_DVD" +# key 390 "KEY_AUX" +# key 391 "KEY_MP3" +# key 392 "KEY_AUDIO" +# key 393 "KEY_VIDEO" +# key 394 "KEY_DIRECTORY" +# key 395 "KEY_LIST" +# key 396 "KEY_MEMO" +key 397 CALENDAR +# key 398 "KEY_RED" +# key 399 "KEY_GREEN" +# key 400 "KEY_YELLOW" +# key 401 "KEY_BLUE" +key 402 CHANNEL_UP +key 403 CHANNEL_DOWN +# key 404 "KEY_FIRST" +# key 405 "KEY_LAST" +# key 406 "KEY_AB" +# key 407 "KEY_NEXT" +# key 408 "KEY_RESTART" +# key 409 "KEY_SLOW" +# key 410 "KEY_SHUFFLE" +# key 411 "KEY_BREAK" +# key 412 "KEY_PREVIOUS" +# key 413 "KEY_DIGITS" +# key 414 "KEY_TEEN" +# key 415 "KEY_TWEN" + +key 429 CONTACTS + +# key 448 "KEY_DEL_EOL" +# key 449 "KEY_DEL_EOS" +# key 450 "KEY_INS_LINE" +# key 451 "KEY_DEL_LINE" + + +key 464 FUNCTION +key 465 ESCAPE FUNCTION +key 466 F1 FUNCTION +key 467 F2 FUNCTION +key 468 F3 FUNCTION +key 469 F4 FUNCTION +key 470 F5 FUNCTION +key 471 F6 FUNCTION +key 472 F7 FUNCTION +key 473 F8 FUNCTION +key 474 F9 FUNCTION +key 475 F10 FUNCTION +key 476 F11 FUNCTION +key 477 F12 FUNCTION +key 478 1 FUNCTION +key 479 2 FUNCTION +key 480 D FUNCTION +key 481 E FUNCTION +key 482 F FUNCTION +key 483 S FUNCTION +key 484 B FUNCTION + + +# key 497 KEY_BRL_DOT1 +# key 498 KEY_BRL_DOT2 +# key 499 KEY_BRL_DOT3 +# key 500 KEY_BRL_DOT4 +# key 501 KEY_BRL_DOT5 +# key 502 KEY_BRL_DOT6 +# key 503 KEY_BRL_DOT7 +# key 504 KEY_BRL_DOT8 + +# Keys defined by HID usages +key usage 0x0c006F BRIGHTNESS_UP +key usage 0x0c0070 BRIGHTNESS_DOWN + +# Joystick and game controller axes. +# Axes that are not mapped will be assigned generic axis numbers by the input subsystem. +axis 0x00 X +axis 0x01 Y +axis 0x02 Z +axis 0x03 RX +axis 0x04 RY +axis 0x05 RZ +axis 0x06 THROTTLE +axis 0x07 RUDDER +axis 0x08 WHEEL +axis 0x09 GAS +axis 0x0a BRAKE +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_0079_Product_0011.kl b/prebuilt/usr/keylayout/Vendor_0079_Product_0011.kl new file mode 100644 index 0000000..2ae2a01 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_0079_Product_0011.kl @@ -0,0 +1,23 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Classic NES Controller + +key 289 BUTTON_A +key 290 BUTTON_B +key 297 BUTTON_START +key 296 BUTTON_SELECT + +axis 0x00 HAT_X +axis 0x01 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_045e_Product_028e.kl b/prebuilt/usr/keylayout/Vendor_045e_Product_028e.kl new file mode 100644 index 0000000..301601a --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_045e_Product_028e.kl @@ -0,0 +1,46 @@ +# Copyright (C) 2011 The Android Open Source 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. + +# +# XBox 360 USB Controller +# + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 314 BACK +key 315 BUTTON_START +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +# Left and right stick. +# The reported value for flat is 128 out of a range from -32767 to 32768, which is absurd. +# This confuses applications that rely on the flat value because the joystick actually +# settles in a flat range of +/- 4096 or so. +axis 0x00 X flat 4096 +axis 0x01 Y flat 4096 +axis 0x03 Z flat 4096 +axis 0x04 RZ flat 4096 + +# Triggers. +axis 0x02 LTRIGGER +axis 0x05 RTRIGGER + +# Hat. +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_046d_Product_c216.kl b/prebuilt/usr/keylayout/Vendor_046d_Product_c216.kl new file mode 100644 index 0000000..6743323 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_046d_Product_c216.kl @@ -0,0 +1,37 @@ +# Copyright (C) 2011 The Android Open Source 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. + +# +# Logitech Dual Action Controller +# + +key 0x120 BUTTON_A +key 0x123 BUTTON_B +key 0x121 BUTTON_X +key 0x122 BUTTON_Y +key 0x124 BUTTON_L1 +key 0x125 BUTTON_R1 +key 0x126 BUTTON_L2 +key 0x127 BUTTON_R2 +key 0x128 BUTTON_SELECT +key 0x129 BUTTON_START +key 0x12a BUTTON_THUMBL +key 0x12b BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x02 Z +axis 0x05 RZ +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_046d_Product_c219.kl b/prebuilt/usr/keylayout/Vendor_046d_Product_c219.kl new file mode 100644 index 0000000..2fa964c --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_046d_Product_c219.kl @@ -0,0 +1,35 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Logitech Logitech Cordless RumblePad 2 + +key 305 BUTTON_A +key 306 BUTTON_B +key 304 BUTTON_X +key 307 BUTTON_Y +key 308 BUTTON_L1 +key 309 BUTTON_R1 +key 310 BUTTON_L2 +key 311 BUTTON_R2 +key 313 BUTTON_START +key 312 BACK +key 314 BUTTON_THUMBL +key 315 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x02 Z +axis 0x05 RZ +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_046d_Product_c21f.kl b/prebuilt/usr/keylayout/Vendor_046d_Product_c21f.kl new file mode 100644 index 0000000..a9ba378 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_046d_Product_c21f.kl @@ -0,0 +1,36 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Logitech Wireless Gamepad F710 + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_046d_Product_c294.kl b/prebuilt/usr/keylayout/Vendor_046d_Product_c294.kl new file mode 100644 index 0000000..5492f49 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_046d_Product_c294.kl @@ -0,0 +1,53 @@ +# Copyright (C) 2011 The Android Open Source 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. + +# +# Logitech G25 Racing Wheel (in Compatibility Mode) +# + +# 4 way buttons above hat +key 0x121 BUTTON_A +key 0x123 BUTTON_B +key 0x120 BUTTON_X +key 0x122 BUTTON_Y + +# Row of buttons under hat +key 0x12b BUTTON_1 +key 0x128 BUTTON_2 +key 0x129 BUTTON_3 +key 0x12a BUTTON_4 + +# Gear shift positions +# 0x12a top-left gear (aliased as BUTTON_4) +# 0x12b bottom-left gear (aliased as BUTTON_1) + +# Buttons on wheel +key 0x127 BUTTON_L1 +key 0x126 BUTTON_R1 + +# Toggles under wheel +key 0x125 BUTTON_L2 +key 0x124 BUTTON_R2 + +# Hat +axis 0x10 HAT_X +axis 0x11 HAT_Y + +# Steering Wheel +axis 0x00 WHEEL + +# Accelerator / Brake +# 00..7e : accelerator +# 80..ff : brake +axis 0x01 split 0x7f GAS BRAKE diff --git a/prebuilt/usr/keylayout/Vendor_046d_Product_c299.kl b/prebuilt/usr/keylayout/Vendor_046d_Product_c299.kl new file mode 100644 index 0000000..d42963d --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_046d_Product_c299.kl @@ -0,0 +1,62 @@ +# Copyright (C) 2011 The Android Open Source 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. + +# +# Logitech G25 Racing Wheel (in Native Mode) +# + +# 4 way buttons above hat +key 0x121 BUTTON_A +key 0x123 BUTTON_B +key 0x120 BUTTON_X +key 0x122 BUTTON_Y + +# Row of buttons under hat +key 0x12b BUTTON_1 +key 0x128 BUTTON_2 +key 0x129 BUTTON_3 +key 0x12a BUTTON_4 + +# Gear shift positions +key 0x12c BUTTON_5 +key 0x12d BUTTON_6 +key 0x12e BUTTON_7 +key 0x12f BUTTON_8 +key 0x2d0 BUTTON_9 +key 0x2d1 BUTTON_10 +key 0x2d2 BUTTON_11 + +# Buttons on wheel +key 0x127 BUTTON_L1 +key 0x126 BUTTON_R1 + +# Toggles under wheel +key 0x125 BUTTON_L2 +key 0x124 BUTTON_R2 + +# Hat +axis 0x10 HAT_X +axis 0x11 HAT_Y + +# Steering Wheel +axis 0x00 WHEEL + +# Clutch +axis 0x01 invert GENERIC_1 + +# Accelerator +axis 0x02 invert GAS + +# Brake +axis 0x05 invert BRAKE diff --git a/prebuilt/usr/keylayout/Vendor_046d_Product_c532.kl b/prebuilt/usr/keylayout/Vendor_046d_Product_c532.kl new file mode 100644 index 0000000..741c2e1 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_046d_Product_c532.kl @@ -0,0 +1,133 @@ +# Copyright (C) 2010 The Android Open Source 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. + +# +# Logitech Revue Wireless keyboard +# +# Notes: +# - The GRAVE key is emulated by the keyboard. +# ALT + LEFT_BRACKET produces GRAVE. +# ALT + RIGHT_BRACKET produces SHIFT + GRAVE. +# - FORWARD_DEL is produced by fn + BACKSPACE +# - PAGE_UP / PAGE_DOWN is produced by fn + CHANNEL_UP / CHANNEL_DOWN +# - The AVR / STB / TV power and input buttons seem to be non-functional +# as well as several of the other fn buttons and the PIP button? + +key 1 ESCAPE +key 2 1 +key 3 2 +key 4 3 +key 5 4 +key 6 5 +key 7 6 +key 8 7 +key 9 8 +key 10 9 +key 11 0 +key 12 MINUS +key 13 EQUALS +key 14 DEL +key 15 TAB +key 16 Q +key 17 W +key 18 E +key 19 R +key 20 T +key 21 Y +key 22 U +key 23 I +key 24 O +key 25 P +key 26 LEFT_BRACKET +key 27 RIGHT_BRACKET +key 28 ENTER +key 29 CTRL_LEFT +key 30 A +key 31 S +key 32 D +key 33 F +key 34 G +key 35 H +key 36 J +key 37 K +key 38 L +key 39 SEMICOLON +key 40 APOSTROPHE +key 41 GRAVE +key 42 SHIFT_LEFT +key 43 BACKSLASH +key 44 Z +key 45 X +key 46 C +key 47 V +key 48 B +key 49 N +key 50 M +key 51 COMMA +key 52 PERIOD +key 53 SLASH +key 54 SHIFT_RIGHT +key 56 ALT_RIGHT +key 57 SPACE +key 58 CAPS_LOCK +key 59 F1 +key 60 F2 +key 61 F3 +key 62 F4 +key 63 F5 +key 64 F6 +key 65 F7 +key 66 F8 +key 67 F9 +key 68 F10 +key 87 F11 +key 88 F12 +key 96 DPAD_CENTER +key 97 CTRL_RIGHT +key 102 MOVE_HOME +key 103 DPAD_UP +key 104 PAGE_UP +key 105 DPAD_LEFT +key 106 DPAD_RIGHT +key 107 MOVE_END +key 108 DPAD_DOWN +key 109 PAGE_DOWN +key 110 NUMPAD_ENTER +key 111 FORWARD_DEL +key 113 VOLUME_MUTE +key 114 VOLUME_DOWN +key 115 VOLUME_UP +key 119 MEDIA_PAUSE +key 125 SEARCH +key 127 MENU +key 156 BOOKMARK +key 158 BACK +key 163 MEDIA_NEXT +key 165 MEDIA_PREVIOUS +key 166 MEDIA_STOP +key 167 MEDIA_RECORD +key 168 MEDIA_REWIND +key 172 HOME +key 207 MEDIA_PLAY +key 208 MEDIA_FAST_FORWARD +# key 288 left mouse button +# key 289 right mouse button (fn + button) +key 362 GUIDE +key 366 DVR +key 377 TV +key 402 CHANNEL_UP +key 403 CHANNEL_DOWN +key 418 ZOOM_IN +key 419 ZOOM_OUT + diff --git a/prebuilt/usr/keylayout/Vendor_054c_Product_0268.kl b/prebuilt/usr/keylayout/Vendor_054c_Product_0268.kl new file mode 100644 index 0000000..7c60137 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_054c_Product_0268.kl @@ -0,0 +1,76 @@ +# Copyright (C) 2011 The Android Open Source 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. + +# +# Sony Playstation(R)3 Controller +# + +key 0x124 DPAD_UP +key 0x125 DPAD_RIGHT +key 0x126 DPAD_DOWN +key 0x127 DPAD_LEFT + +key 0x120 BUTTON_SELECT +key 0x123 BUTTON_START +key 0x12e BUTTON_A +key 0x12d BUTTON_B +key 0x12f BUTTON_X +key 0x12c BUTTON_Y +key 0x12a BUTTON_L1 +key 0x12b BUTTON_R1 +key 0x128 BUTTON_L2 +key 0x129 BUTTON_R2 +key 0x121 BUTTON_THUMBL +key 0x122 BUTTON_THUMBR + +# PS key +key 0x2d0 HOME + +# Left Analog Stick +axis 0x00 X +axis 0x01 Y + +# Right Analog Stick +axis 0x02 Z +axis 0x05 RZ + +# DPAD +# axis 0x2c -HAT_Y +# axis 0x2d +HAT_X +# axis 0x2e +HAT_Y +# axis 0x2f -HAT_X + +# L2 trigger +axis 0x30 LTRIGGER + +# R2 trigger +axis 0x31 RTRIGGER + +# L1 trigger +# axis 0x32 + +# R1 trigger +# axis 0x33 + +# Triangle +# axis 0x34 + +# Circle +# axis 0x35 + +# Cross +# axis 0x36 + +# Square +# axis 0x37 diff --git a/prebuilt/usr/keylayout/Vendor_0583_Product_2060.kl b/prebuilt/usr/keylayout/Vendor_0583_Product_2060.kl new file mode 100644 index 0000000..92c8a14 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_0583_Product_2060.kl @@ -0,0 +1,27 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# ION GO PAD + +key 288 BUTTON_A +key 289 BUTTON_B +key 290 BUTTON_X +key 291 BUTTON_Y +key 294 BUTTON_L1 +key 295 BUTTON_R1 +key 292 BUTTON_L2 +key 293 BUTTON_R2 + +axis 0x00 HAT_X +axis 0x01 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_05ac_Product_0239.kl b/prebuilt/usr/keylayout/Vendor_05ac_Product_0239.kl new file mode 100644 index 0000000..b0c358e --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_05ac_Product_0239.kl @@ -0,0 +1,119 @@ +# Copyright (C) 2010 The Android Open Source 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. + +# +# Apple Wireless Keyboard +# +# Notes: +# - Keys such as PAGE_UP and FORWARD_DEL are produced using the +# function key. +# - Special function keys for brightness control, etc. are not +# implemented here. + +key 1 ESCAPE +key 2 1 +key 3 2 +key 4 3 +key 5 4 +key 6 5 +key 7 6 +key 8 7 +key 9 8 +key 10 9 +key 11 0 +key 12 MINUS +key 13 EQUALS +key 14 DEL +key 15 TAB +key 16 Q +key 17 W +key 18 E +key 19 R +key 20 T +key 21 Y +key 22 U +key 23 I +key 24 O +key 25 P +key 26 LEFT_BRACKET +key 27 RIGHT_BRACKET +key 28 ENTER +key 29 CTRL_LEFT +key 30 A +key 31 S +key 32 D +key 33 F +key 34 G +key 35 H +key 36 J +key 37 K +key 38 L +key 39 SEMICOLON +key 40 APOSTROPHE +key 41 GRAVE +key 42 SHIFT_LEFT +key 43 BACKSLASH +key 44 Z +key 45 X +key 46 C +key 47 V +key 48 B +key 49 N +key 50 M +key 51 COMMA +key 52 PERIOD +key 53 SLASH +key 54 SHIFT_RIGHT +key 56 ALT_LEFT +key 57 SPACE +key 58 CAPS_LOCK +key 59 F1 +key 60 F2 +key 61 F3 +key 62 F4 +key 63 F5 +key 64 F6 +key 65 F7 +key 66 F8 +key 67 F9 +key 68 F10 +key 87 F11 +key 88 F12 +key 100 ALT_RIGHT +key 102 MOVE_HOME +key 103 DPAD_UP +key 104 PAGE_UP +key 105 DPAD_LEFT +key 106 DPAD_RIGHT +key 107 MOVE_END +key 108 DPAD_DOWN +key 109 PAGE_DOWN +key 110 NUMPAD_ENTER +key 111 FORWARD_DEL +key 113 VOLUME_MUTE +key 114 VOLUME_DOWN +key 115 VOLUME_UP +key 120 APP_SWITCH +key 125 META_LEFT +key 126 META_RIGHT +key 161 MEDIA_EJECT +key 163 MEDIA_NEXT +key 164 MEDIA_PLAY_PAUSE +key 165 MEDIA_PREVIOUS +# key 204 show gadgets +key 224 BRIGHTNESS_DOWN +key 225 BRIGHTNESS_UP +# key 229 blank special function on F5 +# key 230 blank special function on F6 +key 464 FUNCTION diff --git a/prebuilt/usr/keylayout/Vendor_1038_Product_1412.kl b/prebuilt/usr/keylayout/Vendor_1038_Product_1412.kl new file mode 100644 index 0000000..551b0bd --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1038_Product_1412.kl @@ -0,0 +1,31 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Steelseries Free + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 316 BUTTON_SELECT + +axis 0x00 X +axis 0x01 Y +axis 0x02 Z +axis 0x05 RZ +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_12bd_Product_d015.kl b/prebuilt/usr/keylayout/Vendor_12bd_Product_d015.kl new file mode 100644 index 0000000..557d62f --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_12bd_Product_d015.kl @@ -0,0 +1,27 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Hitgaming SNES Retro + +key 306 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 304 BUTTON_Y +key 308 BUTTON_L1 +key 309 BUTTON_R1 +key 313 BUTTON_START +key 312 BUTTON_SELECT + +axis 0x00 HAT_X +axis 0x01 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1689_Product_fd00.kl b/prebuilt/usr/keylayout/Vendor_1689_Product_fd00.kl new file mode 100644 index 0000000..8407b13 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1689_Product_fd00.kl @@ -0,0 +1,38 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Razer Onza Tournament Edition + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR +key 706 DPAD_UP +key 705 DPAD_RIGHT +key 707 DPAD_DOWN +key 704 DPAD_LEFT + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER diff --git a/prebuilt/usr/keylayout/Vendor_1689_Product_fd01.kl b/prebuilt/usr/keylayout/Vendor_1689_Product_fd01.kl new file mode 100644 index 0000000..cacc075 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1689_Product_fd01.kl @@ -0,0 +1,36 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Razer Xbox 360 Gamepad + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1689_Product_fe00.kl b/prebuilt/usr/keylayout/Vendor_1689_Product_fe00.kl new file mode 100644 index 0000000..467173f --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1689_Product_fe00.kl @@ -0,0 +1,36 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Razer Sabertooth Elite + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1bad_Product_f016.kl b/prebuilt/usr/keylayout/Vendor_1bad_Product_f016.kl new file mode 100644 index 0000000..00f8559 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1bad_Product_f016.kl @@ -0,0 +1,36 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Madcatz Gamepad + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1bad_Product_f023.kl b/prebuilt/usr/keylayout/Vendor_1bad_Product_f023.kl new file mode 100644 index 0000000..175a523 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1bad_Product_f023.kl @@ -0,0 +1,35 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Mad Catz MLG GamePad for Xbox 360 + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1bad_Product_f027.kl b/prebuilt/usr/keylayout/Vendor_1bad_Product_f027.kl new file mode 100644 index 0000000..216e3da --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1bad_Product_f027.kl @@ -0,0 +1,36 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# MadCatz FPS Pro + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1bad_Product_f036.kl b/prebuilt/usr/keylayout/Vendor_1bad_Product_f036.kl new file mode 100644 index 0000000..f27de1c --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1bad_Product_f036.kl @@ -0,0 +1,36 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# MadCatz Generic XBox Controller + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BACK +key 316 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_1d79_Product_0009.kl b/prebuilt/usr/keylayout/Vendor_1d79_Product_0009.kl new file mode 100644 index 0000000..a3d5bbd --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_1d79_Product_0009.kl @@ -0,0 +1,40 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# Nyko Playpad / Playpad Pro + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 158 BACK +key 172 HOME +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR +key 103 DPAD_UP +key 105 DPAD_LEFT +key 106 DPAD_RIGHT +key 108 DPAD_DOWN + +axis 0x00 X +axis 0x01 Y +axis 0x02 Z +axis 0x05 RZ +axis 0x09 RTRIGGER +axis 0x0a LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/Vendor_22b8_Product_093d.kl b/prebuilt/usr/keylayout/Vendor_22b8_Product_093d.kl new file mode 100644 index 0000000..2749c5b --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_22b8_Product_093d.kl @@ -0,0 +1,105 @@ +# Copyright (C) 2010 The Android Open Source 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. + +# +# Motorola Bluetooth Wireless Keyboard. +# + +key 1 BACK +key 2 1 +key 3 2 +key 4 3 +key 5 4 +key 6 5 +key 7 6 +key 8 7 +key 9 8 +key 10 9 +key 11 0 +key 12 MINUS +key 13 EQUALS +key 14 DEL +key 15 TAB +key 16 Q +key 17 W +key 18 E +key 19 R +key 20 T +key 21 Y +key 22 U +key 23 I +key 24 O +key 25 P +key 26 LEFT_BRACKET +key 27 RIGHT_BRACKET +key 28 ENTER +key 29 CTRL_LEFT +key 30 A +key 31 S +key 32 D +key 33 F +key 34 G +key 35 H +key 36 J +key 37 K +key 38 L +key 39 SEMICOLON +key 40 APOSTROPHE +key 41 GRAVE +key 42 SHIFT_LEFT +key 43 BACKSLASH +key 44 Z +key 45 X +key 46 C +key 47 V +key 48 B +key 49 N +key 50 M +key 51 COMMA +key 52 PERIOD +key 53 SLASH +key 54 SHIFT_RIGHT +key 56 ALT_LEFT +key 57 SPACE +key 58 CAPS_LOCK +key 59 F1 +key 60 F2 +key 61 F3 +key 62 F4 +key 63 F5 +key 64 F6 +key 65 F7 +key 66 F8 +key 67 F9 +key 68 F10 +key 87 F11 +key 88 F12 +key 97 CTRL_RIGHT +key 102 HOME +key 103 DPAD_UP +key 105 DPAD_LEFT +key 106 DPAD_RIGHT +key 107 MOVE_END +key 108 DPAD_DOWN +key 111 FORWARD_DEL +key 113 VOLUME_MUTE +key 114 VOLUME_DOWN +key 115 VOLUME_UP +key 125 MENU +key 127 SEARCH +key 163 MEDIA_NEXT +key 164 MEDIA_PLAY_PAUSE +key 165 MEDIA_PREVIOUS +key 166 MEDIA_STOP +# key 226 tbd reserved key diff --git a/prebuilt/usr/keylayout/Vendor_2378_Product_100a.kl b/prebuilt/usr/keylayout/Vendor_2378_Product_100a.kl new file mode 100644 index 0000000..d9cd171 --- /dev/null +++ b/prebuilt/usr/keylayout/Vendor_2378_Product_100a.kl @@ -0,0 +1,35 @@ +# Copyright (C) 2013 The Android Open Source 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. + +# OnLive, Inc. OnLive Wireless Controller + +key 304 BUTTON_A +key 305 BUTTON_B +key 307 BUTTON_X +key 308 BUTTON_Y +key 310 BUTTON_L1 +key 311 BUTTON_R1 +key 315 BUTTON_START +key 314 BUTTON_SELECT +key 317 BUTTON_THUMBL +key 318 BUTTON_THUMBR + +axis 0x00 X +axis 0x01 Y +axis 0x03 Z +axis 0x04 RZ +axis 0x05 RTRIGGER +axis 0x02 LTRIGGER +axis 0x10 HAT_X +axis 0x11 HAT_Y diff --git a/prebuilt/usr/keylayout/gpio-keys.kl b/prebuilt/usr/keylayout/gpio-keys.kl new file mode 100644 index 0000000..0cb57a5 --- /dev/null +++ b/prebuilt/usr/keylayout/gpio-keys.kl @@ -0,0 +1,35 @@ +# 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 + +key 115 VOLUME_UP WAKE_DROPPED +key 114 VOLUME_DOWN WAKE +key 102 HOME WAKE +key 250 INFO + +key 158 BACK VIRTUAL +key 172 HOME VIRTUAL +key 139 MENU VIRTUAL +key 249 CHANNEL_UP VIRTUAL diff --git a/prebuilt/usr/keylayout/qwerty.kl b/prebuilt/usr/keylayout/qwerty.kl new file mode 100644 index 0000000..f1caacd --- /dev/null +++ b/prebuilt/usr/keylayout/qwerty.kl @@ -0,0 +1,112 @@ +# Copyright (C) 2010 The Android Open Source 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. + +# +# Emulator keyboard layout #1. +# +# This file is no longer used as the platform's default keyboard layout. +# Refer to Generic.kl instead. +# + +key 399 GRAVE +key 2 1 +key 3 2 +key 4 3 +key 5 4 +key 6 5 +key 7 6 +key 8 7 +key 9 8 +key 10 9 +key 11 0 +key 158 BACK WAKE_DROPPED +key 230 SOFT_RIGHT WAKE +key 60 SOFT_RIGHT WAKE +key 107 ENDCALL WAKE_DROPPED +key 62 ENDCALL WAKE_DROPPED +key 229 MENU WAKE_DROPPED +key 139 MENU WAKE_DROPPED +key 59 MENU WAKE_DROPPED +key 127 SEARCH WAKE_DROPPED +key 217 SEARCH WAKE_DROPPED +key 228 POUND +key 227 STAR +key 231 CALL WAKE_DROPPED +key 61 CALL WAKE_DROPPED +key 232 DPAD_CENTER WAKE_DROPPED +key 108 DPAD_DOWN WAKE_DROPPED +key 103 DPAD_UP WAKE_DROPPED +key 102 HOME WAKE +key 105 DPAD_LEFT WAKE_DROPPED +key 106 DPAD_RIGHT WAKE_DROPPED +key 115 VOLUME_UP WAKE +key 114 VOLUME_DOWN WAKE +key 116 POWER WAKE +key 212 CAMERA + +key 16 Q +key 17 W +key 18 E +key 19 R +key 20 T +key 21 Y +key 22 U +key 23 I +key 24 O +key 25 P +key 26 LEFT_BRACKET +key 27 RIGHT_BRACKET +key 43 BACKSLASH + +key 30 A +key 31 S +key 32 D +key 33 F +key 34 G +key 35 H +key 36 J +key 37 K +key 38 L +key 39 SEMICOLON +key 40 APOSTROPHE +key 14 DEL + +key 44 Z +key 45 X +key 46 C +key 47 V +key 48 B +key 49 N +key 50 M +key 51 COMMA +key 52 PERIOD +key 53 SLASH +key 28 ENTER + +key 56 ALT_LEFT +key 100 ALT_RIGHT +key 42 SHIFT_LEFT +key 54 SHIFT_RIGHT +key 15 TAB +key 57 SPACE +key 150 EXPLORER +key 155 ENVELOPE + +key 12 MINUS +key 13 EQUALS +key 215 AT + +# On an AT keyboard: ESC, F10 +key 1 BACK WAKE_DROPPED +key 68 MENU WAKE_DROPPED diff --git a/proprietary-blobs.txt b/proprietary-blobs.txt new file mode 100644 index 0000000..bbf0647 --- /dev/null +++ b/proprietary-blobs.txt @@ -0,0 +1,278 @@ +# Time services +app/TimeService.apk +bin/time_daemon +vendor/lib/libtime_genoff.so +vendor/lib/libTimeService.so + +# Firmwares +vendor/firmware/a225p5_pm4.fw +vendor/firmware/a225_pm4.fw +vendor/firmware/a300_pm4.fw +vendor/firmware/a330_pm4.fw +vendor/firmware/cpp_firmware_v1_1_6.fw +vendor/firmware/keymaster.b00 +vendor/firmware/keymaster.b02 +vendor/firmware/keymaster.mdt +vendor/firmware/leia_pm4_470.fw +vendor/firmware/venus.b01 +vendor/firmware/venus.b03 +vendor/firmware/venus.mbn +vendor/firmware/a225_pfp.fw +vendor/firmware/a300_pfp.fw +vendor/firmware/a330_pfp.fw +vendor/firmware/cpp_firmware_v1_1_1.fw +vendor/firmware/cpp_firmware_v1_2_0.fw +vendor/firmware/keymaster.b01 +vendor/firmware/keymaster.b03 +vendor/firmware/leia_pfp_470.fw +vendor/firmware/venus.b00 +vendor/firmware/venus.b02 +vendor/firmware/venus.b04 +vendor/firmware/venus.mdt + +# Audio +etc/ACDB/Bluetooth_cal.acdb +etc/ACDB/General_cal.acdb +etc/ACDB/Global_cal.acdb +etc/ACDB/Handset_cal.acdb +etc/ACDB/Hdmi_cal.acdb +etc/ACDB/Headset_cal.acdb +etc/ACDB/Speaker_cal.acdb +etc/ACDB/workspaceFile.qwsp +vendor/lib/libadiertac.so +vendor/lib/libacdbrtac.so +vendor/lib/libaudcal.so +vendor/lib/libaudioalsa.so +vendor/lib/libacdbmapper.so +vendor/lib/libacdbloader.so +lib/libtinyalsa.so +lib/libtinycompress.so +lib/hw/audio.primary.msm8226.so +bin/fm_qsoc_patches + +# Listen service +vendor/lib/liblistenhardware.so +vendor/lib/liblistenjni.so +vendor/lib/liblisten.so +vendor/lib/liblistensoundmodel.so + +# Ril +vendor/lib/libril-qc-qmi-1.so +vendor/lib/libril-qcril-hook-oem.so +vendor/lib/libdsutils.so +vendor/lib/libdiag.so +vendor/lib/libqmi.so +vendor/lib/libqmi_client_qmux.so +vendor/lib/libqmiservices.so +vendor/lib/libidl.so +vendor/lib/libqcci_legacy.so +vendor/lib/libqmi_csi.so +vendor/lib/libqmi_cci.so +vendor/lib/libqmi_encdec.so +vendor/lib/libqmi_common_so.so +vendor/lib/libdsi_netctrl.so +vendor/lib/libqdi.so +vendor/lib/libnetmgr.so +vendor/lib/libdsnetutils.so +vendor/lib/libqdp.so +lib/libvss_common_iface.so +lib/libvss_common_idl.so +lib/libvss_nv_iface.so +lib/libvss_nv_idl.so +lib/libvss_common_core.so +lib/libvss_nv_core.so +lib/libril.so +bin/qmuxd +bin/rild +bin/rmt_storage +bin/netmgrd +# ???? +vendor/lib/libconfigdb.so +vendor/lib/libdsucsd.so +vendor/lib/libqmi_csvt_srvc.so + +# EGL +vendor/lib/egl/eglsubAndroid.so +vendor/lib/egl/libq3dtools_adreno.so +vendor/lib/egl/libGLESv2_adreno.so +vendor/lib/egl/libGLESv1_CM_adreno.so +vendor/lib/egl/libEGL_adreno.so +vendor/lib/libscale.so +vendor/lib/libsc-a3xx.so +vendor/lib/librs_adreno_sha1.so +vendor/lib/librs_adreno.so +vendor/lib/libllvm-qcom.so +vendor/lib/libgsl.so +vendor/lib/libc2d30.so +vendor/lib/libc2d30-a3xx.so +vendor/lib/libadreno_utils.so +vendor/lib/libRSDriver_adreno.so +vendor/lib/libOpenVG.so +vendor/lib/libOpenCL.so +vendor/lib/libCB.so +vendor/lib/libC2D2.so + +# Media +vendor/lib/libWVStreamControlAPI_L3.so +vendor/lib/libwvm.so + + +# Camera +bin/mm-qcamera-daemon +lib/hw/camera.msm8226.so +lib/libchromatix_hi543_common.so +lib/libchromatix_hi543_default_video.so +lib/libchromatix_hi543_preview.so +lib/libchromatix_hi543_snapshot.so +lib/libchromatix_imx111_common.so +lib/libchromatix_imx111_default_video.so +lib/libchromatix_imx111_preview.so +lib/libchromatix_imx111_snapshot.so +lib/libchromatix_imx119_common.so +lib/libchromatix_imx119_default_video.so +lib/libchromatix_imx119_preview.so +lib/libchromatix_imx179_common.so +lib/libchromatix_imx179_default_video.so +lib/libchromatix_imx179_preview.so +lib/libchromatix_imx179_snapshot.so +lib/libchromatix_imx219_common.so +lib/libchromatix_imx219_default_video.so +lib/libchromatix_imx219_preview.so +lib/libchromatix_imx219_snapshot.so +lib/libmmcamera_hi707.so +lib/libmmcamera_hi543.so +lib/libmmcamera_imx111.so +lib/libmmcamera_imx119.so +lib/libmmcamera_imx179.so +lib/libmmcamera_imx219.so +lib/libmmcamera_interface.so +lib/libmorpho_image_stab31.so +lib/libmorpho_memory_allocator.so +lib/libmorpho_panorama_gp.so +lib/libmorpho_panorama_wa_viewer.so +lib/libmmjpeg_interface.so +vendor/lib/liboemcamera.so +vendor/lib/libmmcamera2_stats_modules.so +vendor/lib/libmmcamera2_stats_algorithm.so +vendor/lib/libmmcamera2_iface_modules.so +vendor/lib/libmmcamera2_isp_modules.so +vendor/lib/libmmcamera2_sensor_modules.so +vendor/lib/libmmcamera2_pproc_modules.so +vendor/lib/libmmcamera2_cpp_module.so +vendor/lib/libmmcamera2_c2d_module.so +vendor/lib/libmmcamera2_imglib_modules.so +vendor/lib/libmmcamera_imglib.so +vendor/lib/libadsprpc.so +vendor/lib/libmmcamera2_wnr_module.so +vendor/lib/libmmcamera2_vpe_module.so +vendor/lib/libmmcamera_faceproc.so +vendor/lib/libmmcamera_hdr_gb_lib.so +vendor/lib/libmmcamera_hdr_lib.so +vendor/lib/libmmcamera_wavelet_lib.so +vendor/lib/libfastcvopt.so +vendor/lib/libfastcvadsp_stub.so +vendor/lib/libmmcamera_tintless_algo.so +vendor/lib/libmmcamera_tintless_bg_pca_algo.so +vendor/lib/libmmjpeg.so +vendor/lib/libjpegdhw.so +vendor/lib/libjpegehw.so +vendor/lib/libqomx_jpegdec.so +vendor/lib/libqomx_jpegenc.so +vendor/lib/libmmqjpeg_codec.so +vendor/lib/libmmcamera_hi351.so +vendor/lib/libmmcamera_hi543_eeprom.so +vendor/lib/libmmcamera_imx111_eeprom.so +vendor/lib/libmmcamera_imx179_eeprom.so +vendor/lib/libmmcamera_imx219_eeprom.so +vendor/lib/libmmcamera_mt9m114.so +vendor/lib/libmmcamera_tuning.so +vendor/lib/libmm-hdcpmgr.so +# XXX +lib/libmm-qcamera.so +vendor/lib/libmm-color-convertor.so +vendor/lib/libmmhttpstack.so +vendor/lib/libmmiipstreammmihttp.so +vendor/lib/libmmipl.so +vendor/lib/libmmipstreamnetwork.so +vendor/lib/libmmipstreamsourcehttp.so +vendor/lib/libmmipstreamutils.so +vendor/lib/libmmosal.so +vendor/lib/libmmparser.so +vendor/lib/libmmrtpdecoder.so +vendor/lib/libmmrtpencoder.so + + +# Media +lib/libqomx_core.so +lib/libdashplayer.so +vendor/lib/libmmipstreamaal.so +vendor/lib/libOmxAacDec.so +vendor/lib/libOmxAmrwbplusDec.so +vendor/lib/libOmxEvrcDec.so +vendor/lib/libOmxQcelp13Dec.so +vendor/lib/libOmxWmaDec.so + +# Thermal daemon +bin/thermal-engine +vendor/lib/libthermalioctl.so +vendor/lib/libthermalclient.so + +# Gps +lib/hw/gps.default.so +lib/libloc_core.so +lib/libloc_eng.so +lib/libloc_api_v02.so +lib/libloc_ds_api.so +lib/libgps.utils.so +vendor/lib/liblocationservice.so +vendor/lib/libulp2.so +vendor/lib/libgeofence.so +vendor/lib/libizat_core.so +vendor/lib/liblbs_core.so + +# Sensors +vendor/lib/hw/sensors.msm8226.so +vendor/lib/libsensor1.so +vendor/lib/libsensor_reg.so +bin/sensors.qcom +lib/hw/lights.msm8226.so +vendor/lib/libbmc050.so + +# Other +vendor/lib/libQSEEComAPI.so +-bin/irsc_util +bin/mm-pp-daemon +vendor/lib/libmm-abl-oem.so +vendor/lib/libmm-abl.so +-bin/ptt_socket_app +-lib/libqsap_sdk.so + +# +bin/ims_rtp_daemon +vendor/lib/lib-imsdpl.so +vendor/lib/lib-rtpsl.so +vendor/lib/lib-rtpcore.so +vendor/lib/lib-rtpdaemoninterface.so +vendor/lib/lib-rtpcommon.so +vendor/lib/lib-dplmedia.so + +# IRDA +bin/irrcServer +lib/libirrc.so +lib/libirrcClient.so +lib/libirrcJni.so +lib/liblgewg.so + +# We need it? +-bin/port-bridge +-bin/riva_ramdump +-bin/imsdatadaemon +-bin/imsqmidaemon +-bin/adsprpcd +-bin/bnrd +-bin/ssr_diag +vendor/lib/hw/flp.default.so +-vendor/lib/libdisp-aba.so +-vendor/lib/libcneapiclient.so +-lib/libcnefeatureconfig.so +vendor/firmware/libpn547_fw.so diff --git a/recovery.fstab b/recovery.fstab index 087d55e..a6a0654 100644 --- a/recovery.fstab +++ b/recovery.fstab @@ -4,6 +4,5 @@ /dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults /dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults /dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults - -#/dev/block/mmcblk1p1 /sdcard vfat defaults defaults +/dev/block/mmcblk1p1 /external_sd vfat defaults defaults diff --git a/rootdir/fscheck.sh b/rootdir/fscheck.sh new file mode 100644 index 0000000..b1985e8 --- /dev/null +++ b/rootdir/fscheck.sh @@ -0,0 +1,11 @@ +#!/sbin/bbx sh + +FSTYPE=`/sbin/bbx blkid /dev/block/mmcblk0p34 | /sbin/bbx cut -d ' ' -f3 | /sbin/bbx cut -d '"' -f2` + +if [ "$FSTYPE" == "ext4" ] +then + /sbin/bbx rm /fstab_f2fs.w7ds +else + /sbin/bbx cp -f /fstab_f2fs.w7ds /etc/recovery.fstab + /sbin/bbx mv -f /fstab_f2fs.w7ds /fstab.w7ds +fi diff --git a/rootdir/fstab.w7ds b/rootdir/fstab.w7ds new file mode 100644 index 0000000..619ddae --- /dev/null +++ b/rootdir/fstab.w7ds @@ -0,0 +1,19 @@ +# Android fstab file. +# The filesystem that contains the filesystem checker binary (typically /system) cannot +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK + +#TODO: Add 'check' as fs_mgr_flags with data partition. +# Currently we dont have e2fsck compiled. So fs check would failed. +# +# +/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=external_SD:auto,noemulatedsd +/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,check +/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard,data=ordered,errors=continue wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/encrypt +/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc wait,check +/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults +/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults +/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults diff --git a/rootdir/fstab_f2fs.w7ds b/rootdir/fstab_f2fs.w7ds new file mode 100644 index 0000000..77adebb --- /dev/null +++ b/rootdir/fstab_f2fs.w7ds @@ -0,0 +1,19 @@ +# Android fstab file. +# The filesystem that contains the filesystem checker binary (typically /system) cannot +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK + +#TODO: Add 'check' as fs_mgr_flags with data partition. +# Currently we dont have e2fsck compiled. So fs check would failed. +# +# +/devices/msm_sdcc.2/mmc_host auto vfat defaults voldmanaged=external_SD:auto,noemulatedsd +/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait,check +/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,errors=recover wait,nonremovable,encryptable=footer,length=-16384 +/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc wait,check +/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr,errors=recover wait,nonremovable,length=-16384 +/dev/block/platform/msm_sdcc.1/by-name/drm /persist-lg ext4 nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/mpt /mpt ext4 nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/sns /sns ext4 nosuid,nodev,barrier=1,data=ordered wait,check +/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults +/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults +/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults diff --git a/rootdir/init.class_main.sh b/rootdir/init.class_main.sh new file mode 100755 index 0000000..e5a69d4 --- /dev/null +++ b/rootdir/init.class_main.sh @@ -0,0 +1,77 @@ +#!/system/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 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` +netmgr=`getprop ro.use_data_netmgrd` +sgltecsfb=`getprop persist.radio.sglte_csfb` + +case "$baseband" in + "apq") + setprop ro.radio.noril yes + stop ril-daemon +esac + +case "$baseband" in + "msm" | "csfb" | "svlte2a" | "mdm" | "sglte" | "sglte2" | "dsda2" | "unknown") + start qmuxd + case "$baseband" in + "svlte2a" | "csfb") + start qmiproxy + ;; + "sglte" | "sglte2" ) + if [ "x$sgltecsfb" != "xtrue" ]; then + start qmiproxy + else + setprop persist.radio.voice.modem.index 0 + fi + ;; + "dsda2") + setprop persist.radio.multisim.config dsda + esac + + multisim=`getprop persist.radio.multisim.config` + + if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then + stop ril-daemon + start mmi-ril-daemon + start ril-daemon1 + elif [ "$multisim" = "tsts" ]; then + stop ril-daemon + start mmi-ril-daemon + start ril-daemon1 + start ril-daemon2 + fi + + case "$netmgr" in + "true") + start netmgrd + esac +esac diff --git a/rootdir/init.lge.early.rc b/rootdir/init.lge.early.rc new file mode 100755 index 0000000..2b60d80 --- /dev/null +++ b/rootdir/init.lge.early.rc @@ -0,0 +1,24 @@ + +######################################## +# CAPP_SECCLK +######################################## +service lgsecclk /system/bin/lgsecclkserver + class main + user system + group system lgdrm_acc sdcard_rw media_rw + +# restart when servicemanager is restarted +on property:init.svc.servicemanager=restarting + restart lgsecclk + +######################################## +# CAPP_DRM +######################################## +service lgdrm /system/bin/lgdrmserver + class main + user lgdrm + group lgdrm_acc sdcard_rw media_rw system radio sdcard_r + +# restart when servicemanager is restarted +on property:init.svc.servicemanager=restarting + restart lgdrm diff --git a/rootdir/init.lge.log.rc b/rootdir/init.lge.log.rc new file mode 100755 index 0000000..8e5dcab --- /dev/null +++ b/rootdir/init.lge.log.rc @@ -0,0 +1,165 @@ +on post-fs-data + mkdir /data/logger 0775 system system + +#power log +service log-power /system/bin/sh /system/bin/logger_power.sh + class main + disabled + oneshot + +# kernel log +service log-kernel /system/bin/sh /system/bin/logger_kernel.sh + class main + disabled + oneshot + +on property:persist.service.kernel.enable=6 + restart log-kernel + +on property:persist.service.kernel.enable=5 + restart log-kernel + +on property:persist.service.kernel.enable=4 + restart log-kernel + +on property:persist.service.kernel.enable=3 + restart log-kernel + +on property:persist.service.kernel.enable=2 + restart log-kernel + +on property:persist.service.kernel.enable=1 + restart log-kernel + +on property:persist.service.kernel.enable=0 + stop log-kernel + +# logcat main +service logcat-main /system/bin/sh /system/bin/logger_main.sh + class main + disabled + oneshot + +on property:persist.service.main.enable=6 + restart logcat-main + +on property:persist.service.main.enable=5 + restart logcat-main + +on property:persist.service.main.enable=4 + restart logcat-main + +on property:persist.service.main.enable=3 + restart logcat-main + +on property:persist.service.main.enable=2 + restart logcat-main + +on property:persist.service.main.enable=1 + restart logcat-main + +on property:persist.service.main.enable=0 + stop logcat-main + +# logcat system +service logcat-system /system/bin/sh /system/bin/logger_system.sh + class main + disabled + oneshot + +on property:persist.service.system.enable=6 + restart logcat-system + +on property:persist.service.system.enable=5 + restart logcat-system + +on property:persist.service.system.enable=4 + restart logcat-system + +on property:persist.service.system.enable=3 + restart logcat-system + +on property:persist.service.system.enable=2 + restart logcat-system + +on property:persist.service.system.enable=1 + restart logcat-system + +on property:persist.service.system.enable=0 + stop logcat-system + +# logcat radio +service logcat-radio /system/bin/sh /system/bin/logger_radio.sh + class main + disabled + oneshot + +on property:persist.service.radio.enable=6 + restart logcat-radio + +on property:persist.service.radio.enable=5 + restart logcat-radio + +on property:persist.service.radio.enable=4 + restart logcat-radio + +on property:persist.service.radio.enable=3 + restart logcat-radio + +on property:persist.service.radio.enable=2 + restart logcat-radio + +on property:persist.service.radio.enable=1 + restart logcat-radio + +on property:persist.service.radio.enable=0 + stop logcat-radio + +# logcat events +service logcat-events /system/bin/sh /system/bin/logger_events.sh + class main + disabled + oneshot + +on property:persist.service.events.enable=6 + restart logcat-events + +on property:persist.service.events.enable=5 + restart logcat-events + +on property:persist.service.events.enable=4 + restart logcat-events + +on property:persist.service.events.enable=3 + restart logcat-events + +on property:persist.service.events.enable=2 + restart logcat-events + +on property:persist.service.events.enable=1 + restart logcat-events + +on property:persist.service.events.enable=0 + stop logcat-events + +#tcpdump - packet log +service log-packet /system/bin/sh /system/bin/logger_packet.sh + class main + disabled + oneshot + +on property:persist.service.packet.enable=1 + start log-packet + +on property:persist.service.packet.enable=0 + stop log-packet + +# write eventlog for boot animation end +service write_event_log /system/bin/write_event_log 55000 + user system + group system + disabled + oneshot + +on property:init.svc.bootanim=stopped + start write_event_log diff --git a/rootdir/init.lge.rc b/rootdir/init.lge.rc new file mode 100755 index 0000000..e4e7819 --- /dev/null +++ b/rootdir/init.lge.rc @@ -0,0 +1,126 @@ +#CAPP_CKERROR_REPORTER +import init.ckerror.rc + +on post-fs + #persist-lg + chown system system /persist-lg + chmod 0771 /persist-lg + +on post-fs-data + #CAPP_SECUREBOOT + exec /sbin/wallpaper -ap + wait /sbin/wallpaper + + #CAPP_FONTS + mkdir /data/font 775 system system + chmod 775 /data/font + mkdir /data/font/config 775 system system + chmod 775 /data/font/config + mkdir /data/font/download 775 system system + chmod 775 /data/font/download + + #persist-lg + chown system system /persist-lg + chmod 0771 /persist-lg + + #LGDRM + mkdir /data/lgdrm 0770 lgdrm lgdrm_acc + mkdir /persist-lg/lgdrm 0770 lgdrm lgdrm_acc + + #Widevine + mkdir /persist-lg/widevine 0770 drm system + + #Widevine firmware + mkdir /persist-lg/firmware 0771 system system + exec /system/bin/cpfirmware widevine /persist-lg/firmware + + #Secure clock + mkdir /persist-lg/secclk 0700 system system + + #DivX DRM + mkdir /persist-lg/multimedia 0770 media divxdrm + mkdir /persist-lg/multimedia/nx 0770 media divxdrm + mkdir /persist-lg/multimedia/uma 0770 media divxdrm + mkdir /persist-lg/multimedia/scnt 0770 media divxdrm + mkdir /persist-lg/multimedia/scnt/sdadf 0770 media divxdrm + + #CAPP_BLUEERROR_HANDLER: temp version, it will be removed + chown root system /data/dontpanic + chmod 0775 /data/dontpanic + + #LGMDM [a1-mdm-dev@lge.com][ID-MDM-77][ID-MDM-289] + mkdir /data/system/lgmdm 0700 system system +#CAPP_RESERVED_USERDATA +on property:ro.reserve.blockcount=* + exec /system/bin/tune2fs -r $ro.reserve.blockcount \ + -u system -g system $ro.reserve.userdata + +#CAPP_POWEROFF_ANI +service shutdownanim /system/bin/shutdownanimation + user graphics + group graphics system + disabled + oneshot + +#CAPP_NFS +service nfsserversetup /system/bin/nfsserversetup + class late_start + user root + oneshot + +#CAPP_MPROFILER +service lgprofd /system/bin/lgprofd + socket lgprofd stream 666 + + +#Application Manager ENABLE_UNINSTALL +service enable_uninstall /system/vendor/bin/enable_uninstall.sh + disabled + oneshot + +#Application Manager ENABLE_UNINSTALL +on property:vold.post_fs_data_done=1 + start enable_uninstall + +#CAPP_LOGCATCHER +service digicl /system/bin/digicl.sh + class main + disabled + oneshot + +#CAPP_LOGCATCHER +service quickdump /system/bin/quickdump.sh + class main + disabled + oneshot + ioprio rt 0 + keycodes 114 115 116 + +#CAPP_NFS +service nfskill /system/bin/nfskillprocess + disabled + oneshot + user root + +on property:vold.decrypt=trigger_shutdown_framework + start nfskill + +#Application Manager NTCODE work +service ntcode_listing /system/vendor/bin/ntcode_listing.sh + disabled + oneshot + +#Application Manager NTCODE work +on property:persist.sys.mcc-list=* + start ntcode_listing + +#Useless apks delete +service apk_delete /system/vendor/bin/apk_delete.sh + user root + group root + disabled + oneshot + +#Useless apks delete +on property:persist.data.sbp.update=1 + start apk_delete diff --git a/rootdir/init.mdm.sh b/rootdir/init.mdm.sh new file mode 100755 index 0000000..451e588 --- /dev/null +++ b/rootdir/init.mdm.sh @@ -0,0 +1,33 @@ +#!/system/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" ]; then + start mdm_helper +fi + diff --git a/rootdir/init.usb.rc b/rootdir/init.usb.rc new file mode 100755 index 0000000..15467cc --- /dev/null +++ b/rootdir/init.usb.rc @@ -0,0 +1,91 @@ +# Copyright (C) 2012 The Android Open Source Project +# +# USB configuration common for all android devices +# + +on post-fs-data + chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file + chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file + chown system system /sys/class/android_usb/android0/f_rndis/ethaddr + chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr + +# Used to disable USB when switching states +on property:sys.usb.config=none + stop adbd + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/bDeviceClass 0 + setprop sys.usb.state ${sys.usb.config} + +# adb only USB configuration +# This should only be used during device bringup +# and as a fallback if the USB manager fails to set a standard configuration +on property:sys.usb.config=adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct D002 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# USB accessory configuration +on property:sys.usb.config=accessory + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d00 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# USB accessory configuration, with adb +on property:sys.usb.config=accessory,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d01 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# audio accessory configuration +on property:sys.usb.config=audio_source + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d02 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# audio accessory configuration, with adb +on property:sys.usb.config=audio_source,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d03 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# USB and audio accessory configuration +on property:sys.usb.config=accessory,audio_source + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d04 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# USB and audio accessory configuration, with adb +on property:sys.usb.config=accessory,audio_source,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18d1 + write /sys/class/android_usb/android0/idProduct 2d05 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Used to set USB configuration at boot and to switch the configuration +# when changing the default configuration +on property:persist.sys.usb.config=* + setprop sys.usb.config ${persist.sys.usb.config} diff --git a/rootdir/init.w7ds.rc b/rootdir/init.w7ds.rc new file mode 100755 index 0000000..794a217 --- /dev/null +++ b/rootdir/init.w7ds.rc @@ -0,0 +1,147 @@ +import /init.zetaw.rc +import /init.w7ds.usb.rc +import /init.w7ds_product.rc + +on early-init + mkdir /firmware 0771 system system + symlink /data/tombstones /tombstones + +on init + + chmod 755 /sbin/bbx + chmod 755 /fscheck.sh + exec /fscheck.sh + + # CM: We use our own ril-daemon service definition, see mmi-ril-daemon + stop ril-daemon + +on fs + mount_all fstab.w7ds + + # Keeping following partitions outside fstab file. As user may not have + # these partition flashed on the device. Failure to mount any partition in fstab file + # results in failure to launch late-start class. + + wait /dev/block/platform/msm_sdcc.1/by-name/modem + mount vfat /dev/block/platform/msm_sdcc.1/by-name/modem /firmware ro shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 + + write /sys/kernel/boot_adsp/boot 1 + +# In order to keep plenty of large order chunks. + write /proc/sys/vm/min_free_kbytes 5120 + +on post-fs-data + mkdir /data/tombstones 0771 system system + mkdir /tombstones/modem 0771 system system + + setprop vold.post_fs_data_done 1 + +on early-boot + +on boot + +#start camera server as daemon +service qcamerasvr /system/bin/mm-qcamera-daemon + class late_start + user camera + group camera system inet input graphics + +#LGE_CHANGE_S, restart qcamerasvr when restarting mediaserver and servicemanager, yousung.kang@lge.com +on property:init.svc.media=restarting + restart qcamerasvr +on property:init.svc.servicemanager=restarting + restart qcamerasvr +#LGE_CHANGE_E, restart qcamerasvr when restarting mediaserver and servicemanager, yousung.kang@lge.com + +# Allow usb charging to be disabled persistently +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 + +# Allow usb charging to be disabled persistently +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 + +on property:persist.service.fakebatt=1 + write /sys/class/power_supply/battery/pseudo_batt "1 1 100 40 4100 80 1" + +on property:persist.service.fakebatt=0 + write /sys/class/power_supply/battery/pseudo_batt "0 1 100 40 4100 80 1" + +service time_daemon /system/bin/time_daemon + class late_start + user root + group root + +service mpdecision /system/bin/mpdecision --no_sleep --avg_comp + user root + disabled + +service thermal-engine /system/bin/thermal-engine + class main + user root + group root + +service qrngd /system/bin/qrngd -f + class main + user root + group root + +service qrngp /system/bin/qrngp + class main + user root + group root + oneshot + disabled + +on property:sys.boot_completed=1 + start qrngp + +service audiod /system/bin/audiod + class late_start + user system + group system + +on boot + + chown system system /sys/class/power_supply/battery/pseudo_batt + +service adsprpcd /system/bin/adsprpcd + class main + user media + group media + +service wcnss-service /system/bin/wcnss_service + class late_start + user root + group system wifi + oneshot + +service ppd /system/bin/mm-pp-daemon + class late_start + user system + socket pps stream 0660 system system graphics + group system graphics + +on property:init.svc.surfaceflinger=stopped + stop ppd + + +# Define call duration feature +on property:ro.lge.callduration=1 + mkdir /persist-lg/callduration 0770 system radio + chown system radio /persist-lg/callduration + chmod 0770 /persist-lg/callduration + +service mmi-ril-daemon /system/bin/rild + class main + socket rild stream 660 root radio + socket rild-debug stream 660 radio system + socket cutback stream 660 media radio + user root + group radio cache inet misc audio sdcard_rw qcom_oncrpc qcom_diag log net_raw diag diff --git a/rootdir/init.w7ds.usb.rc b/rootdir/init.w7ds.usb.rc new file mode 100755 index 0000000..e69de29 diff --git a/rootdir/init.w7ds_product.rc b/rootdir/init.w7ds_product.rc new file mode 100755 index 0000000..b2d0249 --- /dev/null +++ b/rootdir/init.w7ds_product.rc @@ -0,0 +1,17 @@ +on init + mkdir /mpt 0775 system system + mkdir /cust 0771 system system + wait /dev/block/platform/msm_sdcc.1/by-name/mpt + wait /dev/block/platform/msm_sdcc.1/by-name/cust + exec /sbin/setup_fs_static /dev/block/platform/msm_sdcc.1/by-name/mpt /dev/block/platform/msm_sdcc.1/by-name/cust no_reboot + +on fs + wait /dev/block/platform/msm_sdcc.1/by-name/cust + exec /system/bin/e2fsck -p /dev/block/platform/msm_sdcc.1/by-name/cust + mount ext4 /dev/block/platform/msm_sdcc.1/by-name/cust /cust ro nodev barrier=1 noauto_da_alloc + +on post-fs-data + chown system system /mpt + chmod 0775 /mpt + chown system system /cust + chmod 0771 /cust diff --git a/rootdir/init.zetaw.bt_vendor.rc b/rootdir/init.zetaw.bt_vendor.rc new file mode 100755 index 0000000..05d33a5 --- /dev/null +++ b/rootdir/init.zetaw.bt_vendor.rc @@ -0,0 +1,107 @@ +#!/system/bin/sh +# Copyright (c) 2009-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. +# +on boot + + chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type + chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state + chown bluetooth 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 + chmod 0660 /sys/module/bluetooth_power/parameters/power + chmod 0660 /sys/module/hci_smd/parameters/hcismd_set + chmod 0660 /sys/class/rfkill/rfkill0/state + chmod 0660 /proc/bluetooth/sleep/proto + chown bluetooth bluetooth /dev/ttyHS0 + chmod 0660 /sys/module/hci_uart/parameters/ath_lpm + chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite + chmod 0660 /dev/ttyHS0 + chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock + chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock + chown system system /sys/devices/platform/kcal_ctrl.0/kcal + chown system system /sys/devices/platform/kcal_ctrl.0/kcal_ctrl + chmod 0660 /dev/ttyHS2 + chown bluetooth bluetooth /dev/ttyHS2 + +on property:bluetooth.sap.status=running + start bt-sap + +on property:bluetooth.sap.status=stopped + stop bt-sap + +on property:bluetooth.dun.status=running + start bt-dun + +on property:bluetooth.dun.status=stopped + stop bt-dun + +on property:bluetooth.start_hci=true + start start_hci_filter + +on property:bluetooth.start_hci=false + stop start_hci_filter + +service start_hci_filter /system/bin/wcnss_filter + class late_start + user bluetooth + group bluetooth + disabled + +service config_bluetooth /system/bin/sh /system/etc/init.zetaw.bt.sh "onboot" + class core + user root + oneshot + +service hciattach /system/bin/sh /system/etc/init.zetaw.bt.sh + class late_start + user bluetooth + group bluetooth net_bt_admin + disabled + oneshot + +on property:bluetooth.hciattach=true + start hciattach + +on property:bluetooth.hciattach=false + setprop bluetooth.status off + +service hciattach_ath3k /system/bin/sh /system/etc/init.ath3k.bt.sh + class late_start + user bluetooth + group system bluetooth net_bt_admin misc + disabled + oneshot + +service btwlancoex /system/bin/sh /system/etc/init.zetaw.coex.sh + class late_start + user bluetooth + group bluetooth net_bt_admin inet net_admin net_raw + disabled + oneshot diff --git a/rootdir/init.zetaw.class_core.sh b/rootdir/init.zetaw.class_core.sh new file mode 100755 index 0000000..0345bfc --- /dev/null +++ b/rootdir/init.zetaw.class_core.sh @@ -0,0 +1,208 @@ +#!/system/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 + ;; + *) + case "$dserial" in + "1") + start console + ;; + esac + ;; +esac + +# +# Allow persistent faking of bms +# User needs to set fake bms charge in persist.bms.fake_batt_capacity +# +fake_batt_capacity=`getprop persist.bms.fake_batt_capacity` +case "$fake_batt_capacity" in + "") ;; #Do nothing here + * ) + echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity + ;; +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/init.zetaw.cmm.usb.sh b/rootdir/init.zetaw.cmm.usb.sh new file mode 100755 index 0000000..5b8c270 --- /dev/null +++ b/rootdir/init.zetaw.cmm.usb.sh @@ -0,0 +1,45 @@ +#!/system/bin/sh +# Copyright (c) 2012, Code Aurora Forum. All rights reserved. +# Copyright (c) 2012, LG Electronics Inc. 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 Code Aurora Forum, Inc. 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. +# + +# +# When boot is completed and persist.sys.usb.config is "boot", +# set persist.sys.usb.config into default mode. +# + +usb_config=`getprop persist.sys.usb.config` +case "$usb_config" in + "boot") #factory status, select default + setprop persist.sys.usb.config charge_only + ;; + "boot,adb") #factory status, select default + setprop persist.sys.usb.config charge_only,adb + ;; + *) ;; #USB persist config exists, do nothing +esac diff --git a/rootdir/init.zetaw.early_boot.sh b/rootdir/init.zetaw.early_boot.sh new file mode 100755 index 0000000..fa97d92 --- /dev/null +++ b/rootdir/init.zetaw.early_boot.sh @@ -0,0 +1,199 @@ +#!/system/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. +# + +export PATH=/system/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 + +log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'" + +case "$1" 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 ro.sf.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 ro.sf.lcd_density 240 + ;; + "Dragon") + setprop ro.sound.alsa "WM8903" + ;; + 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 ro.sf.lcd_density 160 + ;; + "MTP") + setprop ro.sf.lcd_density 240 + ;; + *) + case "$soc_hwid" in + "109") + setprop ro.sf.lcd_density 160 + ;; + *) + setprop ro.sf.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 ro.sf.lcd_density 160 + # Liquid do not have hardware navigation keys, so enable + # Android sw navigation bar + setprop ro.hw.nav_keys 0 + ;; + "Dragon") + setprop ro.sf.lcd_density 240 + ;; + *) + setprop ro.sf.lcd_density 320 + ;; + esac + ;; + + "msm8226") + case "$soc_hwplatform" in + *) + setprop ro.sf.lcd_density 320 + ;; + esac + ;; + + "msm8610") + case "$soc_hwplatform" in + *) + setprop ro.sf.lcd_density 240 + ;; + esac + ;; + "apq8084") + case "$soc_hwplatform" in + "Liquid") + setprop ro.sf.lcd_density 293 + # Liquid do not have hardware navigation keys, so enable + # Android sw navigation bar + setprop ro.hw.nav_keys 0 + ;; + *) + setprop ro.sf.lcd_density 440 + ;; + esac + ;; +esac + +# Setup HDMI related nodes & permissions +# HDMI can be fb1 or fb2 +# Loop through the sysfs nodes and determine +# the HDMI(dtv panel) +for fb_cnt in 0 1 2 +do +file=/sys/class/graphics/fb$fb_cnt +dev_file=/dev/graphics/fb$fb_cnt + if [ -d "$file" ] + then + value=`cat $file/msm_fb_type` + case "$value" in + "dtv panel") + chown -h system.graphics $file/hpd + chown -h system.system $file/hdcp/tp + chown -h system.graphics $file/vendor_name + chown -h system.graphics $file/product_description + chmod -h 0664 $file/hpd + chmod -h 0664 $file/hdcp/tp + chmod -h 0664 $file/vendor_name + chmod -h 0664 $file/product_description + chmod -h 0664 $file/video_mode + chmod -h 0664 $file/format_3d + # create symbolic link + ln -s $dev_file /dev/graphics/hdmi + # Change owner and group for media server and surface flinger + chown -h system.system $file/format_3d;; + esac + fi +done + +# Set date to a time after 2008 +# This is a workaround for Zygote to preload time related classes properly +date -s 20090102.130000 + diff --git a/rootdir/init.zetaw.factory.sh b/rootdir/init.zetaw.factory.sh new file mode 100755 index 0000000..302d243 --- /dev/null +++ b/rootdir/init.zetaw.factory.sh @@ -0,0 +1,247 @@ +#!/system/bin/sh +# Copyright (c) 2009-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. +# + +# Actions on fast factory test mode + chown -h bluetooth.bluetooth /sys/module/bluetooth_power/parameters/power + chown -h bluetooth.bluetooth /sys/class/rfkill/rfkill0/type + chown -h bluetooth.bluetooth /sys/class/rfkill/rfkill0/state + chown -h bluetooth.bluetooth /proc/bluetooth/sleep/proto + chown -h system.system /sys/module/sco/parameters/disable_esco + chown -h bluetooth.bluetooth /sys/module/hci_smd/parameters/hcismd_set + chmod -h 0660 /sys/module/bluetooth_power/parameters/power + chmod -h 0660 /sys/module/hci_smd/parameters/hcismd_set + chmod -h 0660 /sys/class/rfkill/rfkill0/state + chmod -h 0660 /proc/bluetooth/sleep/proto + chown -h bluetooth.bluetooth /dev/ttyHS0 + chmod -h 0660 /dev/ttyHS0 + chown -h bluetooth.bluetooth /sys/devices/platform/msm_serial_hs.0/clock + chmod -h 0660 /sys/devices/platform/msm_serial_hs.0/clock + + chmod -h 0660 /dev/ttyHS2 + chown -h bluetooth.bluetooth /dev/ttyHS2 + + #Create QMUX deamon socket area + mkdir -p /dev/socket/qmux_radio + chown -h radio.radio /dev/socket/qmux_radio + chmod -h 2770 /dev/socket/qmux_radio + mkdir -p /dev/socket/qmux_audio + chown -h media.audio /dev/socket/qmux_audio + chmod -h 2770 /dev/socket/qmux_audio + mkdir -p /dev/socket/qmux_bluetooth + chown -h bluetooth.bluetooth /dev/socket/qmux_bluetooth + chmod -h 2770 /dev/socket/qmux_bluetooth + mkdir -p /dev/socket/qmux_gps + chown -h gps.gps /dev/socket/qmux_gps + chmod -h 2770 /dev/socket/qmux_gps + + # Allow QMUX daemon to assign port open wait time + chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait + + setprop wifi.interface wlan0 + + setprop ro.telephony.call_ring.multiple false + + #Set SUID bit for usbhub + chmod -h 4755 /system/bin/usbhub + chmod -h 755 /system/bin/usbhub_init + + #Remove SUID bit for iproute2 ip tool + chmod -h 0755 /system/bin/ip + + chmod -h 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state + + # setup permissions for fb1 related nodes + chown -h system.graphics /sys/class/graphics/fb1/hpd + chown -h system.system /sys/class/graphics/fb1/hdcp/tp + chmod -h 0664 /sys/devices/virtual/graphics/fb1/hpd + chmod -h 0664 /sys/devices/virtual/graphics/fb1/hdcp/tp + chmod -h 0664 /sys/devices/virtual/graphics/fb1/video_mode + chmod -h 0664 /sys/devices/virtual/graphics/fb1/format_3d + + # Change owner and group for media server and surface flinger + chown -h system.system /sys/devices/virtual/graphics/fb1/format_3d + + #For bridgemgr daemon to inform the USB driver of the correct transport + chown -h radio.radio /sys/class/android_usb/f_rmnet_smd_sdio/transport + + #To allow interfaces to get v6 address when tethering is enabled + echo 2 > /proc/sys/net/ipv6/conf/rmnet0/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet1/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet2/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet3/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet4/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet5/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet6/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet7/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra + echo 2 > /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra + + # 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 + echo 1 > /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal + +#TODO: +# basic network init +# ifup lo +# hostname localhost +# domainname localdomain + +# set RLIMIT_NICE to allow priorities from 19 to -20 +# setrlimit 13 40 40 + +# Memory management. Basic kernel parameters, and allow the high +# level system server to be able to adjust the kernel OOM driver +# parameters to match how it is managing things. + echo 1 > /proc/sys/vm/overcommit_memory + echo 4 > /proc/sys/vm/min_free_order_shift + chown -h root.system /sys/module/lowmemorykiller/parameters/adj + chmod -h 0664 /sys/module/lowmemorykiller/parameters/adj + chown -h root.system /sys/module/lowmemorykiller/parameters/minfree + chmod -h 0664 /sys/module/lowmemorykiller/parameters/minfree + + # Tweak background writeout + echo 200 > /proc/sys/vm/dirty_expire_centisecs + echo 5 > /proc/sys/vm/dirty_background_ratio + + # Permissions for System Server and daemons. + chown -h radio.system /sys/android_power/state + chown -h radio.system /sys/android_power/request_state + chown -h radio.system /sys/android_power/acquire_full_wake_lock + chown -h radio.system /sys/android_power/acquire_partial_wake_lock + chown -h radio.system /sys/android_power/release_wake_lock + chown -h system.system /sys/power/autosleep + chown -h system.system /sys/power/state + chown -h system.system /sys/power/wakeup_count + chown -h radio.system /sys/power/wake_lock + chown -h radio.system /sys/power/wake_unlock + chmod -h 0660 /sys/power/state + chmod -h 0660 /sys/power/wake_lock + chmod -h 0660 /sys/power/wake_unlock + + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/timer_rate + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/boost + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/boost + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/boostpulse + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/input_boost + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost + chown -h system.system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration + chmod -h 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration + + # Assume SMP uses shared cpufreq policy for all CPUs + chown -h system.system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + chmod -h 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + + chown -h system.system /sys/class/timed_output/vibrator/enable + chown -h system.system /sys/class/leds/keyboard-backlight/brightness + chown -h system.system /sys/class/leds/lcd-backlight/brightness + chown -h system.system /sys/class/leds/button-backlight/brightness + chown -h system.system /sys/class/leds/jogball-backlight/brightness + chown -h system.system /sys/class/leds/red/brightness + chown -h system.system /sys/class/leds/green/brightness + chown -h system.system /sys/class/leds/blue/brightness + chown -h system.system /sys/class/leds/red/device/grpfreq + chown -h system.system /sys/class/leds/red/device/grppwm + chown -h system.system /sys/class/leds/red/device/blink + chown -h system.system /sys/class/leds/red/brightness + chown -h system.system /sys/class/leds/green/brightness + chown -h system.system /sys/class/leds/blue/brightness + chown -h system.system /sys/class/leds/red/device/grpfreq + chown -h system.system /sys/class/leds/red/device/grppwm + chown -h system.system /sys/class/leds/red/device/blink + chown -h system.system /sys/class/timed_output/vibrator/enable + chown -h system.system /sys/module/sco/parameters/disable_esco + chown -h system.system /sys/kernel/ipv4/tcp_wmem_min + chown -h system.system /sys/kernel/ipv4/tcp_wmem_def + chown -h system.system /sys/kernel/ipv4/tcp_wmem_max + chown -h system.system /sys/kernel/ipv4/tcp_rmem_min + chown -h system.system /sys/kernel/ipv4/tcp_rmem_def + chown -h system.system /sys/kernel/ipv4/tcp_rmem_max + chown -h root radio /proc/cmdline + +# Define TCP buffer sizes for various networks +# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, + setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208 + setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576 + setprop net.tcp.buffersize.lte 524288,1048576,2097152,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,262144,4096,16384,262144 + +# Assign TCP buffer thresholds to be ceiling value of technology maximums +# Increased technology maximums should be reflected here. + echo 2097152 > /proc/sys/net/core/rmem_max + echo 2097152 > /proc/sys/net/core/wmem_max + +# Set the property to indicate type of virtual display to 0 +# 0 indicates that virtual display is not a Wifi display and that the +# session is not exercised through RemoteDisplay in the android framework + setprop persist.sys.wfd.virtual 0 + +# Set this property so surfaceflinger is not started by system_init + setprop system_init.startsurfaceflinger 0 + +# Start the following services needed for fftm + start config_bluetooth + start media + start fastmmi + start adbd + start qcom-post-boot + start rmt_storage + start qcom-c_main-sh + start irsc_util + start qcamerasvr + start qcom-usb-sh + start qcomsysd diff --git a/rootdir/init.zetaw.rc b/rootdir/init.zetaw.rc new file mode 100755 index 0000000..f2a9100 --- /dev/null +++ b/rootdir/init.zetaw.rc @@ -0,0 +1,1135 @@ +# Copyright (c) 2009-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. +# + +import init.zetaw.usb.rc +import init.lge.log.rc +#LG_UPDATE_START : move to init.zetaw.bt_vendor.rc to seperate vendor's resource 20140106, [START] +import init.zetaw.bt_vendor.rc +#LG_UPDATE_END : 20140106, [END] +on early-init + mount debugfs debugfs /sys/kernel/debug + +on init + # Set permissions for persist partition + mkdir /persist 0771 system system + mkdir /persist-lg 0771 system system + mkdir /sns 0775 system system + mkdir /storage 0751 system sdcard_r + mkdir /storage/external_SD 0700 root root + mkdir /mnt/media_rw 0700 media_rw media_rw + mkdir /mnt/media_rw/external_SD 0700 media_rw media_rw + # See storage config details at http://source.android.com/tech/storage/ + mkdir /mnt/shell/emulated 0700 shell shell + mkdir /storage/emulated 0555 root root + + export EXTERNAL_STORAGE /storage/emulated/legacy + export SECONDARY_STORAGE /storage/external_SD + export EMULATED_STORAGE_SOURCE /mnt/shell/emulated + export EMULATED_STORAGE_TARGET /storage/emulated + + # Support legacy paths + symlink /storage/emulated/legacy /sdcard + symlink /storage/emulated/legacy /mnt/sdcard + symlink /storage/emulated/legacy /storage/sdcard0 + symlink /storage/usbdisk /usbdisk + symlink /storage/usbdisk /mnt/usbdisk + + # NFC fix + symlink /dev/pn547 /dev/pn544 + +# SD Enc + setprop ro.ssbd.session /dev/block/platform/msm_sdcc.1/by-name/eksst + setprop ro.ssbd.offset 0 +on fs + +# sreadahead daemon +on post-fs + #start sreadahead + chmod 664 /sys/devices/virtual/input/lge_touch/touch_gesture + chown system system /sys/devices/virtual/input/lge_touch/touch_gesture + chmod 664 /sys/devices/virtual/input/lge_touch/knock_on_type + chown system system /sys/devices/virtual/input/lge_touch/knock_on_type + chmod 664 /sys/devices/virtual/input/lge_touch/global_access_pixel + chown system system /sys/devices/virtual/input/lge_touch/global_access_pixel + chmod 664 /sys/devices/virtual/input/lge_touch/lpwg_data + chown system system /sys/devices/virtual/input/lge_touch/lpwg_data + chmod 664 /sys/devices/virtual/input/lge_touch/lpwg_notify + chown system system /sys/devices/virtual/input/lge_touch/lpwg_notify + chmod 664 /sys/devices/virtual/input/lge_touch/incoming_call + chown system system /sys/devices/virtual/input/lge_touch/incoming_call + chmod 664 /sys/devices/virtual/input/lge_touch/lockscreen + chown system system /sys/devices/virtual/input/lge_touch/lockscreen + chmod 664 /sys/devices/virtual/input/lge_touch/ime_status + chown system system /sys/devices/virtual/input/lge_touch/ime_status + +# LGE_CHANGE_S +# enable chargerlogo +on chargerlogo + stop bootlogo + exec /sbin/chargerlogo +#LGE_CHANGE_E + +on early-boot + # set RLIMIT_MEMLOCK to 64MB + setrlimit 8 67108864 67108864 + # Allow subsystem (modem etc) debugging + write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} + exec /system/bin/sh /init.zetaw.early_boot.sh ${ro.board.platform} + exec /system/bin/sh /init.zetaw.syspart_fixup.sh ${ro.board.platform} ${ro.serialno} + # disable lmk_fast_run + write /sys/module/lowmemorykiller/parameters/lmk_fast_run 0 + +on boot +# ADD LGODL + chmod 0755 /system/bin/lg_dm_dev_router +#LG_UPDATE_START : move to init.zetaw.bt_vendor.rc to seperate vendor's resource 20140106, [START] +# chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power +# chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type +# chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state +# chown bluetooth 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 +# chmod 0660 /sys/module/bluetooth_power/parameters/power +# chmod 0660 /sys/module/hci_smd/parameters/hcismd_set +# chmod 0660 /sys/class/rfkill/rfkill0/state +# chmod 0660 /proc/bluetooth/sleep/proto +# chown bluetooth bluetooth /dev/ttyHS0 +# chmod 0660 /sys/module/hci_uart/parameters/ath_lpm +# chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite +# chmod 0660 /dev/ttyHS0 +# chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock +# chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock +# chown system system /sys/devices/platform/kcal_ctrl.0/kcal +# chown system system /sys/devices/platform/kcal_ctrl.0/kcal_ctrl + +# chmod 0660 /dev/ttyHS2 +# chown bluetooth bluetooth /dev/ttyHS2 +#LG_UPDATE_END : 20140106, [END] + + #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 + + 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 + + #Set SUID bit for usbhub + chmod 4755 /system/bin/usbhub + chmod 755 /system/bin/usbhub_init + + #Remove SUID bit for iproute2 ip tool + chmod 0755 /system/bin/ip + + #Create directory used by sensor subsystem(dsps) + mkdir /data/system/sensors + chmod 665 /data/system/sensors + write /data/system/sensors/settings 1 + chmod 660 /data/system/sensors/settings + # AKM setting data + mkdir /data/misc/sensors + chmod 775 /data/misc/sensors + mkdir /persist/sensors + chmod 775 /persist/sensors + + chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state + + #For bridgemgr daemon to inform the USB driver of the correct transport + chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport + +# Define TCP buffer sizes for various networks +# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, + setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208 + setprop net.tcp.buffersize.lte 524288,1048576,2097152,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,262144,4096,16384,262144 + +# 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 2097152 + write /proc/sys/net/core/wmem_max 2097152 + + #To allow interfaces to get v6 address when tethering is enabled + write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2 + write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2 + + # 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 + + # NFC local data and nfcee xml storage + mkdir /data/nfc 0770 nfc nfc + mkdir /data/nfc/param 0770 nfc nfc + + # Set the console loglevel to < KERN_INFO + # Set the default message loglevel to KERN_INFO + write /proc/sys/kernel/printk "6 6 1 7" + +# byungil.choi@lge.com for SW IrRC + chown media media /dev/msm_IRRC_pcm_dec + chmod 0660 /dev/msm_IRRC_pcm_dec + +# msm specific files that need to be created on /data +on post-fs-data + # we will remap this as /mnt/sdcard with the sdcard fuse tool + mkdir /data/media 0770 media_rw media_rw + chown media_rw media_rw /data/media + + mkdir /data/footprint 0750 root log + chown root system /data/footprint + chmod 0775 /data/footprint + + start last_kmsg_backup + + mkdir /sns/cal/ 0644 system system + + mkdir /data/misc/bluetooth 0770 bluetooth bluetooth + + # Create the directories used by the Wireless subsystem + mkdir /data/misc/wifi 0771 wifi system + mkdir /data/misc/wifi/sockets 0770 wifi wifi + mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi + mkdir /data/misc/dhcp 0770 dhcp dhcp + +# chown dhcp dhcp /data/misc/dhcp +# CONFIG_LGE_WLAN_PATCH +# to observe dnsmasq.leases file for dhcp information of soft ap. + chown dhcp system /data/misc/dhcp + + # Create the directories used by CnE subsystem + mkdir /data/connectivity 0771 system system + chown system system /data/connectivity + + mkdir /data/connectivity/nsrm 0771 system system + chown system system /data/connectivity/nsrm + + mkdir /data/connectivity/nsrm 0771 system system + chown system system /data/connectivity/nsrm + + # Create directory used by audio subsystem + mkdir /data/misc/audio 0770 audio audio + + # 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 system system /persist + chmod 0771 /persist + 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 + + # Allow Torch app use torch + chown system system /sys/class/leds/led:flash_torch/brightness + chmod 0666 /sys/class/leds/led:flash_torch/brightness + +# Mobile DM Router + chmod 0660 /dev/lge_dm_tty0 + chown system system /dev/lge_dm_tty0 + + # SSR feature + chmod 0660 /dev/ramdump_adsp + chown system system /dev/ramdump_adsp + + chmod 0660 /dev/ramdump_audio-ocmem + chown system system /dev/ramdump_audio-ocmem + + chmod 0660 /dev/ramdump_modem + chown system system /dev/ramdump_modem + + chmod 0660 /dev/ramdump_smem-modem + chown system system /dev/ramdump_smem-modem + + chmod 0660 /dev/ramdump_smem-smd + chown system system /dev/ramdump_smem-smd + + chmod 0660 /dev/ramdump_venus + chown system system /dev/ramdump_venus + + chmod 0660 /dev/ramdump_pronto + chown system system /dev/ramdump_pronto + +# ADD LGODL + chmod 0660 /dev/lge_dm_dev_tty0 + chown system system /dev/lge_dm_dev_tty0 + + #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant + mkdir /data/system 0775 system system + #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant + + #Create directories for wiper services + mkdir /data/wpstiles/ 0755 shell + mkdir /data/wiper 0755 gps qcom_oncrpc + + #Create directories for gpsone_daemon services + mkdir /data/misc/gpsone_d 0770 system gps + + #Create directories for QuIPS + mkdir /data/misc/quipc 0770 gps system + + #Create directories for Location services + mkdir /data/misc/location 0770 gps gps + mkdir /data/misc/location/mq 0770 gps gps + mkdir /data/misc/location/xtwifi 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 directory for hostapd + mkdir /data/hostapd 0770 system wifi + + # Create /data/time folder for time-services + mkdir /data/time/ 0700 system system + + mkdir /data/audio/ 0770 media audio + # Enable the setgid bit on the directory + chmod 2770 /data/audio + + 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 + + # LGE_CHANGE_S + mount debugfs /sys/kernel/debug /sys/kernel/debug + # LGE_CHANGE_E + +# Make directory for DRM + chown system system /persist-lg + chmod 0771 /persist-lg + + #HDCP2.x for Wi-Fi Display + mkdir /persist-lg/wfd 0770 system system + chown system system /persist-lg/wfd + chmod 0770 /persist-lg/wfd + +#sns partition permission change + + chown system system /sns + chmod 0775 /sns + +# Export GPIO56 for fusion targets to enable/disable hub +service usbhub_init /system/bin/usbhub_init + class late_start + user root + disabled + oneshot + +on property:persist.radio.atfwd.start=false + stop atfwd + +on property:init.svc.surfaceflinger=stopped + stop ppd + stop hdmid + +on property:ro.board.platform=msm7630_fusion + start usbhub_init + +on property:init.svc.wpa_supplicant=stopped + stop dhcpcd + +on property:bluetooth.isEnabled=true + start btwlancoex + write /sys/class/bluetooth/hci0/idle_timeout 7000 + +on property:ro.bluetooth.ftm_enabled=true + start ftmd + +service last_kmsg_backup /system/bin/sh /system/etc/last_kmsg_backup.sh + class main + disabled + oneshot + +service zetaw-c_core-sh /system/bin/sh /init.zetaw.class_core.sh + class core + user root + oneshot + +service zetaw-c_main-sh /system/bin/sh /init.class_main.sh + class main + user root + oneshot + +#service ril-qmi /system/bin/sh /init.zetaw.ril.sh +# class main +# user root +# oneshot + +service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated + class late_start + +service fuse_external_SD /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/external_SD /storage/external_SD + class late_start + disabled + +# Binding fuse mount point to /storage/emulated/legacy +on property:init.svc.sdcard=running + wait /mnt/shell/emulated/0 + mount none /mnt/shell/emulated/0 /storage/emulated/legacy bind + +on property:vold.decrypt=trigger_restart_framework + start zetaw-c_main-sh + start config_bluetooth + +on property:persist.env.fastdorm.enabled=true + setprop persist.radio.data_no_toggle 1 + +service cnd /system/bin/cnd + class late_start + socket cnd stream 660 root inet + +service irsc_util /system/bin/logwrapper /system/bin/irsc_util "/etc/sec_config" + class main + user root + oneshot + +service rmt_storage /system/bin/rmt_storage + class core + user root + disabled + +on property:ro.boot.emmc=true + start rmt_storage + +service rfs_access /system/bin/rfs_access + class core + user system + group system net_raw + +on property:ro.boot.emmc=true + start rfs_access + +service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0 + class late_start + user bluetooth + group bluetooth net_bt_admin inet + disabled + oneshot + +service bt-sap /system/bin/sapd 15 + user bluetooth + group bluetooth net_bt_admin + class late_start + disabled + oneshot + +service ftmd /system/bin/logwrapper /system/bin/ftmdaemon + class late_start + user root + group bluetooth net_bt_admin misc net_bt_stack qcom_diag + disabled + oneshot + +service bridgemgrd /system/bin/bridgemgrd + class late_start + user radio + group radio qcom_diag + disabled + +service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0 + class late_start + user system + group system inet + disabled + +service qmiproxy /system/bin/qmiproxy + class main + user radio + group radio qcom_diag + disabled + +# QMUX must be in multiple groups to support external process connections +service qmuxd /system/bin/qmuxd + class main + user radio + group radio audio bluetooth gps qcom_diag + disabled + +service netmgrd /system/bin/netmgrd + class main + disabled + +service sensors /system/bin/sensors.qcom + class late_start + user root + group root radio system + +on property:ro.use_data_netmgrd=false + # netmgr not supported on specific target + stop 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 + +service amp_init /system/bin/amploader -i + class late_start + user root + disabled + oneshot + +service amp_load /system/bin/amploader -l 7000 + class late_start + user root + disabled + oneshot + +service amp_unload /system/bin/amploader -u + class late_start + user root + disabled + oneshot + +service p2p_supplicant /system/bin/wpa_supplicant \ + -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ + -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \ + -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf \ + -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ + -e/data/misc/wifi/entropy.bin -g@android: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 + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +service wpa_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf \ + -O/data/misc/wifi/sockets \ + -e/data/misc/wifi/entropy.bin -g@android: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 + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG + class late_start + disabled + oneshot + +service dhcpcd_p2p /system/bin/dhcpcd -ABKLG + class late_start + disabled + oneshot + +service iprenew_wlan0 /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service iprenew_p2p /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service ptt_socket_app /system/bin/ptt_socket_app + class main + user system + group system + oneshot + +service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG + class late_start + disabled + oneshot + +service iprenew_bt-pan /system/bin/dhcpcd -n + class late_start + disabled + oneshot + +service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG + disabled + oneshot + +service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG + disabled + oneshot + +service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG + disabled + oneshot + +service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG + disabled + oneshot + +service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG + disabled + oneshot + +service gpsone_daemon /system/bin/gpsone_daemon + class late_start + user gps + group gps inet net_raw + disabled + +service quipc_igsn /system/bin/quipc_igsn + class late_start + user gps + group inet gps qcom_diag + disabled + +service quipc_main /system/bin/quipc_main + class late_start + user gps + group gps net_admin wifi inet qcom_diag + disabled + +service location_mq /system/bin/location-mq + class late_start + user gps + group gps + disabled + +service lowi-server /system/bin/lowi-server + class late_start + user gps + group gps net_admin wifi inet qcom_diag + disabled + +service fm_dl /system/bin/sh /system/etc/init.zetaw.fm.sh + class late_start + user root + group system fm_radio + disabled + oneshot + +on property:crypto.driver.load=1 + insmod /system/lib/modules/qce.ko + insmod /system/lib/modules/qcedev.ko + +on property:crypto.driver.load=0 + exec /system/bin/rmmod qcedev.ko + exec /system/bin/rmmod qce.ko + +service drmdiag /system/bin/drmdiagapp + class late_start + user root + disabled + oneshot + +on property:drmdiag.load=1 + start drmdiag + +on property:drmdiag.load=0 + stop drmdiag + +service zetaw-sh /system/bin/sh /init.zetaw.sh + class late_start + user root + oneshot + +service zetaw-post-boot /system/bin/sh /system/etc/init.zetaw.post_boot.sh + class late_start + user root + disabled + oneshot + +service wifi-sdio-on /system/bin/sh /system/etc/init.zetaw.sdio.sh + class late_start + group wifi inet + disabled + oneshot + +service wifi-crda /system/bin/sh /system/etc/init.crda.sh + class late_start + user root + disabled + oneshot + + +on property:init.svc.bootanim=stopped + start zetaw-post-boot + +service atfwd /system/bin/ATFWD-daemon + class late_start + user system + group system radio + +service hdmid /system/bin/hdmid + class late_start + socket hdmid stream 0660 root system graphics + disabled + +service ppd /system/bin/mm-pp-daemon + class late_start + user system + socket pps stream 0660 system system graphics + group system graphics + +service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf + class late_start + user root + group root + oneshot + disabled + +service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D + class late_start + group radio wifi inet + disabled + oneshot + +on property:persist.data.ds_fmc_app.mode=1 + start ds_fmc_appd + +service ims_regmanager /system/bin/exe-ims-regmanagerprocessnative + class late_start + group net_bt_admin inet radio wifi + disabled + +on property:persist.ims.regmanager.mode=1 + start ims_regmanager + +on property:ro.data.large_tcp_window_size=true + # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) + write /proc/sys/net/ipv4/tcp_adv_win_scale 2 + +service battery_monitor /system/bin/battery_monitor + user system + group system + disabled + +service ril-daemon1 /system/bin/rild -c 1 + class main + socket rild1 stream 660 root radio + socket rild-debug1 stream 660 radio system + user root + disabled + group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log + +service ril-daemon2 /system/bin/rild -c 2 + class main + socket rild2 stream 660 root radio + socket rild-debug2 stream 660 radio system + user root + disabled + group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log + +service profiler_daemon /system/bin/profiler_daemon + class late_start + user root + group root + disabled + +service hcidump /system/bin/sh /system/etc/hcidump.sh + user bluetooth + group bluetooth system net_bt_admin net_admin + disabled + oneshot + +service charger /charger + class charger + +# Mobile DM Router +service lg_dm_router /system/bin/lg_dm_router + class late_start + user system + group system + disabled + socket Full.DM.port stream 660 system system + +on property:persist.service.dm_app.enable=true + start lg_dm_router +on property:persist.service.dm_app.enable=false + stop lg_dm_router + +# ADD LGODL +service lg_dm_dev_router /system/bin/lg_dm_dev_router + class late_start + user root + group system sdcard_r sdcard_rw + disabled + oneshot + +on property:persist.service.lge.odl_on=true + start lg_dm_dev_router +on property:persist.service.lge.odl_on=false + + +service ssr_diag /system/bin/ssr_diag + class late_start + user system + group system + +# SSR setting +on property:persist.sys.ssr.restart_level=* + exec /system/bin/sh /init.zetaw.ssr.sh ${persist.sys.ssr.restart_level} ${ro.build.type} + +# [BEGIN][LGE_WIFI][QCT][neo-wifi@lge.com] add riva_ramdump service +# WIFI SSR settings +on property:persist.sys.ssr.restart_level_w=* + exec /system/bin/sh /system/etc/init.zetaw.ssr.wifi.sh ${persist.sys.ssr.restart_level_w} +# [END][LGE_WIFI][QCT][neo-wifi@lge.com] add riva_ramdump service + +# [BEGIN][LGE_WIFI][QCT][neo-wifi@lge.com] set SSR3 and rivadump enable depends on buildtype +on property:ro.build.type=user + setprop persist.sys.ssr.restart_level_w 3 + +on property:ro.build.type=userdebug + setprop persist.sys.ssr.restart_level_w 3 + setprop persist.service.rivadump.enable 1 +# [END][LGE_WIFI][QCT][neo-wifi@lge.com] set SSR3 and rivadump enable depends on buildtype + +# Define fastmmi +service fastmmi /system/bin/mmi + user root + group root + disabled + +service fastmmisrv /system/bin/sh /init.zetaw.factory.sh + user root + disabled + oneshot + +# sreadahead daemon +service sreadahead /sbin/treadahead + oneshot + disabled + +# sreadahead daemon +service sreadahead-check /sbin/sreadahead_check + class main + user root + group root + oneshot + +on ffbm + start fastmmisrv + +service diag_mdlog_start /system/bin/diag_mdlog + class late_start + user sdcard_rw + group system qcom_diag sdcard_rw sdcard_r media_rw + disabled + oneshot + +service diag_mdlog_stop /system/bin/diag_mdlog -k + class late_start + user sdcard_rw + group system qcom_diag sdcard_rw sdcard_r media_rw + disabled + oneshot + +on property:ro.minios.enable=1 + start zetaw-post-boot + +# Factory, ATD +service atd /system/bin/atd /dev/ttyGS0 /dev/smd0 + socket atd stream 0660 system inet + class main + +# Factory, MTSD lg-msp@lge.com +service mtsd /system/bin/mtsd + class late_start + oneshot + socket mtsd.port stream 660 system system + +on property:sys.mts.forcemts=1 + start mtsd +on property:sys.mts.forcemts=0 + stop mtsd +#touch firmware upgrade on hiddenmenu +on property:sys.lge.touchfirmware.update=1 + write /sys/devices/virtual/input/lge_touch/fw_upgrade 1 + setprop sys.lge.touchfirmware.update 2 + +on property:sys.lge.touchsensingtest=1 + write /sys/devices/virtual/input/lge_touch/sensing_test 1 +on property:sys.lge.touchsensingtest=0 + write /sys/devices/virtual/input/lge_touch/sensing_test 0 + setprop sys.lge.touchsensingtest 2 + +on property:ril.lge.touch.callstate=0 + write /sys/devices/virtual/input/lge_touch/incoming_call 0 +on property:ril.lge.touch.callstate=1 + write /sys/devices/virtual/input/lge_touch/incoming_call 1 +on property:ril.lge.touch.callstate=2 + write /sys/devices/virtual/input/lge_touch/incoming_call 2 + +on property:service.keyguard.status=0 + write /sys/devices/virtual/input/lge_touch/lockscreen 0 +on property:service.keyguard.status=1 + write /sys/devices/virtual/input/lge_touch/lockscreen 1 +on property:service.keyguard.status=2 + write /sys/devices/virtual/input/lge_touch/lockscreen 2 + +service qseecomd /system/bin/qseecomd + class late_start + user root + group root + +# lge hidden menu can set parameters persist.service.crash.enable +# rtb log enable and ftrace event enable +on property:persist.service.crash.enable=1 + write /sys/module/restart/parameters/download_mode 1 + write /sys/module/msm_rtb/parameters/filter 63 + write /sys/kernel/debug/tracing/buffer_size_kb 512 + write /sys/kernel/debug/tracing/events/sched/sched_switch/enable 1 + write /sys/kernel/debug/tracing/events/irq/irq_handler_entry/enable 1 + write /sys/kernel/debug/tracing/events/workqueue/workqueue_execute_start/enable 1 + write /sys/kernel/debug/tracing/events/workqueue/workqueue_execute_end/enable 1 + write /sys/module/lge_handle_panic/parameters/no_powermode 1 + +on property:persist.service.crash.enable=0 + write /sys/module/restart/parameters/download_mode 0 + write /sys/module/msm_rtb/parameters/filter 0 + write /sys/kernel/debug/tracing/buffer_size_kb 0 + write /sys/kernel/debug/tracing/events/sched/sched_switch/enable 0 + write /sys/kernel/debug/tracing/events/irq/irq_handler_entry/enable 0 + write /sys/kernel/debug/tracing/events/workqueue/workqueue_execute_start/enable 0 + write /sys/kernel/debug/tracing/events/workqueue/workqueue_execute_end/enable 0 + write /sys/module/lge_handle_panic/parameters/no_powermode 0 + +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 system + group system + disabled + +# 2013.05.13 real-wifi@lge.com[woOgi] TestMode Daemon for QCT driver +service ftm_ptt /system/bin/ftm_ptt -d + class late_start + user root + group radio + disabled + oneshot + +on property:hw.ftm_ptt_start=1 + start ftm_ptt + +on property:hw.ftm_ptt_start=0 + stop ftm_ptt +# 2013.05.13 real-wifi@lge.com[woOgi] TestMode Daemon for QCT driver + +# LG_BTUI : BDADDR_LOADER [s] +service bdaddr_loader /system/bin/bdaddr_loader + user root + group bluetooth net_bt_admin misc net_bt_stack + disabled + oneshot +# LG_BTUI : BDADDR_LOADER [e] + +# Modem-bsp, SSR Ramdump Application +service ssr_dump /system/bin/subsystem_ramdump 1 + class late_start + user system + group system sdcard_r sdcard_rw + disabled + +on property:persist.service.ssr_dump.enable=1 + write /sys/module/subsystem_restart/parameters/enable_ramdumps 1 + start ssr_dump +on property:persist.service.ssr_dump.enable=0 + write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 + stop ssr_dump + +on property:persist.service.ssr_dump.ssr=1 + write /sys/devices/fc880000.qcom,mss/subsys1/restart_level RELATED +on property:persist.service.ssr_dump.ssr=0 + write /sys/devices/fc880000.qcom,mss/subsys1/restart_level SYSTEM + +# [BEGIN][LGE_WIFI][QCT][neo-wifi@lge.com] add riva_ramdump service +on property:persist.service.rivadump.enable=1 + write /sys/module/pil_pronto/parameters/enable_pronto_ramdump 1 + start riva_ramdump +on property:persist.service.rivadump.enable=0 + write /sys/module/pil_pronto/parameters/enable_pronto_ramdump 0 + stop riva_ramdump + +service riva_ramdump /system/bin/riva_ramdump + class late_start + user root + group system + disabled +# [END][LGE_WIFI][QCT][neo-wifi@lge.com] add riva_ramdump service + +#LGE_CHANGE_S 2012.04 for MOCA +service moca_service /system/bin/moca -s + class late_start + user root + group system sdcard_r sdcard_rw radio + disabled + oneshot + socket Full.MOCA.port stream 660 system system + +service moca_restart /system/bin/moca_restart + class late_start + user root + group system sdcard_r sdcard_rw radio + disabled + oneshot + +service moca_ssr_ramdump /system/bin/subsystem_ramdump 1 + class late_start + user system + group system sdcard_r sdcard_rw radio + disabled + oneshot + +on property:persist.service.moca.enable=1 + start moca_service + start moca_restart + +service moca_service_disable /system/bin/moca -k + class late_start + user root + group system sdcard_r sdcard_rw radio + disabled + oneshot + +on property:persist.service.moca.enable=0 + start moca_service_disable +#LGE_CHANGE_E 2012.04 for MOCA + +on property:rild.modem_restart=silence + write /sys/module/lge_handle_panic/parameters/gen_modem_panic 2 + +# byungil.choi@lge.com for SW IrRC +service irrcServer /system/bin/irrcServer + class main + user media + group media + onrestart restart irrcServer + +service ssbd /system/bin/ssbd + class main + socket ssbd stream 0660 root mount + +#LGE_CHANGE_S, 20131206 add AICL start routin +service charger_monitor /system/bin/charger_monitor + user system + group system + +on charger-monitor + chown root system /sys/module/qpnp_charger/parameters/charger_monitor + chown root system /sys/class/power_supply/battery/input_current_max + chown root system /sys/class/power_supply/battery/input_current_trim + chown root system /sys/class/power_supply/battery/voltage_min + chown root system /sys/class/power_supply/battery/input_current_settled + 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/voltage_min + chmod 0664 /sys/class/power_supply/battery/input_current_settled + chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor + start charger_monitor +#LGE_CHANGE_E, 20131206 add AICL start routin + +# CM Performance Profiles + +# Powersave +on property:sys.perf.profile=0 + start mpdecision + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave + write /sys/class/devfreq/qcom,cpubw.55 powersave + +# Balanced +on property:sys.perf.profile=1 + start mpdecision + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive + write /sys/class/devfreq/qcom,cpubw.55 msm_cpufreq + +# High performance +on property:sys.perf.profile=2 + stop mpdecision + write /sys/devices/system/cpu/cpu0/online 1 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor performance + write /sys/class/devfreq/qcom,cpubw.65 performance diff --git a/rootdir/init.zetaw.ril.sh b/rootdir/init.zetaw.ril.sh new file mode 100755 index 0000000..7dc519b --- /dev/null +++ b/rootdir/init.zetaw.ril.sh @@ -0,0 +1,60 @@ +#!/system/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. +# + +carrier=`getprop persist.env.spec` +if [ "$carrier" = "ChinaTelecom" ]; then + # Update the props. + setprop persist.env.phone.global true + setprop persist.env.plmn.update true + + # Remount /system with read-write permission for copy action. + `mount -o remount,rw /system` + + # Copy the modules to system app. + `cp /system/vendor/ChinaTelecom/system/app/RoamingSettings.apk /system/app/RoamingSettings.apk` + `cp /system/vendor/ChinaTelecom/system/app/UniversalDownload.apk /system/app/UniversalDownload.apk` + `chmod -h 644 /system/app/RoamingSettings.apk` + `chmod -h 644 /system/app/UniversalDownload.apk` + + # Remount /system with read-only + `mount -o remount,ro /system` +else + # Update the props. + setprop persist.env.phone.global false + setprop persist.env.plmn.update false + + # Remount /system with read-write permission for remove action. + `mount -o remount,rw /system` + + # Remove the modules from the system app. + `rm /system/app/RoamingSettings.apk` + `rm /system/app/UniversalDownload.apk` + + # Remount /system with read-only + `mount -o remount,ro /system` +fi diff --git a/rootdir/init.zetaw.sh b/rootdir/init.zetaw.sh new file mode 100755 index 0000000..3dccc29 --- /dev/null +++ b/rootdir/init.zetaw.sh @@ -0,0 +1,208 @@ +#!/system/bin/sh +# Copyright (c) 2009-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. +# + +target=`getprop ro.board.platform` +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 -h 0660 /sys/module/qpnp_bms/parameters/* + chmod -h 0660 /sys/module/pm8921_bms/parameters/* + mkdir -p /data/bms + chown -h root.system /data/bms + chmod -h 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/voltage_min + chmod -h 0664 /sys/class/power_supply/battery/input_current_max + chmod -h 0664 /sys/class/power_supply/battery/input_current_trim + chmod -h 0664 /sys/class/power_supply/battery/voltage_min + chmod -h 0664 /sys/module/qpnp_charger/parameters/charger_monitor + start charger_monitor + fi +} + +baseband=`getprop ro.baseband` +izat_premium_enablement=`getprop ro.qc.sdk.izat.premium_enabled` +izat_service_mask=`getprop ro.qc.sdk.izat.service_mask` + +# +# Suppress default route installation during RA for IPV6; user space will take +# care of this +# exception default ifc +for file in /proc/sys/net/ipv6/conf/* +do + echo 0 > $file/accept_ra_defrtr +done +echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr + +# +# Start gpsone_daemon for SVLTE Type I & II devices +# + +# platform id 126 is for MSM8974 +case "$platformid" in + "126") + start gpsone_daemon +esac +case "$target" in + "msm7630_fusion") + start gpsone_daemon +esac +case "$baseband" in + "svlte2a") + start gpsone_daemon + start bridgemgrd + ;; + "sglte" | "sglte2") + start gpsone_daemon + ;; +esac + +let "izat_service_gtp_wifi=$izat_service_mask & 2#1" +let "izat_service_gtp_wwan_lite=($izat_service_mask & 2#10)>>1" +let "izat_service_pip=($izat_service_mask & 2#100)>>2" + +if [ "$izat_premium_enablement" -ne 1 ]; then + if [ "$izat_service_gtp_wifi" -ne 0 ]; then +# GTP WIFI bit shall be masked by the premium service flag + let "izat_service_gtp_wifi=0" + fi +fi + +if [ "$izat_service_gtp_wwan_lite" -ne 0 ] || + [ "$izat_service_gtp_wifi" -ne 0 ] || + [ "$izat_service_pip" -ne 0 ]; then +# OS Agent would also be started under the same condition + start location_mq +fi + +if [ "$izat_service_gtp_wwan_lite" -ne 0 ] || + [ "$izat_service_gtp_wifi" -ne 0 ]; then +# start GTP services shared by WiFi and WWAN Lite + start xtwifi_inet + start xtwifi_client +fi + +if [ "$izat_service_gtp_wifi" -ne 0 ] || + [ "$izat_service_pip" -ne 0 ]; then +# advanced WiFi scan service shared by WiFi and PIP + start lowi-server +fi + +if [ "$izat_service_pip" -ne 0 ]; then +# PIP services + start quipc_main + start quipc_igsn +fi + +start_sensors + +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 + ;; +#LGE_CHANGE_S, 20131206 hyogook.lee@lge.com LGE use charger_monitor complet boot & charger logo so change start routine +# "msm8226") +# start_charger_monitor +# ;; +# "msm8610") +# start_charger_monitor +# ;; +#esac +#LGE_CHANGE_E, 20131206 hyogook.lee@lge.com LGE use charger_monitor complet boot & charger logo so change start routine diff --git a/rootdir/init.zetaw.ssr.sh b/rootdir/init.zetaw.ssr.sh new file mode 100755 index 0000000..89d4b6c --- /dev/null +++ b/rootdir/init.zetaw.ssr.sh @@ -0,0 +1,144 @@ +#!/system/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 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. +# + +ssr_str="$1" +BUILD_TYPE="$2" +IFS=, +ssr_array=($ssr_str) +declare -i subsys_mask=0 + +# check user input subsystem with system device +ssr_check_subsystem_name() +{ + declare -i i=0 + subsys=`cat /sys/bus/msm_subsys/devices/subsys$i/name` + while [ "$subsys" != "" ] + do + if [ "$subsys" == "$ssr_name" ]; then + return 1 + fi + i=$i+1 + subsys=`cat /sys/bus/msm_subsys/devices/subsys$i/name` + done + return 0 +} + +# set subsystem mask to indicate which subsystem needs to be enabled +for num in "${!ssr_array[@]}" +do + case "${ssr_array[$num]}" in + "1") + subsys_mask=0 + ;; + "riva") + subsys_mask=$subsys_mask+1 + ;; + "3") + subsys_mask=63 + ;; + "adsp") + ssr_name=adsp + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+2 + fi + ;; + "modem") + ssr_name=modem + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+4 + fi + ;; + "wcnss") + ssr_name=wcnss + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+8 + fi + ;; + "venus") + ssr_name=venus + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+16 + fi + ;; + "external_modem") + ssr_name=external_modem + if ( ssr_check_subsystem_name ); then + subsys_mask=$subsys_mask+32 + fi + ;; + esac +done + +# enable selected subsystem restart +if [ $((subsys_mask & 1)) == 1 ]; then + echo 1 > /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr +else + echo 0 > /sys/module/wcnss_ssr_8960/parameters/enable_riva_ssr +fi + +# SSR for ADSP always disable in user build image +if [ $BUILD_TYPE == "user" ]; then + echo "system" > /sys/bus/msm_subsys/devices/subsys0/restart_level +else + if [ $((subsys_mask & 2)) == 2 ]; then + echo "related" > /sys/bus/msm_subsys/devices/subsys0/restart_level + else + echo "system" > /sys/bus/msm_subsys/devices/subsys0/restart_level + fi +fi + +if [ $((subsys_mask & 4)) == 4 ]; then + echo "related" > /sys/bus/msm_subsys/devices/subsys1/restart_level +else + echo "system" > /sys/bus/msm_subsys/devices/subsys1/restart_level +fi + +# place SSR for Wifi handle to init.{$targetname}.ssr.wifi.sh -- bluetooth.kang@lge.com +#if [ $((subsys_mask & 8)) == 8 ]; then +# echo "related" > /sys/bus/msm_subsys/devices/subsys2/restart_level +#else +# echo "system" > /sys/bus/msm_subsys/devices/subsys2/restart_level +#fi + +if [ $((subsys_mask & 16)) == 16 ]; then + echo "related" > /sys/bus/msm_subsys/devices/subsys3/restart_level +else + echo "system" > /sys/bus/msm_subsys/devices/subsys3/restart_level +fi + +if [ $((subsys_mask & 32)) == 32 ]; then + echo "related" > /sys/bus/msm_subsys/devices/subsys4/restart_level +else + echo "system" > /sys/bus/msm_subsys/devices/subsys4/restart_level +fi + +if [ $((subsys_mask & 63)) == 63 ]; then + echo 3 > /sys/module/subsystem_restart/parameters/restart_level +else + echo 1 > /sys/module/subsystem_restart/parameters/restart_level +fi diff --git a/rootdir/init.zetaw.syspart_fixup.sh b/rootdir/init.zetaw.syspart_fixup.sh new file mode 100755 index 0000000..32980c1 --- /dev/null +++ b/rootdir/init.zetaw.syspart_fixup.sh @@ -0,0 +1,84 @@ +#!/system/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. +# + +target="$1" +serial="$2" + +# No path is set up at this point so we have to do it here. +PATH=/sbin:/system/sbin:/system/bin:/system/xbin +export PATH + +mount_needed=false; + +if [ ! -f /system/etc/boot_fixup ];then +# This should be the first command +# remount system as read-write. + mount -o rw,remount,barrier=1 /system + mount_needed=true; +fi + +# **** WARNING ***** +# This runs in a single-threaded, critical path portion +# of the Android bootup sequence. This is to guarantee +# all necessary system partition fixups are done before +# the rest of the system starts up. Run any non- +# timing critical tasks in a separate process to +# prevent slowdown at boot. + +# Run modem link script +if [ -f /system/etc/init.zetaw.modem_links.sh ]; then + /system/bin/sh /system/etc/init.zetaw.modem_links.sh +fi + +# Run mdm link script +if [ -f /system/etc/init.zetaw.mdm_links.sh ]; then + /system/bin/sh /system/etc/init.zetaw.mdm_links.sh +fi + +# Run wifi script +if [ -f /system/etc/init.zetaw.wifi.sh ]; then + /system/bin/sh /system/etc/init.zetaw.wifi.sh "$target" "$serial" +fi + +# Run the sensor script +if [ -f /system/etc/init.zetaw.sensor.sh ]; then + /system/bin/sh /system/etc/init.zetaw.sensor.sh +fi + +# Run usf script +if [ -f /system/etc/usf_settings.sh ]; then + /system/bin/sh /system/etc/usf_settings.sh +fi + +touch /system/etc/boot_fixup + +if $mount_needed ;then +# This should be the last command +# remount system as read-only. + mount -o ro,remount,barrier=1 /system +fi diff --git a/rootdir/init.zetaw.usb.rc b/rootdir/init.zetaw.usb.rc new file mode 100755 index 0000000..37b7c64 --- /dev/null +++ b/rootdir/init.zetaw.usb.rc @@ -0,0 +1,358 @@ +# 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. +# + +service zetaw-usb-sh /system/bin/sh /init.zetaw.usb.sh + class core + user root + oneshot + +service zetaw-cmm-usb-sh /system/bin/sh /init.zetaw.cmm.usb.sh + class core + user root + oneshot + disabled + +on post-fs-data + chown system system /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode + chmod 0660 /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode + +on property:sys.usb.provisioned=1 + start zetaw-cmm-usb-sh + +on chargerlogo_usb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 6300 + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions charge_only + write /sys/class/android_usb/android0/enable 1 + +# LGE USB compositions +# boot +on property:sys.usb.config=boot + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61F1 + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,mtp + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=boot,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61F1 + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,mtp,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# pc_suite +on property:sys.usb.config=pc_suite + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61F1 + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,mtp + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=pc_suite,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61F1 + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,mtp,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# usb_tethering +on property:sys.usb.config=ecm + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61FE + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,ecm + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ecm,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61FE + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,ecm,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61FE + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61FE + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# mtp +on property:sys.usb.config=mtp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61F1 + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,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 1004 + write /sys/class/android_usb/android0/idProduct 61F1 + write /sys/class/android_usb/android0/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions acm,diag,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_only + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 631C + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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_only,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61F9 + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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} + +# ptp +on property:sys.usb.config=ptp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 631E + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 631D + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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=ptp_only + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 631E + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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_only,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 631D + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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} + +# mass_storage +on property:sys.usb.config=mass_storage + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61A6 + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + 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=mass_storage,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 61A6 + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions mass_storage,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# autorun +on property:sys.usb.config=cdrom_storage + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 630E + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions cdrom_storage + write /sys/class/android_usb/android0/f_cdrom_storage/lun/file /system/usbautorun.iso + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=cdrom_storage,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 630E + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions cdrom_storage + write /sys/class/android_usb/android0/f_cdrom_storage/lun/file /system/usbautorun.iso + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# charge_only +on property:sys.usb.config=charge_only + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 6300 + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions charge_only + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=charge_only,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 1004 + write /sys/class/android_usb/android0/idProduct 631F + write /sys/class/android_usb/android0/bDeviceClass 0 + write /sys/class/android_usb/android0/bDeviceSubClass 0 + write /sys/class/android_usb/android0/bDeviceProtocol 0 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# QCT +on property:sys.usb.config=qmicm + 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/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=qmicm,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/bDeviceClass 239 + write /sys/class/android_usb/android0/bDeviceSubClass 2 + write /sys/class/android_usb/android0/bDeviceProtocol 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/init.zetaw.usb.sh b/rootdir/init.zetaw.usb.sh new file mode 100755 index 0000000..2e833d3 --- /dev/null +++ b/rootdir/init.zetaw.usb.sh @@ -0,0 +1,200 @@ +#!/system/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. +# +# +# Update USB serial number from persist storage if present, if not update +# with value passed from kernel command line, if none of these values are +# set then use the default value. This order is needed as for devices which +# do not have unique serial number. +# User needs to set unique usb serial number to persist.usb.serialno +# +serialno=`getprop persist.usb.serialno` +case "$serialno" in + "") + serialnum=`getprop ro.serialno` + case "$serialnum" in + "");; #Do nothing, use default serial number + *) + echo "$serialnum" > /sys/class/android_usb/android0/iSerial + esac + ;; + *) + echo "$serialno" > /sys/class/android_usb/android0/iSerial +esac + +chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup +chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup + +# +# Allow persistent usb charging disabling +# User needs to set usb charging disabled in persist.usb.chgdisabled +# +target=`getprop ro.board.platform` +usbchgdisabled=`getprop persist.usb.chgdisabled` +case "$usbchgdisabled" in + "") ;; #Do nothing here + * ) + case $target in + "msm8660") + echo "$usbchgdisabled" > /sys/module/pmic8058_charger/parameters/disabled + echo "$usbchgdisabled" > /sys/module/smb137b/parameters/disabled + ;; + "msm8960") + echo "$usbchgdisabled" > /sys/module/pm8921_charger/parameters/disabled + ;; + esac +esac + +usbcurrentlimit=`getprop persist.usb.currentlimit` +case "$usbcurrentlimit" in + "") ;; #Do nothing here + * ) + case $target in + "msm8960") + echo "$usbcurrentlimit" > /sys/module/pm8921_charger/parameters/usb_max_current + ;; + esac +esac +# +# Allow USB enumeration with default PID/VID +# +echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua +usb_config=`getprop persist.sys.usb.config` +bootmode=`getprop ro.bootmode` +buildtype=`getprop ro.build.type` +case "$bootmode" in + "bp-tools" ) + setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet,usbnet,adb + ;; + "factory" ) + setprop persist.sys.usb.config usbnet + ;; + "qcom" ) + setprop persist.sys.usb.config diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb + ;; + * ) + case "$usb_config" in + "ptp,adb" | "mtp,adb" | "mass_storage,adb" | "ptp" | "mtp" | "mass_storage" ) + ;; + *) + case "$buildtype" in + "user" ) + setprop persist.sys.usb.config mtp + ;; + * ) + setprop persist.sys.usb.config mtp,adb + ;; + esac + ;; + esac + ;; +esac + +# +# Add support for exposing lun0 as cdrom in mass-storage +# +target=`getprop ro.product.device` +cdromname="/dev/block/platform/msm_sdcc.1/by-name/cdrom" +cdromenable=`getprop persist.service.cdrom.enable` +case "$target" in + "msm8226" | "msm8610") + case "$cdromenable" in + 0) + echo "" > /sys/class/android_usb/android0/f_mass_storage/lun0/file + ;; + 1) + echo "mounting usbcdrom lun" + echo $cdromname > /sys/class/android_usb/android0/f_mass_storage/lun0/file + ;; + esac + ;; +esac + +# +# Select USB BAM - 2.0 or 3.0 +# +case "$target" in + "msm8974") + echo hsusb > /sys/bus/platform/devices/usb_bam/enable + ;; + "apq8084") + if [ "$baseband" == "apq" ]; then + echo "msm_hsic_host" > /sys/bus/platform/drivers/xhci_msm_hsic/unbind + fi + ;; + "msm8226") + if [ -e /sys/bus/platform/drivers/msm_hsic_host ]; then + if [ ! -L /sys/bus/usb/devices/1-1 ]; then + echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind + fi + fi + ;; +esac + +# +# set module params for embedded rmnet devices +# +rmnetmux=`getprop persist.rmnet.mux` +case "$baseband" in + "mdm" | "dsda" | "sglte2") + case "$rmnetmux" in + "enabled") + echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled + echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links + echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev + ;; + esac + echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init + # Allow QMUX daemon to assign port open wait time + chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait + ;; + "dsda2") + echo 2 > /sys/module/rmnet_usb/parameters/no_rmnet_devs + echo hsicctl,hsusbctl > /sys/module/rmnet_usb/parameters/rmnet_dev_names + case "$rmnetmux" in + "enabled") #mux is neabled on both mdms + echo 3 > /sys/module/rmnet_usb/parameters/mux_enabled + echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links + echo 17 > write /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev + ;; + "enabled_hsic") #mux is enabled on hsic mdm + echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled + echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links + echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev + ;; + "enabled_hsusb") #mux is enabled on hsusb mdm + echo 2 > /sys/module/rmnet_usb/parameters/mux_enabled + echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links + echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev + ;; + esac + echo 1 > /sys/module/rmnet_usb/parameters/rmnet_data_init + # Allow QMUX daemon to assign port open wait time + chown -h radio.radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait + ;; +esac diff --git a/rootdir/sbin/bbx b/rootdir/sbin/bbx new file mode 100755 index 0000000..ab9e099 Binary files /dev/null and b/rootdir/sbin/bbx differ diff --git a/rootdir/sepolicy b/rootdir/sepolicy new file mode 100644 index 0000000..eeddc24 Binary files /dev/null and b/rootdir/sepolicy differ diff --git a/twrp.fstab b/rootdir/twrp.fstab similarity index 55% rename from twrp.fstab rename to rootdir/twrp.fstab index c53ac5a..19b710b 100644 --- a/twrp.fstab +++ b/rootdir/twrp.fstab @@ -1,8 +1,8 @@ # mount point fstype device -/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata -/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache -/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system +/data auto /dev/block/platform/msm_sdcc.1/by-name/userdata +/cache auto /dev/block/platform/msm_sdcc.1/by-name/cache +/system auto /dev/block/platform/msm_sdcc.1/by-name/system /boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot /recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery /sdcard auto /dev/block/mmcblk1p1 diff --git a/rootdir/ueventd.w7ds.rc b/rootdir/ueventd.w7ds.rc new file mode 100644 index 0000000..76dedf1 --- /dev/null +++ b/rootdir/ueventd.w7ds.rc @@ -0,0 +1,199 @@ +# 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. +# + +/dev/null 0666 root root +/dev/zero 0666 root root +/dev/full 0666 root root +/dev/ptmx 0666 root root +/dev/tty 0666 root root +/dev/random 0666 root root +/dev/urandom 0666 root root + +/dev/ashmem 0666 root root +/dev/binder 0666 root root +/dev/tspdrv 0666 root root +/dev/ttyHSL0 0660 radio system +# logger should be world writable (for logging) but not readable +/dev/log/* 0666 root log + +# the DIAG device node is not world writable/readable. +/dev/diag 0660 system qcom_diag +/dev/ttydiag0 0660 system qcom_diag +/dev/ttydiag1 0660 system qcom_diag +/dev/genlock 0666 system system +/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 0600 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 + +#permissions for CSVT +/dev/smd11 0660 radio radio + +/dev/radio0 0640 system system +/dev/rfcomm0 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/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/video* 0660 system camera +/dev/media* 0660 system camera +/dev/v4l-subdev* 0660 system camera +/dev/qseecom 0660 system drmrpc +/dev/gemini0 0660 system camera +/dev/jpeg0 0660 system camera +/dev/jpeg1 0660 system camera +/dev/jpeg2 0660 system camera +/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 0664 root root +/dev/adsprpc-smd 0660 media camera + +#permissions for 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_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 0640 system audio +/dev/msm_a2dp_in 0660 system audio +/dev/msm_ac3 0660 system audio +/dev/msm_acdb 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/smd3 0660 bluetooth net_bt_stack +/dev/smd2 0660 bluetooth net_bt_stack +/dev/ttyHSL1 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 + +# DVB devices +/dev/dvb/adapter0/demux* 0444 media media +/dev/dvb/adapter0/dvr* 0664 media media +/dev/dvb/adapter0/video* 0664 media media + +# Broadcast devices +/dev/tsc_mux0 0660 media media +/dev/tsc_ci0 0660 media media + +# sensors +/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/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 + +# wlan +/dev/wcnss_wlan 0660 system system +/dev/wcnss_ctrl 0660 system system + +#nfc permissions +/dev/nfc-nci 0660 nfc nfc +/dev/pn547 0660 nfc nfc + +# UIO devices +/dev/uio0 0660 system system +/dev/uio1 0660 system system +/dev/uio2 0660 system system + +# Begin Immersion changes +/dev/tspdrv 0660 system system +# End Immersion changes diff --git a/sepolicy/adbd.te b/sepolicy/adbd.te new file mode 100644 index 0000000..a430d1c --- /dev/null +++ b/sepolicy/adbd.te @@ -0,0 +1,2 @@ +allow adbd system_data_file:file open; +allow adbd tmpfs:lnk_file read; diff --git a/sepolicy/app.te b/sepolicy/app.te new file mode 100644 index 0000000..f9a2eba --- /dev/null +++ b/sepolicy/app.te @@ -0,0 +1,11 @@ +allow media_app cache_backup_file:dir getattr; +allow media_app rootfs:file { read getattr open }; +allow platform_app pds_file:dir getattr; +allow platform_app persist_file:dir getattr; +allow platform_app rootfs:file getattr; +allow platform_app tombstone_data_file:dir getattr; +#su +allow platform_app device:fifo_file { read write open }; +allow platform_app device:sock_file write; +allow platform_app init:unix_stream_socket connectto; +allow platform_app su_exec:file { read getattr open execute execute_no_trans }; diff --git a/sepolicy/bluetooth_loader.te b/sepolicy/bluetooth_loader.te new file mode 100644 index 0000000..d14a033 --- /dev/null +++ b/sepolicy/bluetooth_loader.te @@ -0,0 +1,42 @@ +# Bluetooth executables and script (btnvtool, init.qcom.bt.sh) +type bluetooth_loader, domain; +type bluetooth_loader_exec, exec_type, file_type; + +allow bluetooth_loader rootfs:file { read open }; + +# Start bluetooth from init +init_daemon_domain(bluetooth_loader) + +# Run init.qcom.bt.sh +allow bluetooth_loader shell_exec:file { entrypoint read }; +allow bluetooth_loader bluetooth_loader_exec:file { getattr open execute_no_trans }; + +# init.qcom.bt.sh needs /system/bin/log access +allow bluetooth_loader devpts:chr_file rw_file_perms; + +# Run hci_qcomm_init from init.qcom.bt.sh +domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach) + +# hci_qcomm_init started with logwrapper +allow hci_attach devpts:chr_file rw_file_perms; +allow hci_attach bluetooth_loader:fd use; + +# Read mac address from persist partition +allow shell persist_file:dir getattr; +allow hci_attach persist_bluetooth_file:file { read open }; +allow bluetooth_loader persist_file:dir search; +r_dir_file(bluetooth_loader, persist_bluetooth_file) + +# Talk to init over the property socket +unix_socket_connect(bluetooth_loader, property, init) +# Set persist.service.bdroid.* and bluetooth.* property values +allow { bluetooth bluetooth_loader } bluetooth_prop:property_service set; + +# Shared memory node access +allow hci_attach bluetooth_device:chr_file rw_file_perms; + +# Allow getprop/setprop for init.qcom.bt.sh +allow bluetooth_loader system_file:file execute_no_trans; + +allow hci_attach bluetooth_loader:fifo_file { write getattr }; +allow hci_attach self:capability dac_override; diff --git a/sepolicy/bridge.te b/sepolicy/bridge.te new file mode 100644 index 0000000..381ea16 --- /dev/null +++ b/sepolicy/bridge.te @@ -0,0 +1,17 @@ +# Bridge Manager (radio process) +type bridge, domain; +type bridge_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(bridge) + +allow bridge self:netlink_kobject_uevent_socket { create bind read }; + +# Allow logging diagnostic items +allow bridge diagnostic_device:chr_file rw_file_perms; + +# Talk to qmuxd +qmux_socket(bridge) + +# XXX Label sysfs files with a specific type? +allow bridge sysfs:file { open write read getattr }; diff --git a/sepolicy/camera.te b/sepolicy/camera.te new file mode 100644 index 0000000..dc31bb2 --- /dev/null +++ b/sepolicy/camera.te @@ -0,0 +1,37 @@ +# Qualcomm MSM camera +type camera, domain; +type camera_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(camera) + +allow camera self:process execmem; + +allow camera camera_device:dir search; +allow camera { video_device camera_device }:chr_file rw_file_perms; +allow camera { surfaceflinger mediaserver }:fd use; + +# Create /data/cam_socket0 as camera_socket +type_transition camera system_data_file:sock_file camera_socket "cam_socket0"; +type_transition camera system_data_file:sock_file camera_socket "cam_socket1"; +allow camera camera_socket:sock_file { create unlink }; +allow camera system_data_file:dir remove_name; +allow camera system_data_file:sock_file unlink; + +# All others under /data get camera_data_file +file_type_auto_trans(camera, system_data_file, camera_data_file); +allow camera camera_data_file:dir { write add_name }; +allow camera camera_data_file:file create_file_perms; + +# Connect to /data/app/sensor_ctl_socket +unix_socket_connect(camera, sensors, sensors) +allow camera sensors_socket:sock_file read; + +allow camera devpts:chr_file { read write getattr }; +allow camera device:chr_file { read write ioctl open }; +allow camera mpdecision:unix_stream_socket connectto; +allow camera servicemanager:binder call; +allow camera socket_device:sock_file write; +allow camera system:binder call; +allow camera system:unix_stream_socket { read write setopt }; +allow camera system_data_file:file { open write }; diff --git a/sepolicy/device.te b/sepolicy/device.te new file mode 100644 index 0000000..29809f8 --- /dev/null +++ b/sepolicy/device.te @@ -0,0 +1,8 @@ +type diagnostic_device, dev_type; +type kgsl_device, dev_type, mlstrustedobject; +type mpdecision_device, dev_type; +type shared_log_device, dev_type; +type power_control_device, dev_type; +type efs_block_device, dev_type; +type bluetooth_device, dev_type; +type shared_memory_device, dev_type; diff --git a/sepolicy/dhcp.te b/sepolicy/dhcp.te new file mode 100644 index 0000000..75808dc --- /dev/null +++ b/sepolicy/dhcp.te @@ -0,0 +1,2 @@ +allow dhcp self:rawip_socket { create write setopt read }; +allow dhcp devpts:chr_file { read write ioctl }; diff --git a/sepolicy/dnsmasq.te b/sepolicy/dnsmasq.te new file mode 100644 index 0000000..058250d --- /dev/null +++ b/sepolicy/dnsmasq.te @@ -0,0 +1,14 @@ +allow dnsmasq self:capability net_admin; +allow dnsmasq self:udp_socket { read write ioctl create bind }; +allow dnsmasq node:udp_socket node_bind; +allow dnsmasq port:udp_socket name_bind; +allow dnsmasq self:capability { net_raw dac_override }; +allow dnsmasq self:netlink_route_socket { write read getattr nlmsg_read bind create }; +allow dnsmasq self:rawip_socket { write read create setopt }; +allow dnsmasq self:udp_socket setopt; +allow dnsmasq netd:fd use; +allow dnsmasq netd:fifo_file { read write }; +allow dnsmasq netd:netlink_kobject_uevent_socket { read write }; +allow dnsmasq netd:netlink_nflog_socket { read write }; +allow dnsmasq netd:netlink_route_socket { read write }; +allow dnsmasq netd:unix_stream_socket { read write }; diff --git a/sepolicy/domain.te b/sepolicy/domain.te new file mode 100644 index 0000000..8fdcb15 --- /dev/null +++ b/sepolicy/domain.te @@ -0,0 +1,3 @@ +allow domain kgsl_device:chr_file rw_file_perms; +# libgsl is chatty about accessing /data/local/tmp +dontaudit { surfaceflinger appdomain } shell_data_file:dir search; diff --git a/sepolicy/drmserver.te b/sepolicy/drmserver.te new file mode 100644 index 0000000..2c224e1 --- /dev/null +++ b/sepolicy/drmserver.te @@ -0,0 +1,2 @@ +# Drm wants to read /firmware/image/tzapps.mdt +r_dir_file(drmserver, radio_efs_file) diff --git a/sepolicy/file.te b/sepolicy/file.te new file mode 100644 index 0000000..c3d230a --- /dev/null +++ b/sepolicy/file.te @@ -0,0 +1,19 @@ +type mpdecision_socket, file_type; +type qmuxd_socket, file_type; +type sensors_socket, file_type; +type camera_socket, file_type; + +type sensors_data_file, file_type, data_file_type; + +# Default type for anything under /firmware +type radio_efs_file, fs_type; + +# Persist firmware types +type persist_file, file_type; +type persist_bluetooth_file, file_type; +type persist_drm_file, file_type; +type persist_wifi_file, file_type; + +# PDS partition +type pds_file, file_type; + diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts new file mode 100644 index 0000000..9188155 --- /dev/null +++ b/sepolicy/file_contexts @@ -0,0 +1,92 @@ +/dev/msm_acdb u:object_r:audio_device:s0 +/dev/msm_mp3 u:object_r:audio_device:s0 +/dev/msm_rtac u:object_r:audio_device:s0 +/dev/msm_vidc.* u:object_r:audio_device:s0 +/dev/msm_amrnb.* u:object_r:audio_device:s0 +/dev/msm_amrwb.* u:object_r:audio_device:s0 +/dev/msm_aac.* u:object_r:audio_device:s0 + +/dev/qseecom u:object_r:tee_device:s0 + +# Jpeg Engine support +/dev/gemini.* u:object_r:camera_device:s0 +# MSM camera related +/dev/video.* u:object_r:camera_device:s0 +/dev/msm_camera(/.*)? u:object_r:camera_device:s0 +/dev/msm_camera/video_msm u:object_r:camera_device:s0 + +# Media interface +/dev/media.* u:object_r:video_device:s0 + +# Image Rotator Driver +/dev/msm_rotator u:object_r:video_device:s0 + +# Sensors DSPS driver +/dev/msm_dsps u:object_r:sensors_device:s0 +/dev/smd_sns_dsps u:object_r:sensors_device:s0 + +/dev/hsicctl[0-3] u:object_r:radio_device:s0 +/dev/rmnet_mux_ctrl u:object_r:radio_device:s0 +/dev/qmi[0-2] u:object_r:radio_device:s0 +/dev/radio0 u:object_r:radio_device:s0 +/dev/ramdump_.* u:object_r:radio_device:s0 +/dev/smd7 u:object_r:radio_device:s0 +/dev/smdcntl0 u:object_r:radio_device:s0 +/dev/smdcntl1 u:object_r:radio_device:s0 +/dev/smdcntl2 u:object_r:radio_device:s0 +/dev/smdcntl3 u:object_r:radio_device:s0 +/dev/smdcntl4 u:object_r:radio_device:s0 +/dev/smdcntl5 u:object_r:radio_device:s0 +/dev/smdcntl6 u:object_r:radio_device:s0 +/dev/smdcntl7 u:object_r:radio_device:s0 +/dev/ttyUSB0 u:object_r:radio_device:s0 + +/dev/ttyHS.* u:object_r:hci_attach_dev:s0 +/dev/smd2 u:object_r:hci_attach_dev:s0 +/dev/smd3 u:object_r:hci_attach_dev:s0 + +/dev/cpu_dma_latency u:object_r:power_control_device:s0 +/dev/diag u:object_r:diagnostic_device:s0 +/dev/smd.* u:object_r:shared_memory_device:s0 +/dev/smem_log u:object_r:shared_log_device:s0 +/dev/kgsl-.* u:object_r:kgsl_device:s0 + +# Sockets +/dev/socket/qmux_audio(/.*)? u:object_r:qmuxd_socket:s0 +/dev/socket/qmux_bluetooth(/.*)? u:object_r:qmuxd_socket:s0 +/dev/socket/qmux_gps(/.*)? u:object_r:qmuxd_socket:s0 +/dev/socket/qmux_radio(/.*)? u:object_r:qmuxd_socket:s0 +/dev/socket/mpdecision(/.*)? u:object_r:mpdecision_socket:s0 + +# Block labeling +/dev/block/mmcblk0p1 u:object_r:efs_block_device:s0 + +# Data labeling +/data/misc/sensors(/.*)? u:object_r:sensors_data_file:s0 +/data/system/sensors(/.*)? u:object_r:sensors_data_file:s0 + +# System binaries +/system/bin/rmt_storage u:object_r:rmt_exec:s0 +/system/bin/thermald u:object_r:thermald_exec:s0 +/system/bin/mpdecision u:object_r:mpdecision_exec:s0 +/system/bin/mm-qcamera-daemon u:object_r:camera_exec:s0 +/system/bin/sensors.qcom u:object_r:sensors_exec:s0 +/system/bin/qmuxd u:object_r:qmux_exec:s0 +/system/bin/bridgemgrd u:object_r:bridge_exec:s0 +/system/bin/netmgrd u:object_r:netmgrd_exec:s0 +/system/bin/qseecomd u:object_r:tee_exec:s0 +/system/bin/hci_qcomm_init u:object_r:hci_attach_exec:s0 +/system/etc/init.qcom.bt.sh u:object_r:bluetooth_loader_exec:s0 +/system/bin/btnvtool u:object_r:bluetooth_loader_exec:s0 + +# Persist firmware filesystem +/persist(/.*)? u:object_r:persist_file:s0 +/persist/.bt_nv.bin u:object_r:persist_bluetooth_file:s0 +/persist/drm/widevine(/.*)? u:object_r:persist_drm_file:s0 +/persist/WCNSS_qcom_wlan_nv.bin u:object_r:persist_wifi_file:s0 +/persist/WCNSS_qcom_wlan_nv_calibration_persist.bin u:object_r:persist_wifi_file:s0 +/persist/WCNSS_qcom_wlan_nv_regulatory_persist.bin u:object_r:persist_wifi_file:s0 + +# PDS partition +/pds(/.*)? u:object_r:pds_file:s0 +/pds/camera(/.*)? u:object_r:camera_data_file:s0 diff --git a/sepolicy/hostapd.te b/sepolicy/hostapd.te new file mode 100644 index 0000000..d2e2517 --- /dev/null +++ b/sepolicy/hostapd.te @@ -0,0 +1 @@ +allow hostapd cgroup:dir { create add_name }; diff --git a/sepolicy/init.te b/sepolicy/init.te new file mode 100644 index 0000000..3f11893 --- /dev/null +++ b/sepolicy/init.te @@ -0,0 +1 @@ +allow init wpa_socket:unix_dgram_socket { bind create }; diff --git a/sepolicy/init_shell.te b/sepolicy/init_shell.te new file mode 100644 index 0000000..7569974 --- /dev/null +++ b/sepolicy/init_shell.te @@ -0,0 +1,4 @@ +allow init_shell sysfs_writable:file setattr; +#su +allow init_shell device:fifo_file { read write ioctl getattr }; + diff --git a/sepolicy/libqc-opt.te b/sepolicy/libqc-opt.te new file mode 100644 index 0000000..a908887 --- /dev/null +++ b/sepolicy/libqc-opt.te @@ -0,0 +1,6 @@ +type libqc-opt, domain; + +# Set sys.media.vdec.sw value +allow init_shell performance_prop:property_service set; +allow libqc-opt performance_prop:property_service set; +allow zygote performance_prop:property_service set; diff --git a/sepolicy/mediaserver.te b/sepolicy/mediaserver.te new file mode 100644 index 0000000..ce35f71 --- /dev/null +++ b/sepolicy/mediaserver.te @@ -0,0 +1,15 @@ +allow mediaserver camera_data_file:sock_file w_file_perms; +allow mediaserver device:sock_file write; + +qmux_socket(mediaserver) + +unix_socket_send(mediaserver, camera, camera) + +allow mediaserver self:socket create; + +# Allow logging diagnostic items +allow mediaserver diagnostic_device:chr_file rw_file_perms; + +allow mediaserver system_data_file:file { write open }; +allow mediaserver camera_device:dir search; +allow mediaserver camera_data_file:dir search; diff --git a/sepolicy/mpdecision.te b/sepolicy/mpdecision.te new file mode 100644 index 0000000..c3be678 --- /dev/null +++ b/sepolicy/mpdecision.te @@ -0,0 +1,30 @@ +# CPU governor (root process) +type mpdecision, domain; +type mpdecision_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(mpdecision) + +# dac_override to unlink /dev/socket/mpdecision/touchboost +allow mpdecision self:capability { dac_override fsetid net_admin }; +allow mpdecision self:netlink_kobject_uevent_socket { create read setopt bind read }; + +# Create under /dev/socket/mpdecision +allow mpdecision mpdecision_socket:dir w_dir_perms; +allow mpdecision mpdecision_socket:sock_file { create setattr write }; + +# XXX Should we label with own type? +allow mpdecision sysfs:file { read open write getattr }; + +allow mpdecision self:capability { chown sys_nice }; +allow mpdecision socket_device:dir { write add_name }; +allow mpdecision socket_device:sock_file { create setattr write }; + +allow mpdecision system_data_file:file { open append create }; +allow mpdecision system_data_file:dir { write add_name }; +allow mpdecision power_control_device:chr_file { write open }; +allow mpdecision sysfs_devices_system_cpu:file write; +allow mpdecision mediaserver:dir search; +allow mpdecision mediaserver:file { read open }; +allow mpdecision system:dir search; +allow mpdecision system:file { read open }; diff --git a/sepolicy/netd.te b/sepolicy/netd.te new file mode 100644 index 0000000..ee1496b --- /dev/null +++ b/sepolicy/netd.te @@ -0,0 +1 @@ +allow netd self:capability fsetid; diff --git a/sepolicy/netmgrd.te b/sepolicy/netmgrd.te new file mode 100644 index 0000000..f745767 --- /dev/null +++ b/sepolicy/netmgrd.te @@ -0,0 +1,33 @@ +# Network utilities (radio process) +type netmgrd, domain; +type netmgrd_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(netmgrd) + +allow netmgrd self:udp_socket { create ioctl }; +# fsetid, dac_override unlink on /dev/socket/qmux_radio/qmux_client_socket +allow netmgrd self:capability { sys_module fsetid setuid setgid net_admin net_raw dac_override }; +allow netmgrd self:packet_socket { write bind read create }; +allow netmgrd self:netlink_socket { write read create bind setopt }; +allow netmgrd self:netlink_route_socket { create bind read write nlmsg_read nlmsg_write setopt getattr }; + +# Talk to qmuxd +qmux_socket(netmgrd) + +# Allow logging diagnostic items +allow netmgrd diagnostic_device:chr_file rw_file_perms; + +# /data/data_test/ access with shell +allow netmgrd shell_exec:file { execute read open execute_no_trans }; +allow netmgrd system_file:file { execute_no_trans }; + +# Talk to init over the property socket +unix_socket_connect(netmgrd, property, init) +# Set net.rmnet_usb0. values +allow netmgrd radio_prop:property_service set; + +allow netmgrd kernel:system module_request; +allow netmgrd self:rawip_socket { write create setopt getopt }; +allow netmgrd proc:file write; +allow netmgrd self:netlink_xfrm_socket { bind create }; diff --git a/sepolicy/nfc.te b/sepolicy/nfc.te new file mode 100644 index 0000000..583a5db --- /dev/null +++ b/sepolicy/nfc.te @@ -0,0 +1 @@ +allow nfc cache_file:file { lock open }; diff --git a/sepolicy/property.te b/sepolicy/property.te new file mode 100644 index 0000000..02bfce2 --- /dev/null +++ b/sepolicy/property.te @@ -0,0 +1 @@ +type performance_prop, property_type; diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts new file mode 100644 index 0000000..8ee3d2d --- /dev/null +++ b/sepolicy/property_contexts @@ -0,0 +1,2 @@ +net.rmnet_usb0. u:object_r:radio_prop:s0 +sys.media.vdec.sw u:object_r:performance_prop:s0 diff --git a/sepolicy/qcom.te b/sepolicy/qcom.te new file mode 100644 index 0000000..729828a --- /dev/null +++ b/sepolicy/qcom.te @@ -0,0 +1,55 @@ +# Qcom init scripts + +allow rootfs shell_exec:file rx_file_perms; +allow init_shell ctl_default_prop:property_service set; +allow init_shell default_prop:property_service set; +allow init_shell graphics_device:dir w_dir_perms; +allow init_shell graphics_device:lnk_file create_file_perms; +allow init_shell radio_efs_file:dir r_dir_perms; +allow init_shell radio_efs_file:file x_file_perms; +allow init_shell rootfs:file r_file_perms; +allow init_shell self:capability { fowner chown fsetid }; +allow init_shell sysfs:file create_file_perms; +allow init_shell system_prop:property_service set; +allow init_shell tmpfs:chr_file r_file_perms; +allow init_shell system_file:lnk_file getattr; +allow init_shell tmpfs:chr_file w_file_perms; +allow init_shell kernel:process setsched; +allow init_shell labeledfs:filesystem remount; +allow init_shell system_file:file { write create }; +allow init_shell system_file:lnk_file create; +allow init_shell system_file:dir w_dir_perms; +allow init_shell cache_file:file { write lock open setattr }; +allow init_shell dhcp_data_file:dir { read write open remove_name }; +allow init_shell dhcp_data_file:file unlink; +allow init_shell proc:file write; +allow init_shell self:capability { net_admin dac_override }; +allow init_shell sensors_data_file:dir { getattr setattr }; +allow init_shell sensors_data_file:file { write getattr setattr }; +allow init_shell system_data_file:dir setattr; +allow init_shell tmpfs:file execute; +allow init_shell wifi_data_file:file { read getattr open }; + +# pds backup and restorecon +allow shell camera_data_file:dir getattr; +allow shell pds_file:dir { read search open getattr }; +allow shell pds_file:file getattr; +allow init_shell pds_file:file { read open }; +allow init_shell pds_file:dir getattr; +allow pds_file rootfs:filesystem associate; + +allow init_shell block_device:blk_file { read open }; +allow init_shell device:chr_file { getattr setattr write open }; +allow init_shell device:dir { write read open add_name }; +allow init_shell device:lnk_file create; +allow init_shell self:capability sys_module; +allow init_shell sensors_device:chr_file getattr; +allow init_shell kernel:system syslog_mod; +allow init_shell self:capability2 syslog; +allow persist_file rootfs:filesystem associate; +allow init_shell persist_file:dir { getattr write remove_name read add_name open }; +allow init_shell persist_file:lnk_file { read create getattr unlink }; +allow init_shell persist_wifi_file:file getattr; +allow init_shell persist_wifi_file:lnk_file unlink; +allow init_shell diagnostic_device:chr_file { read write }; +allow init_shell init:fifo_file { read ioctl getattr }; diff --git a/sepolicy/qmux.te b/sepolicy/qmux.te new file mode 100644 index 0000000..6f84ed8 --- /dev/null +++ b/sepolicy/qmux.te @@ -0,0 +1,20 @@ +# Qualcomm Management Interface Multiplexer +type qmux, domain; +type qmux_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(qmux) + +# Create local qmux_connect_socket +allow qmux qmuxd_socket:dir w_dir_perms; +allow qmux qmuxd_socket:sock_file { create setattr getattr unlink }; + +# /dev/hsicctl* node access +allow qmux radio_device:chr_file rw_file_perms; + +# Allow logging diagnostic items +allow qmux diagnostic_device:chr_file rw_file_perms; + +# XXX Should we label with own type +allow qmux sysfs:file { open write append read getattr }; +allow qmux sysfs_wake_lock:file { append open }; diff --git a/sepolicy/radio.te b/sepolicy/radio.te new file mode 100644 index 0000000..d219df8 --- /dev/null +++ b/sepolicy/radio.te @@ -0,0 +1 @@ +allow radio cache_file:file { lock open }; diff --git a/sepolicy/rild.te b/sepolicy/rild.te new file mode 100644 index 0000000..e4e3d0c --- /dev/null +++ b/sepolicy/rild.te @@ -0,0 +1,15 @@ +allow rild self:netlink_socket { create bind read write }; +allow rild self:netlink_route_socket { write }; + +# Talk to qmuxd +qmux_socket(rild) + +# Allow logging diagnostic items +allow rild diagnostic_device:chr_file rw_file_perms; + +# XXX label with own type? +allow rild sysfs:file { read open write getattr }; + +allow rild self:socket { read write create ioctl }; + +allow rild self:netlink_kobject_uevent_socket { read bind create setopt getopt }; diff --git a/sepolicy/rmt.te b/sepolicy/rmt.te new file mode 100644 index 0000000..cb7f7c9 --- /dev/null +++ b/sepolicy/rmt.te @@ -0,0 +1,31 @@ +# remote storage process +type rmt, domain; +type rmt_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(rmt) + +# opens and reads the primary block device +allow rmt block_device:blk_file { open read write }; +allow rmt block_device:dir search; + +# XXX should we allow sys_rawio on /dev/mem? +allow rmt self:capability { sys_rawio sys_admin }; +# dac_override on open /sys/power/wake_lock +allow rmt self:capability { setuid setgid dac_override }; +allow rmt self:socket { create ioctl bind setopt read write }; + +allow rmt cgroup:dir { create add_name }; +# XXX do we need write access? +allow rmt kmem_device:chr_file rw_file_perms; + +# Allow shared memory logging access +allow rmt shared_log_device:chr_file rw_file_perms; + +# XXX Should we label with own type? +allow rmt sysfs:file { open append read getattr write }; +allow rmt sysfs:dir rw_dir_perms; + +allow rmt radio_efs_file:file { read open }; +allow rmt sysfs_wake_lock:file { append open }; +allow rmt device:chr_file { read write open }; diff --git a/sepolicy/sdcard_internal.te b/sepolicy/sdcard_internal.te new file mode 100644 index 0000000..a08628f --- /dev/null +++ b/sepolicy/sdcard_internal.te @@ -0,0 +1,2 @@ +allow sdcard_internal labeledfs:filesystem associate; + diff --git a/sepolicy/sdcardd.te b/sepolicy/sdcardd.te new file mode 100644 index 0000000..3172e99 --- /dev/null +++ b/sepolicy/sdcardd.te @@ -0,0 +1 @@ +allow sdcardd self:capability sys_resource; diff --git a/sepolicy/sensors.te b/sepolicy/sensors.te new file mode 100644 index 0000000..09e152a --- /dev/null +++ b/sepolicy/sensors.te @@ -0,0 +1,36 @@ +# Integrated qualcomm sensor process +type sensors, domain; +type sensors_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(sensors) + +# dac_override open /dev/msm_dsps +allow sensors self:capability { setuid setgid chown dac_override }; + +# Allow logging diagnostic items +allow sensors diagnostic_device:chr_file rw_file_perms; + +# Create /data/app/sensor_ctl_socket +file_type_auto_trans(sensors, apk_data_file, sensors_socket); + +allow sensors sensors_data_file:dir create_dir_perms; +allow sensors sensors_data_file:file create_file_perms; +dontaudit sensors apk_data_file:dir remove_name; + +# Access to sensor nodes +allow sensors sensors_device:chr_file rw_file_perms; + +# XXX should power_control_device be labeled differently? +allow sensors power_control_device:chr_file { write open append }; + +# XXX label with own type? +allow sensors sysfs:file { open append read write getattr }; + +allow sensors system_data_file:file { write open }; +allow sensors input_device:chr_file { read ioctl open }; +allow sensors input_device:dir { read open }; +allow sensors cgroup:dir { add_name create }; +allow sensors sysfs_wake_lock:file { append open }; +allow sensors shared_log_device:chr_file { read write }; +allow sensors sensors:socket { create }; diff --git a/sepolicy/shell.te b/sepolicy/shell.te new file mode 100644 index 0000000..259d79b --- /dev/null +++ b/sepolicy/shell.te @@ -0,0 +1,2 @@ +allow shell rootfs:file getattr; +allow shell tmpfs:lnk_file read; diff --git a/sepolicy/su.te b/sepolicy/su.te new file mode 100644 index 0000000..987eddf --- /dev/null +++ b/sepolicy/su.te @@ -0,0 +1 @@ +allow system su:binder call; diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te new file mode 100644 index 0000000..aca5928 --- /dev/null +++ b/sepolicy/surfaceflinger.te @@ -0,0 +1 @@ +allow surfaceflinger sysfs:file rw_file_perms; diff --git a/sepolicy/system.te b/sepolicy/system.te new file mode 100644 index 0000000..7eff8f2 --- /dev/null +++ b/sepolicy/system.te @@ -0,0 +1,29 @@ +allow system diagnostic_device:chr_file rw_file_perms; + +allow system init:unix_dgram_socket sendto; +allow system wpa_socket:unix_dgram_socket sendto; + +qmux_socket(system) + +# PowerManagerService +unix_socket_connect(system, sensors, sensors) +allow system sensors_socket:sock_file read; +allow system sensors:unix_stream_socket sendto; + +# mpdecision access +unix_socket_connect(system, mpdecision, mpdecision) +unix_socket_send(system, mpdecision, mpdecision) +allow system mpdecision:unix_stream_socket sendto; +allow system mpdecision_socket:dir search; + +allow system self:capability sys_module; +allow system sysfs:file { read open write }; +allow system adbd_socket:sock_file write; +allow system_app cache_file:file { write lock open setattr }; +allow system sdcard_internal:dir search; +allow system sdcard_internal:file { read open }; +allow system init_shell:binder call; +allow system sysfs_writable:file { write open }; +allow system device:chr_file { read ioctl open }; +allow system camera:binder transfer; +allow system cache_backup_file:file relabelto; diff --git a/sepolicy/te_macros b/sepolicy/te_macros new file mode 100644 index 0000000..274fd55 --- /dev/null +++ b/sepolicy/te_macros @@ -0,0 +1,12 @@ +##################################### +# qmux_socket(clientdomain) +# Allow client to send via a local +# socket to the qmux domain. +define(`qmux_socket', ` +type $1_qmuxd_socket, file_type; +file_type_auto_trans($1, qmuxd_socket, $1_qmuxd_socket) +unix_socket_connect($1, qmuxd, qmux) +allow qmux $1_qmuxd_socket:sock_file { getattr unlink }; +') + + diff --git a/sepolicy/tee.te b/sepolicy/tee.te new file mode 100644 index 0000000..75073bd --- /dev/null +++ b/sepolicy/tee.te @@ -0,0 +1,7 @@ +# Qualcomm Secure Execution Environment Communicator policy +allow tee self:process execmem; + +# Access /persist/drm/widevine +allow tee persist_file:dir search; +allow tee persist_drm_file:dir r_dir_perms; +allow tee persist_drm_file:file r_file_perms; diff --git a/sepolicy/thermald.te b/sepolicy/thermald.te new file mode 100644 index 0000000..33a61df --- /dev/null +++ b/sepolicy/thermald.te @@ -0,0 +1,27 @@ +# Temperature sensor daemon (root process) +type thermald, domain; +type thermald_exec, exec_type, file_type; + +# Started by init +init_daemon_domain(thermald) + +# XXX should we allow kexec_load with /dev/socket/qmux_radio/qmux_client_socket +# dac_override open, unlink with /dev/socket/qmux_radio/qmux_client_socket +allow thermald self:capability { net_admin fsetid dac_override }; + +allow thermald self:socket { ioctl create write read }; +allow thermald self:netlink_kobject_uevent_socket { read create setopt bind }; + +# Talk to qmuxd +qmux_socket(thermald) + +# Access to shared memory logger and logging diagnostic items +allow thermald { shared_log_device diagnostic_device }:chr_file rw_file_perms; + +# XXX Should we label with own type? +allow thermald sysfs:file { open read write getattr }; + +allow thermald self:capability chown; +allow thermald socket_device:dir { write add_name }; +allow thermald socket_device:sock_file { create setattr }; +allow thermald qmuxd_socket:dir remove_name; diff --git a/sepolicy/ueventd.te b/sepolicy/ueventd.te new file mode 100644 index 0000000..1a3ecfb --- /dev/null +++ b/sepolicy/ueventd.te @@ -0,0 +1,11 @@ +# Drivers read firmware files (/firmware/image, /system/etc/firmware/wlan/prima) +allow ueventd { radio_efs_file wifi_data_file }:file r_file_perms; +allow ueventd { radio_efs_file wifi_data_file }:dir search; +allow ueventd { radio_efs_file wifi_data_file }:file getattr; +allow ueventd persist_file:dir search; +allow ueventd persist_wifi_file:file { read getattr open }; +allow ueventd sysfs:file relabelfrom; +allow ueventd sysfs_writable:file { getattr setattr }; +allow ueventd cgroup:dir { create add_name }; +allow ueventd sdcard_external:dir search; +allow ueventd sdcard_external:file r_file_perms; diff --git a/sepolicy/vold.te b/sepolicy/vold.te new file mode 100644 index 0000000..3d633de --- /dev/null +++ b/sepolicy/vold.te @@ -0,0 +1,4 @@ +allow vold system_data_file:file { write open }; +allow vold kernel:system module_request; +allow vold persist_file:dir { read getattr open ioctl }; + diff --git a/sepolicy/wpa_supplicant.te b/sepolicy/wpa_supplicant.te new file mode 100644 index 0000000..6e96fd5 --- /dev/null +++ b/sepolicy/wpa_supplicant.te @@ -0,0 +1,8 @@ +allow wpa init:unix_dgram_socket { read write }; + +# logwrapper used with wpa_supplicant +allow wpa devpts:chr_file { read write }; + +allow wpa wpa_socket:unix_dgram_socket { read write }; +allow wpa_socket system:unix_dgram_socket sendto; +allow wpa wifi_data_file:sock_file { write unlink }; diff --git a/sepolicy/zygote.te b/sepolicy/zygote.te new file mode 100644 index 0000000..926e04c --- /dev/null +++ b/sepolicy/zygote.te @@ -0,0 +1,6 @@ +allow zygote cache_file:file { write lock open setattr }; +allow zygote init:unix_stream_socket connectto; +allow zygote property_socket:sock_file write; +allow zygote labeledfs:filesystem remount; +allow zygote system_data_file:dir { setattr mounton }; +allow zygote devpts:chr_file { read write }; diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..0b0c52a --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,106 @@ +#!/bin/bash + +VENDOR=lge +DEVICE=w7 +OUTDIR=vendor/$VENDOR/$DEVICE +MAKEFILE=../../../$OUTDIR/$DEVICE-vendor-blobs.mk + +(cat << EOF) > $MAKEFILE +# Copyright (C) 2014 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh +PRODUCT_COPY_FILES := \\ + $OUTDIR/proprietary/vendor/lib/libtime_genoff.so:obj/lib/libtime_genoff.so + +PRODUCT_COPY_FILES += \\ +EOF + +LINEEND=" \\" +COUNT=`cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | wc -l | awk {'print $1'}` +for FILE in `cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | sed -e 's#^/system/##g'`; do + COUNT=`expr $COUNT - 1` + if [ $COUNT = "0" ]; then + LINEEND="" + fi + if [[ ! "$FILE" =~ ^-.* ]]; then + FILE=`echo $FILE | sed -e "s/^-//g"` + echo " $OUTDIR/proprietary/$FILE:system/$FILE$LINEEND" >> $MAKEFILE + fi +done + +(cat << EOF) > ../../../$OUTDIR/$DEVICE-vendor.mk +# Copyright (C) 2014 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +# Live wallpaper packages +PRODUCT_PACKAGES := \\ + LiveWallpapers \\ + LiveWallpapersPicker \\ + MagicSmokeWallpapers \\ + VisualizationWallpapers \\ + librs_jni + +# Publish that we support the live wallpaper feature. +PRODUCT_COPY_FILES := \\ + packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml + +# Pick up overlay for features that depend on non-open-source files +DEVICE_PACKAGE_OVERLAYS := vendor/$VENDOR/$DEVICE/overlay + +# Apps +PRODUCT_PACKAGES += \\ + OmaDmclient \\ + qcrilmsgtunnel \\ + SprintHiddenMenu \\ + shutdownlistener \\ + TimeService \\ + UpdateSetting + +\$(call inherit-product, vendor/$VENDOR/$DEVICE/$DEVICE-vendor-blobs.mk) +EOF + +(cat << EOF) > ../../../$OUTDIR/BoardConfigVendor.mk +# Copyright (C) 2014 The CyanogenMod Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is generated by device/$VENDOR/$DEVICE/setup-makefiles.sh + +USE_CAMERA_STUB := false +EOF + diff --git a/system.prop b/system.prop index 530448a..832de57 100644 --- a/system.prop +++ b/system.prop @@ -1,3 +1,88 @@ # -# system.prop for w7ds +# system.prop for w7 # +############################################################ CLEANUP ME PLEASE QUARX ########################################################### + +# Use reference RIL for initial bringup +rild.libpath=/vendor/lib/libril-qc-qmi-1.so +rild.libargs=-d /dev/smd0 +persist.rild.nitz_plmn= +persist.rild.nitz_long_ons_0= +persist.rild.nitz_long_ons_1= +persist.rild.nitz_long_ons_2= +persist.rild.nitz_long_ons_3= +persist.rild.nitz_short_ons_0= +persist.rild.nitz_short_ons_1= +persist.rild.nitz_short_ons_2= +persist.rild.nitz_short_ons_3= +ril.subscription.types=NV,RUIM +DEVICE_PROVISIONED=1 +persist.radio.msgtunnel.start=false +# Start in cdma mode +# +# System props for telephony +# System prop to turn on CdmaLTEPhone always +# LGE_CHANGE_S by.mun@lge.com 2013-08-14 turn off CdmaLTEPhone for W7 +telephony.lteOnCdmaDevice=0 +ro.telephony.default_network=0 + +ro.ril.enable.amr.wideband=1 +ro.lge.proximity.delay=25 +ro.telephony.call_ring.delay=0 + +persist.radio.adb_log_on=1 +persist.radio.qcril_am_enabled=1 +wlan.chip.vendor=qcom +wlan.chip.version=wcn +wifi.lge.patch=true +wifi.lge.sleeppolicy=0 +wifi.lge.offdelay=false +wlan.lge.concurrency=MCC +wlan.lge.supportsimaka=YES +wifi.lge.hanglessid=false +drm.service.enabled=true +persist.lg.data.autoprof.msim=true +persist.cne.feature=1 +debug.sf.fb_always_on=1 +persist.hwc.mdpcomp.enable=true +dev.pm.dyn_samplingrate=1 +mmp.enable.3g2=true +media.aac_51_output_enabled=true +mm.enable.smoothstreaming=true +mm.enable.qcom_parser=37491 +vidc.debug.level=0 +ro.qualcomm.sensors.qmd=false +ro.qc.sdk.sensors.gestures=true +ro.qualcomm.sensors.pedometer=false +ro.qc.sensors.step_detector=true +ro.qc.sensors.step_counter=true +ro.qualcomm.sensors.pam=true +ro.qualcomm.sensors.scrn_ortn=true +ro.qualcomm.sensors.smd=true +ro.qualcomm.sensors.game_rv=false +ro.qualcomm.sensors.georv=true +ro.qc.sensors.smgr_mag_cal_en=false +ro.qc.sensors.max_grav_no_gyro=50 +ro.qc.sensors.max_geomag_rotvec=50 +debug.qualcomm.sns.hal=1 +debug.qualcomm.sns.daemon=e +debug.qualcomm.sns.libsensor1=e +persist.sys.ssr.restart_level=3 +persist.sys.strictmode.disable=true +persist.sys.logkit.ctrlcode=0 +ro.lge.irrc.type=sw +persist.debug.wfd.enable=1 +persist.sys.wfd.virtual=0 +tunnel.audio.encode = true +persist.gsm.sms.forcegsm7=1 +ro.sf.lcd_density=240 +ro.qc.sdk.izat.premium_enabled=1 +ro.qc.sdk.izat.service_mask=0x0 +persist.gps.qc_nlp_in_use=0 +ro.gps.agps_provider=1 +persist.qcril.disable_retry=true +persist.service.crash.enable=0 +ro.config.vc_call_vol_steps=6 +persist.data.sbp.update=0 +persist.radio.rat_on=legacy +ro.lge.proximity.delay=25 diff --git a/vendorsetup.sh b/vendorsetup.sh index fc86f20..ab4904b 100644 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -21,5 +21,5 @@ # function: add_lunch_combo generic-eng #dd_lunch_combo full_mb526-eng -add_lunch_combo cm_w7ds-userdebug +add_lunch_combo cm_w7-userdebug