Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import init.harmony.usb.rc
- on early-init
- mount debugfs debugfs /sys/kernel/debug
- on init
- mkdir /mnt/shell/emulated 0700 shell shell
- mkdir /storage 0775 system sdcard_rw
- mkdir /storage/emulated 0555 root root
- export EXTERNAL_STORAGE /storage/emulated/legacy
- export SECONDARY_STORAGE /storage/sdcard1
- export SECOND_VOLUME_STORAGE /storage/sdcard1
- export THIRD_VOLUME_STORAGE /storage/sdcard2
- export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
- export EMULATED_STORAGE_TARGET /storage/emulated
- # for backwards compatibility
- 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
- # make the pathes for the external media mounts
- mkdir /storage/sdcard1 0000 system system
- mkdir /storage/sdcard2 0000 system system
- mkdir /mnt/usbdrive1 0666 system system
- mkdir /mnt/usbdrive2 0666 system system
- # for backwards compatibility
- symlink /mnt/usbdrive1 /usbdrive1
- symlink /mnt/usbdrive2 /usbdrive2
- symlink /storage/sdcard1 /internal_sd
- symlink /storage/sdcard1 /mnt/internal_sd
- symlink /storage/sdcard2 /microsd
- symlink /storage/sdcard2 /mnt/microsd
- symlink /emmc /mnt/emmc
- symlink /emmc /storage/emmc
- on fs
- # Mount /system rw first to give the filesystem a chance to save a checkpoint
- setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
- setprop ro.crypto.umount_sd false
- setprop ro.crypto.fuse_sdcard true
- mount ext4 /dev/block/mmcblk0p2 /data wait noatime nosuid nodev
- mount_all /fstab.harmony
- mount ext4 /dev/block/mmcblk0p1 /emmc wait noatime nosuid nodev
- on post-fs
- # Keep rootfs rw since FUSE needs dir creation
- mount rootfs rootfs / rw remount
- 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 /mnt/sdcard with the sdcard fuse tool
- mkdir /data/media 0770 media_rw media_rw
- chown media_rw media_rw /data/media
- mkdir /emmc/media 0775 media_rw media_rw
- chown media_rw media_rw /emmc/media
- # Set indication (checked by vold) that we have finished this action
- setprop vold.post_fs_data_done 1
- on boot
- # PQi Permissions
- chmod 0666 /sys/class/gpio/gpio27/value
- # 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 666 /dev/tegra_mediaserver
- chmod 666 /dev/tegra_dc_0
- chmod 666 /dev/tegra_dc_1
- chmod 666 /dev/nvhost-ctrl
- chmod 666 /dev/nvhost-display
- chmod 666 /dev/nvhost-dsi
- chmod 666 /dev/nvhost-gr2d
- chmod 666 /dev/nvhost-gr3d
- chmod 666 /dev/nvhost-isp
- chmod 666 /dev/nvhost-mpe
- chmod 666 /dev/nvhost-vi
- chmod 664 /sys/bus/iio/devices/device0/lux
- chmod 664 /sys/bus/iio/devices/device0/proxim_ir
- # Power management settings
- 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
- write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 80
- # GPS
- mkdir /data/gps
- chown system system /data/gps
- chmod 770 /data/gps
- # 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 -aABDKL
- class main
- disabled
- oneshot
- service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
- class main
- disabled
- oneshot
- service dhcpcd_usb0 /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
- class main
- disabled
- oneshot
- service iprenew_p2p /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
- service iprenew_eth0 /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
- service iprenew_eth0 /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
- # 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
- service sdcard /system/bin/sdcard /emmc/media /mnt/shell/emulated 1023 1023
- class late_start
- #BCM
- #service hciattach /system/bin/brcm_patchram_plus --enable_hci \
- # --baudrate 921600 --patchram /system/etc/firmware/bcm4329.hcd --tosleep 50000 \
- # --i2s=1,1,0,1 --enable_lpm /dev/ttyHS2
- # class main
- # user root
- # group system bluetooth net_bt_admin misc
- # oneshot
- # disabled
- # Enable tcpdump-service
- #service netdump-service /system/xbin/tcpdump -i any -C 5 -p -s 0 -w /sdcard/netdump.cap
- # user root
- # disabled
- #
- #on property:net.netdump.enable=1
- # start netdump-service
- #
- #on property:net.netdump.enable=0
- # stop netdump-service
- # 3G library selection
- service wwlanselect /system/bin/sh /system/bin/wwlan_select.sh
- disabled
- class main
- user root
- group shell
- oneshot
- on device-added-/dev/ttyUSB0
- start wwlanselect
- on device-added-/dev/ttyUSB1
- start wwlanselect
- on device-added-/dev/ttyUSB2
- start wwlanselect
- on device-added-/dev/ttyUSB3
- start wwlanselect
- on device-removed-/dev/ttyUSB0
- stop ril-daemon
- on device-removed-/dev/ttyUSB1
- stop ril-daemon
- on device-removed-/dev/ttyUSB2
- stop ril-daemon
- on device-removed-/dev/ttyUSB3
- stop ril-daemon
- on property:init.svc.bootanim=stopped
- start wwlanselect
- # Postboot service
- service adam_postboot /system/bin/sh /system/etc/adam_postboot.sh
- user root
- oneshot
- on property:init.svc.bootanim=stopped
- start adam_postboot
- class_start postbootinit
- on property:init.svc.vold=running
- start sdcard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement