aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wendt <thoemy@gmx.net>2015-02-22 22:57:06 +0100
committereyosen <abittin@gmail.com>2015-02-28 11:29:22 +0200
commitc5d08f0c3a698a5781f953cbf145589c16544760 (patch)
tree13f32fdbf886170a64934646ae899c250e6baa56
parentff44e750708a346a42c6cb09031080af5e461b60 (diff)
endeavoru: One init.endeavoru.rc to rule them all
* Move everything into one file * Remove HTC stuff that was commented, non existent, unused or unnecessary * Some parts are already in the init.rc or init.tegra3.rc * Some executables or chmodded/chowned files did not exist * Some mkdirs/chmods/chowns are for files that are never accessed * General cleanups Change-Id: I073fad5adbfc627db8be2c65ef6800fc80fa94f2
-rw-r--r--endeavoru.mk3
-rw-r--r--ramdisk/init.endeavoru.cm.rc74
-rw-r--r--ramdisk/init.endeavoru.common.rc521
-rw-r--r--ramdisk/init.endeavoru.htc.rc117
-rw-r--r--ramdisk/init.endeavoru.rc381
-rw-r--r--ramdisk/init.endeavoru.usb.rc19
6 files changed, 362 insertions, 753 deletions
diff --git a/endeavoru.mk b/endeavoru.mk
index 25f24c2..a25f9a4 100644
--- a/endeavoru.mk
+++ b/endeavoru.mk
@@ -54,10 +54,7 @@ PRODUCT_TAGS += dalvik.gc.type-precise
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/ramdisk/fstab.endeavoru:root/fstab.endeavoru \
$(LOCAL_PATH)/ramdisk/init.endeavoru.rc:root/init.endeavoru.rc \
- $(LOCAL_PATH)/ramdisk/init.endeavoru.htc.rc:root/init.endeavoru.htc.rc \
- $(LOCAL_PATH)/ramdisk/init.endeavoru.common.rc:root/init.endeavoru.common.rc \
$(LOCAL_PATH)/ramdisk/init.endeavoru.usb.rc:root/init.endeavoru.usb.rc \
- $(LOCAL_PATH)/ramdisk/init.endeavoru.cm.rc:root/init.endeavoru.cm.rc \
$(LOCAL_PATH)/ramdisk/ueventd.endeavoru.rc:root/ueventd.endeavoru.rc
# configs
diff --git a/ramdisk/init.endeavoru.cm.rc b/ramdisk/init.endeavoru.cm.rc
deleted file mode 100644
index 73392a6..0000000
--- a/ramdisk/init.endeavoru.cm.rc
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Copyright 2012 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.
-#
-
-on early-init
- chown system /sys/kernel/tegra_cap/core_cap_level
- chown system /sys/kernel/tegra_cap/core_cap_state
- chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
-
-# Interactive governor settings
- chown system system /sys/devices/system/cpu/cpufreq/interactive/boost_factor
- chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boost_factor
- chown system system /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
- chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
- chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
- chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
- chown system system /sys/devices/system/cpu/cpufreq/interactive/max_boost
- chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/max_boost
- chown system system /sys/devices/system/cpu/cpufreq/interactive/sustain_load
- chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sustain_load
-
-# a2dp freq boost
- chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- chmod 0664 /sys/devices/platform/tegra_uart.2/a2dp_tuning
-
-# permission for torch app
- chmod 0666 /sys/class/leds/flashlight/brightness
-
-# Mediaserver: camera calibration
- chown system system /dev/block/mmcblk0p2
- chmod 0664 /dev/block/mmcblk0p2
-
-on boot
- # bluetooth
- start load_bt
- insmod /system/lib/modules/uhid.ko
-
-# Replaces HTC's upd_nvs_wlan0 solution with our own
-service wifi_calib /system/bin/wifi_calibration.sh
- seclabel u:r:init:s0 # silence warning
- disabled
- class wifi
- user root
- group wifi
- oneshot
-
-# fusewrapped external sdcard daemon running as media_rw (1023)
-service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
- class late_start
- disabled
-
-service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk
- class late_start
- disabled
-
-# /dev/tihci <-> /dev/hci_tty creation
-service load_bt /system/bin/logwrapper /system/bin/load-bt.sh
- seclabel u:r:init:s0 # silence warning
- disabled
- user root
- group root
- oneshot
diff --git a/ramdisk/init.endeavoru.common.rc b/ramdisk/init.endeavoru.common.rc
deleted file mode 100644
index 6aee555..0000000
--- a/ramdisk/init.endeavoru.common.rc
+++ /dev/null
@@ -1,521 +0,0 @@
-#
-# Copyright 2012 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.
-#
-
-on early-init
- mount debugfs debugfs /sys/kernel/debug
- write /sys/class/firmware/timeout 5
-
-on init
- # internal sdcard
- mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
- mkdir /storage/sdcard0 0700 root root
- export EXTERNAL_STORAGE /storage/sdcard0
-
- # USB OTG
- mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw
- mkdir /storage/usbdisk 0700 root root
- export SECONDARY_STORAGE /storage/usbdisk
-
- # Backwards compatibility
- symlink /storage/sdcard0 /sdcard
- symlink /storage/sdcard0 /mnt/sdcard
-
-on fs
- mkdir /rca 0775 root radio
- mkdir /rfs 0775 root radio
- mkdir /devlog 0700 root root
-
- mount_all /fstab.endeavoru
-
- chmod 0775 /rca
- chmod 0664 /rca/calib.nvm
- chmod 0775 /rfs
-
- chown root radio /rca
- chown root radio /rca/calib.nvm
- chown root radio /rfs
-
- # requires /rca to be rw
- restorecon /rca
- restorecon /rca/calib.nvm
- restorecon_recursive /rfs
-
- setprop ro.crypto.fuse_sdcard true
-
-on post-fs-data
- # Set indication (checked by vold) that we have finished this action
- setprop vold.post_fs_data_done 1
-
- #for TI 1281 GPS
- mkdir /data/tigps 0770 system system
- mkdir /data/tigps/aiding 0770 system system
- mkdir /data/tigps/logs 0770 system system
- mkdir /data/tigps/etc 0770 system system
- mkdir /data/RXN 0770 system system
- mkdir /data/RXN/RXN 0770 system system
- mkdir /data/RXN/RXN/pred 0770 system system
- chmod 0755 /system/bin/RXN_IntApp
- chmod 0770 /system/etc/gps/tigpsrouter
- chmod 0777 /dev/tihci
-
-on boot
- # Setup paths used for socket communication with the dhcp daemon(dhcpd)
- mkdir /data/misc/dhcp 0775 dhcp dhcp
- chown dhcp dhcp /data/misc/dhcp
-
- mkdir /data/nvcam 0775 system system
-
-# HTC_WIFI_START
- mkdir /data/misc/wifi 0770 wifi wifi
- mkdir /data/misc/wifi/sockets 0770 wifi wifi
- mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
- # for hostapd
- chown wifi wifi /dev/rfkill
- chmod 0660 /dev/rfkill
-# HTC_WIFI_END
-
- # bluetooth power up/down interface
- chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
- chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
- chmod 0660 /sys/class/rfkill/rfkill0/state
-
- chown system /sys/module/edp/parameters/edp_ap_limit
- chown system /sys/module/edp/parameters/edp_limits_table
- chown system /sys/devices/system/cpu/cpufreq/ondemand/touch_poke
- chown system /sys/devices/system/cpu/cpu_on
- chown system /sys/kernel/debug/tegra_hotplug/min_cpus
- chown system /sys/kernel/debug/tegra_hotplug/max_cpus
- chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
- chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
- chown system /sys/module/cpu_tegra3/parameters/auto_hotplug
- chown system /sys/devices/system/cpu/cpu1/online
- chown system /sys/devices/system/cpu/cpu2/online
- chown system /sys/devices/system/cpu/cpu3/online
- chown system /sys/module/cpu_tegra3/parameters/mp_policy
- chown system /sys/module/cpu_tegra3/parameters/NwNs
- chown system /sys/module/cpu_tegra3/parameters/TwTs
- chown system /sys/module/cpu_tegra/parameters/cpu_user_cap
- chown radio radio /sys/module/cpu_tegra/parameters/ril_boost
- chown system /sys/kernel/debug/tegra_hotplug/min_cpus
- chmod 0660 /sys/kernel/debug/tegra_hotplug/min_cpus
- chown system /sys/htc/power_save
- chown system /sys/kernel/debug/tegra_emc/eack_state
-
- # preload app folder start
- mkdir /data/preload 0771 system system
- # preload app folder end
-
- # for radio signal stable
- chown radio radio /sys/class/power_supply/battery/charger_control
- chmod 0660 /sys/class/power_supply/battery/charger_control
- chown radio radio /sys/class/power_supply/battery/phone_call
- chmod 0660 /sys/class/power_supply/battery/phone_call
-
-
-# HTC_WIFI_START
- chown dhcp dhcp /data/misc/dhcp
- insmod /system/lib/modules/compat.ko
- insmod /system/lib/modules/cfg80211.ko
- insmod /system/lib/modules/mac80211.ko
- insmod /system/lib/modules/wl12xx.ko debug_level=0x63c00
- chmod 0660 /data/misc/wifi/dhcpd.conf
-# HTC_WIFI_END
-
- # CM: Run our own Wi-Fi calibration service
- start wifi_calib
-
-# Load kineto_gan.ko while booting
- insmod /system/lib/modules/kineto_gan.ko
-
-# HTC PnPMgr sysfs file node
- chown system system /sys/power/pnpmgr/apps/activity_trigger
- chown system system /sys/power/pnpmgr/cpufreq/perflock_scaling_min
- chown system system /sys/power/pnpmgr/cpufreq/perflock_scaling_max
- chown system system /sys/power/pnpmgr/hotplug/cpu_auto_hotplug
- chown system system /sys/power/pnpmgr/hotplug/min_on_cpus
- chown system system /sys/power/pnpmgr/hotplug/cpu1_online
- chown system system /sys/power/pnpmgr/hotplug/cpu2_online
- chown system system /sys/power/pnpmgr/hotplug/cpu3_online
- chown system system /sys/power/pnpmgr/thermal/edp_ap_limit
- chown system system /sys/power/pnpmgr/cpufreq/ap_dvcs
- #chown system system /sys/power/launch_event
- chown system system /sys/power/launch_activity
- chown system system /sys/power/cpunum_ceiling
- chown system system /sys/power/cpunum_floor
-
-
-#camera
- chown media media /sys/htc/media_boost_freq
-
- # for camera to switch burst mode
- chown media media /proc/emmc_burst
-
-# bluetooth
- # UART device
- chmod 0660 /dev/ttyHS2
- chown bluetooth bluetooth /dev/ttyHS2
-
- # power up/down interface
- chmod 0660 /sys/class/rfkill/rfkill0/state
- chmod 0660 /sys/class/rfkill/rfkill0/type
- chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
- chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
-
- # bluetooth MAC address programming
- chown bluetooth bluetooth ro.bt.bdaddr_path
- chown bluetooth bluetooth /system/etc/bluetooth
- setprop ro.bt.bdaddr_path "/system/etc/bluetooth/bdaddr"
-
- # for nvidia platform specific a2dp tuning support
- chown media media /sys/devices/platform/tegra_uart.2/a2dp_tuning
-
- # performance lock for ftp and opp
- chmod 0660 /sys/devices/platform/kim/st_performance_lock
- chown net_bt net_bt /sys/devices/platform/kim/st_performance_lock
-
-# GPS
- setprop ro.gps.supl.supported true
-
-# NFC
- setprop ro.nfc.port "I2C"
- chmod 0660 /dev/pn544
- chown nfc nfc /dev/pn544
-
-# set atmel touch permissions
- chown system system /sys/android_touch/unlock
-
-# set keyboard vol_wakeup permissions
- chown system system /sys/keyboard/vol_wakeup
-
-# backlight
- chown system system /sys/class/backlight/tegra-pwm-bl/brightness
-
-# didim
- chown system system /sys/class/graphics/fb0/device/smartdimmer/enable
- chown system system /sys/class/graphics/fb0/device/smartdimmer/aggressiveness
-
-# Sensor
- chown system system /sys/bus/iio/devices/device0/als_ir_mode
- chown system system /sys/bus/iio/devices/device0/proximity_enable
-
-# BB UART settings
-# chown radio system /dev/ttyHS0
-
-# BB remote file system
- mkdir /data/rfs
- mkdir /data/rfs/data
- mkdir /data/rfs/data/modem
- mkdir /data/rfs/data/debug
- chown radio system /data/rfs/data
- chown radio system /data/rfs/data/modem
- chown radio system /data/rfs/data/debug
- symlink /system/vendor/firmware/data/config /data/rfs/data/config
- symlink /system/vendor/firmware/app /data/rfs/app
- symlink /mnt/modem/data/factory /data/rfs/data/factory
-
-# BB mapping symbolic name to the logging ttyACM port
- symlink /dev/ttyACM3 /dev/log_modem
-
-# GPIO BB access for user radio
- chown radio system /sys/class/gpio/gpio32/value
-
-# Power management settings
- write /sys/module/cpu_tegra3/parameters/no_lp 0
- #write /sys/module/tegra3_emc/parameters/emc_enable 0
- #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand
- write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor ondemand
- write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor ondemand
- chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_min
- chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
- chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_max
- chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
- chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
- chown system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
- chown system /sys/devices/system/cpu/cpufreq/ondemand/touch_poke
- chown system /sys/htc/power_save
- write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_min 10000
- write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
- write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
- write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
- write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
- write /sys/module/cpu_tegra3/parameters/auto_hotplug 1
- write /sys/module/cpuidle/parameters/lp2_in_idle 1
-
-# Increase read ahead size of mmc block devices from default(128) to 1MB
-# Reduces power comsuption during video playback from sdcards
-# write /sys/block/mmcblk0/queue/read_ahead_kb 2048
-# write /sys/block/mmcblk1/queue/read_ahead_kb 2048
-
- # Discretix DRM change start
- mkdir /data/DxDrm
- mkdir /data/DxDrm/fuse
- chmod 555 /data/DxDrm
- mkdir /sdcard/download
- # Discretix DRM change end
-
-# AUD
- mkdir /data/audio
- chmod 755 /data/audio
- chown media audio /data/audio
-
-#wifi
- # Load bcmdhd.ko while booting
- insmod /system/lib/modules/bcmdhd.ko
-
-# HTC_START, Camera, For Flashlight Restriction
- chown radio system /sys/camera_led_status/led_ril_status
- chown system system /sys/camera_led_status/led_wimax_status
- chown system system /sys/camera_led_status/led_hotspot_status
-# HTC_END
-
-# compass/accelerometer daemon
-service akmd /system/bin/akmd
- class main
- user compass
- group compass misc input
-
-# gyro daemon
-service ewtzmud /system/bin/ewtzmud
- class main
- user system
- group system misc input
-
-# wifi ++
-service wpa_supplicant /system/bin/wpa_supplicant \
- -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
- -I/system/etc/wifi/wpa_supplicant_overlay.conf \
- -g@android:wpa_wlan0 \
- -e/data/misc/wifi/entropy.bin
-# 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
-
-# HTC_WIFI_START
-#service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0
-# socket wpa_wlan0 dgram 660 wifi wifi
-# disabled
-# oneshot
-
-service p2p_supplicant /system/bin/wpa_supplicant \
- -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
- -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
- -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
- -I/system/etc/wifi/p2p_supplicant_overlay.conf \
- -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \
- -g@android:wpa_wlan0
- class main
- socket wpa_wlan0 dgram 660 wifi wifi
- disabled
- oneshot
-
-service dhcpcd_wlan0 /system/bin/dhcpcd -ABDKL
- disabled
- oneshot
-
-service iprenew_wlan0 /system/bin/dhcpcd -n
- disabled
- oneshot
-
-service dhcpcd_p2p /system/bin/dhcpcd -aABKL
- disabled
- oneshot
-
-service iprenew_p2p /system/bin/dhcpcd -n
- disabled
- oneshot
-
-service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
- disabled
- oneshot
-
-# CM: Replaced wpa_wlan1 by wpa_wlan0 to make tethering work
-service hostapd_bin /system/bin/hostapd -d /data/misc/wifi/hostapd.conf
- socket wpa_wlan0 dgram 660 wifi wifi
- disabled
- oneshot
-
-on property:wlan.driver.status=ok
- chown wifi wifi /sys/devices/platform/wl1271/bt_coex_state
-
-service upd_nvs_wlan0 /system/bin/calibrator set upd_nvs /system/etc/wifi/TQS_D_1.7.ini /proc/calibration /data/misc/wifi/wl1271-nvs-calibrated.bin
- disabled
- class core
- user root
- group root
- oneshot
-
-service chmod_nvs_wlan0 /system/bin/chmod 660 /data/misc/wifi/wl1271-nvs-calibrated.bin
- disabled
- class core
- user root
- group root
- oneshot
-
-service chown_nvs_wlan0 /system/bin/chown system.wifi /data/misc/wifi/wl1271-nvs-calibrated.bin
- disabled
- class core
- user root
- group root
- oneshot
-
-service upd_nvs_auto /system/bin/calibrator plt autocalibrate wlan0 /system/lib/modules/wl12xx_sdio.ko /system/etc/wifi/TQS_D_1.7.ini /data/misc/wifi/wl1271-nvs-calibrated_auto.bin 00:01:02:03:04:05
- disabled
- class core
- user root
- group root
- oneshot
-
-service chmod_nvs_auto /system/bin/chmod 660 /data/misc/wifi/wl1271-nvs-calibrated_auto.bin
- disabled
- class core
- user root
- group root
- oneshot
-
-service chown_nvs_auto /system/bin/chown system.wifi /data/misc/wifi/wl1271-nvs-calibrated_auto.bin
- disabled
- class core
- user root
- group root
- oneshot
-# HTC_WIFI_END
-# wifi--
-
-
-#Htc Panu supports for Bluetooth Bluez
-service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
- disabled
- oneshot
-
-on property:init.svc.bootanim=stopped
-start adaptive
-
-#BCM
-#service hciattach /system/bin/brcm_patchram_plus --enable_hci \
-# --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS2
-# user bluetooth
-# group bluetooth net_bt_admin
-# disabled
-
-# Start FIL daemon
-#service fil-daemon /system/bin/fild -p /dev/ttyHS0 -s /dev/ttyACM0 -f /dev/ttyACM0 --with-bt3
-# user radio
-
-service uim /system/bin/uim-sysfs
- class core
- user root
- group media bluetooth
- oneshot
-
-service nav /system/bin/navl_server --android_log NAVD-p3 -nav\"-c/system/bin/pathconfigfile.txt\"
- class main
- user system
- group system
- cgroup bg
- oneshot
-
-service rxn_intapp /system/bin/RXN_IntApp /system/etc/gps/RXN/MSLConfig.txt
- class main
- user system
- group system
- cgroup bg
-
-service rilPos-daemon /system/bin/rilposd -l /system/lib/librilpos.so -- -c agps_v_channel
- class main
- user system
- group system radio
- cgroup bg
- disabled
- oneshot
-
-service cplc_main /system/bin/cplc_main
- class main
- user system
- group system radio
- cgroup bg
- disabled
- oneshot
-
-# Recovery daemon: configure MSC partition (misc)
-#service recoveryd /system/bin/recoveryd /dev/block/mmcblk0p17
-# disabled
-# class main
-# user root
-# group root
-# oneshot
-
-#calibration DATA for modem
-# on boot
-# mkdir /data/modem 0777 system system
-# mount ext4 /dev/block/mmcblk0p15 /data/modem
-
-
-#on property:sys.shutdown.requested=1recovery
-# start recoveryd
-
-service htcbatt /system/bin/htcbatt
- class core
- oneshot
-
-# start tf_daemon service
-service tf_daemon /system/bin/tf_daemon -storageDir /data/tf -d
- class main
- user root
- group shell
-
-# may restart due to /data/tf not existing yet
-on property:init.svc.tf_daemon=restarting
- mkdir /data/tf
-
-# create filesystems if necessary
-service setup_fs /system/bin/setup_fs \
- /dev/block/platform/sdhci-tegra.3/by-name/UDA \
- /dev/block/platform/sdhci-tegra.3/by-name/CAC \
- /dev/block/platform/sdhci-tegra.3/by-name/MDM
- class core
- user root
- group root
- oneshot
-
-
-on property:ro.boot.wipeddata=0
- write /sys/kernel/debug/tegra_hotplug/max_cpus 3
- write /sys/kernel/debug/tegra_hotplug/min_cpus 3
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1500000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1500000
- write /sys/module/cpu_tegra/parameters/cpu_user_cap 1300000
-
-on property:ro.boot.wipeddata=1
- write /sys/kernel/debug/tegra_hotplug/max_cpus 1
- write /sys/kernel/debug/tegra_hotplug/min_cpus 1
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1500000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1500000
- write /sys/module/cpu_tegra/parameters/cpu_user_cap 1300000
-
-on property:init.svc.bootanim=stopped
- write /sys/kernel/debug/tegra_hotplug/max_cpus 4
- write /sys/kernel/debug/tegra_hotplug/min_cpus 1
- write /sys/module/cpu_tegra/parameters/cpu_user_cap 0
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 51000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1500000
- write /sys/module/cpu_tegra3/parameters/auto_hotplug 1
diff --git a/ramdisk/init.endeavoru.htc.rc b/ramdisk/init.endeavoru.htc.rc
deleted file mode 100644
index 333ee8c..0000000
--- a/ramdisk/init.endeavoru.htc.rc
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright (C) 2012 The Android Open Source Project
-#
-# IMPORTANT: Do not create world writable files or directories.
-# This is a common source of Android security bugs.
-#
-
-on init
-# NETWORK: NAT setting
-# To prevent out of WINDOW ACK from making
-# connection tracking to treat them as INVALID packet
- write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
-
-# Wifi: Disable the IPv6 of p2p0 interface
- write /proc/sys/net/ipv6/conf/p2p0/disable_ipv6 1
-
-# change mode & owner of HTC Debug Driver node
- chmod 0664 /proc/driver/hdf
- chown root system /proc/driver/hdf
-
-#BOARD_HAVE_BLUETOOTH_BLUEZ mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack
-mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth #BOARD_HAVE_BLUETOOTH_BLUEZ
-
- # HTC add: temp change settings db file access right while boot-up for bootanimation to access
- chmod 0660 /data/data/com.android.providers.settings/databases/settings.db-wal
- chmod 0660 /data/data/com.android.providers.settings/databases/settings.db-shm
- chmod 0660 /data/data/com.android.providers.settings/databases/settings.db-journal
- # HTC add: for customization wizard folder#
- mkdir /data/data/cw 0770 root cw_access
- mkdir /data/data/cwtemp 0770 root cw_access
-
- # HTC add: make bootanimation can access settings.db during boot-up
- chown system system /data/data
- chmod 0771 /data/data
- chmod 0660 /data/data/com.android.providers.settings/databases/settings.db-wal
- chmod 0660 /data/data/com.android.providers.settings/databases/settings.db-shm
- chmod 0660 /data/data/com.android.providers.settings/databases/settings.db-journal
-
- # HTC add: double check the perms of /data/data/recovery for already existed case
- chown root recvy_access /data/data/recovery
- chmod 0775 /data/data/recovery
-
-#+SSD_AUD: soundhound dump pcm
- mkdir /data/audio 0775 media audio
- chmod 2775 /data/audio
-#-SSD_AUD: soundhound dump pcm
-
-on boot
- write /proc/sys/vm/highmem_is_dirtyable 1
- write /proc/sys/vm/lowmem_reserve_ratio 16\ 16
- write /proc/sys/vm/min_free_kbytes 4096
- chown system system /sys/class/leds/amber/brightness
- chown system system /sys/class/leds/amber/blink
- chown system system /sys/class/leds/green/blink
- chown system system /sys/class/leds/button-backlight/blink
- chown system system /sys/class/leds/amber/off_timer
- chown system system /sys/class/leds/green/off_timer
- chown system system /sys/class/leds/button-backlight/off_timer
- chown system system /sys/class/leds/flashlight/brightness
-
-# HTC SSD USB
- chown system system /sys/class/android_usb/f_modem/on
- chown system system /sys/class/android_usb/f_diag/on
- chown system system /sys/class/android_usb/f_rmnet/on
- chown system system /sys/devices/platform/android_usb/usb_disable
-
-#set diag permissions
- chown radio radio /dev/diag
- chown radio radio /dev/diag_mdm
- chown radio radio /dev/htcdiag
- chown radio radio /dev/diag_arm9
- chown radio radio /dev/btdiag
- chmod 0660 /dev/diag
- chmod 0660 /dev/diag_mdm
- chmod 0660 /dev/htcdiag
- chmod 0660 /dev/diag_arm9
- chmod 0660 /dev/btdiag
-
-service sfc /sbin/sfc
- class core
- oneshot
-
-service gsm0710mux /system/bin/gsm0710muxd -s /dev/ttyACM0 -v 5 -n 8 -m basic
- class core
- user radio
- group radio cache inet misc
-# oneshot
- disabled
-
-service nvm-server /system/bin/nvm_server
- class core
- socket nvm-ctl stream 660 radio radio
- user root
- group radio
- oneshot
-
-#service poweron_modem /system/bin/poweron_modem.sh /data/modem_work/
-## class late_start
-# user root
-# group root
-# oneshot
-## start gsm0710mux
-
-service hdmid /system/bin/hdmid
- socket displayd stream 0660 root system graphics
- disabled
-
-on property:ro.hdmi.enable=true
- start hdmid
-
-#HTC_WIFI_START
-service L2PE /system/bin/l2_profile_exchange handset wlan1
- user root
- group root
- disabled
- oneshot
-#HTC_WIFI_END
-
diff --git a/ramdisk/init.endeavoru.rc b/ramdisk/init.endeavoru.rc
index ec8ffc3..c3ac47f 100644
--- a/ramdisk/init.endeavoru.rc
+++ b/ramdisk/init.endeavoru.rc
@@ -1,5 +1,5 @@
#
-# Copyright 2012 The Android Open Source Project
+# Copyright 2014 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.
@@ -14,27 +14,370 @@
# limitations under the License.
#
-# Since it is not recommended to provide a custom init.rc HTCs changes to it
-# were extracted into init.endeavoru.htc.rc.
-# Even though some of HTCs services are not relevant to CM I didn't remove them
-# yet. In case modifications were made they are marked with a "# CM:" comment to
-# make it easier to detect them.
-#
-# Add your changes to this file if they need to be executed before the imports
-# or to init.endeavoru.cm.rc if it doesn't matter.
+import init.endeavoru.usb.rc
+import init.tegra3-common.rc
+on early-init
+ mount debugfs debugfs /sys/kernel/debug
+ write /sys/class/firmware/timeout 5
-# Import HTCs differences from the stock init.rc
-import init.endeavoru.htc.rc
+on init
+ # internal sdcard
+ mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
+ mkdir /storage/sdcard0 0700 root root
+ export EXTERNAL_STORAGE /storage/sdcard0
-# Import HTCs init.endeavoru.common.rc
-import init.endeavoru.common.rc
-# Import HTCs init.endeavoru.usb.rc
-import init.endeavoru.usb.rc
+ # Backwards compatibility
+ symlink /storage/sdcard0 /sdcard
+ symlink /storage/sdcard0 /mnt/sdcard
-# Shared init between enrc2b/endeavoru
-import init.tegra3-common.rc
-# Our additions
-import init.endeavoru.cm.rc
+ # USB OTG
+ mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw
+ mkdir /storage/usbdisk 0700 root root
+ symlink /storage/usbdisk /mnt/usbdisk
+ symlink /mnt/usbdisk /usbdisk
+
+ export SECONDARY_STORAGE /storage/usbdisk
+
+ # NETWORK: NAT setting
+ # To prevent out of WINDOW ACK from making
+ # connection tracking to treat them as INVALID packet
+ write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
+
+ # Wifi: Disable the IPv6 of p2p0 interface
+ write /proc/sys/net/ipv6/conf/p2p0/disable_ipv6 1
+
+on fs
+ mount_all /fstab.endeavoru
+
+ setprop ro.crypto.umount_sd false
+ setprop ro.crypto.fuse_sdcard true
+
+on post-fs-data
+ # Set indication (checked by vold) that we have finished this action
+ setprop vold.post_fs_data_done 1
+
+ # GPS
+ mkdir /data/tigps 0770 system system
+ mkdir /data/tigps/aiding 0770 system system
+ mkdir /data/tigps/logs 0770 system system
+ mkdir /data/tigps/etc 0770 system system
+ mkdir /data/RXN 0770 system system
+ mkdir /data/RXN/RXN 0770 system system
+ mkdir /data/RXN/RXN/pred 0770 system system
+ chmod 0777 /dev/tihci
+
+ # BB mapping symbolic name to the logging ttyACM port
+ symlink /dev/ttyACM3 /dev/log_modem
+
+on boot
+ # Wi-Fi
+ insmod /system/lib/modules/compat.ko
+ insmod /system/lib/modules/cfg80211.ko
+ insmod /system/lib/modules/mac80211.ko
+ insmod /system/lib/modules/wl12xx.ko debug_level=0x63c00
+
+ # Run our own Wi-Fi calibration service
+ start wifi_calib
+
+ start load_bt
+ insmod /system/lib/modules/uhid.ko
+
+ # Load kineto_gan.ko while booting
+ # insmod /system/lib/modules/kineto_gan.ko
+
+ # a2dp freq boost
+ chmod 0664 /sys/devices/platform/tegra_uart.2/a2dp_tuning
+
+ # for hostapd
+ chown wifi wifi /dev/rfkill
+ chmod 0660 /dev/rfkill
+ # HTC_WIFI_END
+
+ # bluetooth power up/down interface
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
+ chmod 0660 /sys/class/rfkill/rfkill0/state
+
+ chown system /sys/module/edp/parameters/edp_ap_limit
+ chown system /sys/module/edp/parameters/edp_limits_table
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/touch_poke
+ chown system /sys/devices/system/cpu/cpu_on
+ chown system /sys/kernel/debug/tegra_hotplug/min_cpus
+ chown system /sys/kernel/debug/tegra_hotplug/max_cpus
+ chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chown system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown system /sys/module/cpu_tegra3/parameters/auto_hotplug
+ chown system /sys/devices/system/cpu/cpu1/online
+ chown system /sys/devices/system/cpu/cpu2/online
+ chown system /sys/devices/system/cpu/cpu3/online
+ chown system /sys/module/cpu_tegra3/parameters/mp_policy
+ chown system /sys/module/cpu_tegra3/parameters/NwNs
+ chown system /sys/module/cpu_tegra3/parameters/TwTs
+ chown system /sys/module/cpu_tegra/parameters/cpu_user_cap
+ chown radio radio /sys/module/cpu_tegra/parameters/ril_boost
+ chown system /sys/kernel/debug/tegra_hotplug/min_cpus
+ chmod 0660 /sys/kernel/debug/tegra_hotplug/min_cpus
+ chown system /sys/htc/power_save
+ chown system /sys/kernel/debug/tegra_emc/eack_state
+
+ # for radio signal stable
+ chown radio radio /sys/class/power_supply/battery/charger_control
+ chmod 0660 /sys/class/power_supply/battery/charger_control
+ chown radio radio /sys/class/power_supply/battery/phone_call
+ chmod 0660 /sys/class/power_supply/battery/phone_call
+
+ # HTC PnPMgr sysfs file node
+ chown system system /sys/power/pnpmgr/apps/activity_trigger
+ chown system system /sys/power/pnpmgr/cpufreq/perflock_scaling_min
+ chown system system /sys/power/pnpmgr/cpufreq/perflock_scaling_max
+ chown system system /sys/power/pnpmgr/hotplug/cpu_auto_hotplug
+ chown system system /sys/power/pnpmgr/hotplug/min_on_cpus
+ chown system system /sys/power/pnpmgr/hotplug/cpu1_online
+ chown system system /sys/power/pnpmgr/hotplug/cpu2_online
+ chown system system /sys/power/pnpmgr/hotplug/cpu3_online
+ chown system system /sys/power/pnpmgr/thermal/edp_ap_limit
+ chown system system /sys/power/pnpmgr/cpufreq/ap_dvcs
+ chown system system /sys/power/launch_activity
+ chown system system /sys/power/cpunum_ceiling
+ chown system system /sys/power/cpunum_floor
+
+ write /proc/sys/vm/highmem_is_dirtyable 1
+ write /proc/sys/vm/lowmem_reserve_ratio 16\ 16
+ write /proc/sys/vm/min_free_kbytes 4096
+
+ chown system system /sys/class/leds/amber/brightness
+ chown system system /sys/class/leds/amber/blink
+ chown system system /sys/class/leds/green/blink
+ chown system system /sys/class/leds/button-backlight/blink
+ chown system system /sys/class/leds/flashlight/brightness
+ chmod 0666 /sys/class/leds/flashlight/brightness
+ chown radio system /sys/camera_led_status/led_ril_status
+ chown system system /sys/camera_led_status/led_wimax_status
+ chown system system /sys/camera_led_status/led_hotspot_status
+
+ # Vendor camera
+ chown media media /sys/htc/media_boost_freq
+
+ # bluetooth
+ # UART device
+ chmod 0660 /dev/ttyHS2
+ chown bluetooth bluetooth /dev/ttyHS2
+
+ # power up/down interface
+ chmod 0660 /sys/class/rfkill/rfkill0/state
+ chmod 0660 /sys/class/rfkill/rfkill0/type
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
+ chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
+
+ # for nvidia platform specific a2dp tuning support
+ chown media media /sys/devices/platform/tegra_uart.2/a2dp_tuning
+
+ # GPS
+ setprop ro.gps.supl.supported true
+
+ # NFC
+ setprop ro.nfc.port "I2C"
+ chmod 0660 /dev/pn544
+ chown nfc nfc /dev/pn544
+
+ # set atmel touch permissions
+ chown system system /sys/android_touch/unlock
+
+ # set keyboard vol_wakeup permissions
+ chown system system /sys/keyboard/vol_wakeup
+
+ # backlight
+ chown system system /sys/class/backlight/tegra-pwm-bl/brightness
+
+ # didim
+ chown system system /sys/class/graphics/fb0/device/smartdimmer/enable
+ chown system system /sys/class/graphics/fb0/device/smartdimmer/aggressiveness
+
+ # Power management settings
+ write /sys/module/cpu_tegra3/parameters/no_lp 0
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor ondemand
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor ondemand
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_min
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_max
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
+ chown system /sys/devices/system/cpu/cpufreq/ondemand/touch_poke
+ chown system /sys/htc/power_save
+ write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate_min 10000
+ write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
+ write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
+ write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
+ write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
+ write /sys/module/cpu_tegra3/parameters/auto_hotplug 1
+ write /sys/module/cpuidle/parameters/lp2_in_idle 1
+
+# compass/accelerometer daemon
+service akmd /system/bin/akmd
+ class main
+ user compass
+ group compass misc input
+
+# gyro daemon
+service ewtzmud /system/bin/ewtzmud
+ class main
+ user system
+ group system misc input
+
+service wpa_supplicant /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/wpa_supplicant_overlay.conf \
+ -g@android:wpa_wlan0 \
+ -e/data/misc/wifi/entropy.bin
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service p2p_supplicant /system/bin/wpa_supplicant \
+ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
+ -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
+ -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
+ -I/system/etc/wifi/p2p_supplicant_overlay.conf \
+ -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \
+ -g@android:wpa_wlan0
+ class main
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service dhcpcd_wlan0 /system/bin/dhcpcd -ABDKL
+ disabled
+ oneshot
+
+service iprenew_wlan0 /system/bin/dhcpcd -n
+ disabled
+ oneshot
+
+service dhcpcd_p2p /system/bin/dhcpcd -aABKL
+ disabled
+ oneshot
+
+service iprenew_p2p /system/bin/dhcpcd -n
+ disabled
+ oneshot
+
+service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
+ disabled
+ oneshot
+
+service hostapd_bin /system/bin/hostapd -d /data/misc/wifi/hostapd.conf
+ socket wpa_wlan0 dgram 660 wifi wifi
+ disabled
+ oneshot
+
+service uim /system/bin/uim-sysfs
+ class core
+ user root
+ group media bluetooth
+ oneshot
+
+service nav /system/bin/navl_server --android_log NAVD-p3 -nav\"-c/system/bin/pathconfigfile.txt\"
+ class main
+ user system
+ group system
+ cgroup bg
+ oneshot
+
+service rxn_intapp /system/bin/RXN_IntApp /system/etc/gps/RXN/MSLConfig.txt
+ class main
+ user system
+ group system
+ cgroup bg
+
+service rilPos-daemon /system/bin/rilposd -l /system/lib/librilpos.so -- -c agps_v_channel
+ class main
+ user system
+ group system radio
+ cgroup bg
+ disabled
+ oneshot
+
+service cplc_main /system/bin/cplc_main
+ class main
+ user system
+ group system radio
+ cgroup bg
+ disabled
+ oneshot
+
+service htcbatt /system/bin/htcbatt
+ class core
+ oneshot
+
+# start tf_daemon service
+service tf_daemon /system/bin/tf_daemon -storageDir /data/tf -d
+ class main
+ user root
+ group shell
+
+# may restart due to /data/tf not existing yet
+on property:init.svc.tf_daemon=restarting
+ mkdir /data/tf
+
+# create filesystems if necessary
+service setup_fs /system/bin/setup_fs \
+ /dev/block/platform/sdhci-tegra.3/by-name/UDA \
+ /dev/block/platform/sdhci-tegra.3/by-name/CAC \
+ /dev/block/platform/sdhci-tegra.3/by-name/MDM
+ class core
+ user root
+ group root
+ oneshot
+
+service wifi_calib /system/bin/wifi_calibration.sh
+ seclabel u:r:init:s0 # silence warning
+ disabled
+ class wifi
+ user root
+ group wifi
+ oneshot
+
+# /dev/tihci <-> /dev/hci_tty creation
+service load_bt /system/bin/logwrapper /system/bin/load-bt.sh
+ seclabel u:r:init:s0 # silence warning
+ disabled
+ user root
+ group root
+ oneshot
+
+service gsm0710mux /system/bin/gsm0710muxd -s /dev/ttyACM0 -v 5 -n 8 -m basic
+ class core
+ user radio
+ group radio cache inet misc
+ disabled
+
+service nvm-server /system/bin/nvm_server
+ class core
+ cgroup bg
+ socket nvm-ctl stream 660 radio radio
+ user root
+ group root
+ oneshot
+
+service hdmid /system/bin/hdmid
+ socket displayd stream 0660 root system graphics
+ disabled
+
+on property:ro.hdmi.enable=true
+ start hdmid
+
+# fusewrapped external sdcard daemon running as media_rw (1023)
+service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
+ class late_start
+ disabled
+
+service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk
+ class late_start
+ disabled
diff --git a/ramdisk/init.endeavoru.usb.rc b/ramdisk/init.endeavoru.usb.rc
index ed5908a..7e102e8 100644
--- a/ramdisk/init.endeavoru.usb.rc
+++ b/ramdisk/init.endeavoru.usb.rc
@@ -622,7 +622,6 @@ on property:sys.usb.config=rndis,modem
write /sys/devices/platform/android_usb/usb_function_switch 260
setprop sys.usb.state ${sys.usb.config}
-
#used for ##3424
on property:persist.sys.usb.diag.config=*
setprop sys.usb.diag.config ${persist.sys.usb.diag.config}
@@ -635,24 +634,6 @@ on property:sys.usb.diag.config=diagoff
write /sys/class/android_usb/android0/f_diag/on 0
setprop sys.usb.diag.state ${sys.usb.diag.config}
-#`` HTC_IPT
-# for USB IPT
-service udhcpd0 /system/bin/logwrapper /system/bin/udhcpd
- disabled
- oneshot
-
-service netsharing0_on /system/bin/netsharing net on
- disabled
- oneshot
-
-service netsharing0_off /system/bin/netsharing net off
- disabled
- oneshot
-
-service netsharing0_pass /system/bin/netsharing net_pass on
- disabled
- oneshot
-
on property:sys.usb.projector.enable=1
write /sys/class/android_usb/f_projector/on 1