import init.sun8i.usb.rc
on init
#See storage config details at
http://source.android.com/tech/storage/#for muser
# mkdir /mnt/shell/emulated 0700 shell shell
# mkdir /storage/emulated 0555 root root
# export EXTERNAL_STORAGE /storage/emulated/legacy
# export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
# export EMULATED_STORAGE_TARGET /storage/emulated
## export MEDIA_STORAGE /mnt/media/sdcard
# 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
## export EXTERNAL_STORAGE /mnt/sdcard
## mkdir /mnt/sdcard 0000 system system
## symlink /mnt/sdcard /sdcard
# #mkdir /mnt/extsd 0000 system system
# #mkdir /mnt/usbhost1 0000 system system
# mkdir /mnt/extsd 0700 media_rw media_rw
# mkdir /storage/extsd 0700 root root
# mkdir /mnt/usbhost1 0700 media_rw media_rw
# mkdir /storage/usbhost1 0700 root root
mount debugfs debugfs /sys/kernel/debug
mkdir /databk 0700 root system
mkdir /private 0700 root system
#not muser
mkdir /mnt/sdcard 0000 shell shell
mkdir /mnt/extsd 0700 shell shell
mkdir /mnt/usbhost1 0700 shell shell
symlink /mnt/sdcard /sdcard
export EXTERNAL_STORAGE /mnt/sdcard
on early-fs
mount_all /fstab.sun8i
setprop ro.crypto.fuse_sdcard true
insmod /system/vendor/modules/disp.ko
insmod /system/vendor/modules/lcd.ko
insmod /system/vendor/modules/mali.ko
insmod /system/vendor/modules/leds-sunxi.ko
# insmod /system/vendor/modules/bcmdhd.ko
on post-fs-data
#mkdir /data/media 0770 media_rw media_rw
#mkdir /mnt/media/sdcard 0770 media_rw media_rw
on fs
format_userdata /dev/block/by-name/UDISK INOVALLEY
format_userdata /dev/block/by-name/private private
# radio related, such as imei.conf
mkdir /data/misc/radio 0777 system radio
#csi module
insmod /system/vendor/modules/videobuf-core.ko
insmod /system/vendor/modules/videobuf-dma-contig.ko
insmod /system/vendor/modules/cam_detect.ko
# insmod /system/vendor/modules/actuator.ko
# insmod /system/vendor/modules/ad5820_act.ko
insmod /system/vendor/modules/cci.ko
insmod /system/vendor/modules/vfe_os.ko
insmod /system/vendor/modules/vfe_subdev.ko
insmod /system/vendor/modules/gc0308.ko
insmod /system/vendor/modules/gc2035.ko
insmod /system/vendor/modules/gc0329.ko
insmod /system/vendor/modules/sp0838.ko
insmod /system/vendor/modules/ov5640.ko
insmod /system/vendor/modules/gc0309.ko
insmod /system/vendor/modules/siv121d.ko
insmod /system/vendor/modules/sid130b.ko
insmod /system/vendor/modules/gc0328.ko
insmod /system/vendor/modules/sp2518.ko
insmod /system/vendor/modules/bf3920.ko
insmod /system/vendor/modules/s5k4ec.ko
insmod /system/vendor/modules/bf3a03.ko
insmod /system/vendor/modules/sp0a19.ko
insmod /system/vendor/modules/gc2155.ko
insmod /system/vendor/modules/bf3703.ko
insmod /system/vendor/modules/gc2145.ko
insmod /system/vendor/modules/gc0312.ko
insmod /system/vendor/modules/vfe_v4l2.ko
# bluetooth
# UART device
# chmod 0660 /dev/ttyS1
# chown bluetooth net_bt_stack /dev/ttyS1
# power up/down interface
# 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
# 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
# write /proc/bluetooth/sleep/lpm 1
#insmod tp and keyboard gsensor
insmod /system/vendor/modules/sw-device.ko
insmod /system/vendor/modules/sunxi-keyboard.ko
insmod /system/vendor/modules/bma250.ko
# insmod /system/vendor/modules/mma7660.ko
# insmod /system/vendor/modules/mma8452.ko
# insmod /system/vendor/modules/mma865x.ko
# insmod /system/vendor/modules/kxtik.ko
# insmod /system/vendor/modules/afa750.ko
# insmod /system/vendor/modules/lis3de_acc.ko
# insmod /system/vendor/modules/lis3dh_acc.ko
insmod /system/vendor/modules/gslX680new.ko
#insmod usb ethernet
insmod /system/vendor/modules/usbnet.ko
insmod /system/vendor/modules/asix.ko
insmod /system/vendor/modules/qf9700.ko
insmod /system/vendor/modules/mcs7830.ko
insmod /system/vendor/modules/rtl8150.ko
insmod /system/vendor/modules/cdc_ether.ko
# talking standby
chown radio system /sys/power/scene_lock
chmod 0644 /sys/power/scene_lock
chown radio system /sys/power/scene_unlock
chmod 0644 /sys/power/scene_unlock
chown radio system /sys/power/scene_state
chmod 0644 /sys/power/scene_state
#2G or 3G init.rc
import init.sunxi.3gdongle.rc
#service logcat /system/bin/logcat -r 1000 -n 10 -v time -f /data/local/logcat.log
# class main
#logger service: logger [kernel|android|radio]
service logger_kernel /system/bin/logger.sh kernel
user root
disabled
service logger_android /system/bin/logger.sh android
user root
disabled
service logger_radio /system/bin/logger.sh radio
user root
disabled
on property:rw.logger=1
start logger_kernel
start logger_android
start logger_radio
# virtual sdcard daemon running as media_rw (1023)
##service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
#service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
# class late_start
#service fuse_extsd /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/extsd /storage/extsd
# class late_start
# disabled
#service fuse_usbhost1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/usbhost1 /storage/usbhost1
# class late_start
# disabled
# ril related services
service ril-daemon /system/bin/rild -l libsoftwinner-ril.so -- -d /dev/ttyUSB2
class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw log
# 1. realtek & eagle wifi service
# 1.1 realtek & eagle wifi sta service
service wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-O/data/misc/wifi/sockets \
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
# 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
# 1.2 realtek & eagle wifi sta p2p concurrent service
service p2p_supplicant /system/bin/wpa_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
-e/data/misc/wifi/entropy.bin -N \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
-O/data/misc/wifi/sockets \
-g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
# 2. broadcom wifi service
# 2.1 broadcom wifi station and softap
#service wpa_supplicant /system/bin/wpa_supplicant \
# -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
# -I/system/etc/wifi/wpa_supplicant_overlay.conf \
# -O/data/misc/wifi/sockets \
# -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
# # 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
# 2.2 broadcom wifi sta p2p concurrent service
#service p2p_supplicant /system/bin/wpa_supplicant \
# -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
# -I/system/etc/wifi/wpa_supplicant_overlay.conf \
# -O/data/misc/wifi/sockets -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
# # 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
on property:sys.boot_completed=1
start ril-daemon
start u3gmonitor