mport init.rk29board.usb.rc
on early-init
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
export SECOND_VOLUME_STORAGE /mnt/external_sd
mkdir /mnt/external_sd 0000 system system
export THIRD_VOLUME_STORAGE /mnt/usb_storage
mkdir /mnt/usb_storage 0000 system system
on fs
exec fsck_msdos -p -f mtd@user
mount vfat mtd@user /mnt/sdcard wait noatime nodiratime nosuid nodev
on post-fs-data
# 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
on init
symlink /etc/bluez/bcm432x/BCM4329B1_TestOnly_0237_26MHz_SEMCO_B23.hcd /bcm4329_samsung.hcd
symlink /etc/bluez/bcm432x/BCM4329B1_USI_WM-BN-BM-01.hcd /bcm4329_usi.hcd
symlink /etc/bluez/bcm432x/BCM4329B1_002.002.023.0389.0000_Cybertan-Foxconn_Cls2_extLNA_EDRmaxInputLev+PeakDEVM_NT.hcd /bcm4329_cybertan.hcd
# for adobe reader mobile
export RK_ADOBE_DE_MOBILE 1
export EBOOK_PAGE_VISIBLE_NUMBER 2
export RK_ADEPT_DEVICE_TYPE mobile
export RK_ADOBE_DE_DOC_FOLDER "/mnt/sdcard/Digital Editions"
export RK_ADEPT_ACTIVATION_FILE /mnt/sdcard/.adobe-digital-editions/activation.xml
export RK_ADEPT_DEVICE_FILE /mnt/sdcard/.adobe-digital-editions/device.xml
export RK_ADEPT_DEVICE_SALT_FILE /mnt/sdcard/.adobe-digital-editions/devicesalt
export ADOBE_FONTS_DIR /system/fonts/adobefonts/
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
#backlight
chown system system /sys/class/backlight/rk28_bl/brightness
# for wifi
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
# bluetooth power up/down interface
chmod 0660 /dev/ttyS0
chmod 0660 /dev/ttyS2
chmod 0660 /dev/vflash
chown bluetooth bluetooth /dev/vflash
chown bluetooth bluetooth /dev/ttyS2
chown bluetooth bluetooth /dev/ttyS0
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0777 /sys/class/rfkill/rfkill0/state
# create virtual SD card at /mnt/sdcard, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
#service sdcard /system/bin/sdcard /data/media 1023 1023
# class late_start
service wpa_supplicant /system/bin/wpa_supplicant \
-Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
#-Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -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 hostapd /system/bin/hostapd /data/misc/wifi/hostapd.conf
class main
disabled
oneshot
# for realtek wifi
service hostapd_rtl /system/bin/hostapd_rtl /data/misc/wifi/hostapd.conf
class main
disabled
oneshot
service hciattach /system/bin/brcm_patchram_plus --patchram /bcm4329_samsung.hcd --baudrate 1500000 --enable_lpm --enable_hci /dev/ttyS2
console
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugreport.sh
class main
disabled
oneshot
keycodes 114 115 116
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service battery_charger /charger
class charger