Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import init.harmony.usb.rc
- on init
- # See storage config details at http://source.android.com/tech/storage/
- mkdir /mnt/shell/emulated 0700 shell shell
- mkdir /storage 0550 system sdcard_r
- mkdir /storage/emulated 0555 root root
- mkdir /storage/sdcard1 0000 system system
- mkdir /storage/usbdisk0 0000 system system
- export EXTERNAL_STORAGE /storage/emulated/legacy
- export SECONDARY_STORAGE /storage/sdcard1
- 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 /mnt/shell/emulated/0 /storage/emulated/legacy
- symlink /storage/sdcard1 /mnt/external1
- symlink /storage/usbdisk0 /mnt/usbdisk
- on fs
- mount_all /fstab.harmony
- setprop ro.crypto.fuse_sdcard true
- mount debugfs debugfs /sys/kernel/debug
- on post-fs-data
- 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
- # we will remap this as /storage/sdcard0 with the sdcard fuse tool
- mkdir /data/media 0770 media_rw media_rw
- chown media_rw media_rw /data/media
- # Set indication (checked by vold) that we have finished this action
- setprop vold.post_fs_data_done 1
- on boot
- # bluetooth permissions
- chmod 0660 /dev/ttyHS2
- chown bluetooth net_bt_stack /dev/ttyHS2
- chmod 0660 /sys/class/rfkill/rfkill0/state
- chmod 0660 /sys/class/rfkill/rfkill0/type
- chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
- chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
- write /sys/class/rfkill/rfkill0/state 0
- symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/BCM4329B1.hcd
- symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/bcm4329B1.hcd
- chmod 0777 /data/bcm4329B1.hcd
- # 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
- # backlight
- chown system system /sys/class/backlight/pwm-backlight/brightness
- # Sensor
- chmod 664 /sys/bus/iio/devices/device0/lux
- chmod 664 /sys/bus/iio/devices/device0/proxim_ir
- # Power management settings
- # cpufreq defaults
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
- write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
- # timer 20ms, min sample 80ms, go max at 80%
- write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
- write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 80000
- write /sys/module/cpuidle/parameters/lp2_in_idle 1
- write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 80
- write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay 20000
- write /sys/devices/system/cpu/cpufreq/interactive/input_boost 1
- # Wakelock debug
- write /sys/module/wakelock/parameters/debug_mask 7
- # GPS
- mkdir /data/gps
- chown gps system /data/gps
- chmod 770 /data/gps
- chown gps system /dev/ttyHS3
- chmod 0664 /dev/ttyHS3
- # GPS init
- write /sys/class/gpio/export 171
- write /sys/class/gpio/gpio171/value 0
- write /sys/class/gpio/gpio171/direction out
- chown gps system /sys/class/gpio/gpio171/value
- chmod 0664 /sys/class/gpio/gpio171/value
- # Default Read Ahead value for sdcards
- write /sys/block/mmcblk0/queue/read_ahead_kb 2048
- write /sys/block/mmcblk1/queue/read_ahead_kb 2048
- service wpa_supplicant /system/bin/wpa_supplicant \
- -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf -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
- service p2p_supplicant /system/bin/wpa_supplicant \
- -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf
- # 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 -ABKL
- class main
- disabled
- oneshot
- service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
- class main
- disabled
- oneshot
- service dhcpcd_p2p /system/bin/dhcpcd -aABKL
- class main
- disabled
- oneshot
- # bluetooth
- service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
- disabled
- oneshot
- service iprenew_wlan0 /system/bin/dhcpcd -n
- disabled
- oneshot
- service iprenew_p2p /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
- service iprenew_eth0 /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
- # Start GPS daemon
- on boot
- service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
- socket gps seqpacket 660 gps system
- user gps
- group system inet
- class late_start
- # create virtual SD card at /mnt/sdcard, based on the /data/media directory
- # deamon will drop to user/group system/media_rw after initializing
- # underlying files in /data/media wil be created with user and group media_rw (1023)
- service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
- class late_start
- # Postboot service
- on property:init.svc.vold=running
- start sdcard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement