Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import init.htc7x30.usb.rc
- on early-init
- # Removed during droid-hal-device build : mount debugfs /sys/kernel/debug /sys/kernel/debug
- mkdir /storage 0555 root root
- mkdir /storage/primary 0555 root root
- mkdir /storage/primary/legacy 0555 root root
- export EXTERNAL_STORAGE /storage/primary/legacy
- # Support legacy paths
- symlink /storage/primary/legacy /sdcard
- symlink /storage/primary/legacy /mnt/sdcard
- symlink /storage/primary/legacy /storage/sdcard0
- symlink /mnt/shell/primary/0 /storage/primary/legacy
- setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
- on early-fs
- mkdir /devlog 0700 root root
- on fs
- #mount all the things
- mount_all fstab.spade
- on post-fs
- chmod 0771 /cache
- chown system cache /cache
- chmod 0700 /devlog
- chown root root /devlog
- on post-fs-data
- # Prep for services
- chmod 0771 /data
- chown system system /data
- mkdir /data/radio 0770 radio radio
- mkdir /data/misc 1771 system misc
- mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
- mkdir /data/misc/keystore 0700 keystore keystore
- mkdir /data/misc/vpn 0770 system vpn
- chown system vpn /data/misc/vpn
- mkdir /data/misc/vpn/profiles 0770 system vpn
- chown system vpn /data/misc/vpn/profiles
- mkdir /data/misc/wifi 0770 wifi wifi
- mkdir /data/misc/wifi/sockets 0770 wifi wifi
- mkdir /data/misc/dhcp 0770 dhcp dhcp
- chown dhcp dhcp /data/misc/dhcp
- # Allow system to have access to /dev/tun directory
- mkdir /dev/tun 0770 system vpn
- chown system vpn /dev/tun
- chmod 0770 /dev/tun
- # Set indication (checked by vold) that we have finished this action
- setprop vold.post_fs_data_done 1
- on boot
- # CyanogenMod SysFS entries
- chown radio system /sys/module/gpio_event/parameters/phone_call_status
- chmod 0664 /sys/module/gpio_event/parameters/phone_call_status
- chown radio system /sys/camera_led_status/led_ril_status
- chmod 0644 /sys/camera_led_status/led_ril_status
- # Power Management
- chmod 0664 /sys/module/pm/parameters/idle_sleep_mode
- # Disable idle power collapse to speed up the boot process
- # Enable it when boot is complete
- write /sys/module/pm2/parameters/idle_sleep_mode 3
- # Disable IPv6 over mobile radio
- #write /proc/sys/net/ipv6/conf/rmnet0/disable_ipv6 1
- #write /proc/sys/net/ipv6/conf/rmnet1/disable_ipv6 1
- #write /proc/sys/net/ipv6/conf/rmnet2/disable_ipv6 1
- # HTC SysFS for "Flip to Speaker"
- chown radio radio /sys/class/htc_accelerometer/accelerometer/PhoneOnOffFlag
- chown radio radio /sys/class/htc_ecompass/ecompass/PhoneOnOffFlag
- # Optical sensors
- chown system system /sys/class/optical_sensors/lightsensor/ls_adc
- chown system system /sys/class/optical_sensors/lightsensor/ls_auto
- chown system system /sys/class/optical_sensors/lightsensor/ls_kadc
- chown system radio /sys/class/optical_sensors/proximity/ps_adc
- chown system system /sys/class/optical_sensors/proximity/ps_kadc
- chmod 0666 /sys/class/optical_sensors/proximity/ps_kadc
- chown system system /sys/class/optical_sensors/proximity/ps_led
- chown system system /sys/class/optical_sensors/proximity/ps_test_mode
- # SysFS charging functions
- chown radio radio /sys/class/power_supply/battery/charger_control
- chmod 0660 /sys/class/power_supply/battery/charger_control
- # bluetooth power up/down interface
- chown bluetooth bluetooth /dev/ttyHS0
- chmod 0660 /sys/class/rfkill/rfkill0/type
- chmod 0660 /sys/class/rfkill/rfkill0/state
- chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
- chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
- # Bluetooth MAC address programming
- chown bluetooth net_bt_stack /sys/module/htc_bdaddress/parameters/bdaddress
- setprop ro.bt.bdaddr_path /sys/module/htc_bdaddress/parameters/bdaddress
- # bluetooth LPM
- chmod 0220 /proc/bluetooth/sleep/lpm
- chmod 0220 /proc/bluetooth/sleep/btwrite
- chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
- chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
- # liblights permissions
- chown system system /sys/class/leds/amber/brightness
- chown system system /sys/class/leds/amber/blink
- chown system system /sys/class/leds/green/brightness
- chown system system /sys/class/leds/green/blink
- chown system system /sys/class/leds/button-backlight/brightness
- chown system camera /sys/class/leds/flashlight/brightness
- chmod 0660 /sys/class/leds/flashlight/brightness
- chown system system /sys/class/leds/lcd-backlight/brightness
- # Increase readahead buffers on MMC devices
- write /sys/block/mmcblk0/queue/read_ahead_kb 2048
- write /sys/block/mmcblk1/queue/read_ahead_kb 1024
- # Flash storage isn't a good entropy source, and only causes locking
- # overhead in the kernel. Turn it off.
- write /sys/block/mmcblk0/queue/add_random 0
- write /sys/block/mmcblk1/queue/add_random 0
- # Radio_feedback permissions
- chown radio radio /dev/radio_feedback
- chmod 0660 /dev/radio_feedback
- # Advanced settings
- chown root system /sys/android_touch/sweep2wake
- chmod 0664 /sys/android_touch/sweep2wake
- chown root system /sys/android_touch/s2w_allow_stroke
- chmod 0664 /sys/android_touch/s2w_allow_stroke
- chown root system /sys/android_touch/s2w_min_distance
- chmod 0664 /sys/android_touch/s2w_min_distance
- chown root system /sys/android_touch/s2w_register_threshold
- chmod 0664 /sys/android_touch/s2w_register_threshold
- chown root system /sys/android_touch/doubletap2wake
- chmod 0664 /sys/android_touch/doubletap2wake
- chown root system /sys/android_touch/dt2w_max_duration
- chmod 0664 /sys/android_touch/dt2w_max_duration
- chown root system /sys/android_touch/dt2w_min_duration
- chmod 0664 /sys/android_touch/dt2w_min_duration
- chown root system /sys/kernel/fast_charge/force_fast_charge
- chmod 0664 /sys/kernel/fast_charge/force_fast_charge
- # Use a reasonable min free value for low memory killer
- write /proc/sys/vm/min_free_kbytes 8192
- # Network tweaks
- write /proc/sys/net/ipv4/tcp_fin_timeout 30
- write /proc/sys/net/ipv4/tcp_keepalive_intvl 30
- write /proc/sys/net/ipv4/tcp_timestamps 1
- write /proc/sys/net/ipv4/tcp_keepalive_time 1200
- write /proc/sys/net/core/rmem_max 524288
- write /proc/sys/net/core/wmem_max 524288
- write /proc/sys/net/ipv4/tcp_tw_reuse 1
- write /proc/sys/net/ipv4/tcp_window_scaling 1
- write /proc/sys/net/ipv4/tcp_mem "8192 87380 524288"
- # The next two settings will be overwritten every time
- # the network type switches (wifi <-> umts etc.)
- # so we start with wifi values to ensure best
- # performance after boot.
- write /proc/sys/net/ipv4/tcp_rmem "8192 87380 524288"
- write /proc/sys/net/ipv4/tcp_wmem "8192 87380 393216"
- setprop net.tcp.buffersize.wifi 8192,87380,524288,8192,87380,524288
- setprop net.tcp.buffersize.hsdpa 8192,87380,524288,8192,65536,393216
- setprop net.tcp.buffersize.umts 6144,87380,393216,6144,32768,283008
- setprop net.tcp.buffersize.edge 4096,32768,220416,4096,32768,110208
- setprop net.tcp.buffersize.gprs 4096,16384,32768,4096,11680,16384
- on property:sys.boot_completed=1
- write /sys/module/pm2/parameters/idle_sleep_mode 1
- on property:init.svc.wpa_supplicant=stopped
- stop dhcpcd
- service wpa_supplicant /system/bin/wpa_supplicant \
- -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
- class main
- socket wpa_wlan0 dgram 660 wifi wifi
- disabled
- oneshot
- service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
- class main
- disabled
- oneshot
- #bluetooth
- service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
- class main
- disabled
- oneshot
- service iprenew_wlan0 /system/bin/dhcpcd -n
- class late_start
- disabled
- oneshot
- service iprenew_bnep0 /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
- # Compass and accelerometer daemon
- service akmd /system/bin/akmd
- class late_start
- user compass
- group compass misc input
- # Bugreport is triggered by the KEY_VOLUMEUP and BTN_MOUSE keycodes
- service bugreport /system/bin/bugmailer.sh -v
- class late_start
- disabled
- oneshot
- keycodes 114 115 116
- service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p13 /dev/block/mmcblk0p14
- class core
- user root
- service htc_ebdlogd /system/bin/htc_ebdlogd -s -k -P 7
- class main
- user root
- disabled
- oneshot
- service htc_ebdlogd_rel /system/bin/htc_ebdlogd -s -k
- class main
- user root
- disabled
- oneshot
- on property:ro.build.tags=test-keys
- start htc_ebdlogd
- on property:ro.build.tags=release-keys
- start htc_ebdlogd_rel
- on property:service.adb.root=1
- write /sys/class/android_usb/android0/enable 0
- restart adbd
- write /sys/class/android_usb/android0/enable 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement