Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: facf864a76
Fetching contributors…

Cannot retrieve contributors at this time

executable file 911 lines (816 sloc) 33.642 kb
on post-fs
# prepare generic keypad name
exec /init_prep_keypad.sh
mount yaffs2 /dev/block/mmcblk1p23 /system ro remount
mount ext3 /dev/block/mmcblk1p23 ro noatime nodiratime remount
mount rootfs rootfs / rw remount
mkdir /cdrom 0770 system system
mount yaffs2 /dev/block/mmcblk1p17 /cdrom ro
symlink /dev/ttyGS0 /dev/acm0
# Create mountpoints and mount tmpfs
mkdir /pds 0775 system system
mkdir /data/tmp 0777 system system
mount tmpfs tmpfs /tmp
#Set the default value for bluedroid_ref
# write /data/tmp/bluedroid_ref 0
# chown system system /data/tmp/bluedroid_ref
# Configure kernel options
# Disable automatic power control for OHCI USB IPC Temporarily
write /sys/devices/platform/ohci-omap3/usb1/1-1/power/control auto
# NFC configuration
# Reset system time
write /sys/class/rtc/rtc0/unsecured_rtc on
# Disable a system-wide task dump on OOM in default
write /proc/sys/vm/oom_dump_tasks 0
write /proc/sys/fs/suid_dumpable 2
# Set core pattern
write /proc/sys/kernel/core_pattern "|/system/bin/coredump %e %p %t"
# Power Management
write /sys/power/sleep_while_idle 1
write /sys/power/enable_off_mode 1
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor mot_hotplug
write /sys/devices/system/cpu/cpufreq/mot_hotplug/sampling_rate 46875
write /sys/devices/system/cpu/cpufreq/mot_hotplug/up_threshold 90
write /sys/devices/system/cpu/cpufreq/mot_hotplug/down_threshold 60
write /sys/devices/system/cpu/cpufreq/mot_hotplug/hotplug_in_threshold 90
write /sys/devices/system/cpu/cpufreq/mot_hotplug/hotplug_out_threshold 20
write /sys/devices/system/cpu/cpufreq/mot_hotplug/hotplug_in_sampling_periods 10
write /sys/devices/system/cpu/cpufreq/mot_hotplug/hotplug_out_sampling_periods 5
write /sys/power/sr_vdd1_autocomp 1
write /sys/power/sr_vdd2_autocomp 1
write /sys/power/enable_abb_mode 1
write /sys/devices/w1\ bus\ master/w1_master_search 2
# Change ownership for vibrators
chown system system /sys/class/timed_output/lvibrator/enable
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/timed_output/vibrator/sweep
# Change permission of vibrators
chmod 0660 /sys/class/timed_output/lvibrator/enable
chmod 0660 /sys/class/timed_output/vibrator/enable
chmod 0660 /sys/class/timed_output/vibrator/sweep
# Mount Points for External Storage Devices
mkdir /mnt/usbdisk_1.1 0755 system system
mkdir /mnt/usbdisk_1.2 0755 system system
mkdir /mnt/usbdisk_1.3 0755 system system
mkdir /mnt/usbdisk_1.4 0755 system system
mkdir /mnt/usbdisk_1.5 0755 system system
mkdir /mnt/usbdisk_1.6 0755 system system
mkdir /mnt/usbdisk_1.7 0755 system system
# Mount mtd partitions
# mount /pds as r/w
# We chown/chmod /pds again so because mount is run as root + defaults
mount yaffs2 /dev/block/mmcblk1p7 /pds nosuid nodev no-checkpoint
mount ext3 /dev/block/mmcblk1p7 /pds nosuid nodev noatime nodiratime
chown system system /pds
chmod 0775 /pds
mkdir /pds/public 0775 system shell
chown system shell /pds/public
chmod 0775 /pds/public
mkdir /pds/factory 0740 mot_tcmd shell
chown mot_tcmd shell /pds/factory
chmod 0740 /pds/factory
mkdir /pds/camera 0775 system media
chown system media /pds/camera
chmod 0775 /pds/camera
mkdir /pds/camera/module1 0775 system media
chown system media /pds/camera/module1
chmod 0775 /pds/camera/module1
# Mount preinstall partition
# mkdir /preinstall 0771 system system
# mount ext3 /dev/block/mmcblk1p23 /preinstall nosuid nodev noatime nodiratime
# chmod 0771 /preinstall
# chown system system /preinstall
# Create basic filesystem structure
# create moto specific dirs for mystuff
mkdir /data/download 0775 system system
mkdir /data/download/mystuff 0775 system system
# create moto specific dirs for wifi
mkdir /data/system 0771 system system
# wifi dirs
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
mkdir /pds/wifi 0771 wifi wifi
chmod 0664 /pds/wifi/nvs_map.bin
mkdir /pds/whisper 0770 mot_whisper mot_whisper
chown mot_whisper mot_whisper /pds/whisper
chmod 0770 /pds/whisper
mkdir /pds/whisper/whisper_only 0700 mot_whisper mot_whisper
chown mot_whisper mot_whisper /pds/whisper/whisper_only
chmod 0700 /pds/whisper/whisper_only
chown mot_whisper /pds/whisper/whisper_only/vector0.bin
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown radio radio /sys/class/radio/w3g_lte/command
# create logger folder
mkdir /data/logger 0770 radio log
chown radio log /data/logger
chmod 0770 /data/logger
mkdir /data/panicreports
chown root radio /data/panicreports
chmod 0775 /data/panicreports
# Backup ramconsole on abnormal reboot.
copy /proc/last_kmsg /data/dontpanic/last_kmsg
chown root log /data/dontpanic/last_kmsg
chmod 0644 /data/dontpanic/last_kmsg
# workaround: in targa somebody deletes the logfile.
# we have to back it up.
copy /data/dontpanic/apanic_console /data/logger/last_apanic_console
chmod 0700 /data/logger/apanic_console
# create the lost+found directories, so as to enforce our permissions
mkdir /pds/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /pds/lost+found
chmod 0770 /pds/lost+found
#Create location directory
mkdir /data/location 0771 radio radio
# Create anr directory and change permission to 777 to save trace.txt
mkdir /data/anr
chmod 0777 /data/anr
# create the necessary dirs for tpapi with proper permission
mkdir /pds/security
mkdir /data/tpapi
mkdir /data/tpapi/etc
mkdir /data/tpapi/etc/tpa
mkdir /data/tpapi/etc/tpa/persistent
chmod 2770 /pds/security
chmod 2770 /data/tpapi
chmod 2770 /data/tpapi/etc
chmod 2770 /data/tpapi/etc/tpa
chmod 2770 /data/tpapi/etc/tpa/persistent
chown mot_tpapi mot_tpapi /pds/security
chown mot_tpapi mot_tpapi /pds/security/counter.bin
chown mot_tpapi mot_tpapi /pds/security/system.bin
chown mot_tpapi mot_tpapi /pds/security/storage.bin
chown mot_tpapi mot_tpapi /pds/security/keymaptable.dat
chown mot_tpapi mot_tpapi /data/tpapi
chown mot_tpapi mot_tpapi /data/tpapi/etc
chown mot_tpapi mot_tpapi /data/tpapi/etc/tpa
chown mot_tpapi mot_tpapi /data/tpapi/etc/tpa/persistent
chown mot_tpapi mot_tpapi /data/tpapi/storage.bin
chown mot_tpapi mot_tpapi /data/tpapi/user.bin
# directory for encryption management tool, enc_mgt_tool
mkdir /data/emt
chmod 0700 /data/emt
# Create wmdrm directory
mkdir /pds/wmdrm 0775 mot_drm mot_drm
# Temp workaround for HP library cleanup
symlink /dev/hp3a-omap /dev/hp3A-omap
# Permissions for video
chmod 0770 /dev/hp3a-omap
chmod 0770 /dev/hplens-omap
chmod 0770 /dev/video0
chmod 0770 /dev/video1
chmod 0770 /dev/video2
chown media camera /dev/hp3a-omap
chown media camera /dev/hplens-omap
chown media camera /dev/video0
chown media graphics /dev/video1
chown media graphics /dev/video2
mount rootfs rootfs / ro remount
# Install kernel modules
insmod /system/lib/modules/sec.ko
# Install product specific kernel modules
exec /system/bin/load_modules.sh
# chown/chmod for FOTA
chown system system /cache/fota
chmod 0770 /cache/fota
# MTU for USB tethering
write /sys/class/net/gether0/mtu 1428
on early-boot
# Define the BLAN interface
setprop ro.blan.interface usb0
# mount eCryptFS if required
start smc
exec /system/bin/enc_mgt_tool
class_start media_early_init
on boot
# Define Motorola DBVC ATVC Property defaults (failsafe properties)
setprop ro.sys.atvc_allow_netmon_usb 0
setprop ro.sys.atvc_allow_netmon_ih 0
setprop ro.sys.atvc_allow_res_core 0
setprop ro.sys.atvc_allow_res_panic 0
setprop ro.sys.atvc_allow_all_adb 1
setprop ro.sys.atvc_allow_all_core 0
setprop ro.sys.atvc_allow_efem 0
setprop ro.sys.atvc_allow_bp_log 0
setprop ro.sys.atvc_allow_ap_mot_log 0
# Change the ownership of led files.
chown system system /sys/class/leds/lcd-backlight/als
chown system system /sys/class/leds/lcd-backlight/pwm_mode
chown system system /sys/class/leds/lcd-backlight/brightness
chmod 0660 /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/keyboard-backlight/brightness
chmod 0660 /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/alt-key-light/brightness
chmod 0660 /sys/class/leds/alt-key-light/brightness
chown system system /sys/class/leds/extra-key-backlight/brightness
chmod 0660 /sys/class/leds/extra-key-backlight/brightness
chown system system /sys/class/leds/shift-key-light/brightness
chmod 0660 /sys/class/leds/shift-key-light/brightness
chown system system /sys/class/leds/kpd_backlight_en/brightness
chmod 0660 /sys/class/leds/kpd_backlight_en/brightness
chown system system /sys/class/leds/keyboard1-backlight/brightness
chmod 0660 /sys/class/leds/keyboard1-backlight/brightness
chown system system /sys/class/leds/keyboard2-backlight/brightness
chmod 0660 /sys/class/leds/keyboard2-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chmod 0660 /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/red/blink
chmod 0660 /sys/class/leds/red/blink
chown system system /sys/class/leds/red/brightness
chmod 0660 /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chmod 0660 /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chmod 0660 /sys/class/leds/blue/brightness
chmod 0660 /sys/class/leds/torch-flash/camera_strobe
chmod 0660 /sys/class/leds/torch-flash/flash_light
chown system system /sys/class/leds/torch-flash/camera_strobe
chown system system /sys/class/leds/torch-flash/flash_light
chown system system /sys/class/leds/spotlight/brightness
chmod 0660 /sys/class/backlight/adp8870_bl/brightness
chown system system /sys/class/backlight/adp8870_bl/brightness
chmod 0660 /sys/class/leds/adp8870-led7/brightness
chown system system /sys/class/leds/adp8870-led7/brightness
chmod 0660 /sys/class/backlight/lm3532_bl/brightness
chown system system /sys/class/backlight/lm3532_bl/brightness
chmod 0660 /sys/class/backlight/430_540_960_amoled_bl/brightness
chown system system /sys/class/backlight/430_540_960_amoled_bl/brightness
# Change the ownership of touch screen file
chown root mot_tcmd /sys/bus/i2c/drivers/qtouch-obp-ts/2-004a/irq_enable
# changes for enabling ducati...
chmod 0660 /dev/syslink-proc4430
chown media media /dev/syslink-proc4430
chmod 0660 /dev/syslink-procmgr
chown media media /dev/syslink-procmgr
chmod 0660 /dev/notifyducatidr
chown media media /dev/notifyducatidr
chmod 0660 /dev/ipcnotify
chown media media /dev/ipcnotify
chmod 0660 /dev/syslink_ipc
chown media media /dev/syslink_ipc
chmod 0660 /dev/syslink_platform
chown media media /dev/syslink_platform
chmod 0440 /dev/omap-rproc0
chown media media /dev/omap-rproc0
chmod 0440 /dev/omap-rproc1
chown media media /dev/omap-rproc1
chmod 0440 /dev/omap-rproc2
chown media media /dev/omap-rproc2
chmod 0440 /dev/iovmm-omap0
chown media media /dev/iovmm-omap0
chmod 0440 /dev/iovmm-omap1
chown media media /dev/iovmm-omap1
chmod 0440 /dev/omap-devh0
chown media media /dev/omap-devh0
chmod 0440 /dev/omap-devh1
chown media media /dev/omap-devh1
chmod 0440 /dev/omap-devh2
chown media media /dev/omap-devh2
chmod 0660 /sys/devices/platform/omapdss/overlay0/zorder
chown system system /sys/devices/platform/omapdss/overlay0/zorder
# change permissions for Overlay
chmod 0660 /dev/video1
chmod 0660 /dev/video2
chmod 0660 /dev/video3
chown system system /dev/video1
chown system system /dev/video2
chown system system /dev/video3
chmod 0660 /sys/bus/usb/devices/usb1/power/control
chmod 0660 /sys/bus/usb/devices/usb2/power/control
chown system radio /sys/bus/usb/devices/usb1/power/control
chown system radio /sys/bus/usb/devices/usb2/power/control
# change permission/ownership for command sys file of mdm6600 ctrl driver
chown system radio /sys/class/radio/mdm6600/command
# change permissions for display CABC mode
chmod 0660 /sys/devices/omapdss/display0/cabc_mode
chown system system /sys/devices/omapdss/display0/cabc_mode
# change permissions for overlay managers and display devices
chmod 0660 /sys/devices/platform/omapdss/display0/enabled
chmod 0660 /sys/devices/platform/omapdss/display1/enabled
chmod 0660 /sys/devices/platform/omapdss/display2/enabled
chmod 0660 /sys/devices/platform/omapdss/display3/enabled
chmod 0660 /sys/devices/platform/omapdss/display0/name
chmod 0660 /sys/devices/platform/omapdss/display1/name
chmod 0660 /sys/devices/platform/omapdss/display2/name
chmod 0660 /sys/devices/platform/omapdss/display3/name
chmod 0660 /sys/devices/platform/omapdss/overlay0/manager
chmod 0660 /sys/devices/platform/omapdss/overlay1/manager
chmod 0660 /sys/devices/platform/omapdss/overlay2/manager
chmod 0660 /sys/devices/platform/omapdss/overlay3/manager
chmod 0660 /sys/devices/platform/omapdss/overlay0/zorder
chmod 0660 /sys/devices/platform/omapdss/overlay1/zorder
chmod 0660 /sys/devices/platform/omapdss/overlay2/zorder
chmod 0660 /sys/devices/platform/omapdss/overlay3/zorder
chown system system /sys/devices/platform/omapdss/display0/enabled
chown system system /sys/devices/platform/omapdss/display1/enabled
chown system system /sys/devices/platform/omapdss/display2/enabled
chown system system /sys/devices/platform/omapdss/display3/enabled
chown system system /sys/devices/platform/omapdss/display0/name
chown system system /sys/devices/platform/omapdss/display1/name
chown system system /sys/devices/platform/omapdss/display2/name
chown system system /sys/devices/platform/omapdss/display3/name
chown system system /sys/devices/platform/omapdss/overlay0/manager
chown system system /sys/devices/platform/omapdss/overlay1/manager
chown system system /sys/devices/platform/omapdss/overlay2/manager
chown system system /sys/devices/platform/omapdss/overlay3/manager
chown system system /sys/devices/platform/omapdss/overlay0/zorder
chown system system /sys/devices/platform/omapdss/overlay1/zorder
chown system system /sys/devices/platform/omapdss/overlay2/zorder
chown system system /sys/devices/platform/omapdss/overlay3/zorder
# change permissions for manager tranparency parameters
chmod 0660 /sys/devices/platform/omapdss/manager0/name
chmod 0660 /sys/devices/platform/omapdss/manager0/display
chmod 0660 /sys/devices/platform/omapdss/manager0/trans_key_value
chmod 0660 /sys/devices/platform/omapdss/manager0/trans_key_type
chmod 0660 /sys/devices/platform/omapdss/manager0/trans_key_enabled
chmod 0660 /sys/devices/platform/omapdss/manager1/name
chmod 0660 /sys/devices/platform/omapdss/manager1/display
chmod 0660 /sys/devices/platform/omapdss/manager1/trans_key_value
chmod 0660 /sys/devices/platform/omapdss/manager1/trans_key_type
chmod 0660 /sys/devices/platform/omapdss/manager1/trans_key_enabled
chmod 0660 /sys/devices/platform/omapdss/manager2/name
chmod 0660 /sys/devices/platform/omapdss/manager2/display
chmod 0660 /sys/devices/platform/omapdss/manager2/trans_key_value
chmod 0660 /sys/devices/platform/omapdss/manager2/trans_key_type
chmod 0660 /sys/devices/platform/omapdss/manager2/trans_key_enabled
chmod 0660 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0660 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0660 /sys/devices/platform/omapdss/overlay2/enabled
chmod 0660 /sys/devices/platform/omapdss/overlay3/enabled
chown system system /sys/devices/platform/omapdss/manager0/name
chown system system /sys/devices/platform/omapdss/manager0/display
chown system system /sys/devices/platform/omapdss/manager0/trans_key_value
chown system system /sys/devices/platform/omapdss/manager0/trans_key_type
chown system system /sys/devices/platform/omapdss/manager0/trans_key_enabled
chown system system /sys/devices/platform/omapdss/manager1/name
chown system system /sys/devices/platform/omapdss/manager1/display
chown system system /sys/devices/platform/omapdss/manager1/trans_key_value
chown system system /sys/devices/platform/omapdss/manager1/trans_key_type
chown system system /sys/devices/platform/omapdss/manager1/trans_key_enabled
chown system system /sys/devices/platform/omapdss/manager2/name
chown system system /sys/devices/platform/omapdss/manager2/display
chown system system /sys/devices/platform/omapdss/manager2/trans_key_value
chown system system /sys/devices/platform/omapdss/manager2/trans_key_type
chown system system /sys/devices/platform/omapdss/manager2/trans_key_enabled
chown system system /sys/devices/platform/omapdss/overlay0/enabled
chown system system /sys/devices/platform/omapdss/overlay1/enabled
chown system system /sys/devices/platform/omapdss/overlay2/enabled
chown system system /sys/devices/platform/omapdss/overlay3/enabled
# change permissions for display timings to get the resolutions
chmod 0660 /sys/devices/platform/omapdss/display0/timings
chmod 0660 /sys/devices/platform/omapdss/display1/timings
chmod 0660 /sys/devices/platform/omapdss/display2/timings
chmod 0660 /sys/devices/platform/omapdss/display3/timings
chown system system /sys/devices/platform/omapdss/display0/timings
chown system system /sys/devices/platform/omapdss/display1/timings
chown system system /sys/devices/platform/omapdss/display2/timings
chown system system /sys/devices/platform/omapdss/display3/timings
# change permissions for Tiler driver
chmod 0660 /dev/tiler
chmod 0660 /dev/dmm
chown media media /dev/tiler
chown media media /dev/dmm
# Change permission of tiler's free_page_max to allow mot_osh access
chmod 0660 /sys/module/tiler_omap/parameters/free_page_max
chown mot_osh mot_osh /sys/module/tiler_omap/parameters/free_page_max
# change permissions for media cache mgmt parameters
chmod 0660 /sys/module/media_cache_mgmt/parameters/media_cache_mgmt
chown media media /sys/module/media_cache_mgmt/parameters/media_cache_mgmt
# change permissions for omap_cpuboost parameters
chmod 0660 /sys/module/omap_cpuboost/parameters/cpuboost_time
chown media media /sys/module/omap_cpuboost/parameters/cpuboost_time
# change permissions for Overlay
chmod 0660 /dev/video1
chmod 0660 /dev/video2
chmod 0660 /dev/video3
chown system system /dev/video1
chown system system /dev/video2
chown system system /dev/video3
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 65536,131072,262144,4096,16384,131072
setprop net.tcp.buffersize.wifi 65536,131072,262144,4096,16384,131072
setprop net.tcp.buffersize.umts 65536,131072,262144,4096,16384,131072
setprop net.tcp.buffersize.edge 16384,32768,65536,4096,16384,32768
setprop net.tcp.buffersize.gprs 4096,8192,12288,4096,8192,12288
# Define optimized TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 131072,262144,524288,4096,16384,131072
setprop net.tcp.buffersize.wifi 131072,262144,524288,4096,16384,131072
setprop net.tcp.buffersize.umts 131072,262144,524288,4096,16384,131072
setprop net.tcp.buffersize.edge 16384,32768,65536,4096,16384,32768
setprop net.tcp.buffersize.gprs 4096,8192,12288,4096,8192,12288
setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
# Camera related
chmod 0660 /dev/hplens-omap
chown media camera /dev/hplens-omap
# Enable panic on softlockup
write /proc/sys/kernel/softlockup_panic 1
# Load traffic shaping modules
insmod /system/lib/modules/ifb.ko
insmod /system/lib/modules/act_mirred.ko
insmod /system/lib/modules/sch_ingress.ko
insmod /system/lib/modules/act_police.ko
insmod /system/lib/modules/cls_u32.ko
insmod /system/lib/modules/sch_htb.ko
insmod /system/lib/modules/em_u32.ko
# Load Authentec VPN kernel module
insmod /system/lib/modules/vpnclient.ko
# Enable hardware watchdog
write /sys/devices/platform/omap_wdt/enabled on
# Start services
exec /system/bin/mot_boot_mode
# Set core max size (2G)
setrlimit 4 2147483648 2147483648
# The properties introduced by moto
# Adjust the out of memory thresholds to account for the larget
# space on sholes. These numbers are in pages (4k). Must be kept
# in sync with init.rc. This must be done before the regular init.rc
# since these properies can't change once set.
on property:ro.kernel.memsize=512M
setprop ro.FOREGROUND_APP_MEM 2464
setprop ro.VISIBLE_APP_MEM 3712
setprop ro.PERCEPTIBLE_APP_MEM 5632
setprop ro.HEAVY_WEIGHT_APP_MEM 5632
setprop ro.SECONDARY_SERVER_MEM 7392
setprop ro.BACKUP_APP_MEM 7392
setprop ro.HOME_APP_MEM 7392
setprop ro.HIDDEN_APP_MEM 10752
setprop ro.EMPTY_APP_MEM 14336
# Overwrite what init.rc selected for the memory killer params to match above.
write /sys/module/lowmemorykiller/parameters/minfree 2464,3712,5632,7392,10752,14336
on property:ro.kernel.memsize=1024M
setprop ro.FOREGROUND_APP_MEM 3072
setprop ro.VISIBLE_APP_MEM 4608
setprop ro.PERCEPTIBLE_APP_MEM 7200
setprop ro.HEAVY_WEIGHT_APP_MEM 7200
setprop ro.SECONDARY_SERVER_MEM 11776
setprop ro.BACKUP_APP_MEM 11776
setprop ro.HOME_APP_MEM 11776
setprop ro.HIDDEN_APP_MEM 17408
setprop ro.EMPTY_APP_MEM 21000
# Overwrite what init.rc selected for the memory killer params to match above.
write /sys/module/lowmemorykiller/parameters/minfree 3072,4608,7200,11776,17408,21000
on property:sys.chargeonly.mode=1
start battd
start console
write /data/chargeonlymode charging
exec /system/bin/charge_only_mode
# Power up to normal
on property:tcmd.suspend=0
class_start pre-zygote_services
class_start zygote_services
class_start post-zygote_services
# Power up to suspend
on property:tcmd.suspend=1
class_start pre-zygote_services
class_start post-zygote_services
# Normal to suspend
on property:tcmd.suspend=2
class_stop zygote_services
#start console for userdebug and eng builds
on property:ro.debuggable=1
start console
# Moto safe power down
on property:sys.reboot=1
exec /system/bin/sleep 10
exec /system/bin/reboot
on property:sys.shutdown=1
exec /system/bin/sleep 10
exec /system/bin/reboot -p
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd_tiwlan0
on property:ro.hdcp.support=1
insmod /system/lib/modules/omap-hdcp.ko
exec /system/bin/hdcp-mknod
chown system media /dev/omap-hdcp
chmod 0660 /dev/omap-hdcp
on property:ro.hdcp.support=2
insmod /system/lib/modules/omap-hdcp.ko
exec /system/bin/hdcp-mknod
chown system media /dev/omap-hdcp
chmod 0660 /dev/omap-hdcp
# The following services are added by moto
# Set property strings for ATVC logging
# This conditionally sets :
# ro.sys.atvc_allow_bp_log
# ro.sys.atvc_allow_gki_log
# ro.sys.atvc_allow_ap_mot_log
# ro.sys.atvc_allow_all_core
# ro.sys.atvc_allow_res_core
# ro.sys.atvc_allow_res_panic
# ro.sys.atvc_allow_efem
# ro.sys.atvc_allow_netmon_usb
# ro.sys.atvc_allow_netmon_ih
# ro.sys.atvc_allow_all_adb
service atvc /system/bin/dbvc_atvc_property_set
class pre-zygote_services
user system
group system
oneshot
#service watchdogd /system/bin/watchdogd
service telnet /system/bin/telnetd
class pre-zygote_services
oneshot
service usbd /system/bin/usbd
class pre-zygote_services
service battd /system/bin/battd
class pre-zygote_services
socket battdsock stream 0660 mot_accy mot_accy
user root
group mot_accy mot_pwric
oneshot
service catcommands /system/bin/catcommands
class pre-zygote_services
group radio
service whisperd /system/bin/whisperd /dev/ttyO1
class post-zygote_services
user mot_whisper
group mot_whisper mot_pwric
oneshot
service msp430 /system/bin/msp430 boot
class pre-zygote_services
user compass
group compass misc input
oneshot
service uim /system/bin/uim-sysfs
class pre-zygote_services
user root
group media bluetooth
oneshot
service hostapd /system/bin/logwrapper /system/bin/Hostapd /data/misc/wifi/hostapd.conf
socket hostapd_tiap0 dgram 660 wifi wifi
disabled
oneshot
service hciattach /system/bin/hciattach -l
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
service nap /system/bin/sdptool add NAP
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service del_nap /system/bin/sdptool remove NAP
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service panu /system/bin/sdptool add PANU
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service del_panu /system/bin/sdptool remove PANU
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service napics /system/bin/sh /system/bin/napics.sh
class post-zygote_services
user root
disabled
oneshot
service btdhcpd /system/bin/dnsmasq -C /system/etc/btpan.conf
user root
disabled
oneshot
service map /system/bin/sdptool add --channel=20 --network=2 MAP
class post-zygote_services
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service tcmd /system/bin/tcmd
class post-zygote_services
group mot_tcmd radio mot_pwric input system log camera graphics mot_accy sdcard_rw audio inet bluetooth wifi compass net_bt_admin mot_tombstone mot_tpapi mount net_raw net_admin mot_whisper media
socket local_tcmd stream 0660 mot_tcmd mot_tcmd
socket batch_socket stream 0600 mot_tcmd mot_tcmd
oneshot
service tcmdhelp /system/bin/tcmdhelp
class post-zygote_services
socket tcmdhelp stream 0600 mot_tcmd mot_tcmd
oneshot
disabled
# turn on wifi for tcmd step one
on property:tcmd.load_wlan=1
insmod /system/lib/modules/tiwlan_drv.ko
# turn on wifi for tcmd step two
on property:tcmd.load_wlan=2
start wlan_loader
# turn on wifi for tcmd step three
on property:tcmd.load_wlan=3
exec /system/bin/ifconfig tiwlan0 up
# turn on rfmd wifi for tcmd step four
on property:tcmd.load_wlan=4
start wlan_loader_rfmd
# turn off wifi for tcmd step one
on property:tcmd.unload_wlan=1
exec /system/bin/ifconfig tiwlan0 down
# turn off wifi for tcmd step two
on property:tcmd.unload_wlan=2
exec /system/bin/rmmod tiwlan_drv
setprop wlan.driver.status unloaded
# turn on bluetooth for tcmd
on property:tcmd.bt_mod=1
insmod /system/lib/modules/wl127x_test.ko
#turn off bluetooth for tcmd
on property:tcmd.bt_mod=0
exec /system/bin/rmmod wl127x_test
#execute tcmdhelp
on property:tcmd.start_tcmdhelp=1
start tcmdhelp
# Ecompass daemon
service akmd2 /system/bin/akmd2
class post-zygote_services
user compass
group compass misc input
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/fw_wlan1281.bin -i /system/etc/wifi/tiwlan.ini \
-e /pds/wifi/nvs_map.bin
class post-zygote_services
disabled
oneshot
service ap_fmloader /system/bin/logwrapper /system/bin/tiap_loader \
-f /system/etc/wifi/fw_wlan1281_AP.bin -i /system/etc/wifi/tiwlan_ap.ini \
-e /pds/wifi/nvs_map.bin
class post-zygote_services
disabled
oneshot
service wlan_loader_rfmd /system/bin/wlan_loader \
-f /system/etc/wifi/fw_wlan1271_rfmd.bin -i /system/etc/wifi/tiwlan_rfmd.ini -e /pds/wifi/nvs_map.bin
class post-zygote_services
disabled
oneshot
service ap_fmloader_rfmd /system/bin/logwrapper /system/bin/wlan_loader \
-f /system/etc/wifi/fw_tiwlan_ap_rfmd.bin -i /system/etc/wifi/tiwlan_ap_rfmd.ini \
-e /pds/wifi/nvs_map.bin
class post-zygote_services
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf
class post-zygote_services
# 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
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_tiwlan0 /system/bin/dhcpcd
class post-zygote_services
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd
disabled
oneshot
service dhcpcd_usbeth0 /system/bin/dhcpcd
class post-zygote_services
disabled
oneshot
service baseimage /system/bin/dspexec -v -T /system/lib/dsp/baseimage.dof
class media_early_init
user media
group media graphics
oneshot
service pvrsrv /system/bin/pvrsrvinit
class post-zygote_services
user root
oneshot
service bugtogo /system/bin/bugtogo.sh
class post-zygote_services
disabled
user root
oneshot
keycodes 114 115 # default to VOLUME_DOWN + VOLUME_UP
service pppd-ril /system/bin/pppd-ril /dev/ttyUSB0 call pppd-ril.options plugin /system/lib/libpppd_plugin-ril.so
class post-zygote_services
user root
disabled
oneshot
service smc /system/bin/startup_smc.sh
class pre-zygote_services
user mot_tpapi
group mot_tpapi
disabled
oneshot
service pm_init /system/bin/sh /system/usr/bin/pm_init.sh
class post-zygote_services
oneshot
service modemlog /system/bin/modemlog
oneshot
service fmradio /system/bin/fmradioserver
class post-zygote_services
user system
group bluetooth net_bt_admin net_raw net_admin misc
disabled
service ftmipcd /system/bin/ftmipcd
class post-zygote_services
user radio
group radio inet
oneshot
service qbplogd /system/bin/qbplogd
class post-zygote_services
user radio
group sdcard_rw radio inet
oneshot
disabled
service dlnasrv /system/bin/dlnasrv
class post-zygote_services
user mot_dlna
group system net_admin sdcard_rw new_raw inet mount misc
oneshot
disabled
service dund_dialup /system/bin/dund --listen --channel=6 --nodetach --dialup
class post-zygote_services
group net_bt net_bt_admin
disabled
oneshot
on property:dev.bootcomplete=1
start savebpver
start loadpreinstalls
service mdm_panicd /system/bin/mdm_panicd
class post-zygote_services
oneshot
#get BP version and save to misc
service savebpver /system/bin/SaveBPVer
class post-zygote_services
oneshot
service secclkd /system/bin/secclkd
class post-zygote_services
socket secclk_socket stream 660 mot_secclkd mot_secclkd
user mot_tpapi
group mot_tpapi mot_sec_rtc mot_secclkd
oneshot
on property:tcmd.ctrl_adb=1
setprop persist.service.adb.enable 1
setprop persist.factory.allow_adb 1
stop usbd
start usbd
on property:tcmd.ctrl_adb=0
setprop persist.service.adb.enable 0
setprop persist.factory.allow_adb 0
stop usbd
start usbd
#start Authentec VPN service
service vpnclientpm /system/bin/vpnclientpm
oneshot
user root
#service loadpreinstalls /system/bin/logwrapper /system/bin/loadpreinstalls.sh
# user system
# group system
# disabled
# oneshot
# start syslink daemon
service syslinkdaemon /system/bin/syslink_daemon.out -f /system/lib/ducati/Notify_MPUSYS_reroute_Test_Core0.xem3 /system/lib/ducati/base_image_app_m3.xem3
class pre-zygote_services
user media
group video
#IKCBS-229 start RescueStarter for MobileRescue
service RescueStarter /system/bin/RescueStarter
user nobody
group input graphics
class post-zygote_services
service gadget-lte-modem /system/bin/tty2ttyd /dev/ttyACM0 /dev/ttyGS1 0 512
user radio
group radio
disabled
service wrigley-diag /system/bin/wrigley-diag.sh
oneshot
disabled
service logcatd-blan /system/bin/logcatd-blan
user root
# Immediately drops root, keeps CAP_SYS_ADMIN, and runs as below
# user system
# group system log inet
disabled
service gadget-qbp-modem /system/bin/tty2ttyd /dev/ttyUSB4 /dev/ttyGS2 0 1024
user radio
group radio
disabled
service gadget-qbp-diag /system/bin/tty2ttyd /dev/ttyUSB0 /dev/ttyGS3 0 1024
user radio
group radio
disabled
on property:ro.bootmode=bp-tools
start tcmd
start gadget-qbp-diag
start wrigley-diag
start logcatd-blan
#Check available storage space to execute device encryption or decryprion
on property:sys.mot.encrypt.test=1
exec /system/bin/encryption_test
exec /system/bin/setprop sys.mot.encrypt.test ""
service mdm_usb_suspend /system/bin/enable_mdm_usb_suspend.sh
class pre-zygote_services
group radio
oneshot
Jump to Line
Something went wrong with that request. Please try again.