Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on early-init
- mount debugfs debugfs /sys/kernel/debug
- export EXTERNAL_STORAGE /mnt/sdcard
- mkdir /mnt/sdcard 0000 system system
- # for backwards compatibility
- symlink /mnt/sdcard /sdcard
- #mkdir /mnt/sdcard2 0000 system system
- ## create directory for mounting usb drives
- #mkdir /mnt/usbdrive 0666 system system
- #symlink /mnt/usbdrive /usbdrive
- # ST-UID
- insmod /sbin/stuid.ko
- # mount configs
- mkdir /configs 0500 root root
- mount ext2 /dev/block/mmcblk0p1 /configs nosuid nodev wait
- chmod 111 /configs
- chown root system /configs
- mount ext2 /dev/block/mmcblk0p1 /configs ro remount
- on fs
- wait /dev/block/mmcblk0p2
- setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
- wait /dev/block/mmcblk0p3
- wait /dev/block/mmcblk0p7
- exec /sbin/sysmount ext4 /dev/block/mmcblk0p2 /dev/block/mmcblk0p3 /system ro
- setprop ro.crypto.state unsupported
- mount ext4 /dev/block/mmcblk0p10 /data wait noatime nosuid nodev
- mount ext4 /dev/block/mmcblk0p4 /cache wait noatime nosuid nodev
- # mount log
- mkdir /log 0770 log log
- mount ext4 /dev/block/mmcblk0p9 /log wait noatime nosuid nodev
- chown log log /log
- chmod 0770 /log
- 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 0775 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
- # make local.prop visible
- symlink /configs/local.prop /data/local.prop
- on boot
- # 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
- write /sys/class/rfkill/rfkill0/state 0
- # 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"
- # backlight
- chown system system /sys/class/backlight/nbx02_backlight/brightness
- chmod 0664 /sys/class/backlight/nbx02_backlight/brightness
- # led
- chown system system /sys/class/leds/info:red/brightness
- chown system system /sys/class/leds/info:green/brightness
- chown system system /sys/class/leds/info:blue/brightness
- chown system system /sys/class/leds/info:blink/delay_on
- chown system system /sys/class/leds/info:blink/delay_off
- # EC
- chown system system /sys/firmware/ec/version
- chmod 444 /sys/firmware/ec/version
- # Sensor
- 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
- wait /dev/nbx_accelerometer
- wait /dev/nbx_magnetometer
- wait /dev/nbx_gyroscope
- wait /dev/nbx_lightsensor
- chmod 0660 /dev/nbx_accelerometer
- chown system system /dev/nbx_accelerometer
- chmod 0660 /dev/nbx_magnetometer
- chown system system /dev/nbx_magnetometer
- chmod 0660 /dev/nbx_gyroscope
- chown system system /dev/nbx_gyroscope
- chmod 0660 /dev/nbx_lightsensor
- chown system system /dev/nbx_lightsensor
- # 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
- write /sys/class/gpio/export 203
- write /sys/class/gpio/gpio203/value 0
- write /sys/class/gpio/gpio203/direction out
- chown system system /sys/power/gps/notifier
- chmod 0600 /sys/power/gps/notifier
- # WWAN
- chown radio radio /sys/power/ril/notifier
- chmod 0600 /sys/power/ril/notifier
- # [HWENABLE-43]
- # write /sys/power/wake_lock 1
- # [AOS-1441] (Updater)
- chown root system /dev/block/mmcblk0p5
- chown root system /dev/block/mmcblk0p7
- chmod 0660 /dev/block/mmcblk0p5
- chmod 0660 /dev/block/mmcblk0p7
- mkdir /cache/recovery
- chown system system /cache/recovery
- chmod 0700 /cache/recovery
- service wpa_supplicant /system/bin/wpa_supplicant \
- -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -W
- # 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 -BL
- class main
- disabled
- oneshot
- service dhcpcd_eth0 /system/bin/dhcpcd -ABKL -f/system/etc/dhcpcd/dhcpcd.conf
- class main
- disabled
- oneshot
- service iprenew_wlan0 /system/bin/dhcpcd -n
- disabled
- oneshot
- service iprenew_eth0 /system/bin/dhcpcd -n
- disabled
- oneshot
- # Atheros +++
- on post-fs-data
- # Create the directories used by the Wireless subsystem
- mkdir /data/misc/wifi 0770 wifi system
- mkdir /data/misc/wifi/wapi_certificate 0770 wifi system
- chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
- chmod 0660 /system/etc/wifi/wpa_supplicant.conf
- mkdir /data/misc/dhcp 0777 system system
- mkdir /data/misc/wifi/sockets 0777 system system
- mkdir /data/system 0777 system system
- mkdir /data/system/wpa_supplicant 0777 wifi wifi
- # wlan_tool is not used
- #service wpa_supplicant /system/bin/wlan_tool wpa_supplicant
- # disabled
- # oneshot
- # wlan_tool is not used
- #service dhcpcd /system/bin/wlan_tool dhcpcd
- # disabled
- # oneshot
- service wlan_tool /system/bin/wlan_tool
- oneshot
- # wlan_tool is not used
- #service abtfilt /system/bin/wlan_tool abtfilt
- # disabled
- # oneshot
- # hostapd is disabled for nbx03
- #service hostapd /system/bin/hostapd /data/misc/wifi/hostapd.conf
- # socket hostapd_wlan1 dgram 660 root wifi
- # user system
- # group wifi system inet net_admin net_raw keystore
- # oneshot
- # disabled
- # Atheros ---
- # 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 1023 1023
- # class late_start
- # bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys
- service bugreport /system/bin/dumpstate -d -v -o /data/storage/bugreports/bugreport
- class main
- disabled
- oneshot
- keycodes 115 114
- #BCM
- #service hciattach /system/bin/brcm_patchram_plus --enable_hci \
- # --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd --pcm_role slave \
- # --enable_lpm /dev/ttyHS2
- # class main
- # user bluetooth
- # group bluetooth net_bt_admin
- # disabled
- ##CSR
- service abtfilt /system/bin/abtfilt -d -z -n -v -s
- class main
- user system
- group system wifi bluetooth inet net_admin net_bt_admin net_raw misc
- oneshot
- disabled
- service hciattach /system/bin/nv_hciattach -n -t 100 -s 921600 ttyHS2 csr_tegra 3500000 flow
- class main
- user bluetooth
- group system bluetooth net_bt_admin misc
- oneshot
- disabled
- # Start GPS daemon
- service gps-daemon /system/bin/glgps_nvidiaTegra2android -c /system/etc/gps/gpsconfig.xml
- class late_start
- user root
- group root
- ## Mount usb drives as /usbdrive. Generally usb drives are formatted with FAT
- ## filesystem, so we support FAT as of now.
- #on device-added-/sys/block/sda
- # mount vfat /dev/block/sda /mnt/usbdrive
- #
- #on device-removed-/sys/block/sda
- # umount /mnt/usbdrive
- #Prepare TF service
- service tf_daemon /system/bin/tf_daemon -storageDir /data/tf -d
- disabled
- class main
- user root
- group shell
- oneshot
- #Create data directory and start service
- on property:tf.enable=y
- mkdir /data/tf
- start tf_daemon
- # Disable autosuspend for ehci.2 host and root-hub
- on boot
- write /sys/devices/platform/tegra-ehci.2/usb1/power/control on
- write /sys/devices/platform/tegra-ehci.2/usb1/1-0:1.0/power/control on
- # Create symlink for wdm driver
- symlink /dev/bus/usb/002/049 /dev/cdc-wdm0
- symlink /dev/bus/usb/002/050 /dev/cdc-wdm1
- # quick_tp insmod
- on boot
- insmod /system/lib/modules/quick_tp.ko
- # Start LogService
- service nfx_log_service /system/bin/nfx_log_service
- class core
- user root
- group root
- # volume limitation
- on property:ro.sony.volume_limit=1
- write /sys/class/sound/vol_limit/state 1
- on property:ro.sony.volume_limit=0
- write /sys/class/sound/vol_limit/state 0
- #start here
- on boot
- class_start core
- class_start main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement