rootdir: Add ramdisk files
This commit is contained in:
@@ -38,6 +38,25 @@ PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
|
||||
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml
|
||||
|
||||
# Ramdisk
|
||||
PRODUCT_PACKAGES += \
|
||||
factory_init.project.rc \
|
||||
factory_init.rc \
|
||||
fstab.mt8127 \
|
||||
init.base.rc \
|
||||
init.build.rc \
|
||||
init.charging.rc \
|
||||
init.mt8127.rc \
|
||||
init.mt8127.usb.rc \
|
||||
init.project.rc \
|
||||
init.rc.ufsd \
|
||||
init.recovery.mt8127.rc \
|
||||
init.ssd.rc \
|
||||
meta_init.project.rc \
|
||||
meta_init.rc \
|
||||
ueventd.mt8127.rc \
|
||||
enableswap.sh
|
||||
|
||||
# Config files
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(DEVICE_FOLDER)/configs/media_codecs.xml:system/etc/media_codecs.xml \
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# Configuration scripts
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := enableswap.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/enableswap.sh
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := factory_init.project.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/factory_init.project.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := factory_init.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/factory_init.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
# Init scripts
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := fstab.mt8127
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/fstab.mt8127
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.base.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.base.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mt8127.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mt8127.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mt8127.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.mt8127.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.project.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.project.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.rc.ufsd
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.rc.ufsd
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.recovery.mt8127.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.recovery.mt8127.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.ssd.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.ssd.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := meta_init.project.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/meta_init.project.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := meta_init.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/meta_init.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.mt8127.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.mt8127.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
echo 0 > /sys/block/zram0/disksize
|
||||
/system/bin/tiny_mkswap /dev/block/zram0
|
||||
/system/bin/tiny_swapon /dev/block/zram0
|
||||
@@ -0,0 +1,71 @@
|
||||
mkdir /data/misc/sensors 0664 system system
|
||||
|
||||
on post-fs-data
|
||||
|
||||
on post-fs
|
||||
#
|
||||
# Connectivity related modules and character device nodes (Begin)
|
||||
#
|
||||
#for 662x_launcher
|
||||
chmod 0660 /dev/ttyMT2
|
||||
chown system system /dev/ttyMT2
|
||||
|
||||
# STP, SDIO, WMT, GPS, FM and BT Driver
|
||||
# insmod /system/lib/modules/mtk_hif_sdio.ko
|
||||
# insmod /system/lib/modules/mtk_stp_wmt.ko
|
||||
# insmod /system/lib/modules/mtk_stp_uart.ko
|
||||
# insmod /system/lib/modules/mtk_stp_gps.ko
|
||||
# insmod /system/lib/modules/mtk_stp_bt.ko
|
||||
# insmod /system/lib/modules/mtk_fm_drv.ko
|
||||
# insmod /system/lib/modules/mtk_fm_priv.ko
|
||||
# insmod /system/lib/modules/mtk_wmt_wifi.ko
|
||||
|
||||
insmod /system/lib/modules/mtk_wmt_detect.ko
|
||||
|
||||
# Create char device file for WMT, GPS, BT, FM, WIFI
|
||||
mknod /dev/stpwmt c 190 0;
|
||||
mknod /dev/stpgps c 191 0;
|
||||
mknod /dev/stpbt c 192 0;
|
||||
mknod /dev/fm c 193 0;
|
||||
chmod 0660 /dev/stpwmt
|
||||
chown system system /dev/stpwmt
|
||||
chmod 0660 /dev/wmtdetect
|
||||
chown system system /dev/wmtdetect
|
||||
|
||||
# FM Radio device, FIXME: this is not a proper way to set permissions
|
||||
chmod 0666 /dev/fm
|
||||
|
||||
mknod /dev/wmtWifi c 153 0
|
||||
chmod 0666 /dev/wmtWifi
|
||||
chmod 0660 /dev/stpgps
|
||||
chmod 0660 /dev/stpbt
|
||||
chown bluetooth radio /dev/stpbt
|
||||
|
||||
# Load WiFi Driver
|
||||
#insmod /system/lib/modules/wlan.ko
|
||||
|
||||
#
|
||||
# Connectivity related modules and character device nodes (Ends)
|
||||
#
|
||||
|
||||
on boot
|
||||
|
||||
|
||||
#
|
||||
# Connectivity related services (Begin)
|
||||
#
|
||||
|
||||
service wmtLoader /system/bin/wmt_loader
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
|
||||
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
|
||||
user system
|
||||
group system
|
||||
|
||||
|
||||
#
|
||||
# Connectivity related services (End)
|
||||
#
|
||||
|
||||
@@ -0,0 +1,698 @@
|
||||
#connectivity related init script
|
||||
import factory_init.project.rc
|
||||
import /init.environ.rc
|
||||
import init.ssd.rc
|
||||
import init.no_ssd.rc
|
||||
import init.ssd_nomuser.rc
|
||||
import init.fon.rc
|
||||
|
||||
on early-init
|
||||
# Set init and its forked children's oom_adj.
|
||||
write /proc/1/oom_score_adj -1000
|
||||
|
||||
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
|
||||
write /sys/fs/selinux/checkreqprot 0
|
||||
|
||||
# Set the security context for the init process.
|
||||
# This should occur before anything else (e.g. ueventd) is started.
|
||||
setcon u:r:init:s0
|
||||
|
||||
# Set the security context of /adb_keys if present.
|
||||
restorecon /adb_keys
|
||||
|
||||
start ueventd
|
||||
|
||||
write /proc/bootprof "INIT: usr/eng build setting"
|
||||
# create mountpoints
|
||||
mkdir /mnt 0775 root system
|
||||
|
||||
on init
|
||||
|
||||
sysclktz 0
|
||||
|
||||
loglevel 5
|
||||
|
||||
# Backward compatibility
|
||||
symlink /system/etc /etc
|
||||
symlink /sys/kernel/debug /d
|
||||
|
||||
# Right now vendor lives on the same filesystem as system,
|
||||
# but someday that may change.
|
||||
symlink /system/vendor /vendor
|
||||
|
||||
# Create cgroup mount point for cpu accounting
|
||||
mkdir /acct
|
||||
mount cgroup none /acct cpuacct
|
||||
mkdir /acct/uid
|
||||
|
||||
# Backwards Compat - XXX: Going away in G*
|
||||
symlink /mnt/sdcard /sdcard
|
||||
|
||||
mkdir /system
|
||||
mkdir /data 0771 system system
|
||||
mkdir /cache 0770 system cache
|
||||
mkdir /config 0500 root root
|
||||
|
||||
# See storage config details at http://source.android.com/tech/storage/
|
||||
mkdir /mnt/shell 0700 shell shell
|
||||
mkdir /mnt/media_rw 0700 media_rw media_rw
|
||||
mkdir /storage 0751 root sdcard_r
|
||||
|
||||
# Directory for putting things only root should see.
|
||||
mkdir /mnt/secure 0700 root root
|
||||
# Create private mountpoint so we can MS_MOVE from staging
|
||||
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
|
||||
|
||||
# Directory for staging bindmounts
|
||||
mkdir /mnt/secure/staging 0700 root root
|
||||
|
||||
# Directory-target for where the secure container
|
||||
# imagefile directory will be bind-mounted
|
||||
mkdir /mnt/secure/asec 0700 root root
|
||||
|
||||
# Secure container public mount points.
|
||||
mkdir /mnt/asec 0700 root system
|
||||
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
|
||||
|
||||
# Filesystem image public mount points.
|
||||
mkdir /mnt/obb 0700 root system
|
||||
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
|
||||
|
||||
write /proc/sys/kernel/panic_on_oops 1
|
||||
write /proc/sys/kernel/hung_task_timeout_secs 0
|
||||
write /proc/cpu/alignment 4
|
||||
write /proc/sys/kernel/sched_latency_ns 10000000
|
||||
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
|
||||
write /proc/sys/kernel/sched_compat_yield 1
|
||||
write /proc/sys/kernel/sched_child_runs_first 0
|
||||
write /proc/sys/kernel/randomize_va_space 2
|
||||
write /proc/sys/kernel/kptr_restrict 2
|
||||
write /proc/sys/kernel/dmesg_restrict 1
|
||||
write /proc/sys/vm/mmap_min_addr 32768
|
||||
write /proc/sys/kernel/sched_rt_runtime_us 950000
|
||||
write /proc/sys/kernel/sched_rt_period_us 1000000
|
||||
|
||||
# change key_provisioning
|
||||
mkdir /data/key_provisioning
|
||||
chmod 0777 /data/key_provisioning
|
||||
|
||||
mkdir /dev/cpuctl
|
||||
mount cgroup none /dev/cpuctl cpu
|
||||
chown system system /dev/cpuctl
|
||||
chown system system /dev/cpuctl/tasks
|
||||
chmod 0660 /dev/cpuctl/tasks
|
||||
write /dev/cpuctl/cpu.shares 1024
|
||||
write /dev/cpuctl/cpu.rt_runtime_us 950000
|
||||
write /dev/cpuctl/cpu.rt_period_us 1000000
|
||||
|
||||
mkdir /dev/cpuctl/apps
|
||||
chown system system /dev/cpuctl/apps/tasks
|
||||
chmod 0666 /dev/cpuctl/apps/tasks
|
||||
write /dev/cpuctl/apps/cpu.shares 1024
|
||||
write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
|
||||
write /dev/cpuctl/apps/cpu.rt_period_us 1000000
|
||||
|
||||
#USB function for factory mode
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 0e8d
|
||||
# write /sys/class/android_usb/android0/idProduct 2006
|
||||
# write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
# write /sys/class/android_usb/android0/functions mass_storage,adb,acm
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state mass_storage,adb,acm
|
||||
|
||||
mkdir /dev/cpuctl/apps/bg_non_interactive
|
||||
chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
|
||||
chmod 0666 /dev/cpuctl/apps/bg_non_interactive/tasks
|
||||
# 5.0 %
|
||||
write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
|
||||
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
|
||||
write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
|
||||
|
||||
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
|
||||
# This is needed by any process that uses socket tagging.
|
||||
chmod 0644 /dev/xt_qtaguid
|
||||
|
||||
# Healthd can trigger a full boot from charger mode by signaling this
|
||||
# property when the power button is held.
|
||||
on property:sys.boot_from_charger_mode=1
|
||||
class_stop charger
|
||||
trigger late-init
|
||||
|
||||
# Load properties from /system/ + /factory after fs mount.
|
||||
on load_all_props_action
|
||||
load_all_props
|
||||
|
||||
# Mount filesystems and start core system services.
|
||||
on late-init
|
||||
trigger early-fs
|
||||
trigger fs
|
||||
trigger post-fs
|
||||
trigger post-fs-data
|
||||
|
||||
# Load properties from /system/ + /factory after fs mount. Place
|
||||
# this in another action so that the load will be scheduled after the prior
|
||||
# issued fs triggers have completed.
|
||||
trigger load_all_props_action
|
||||
|
||||
trigger early-boot
|
||||
trigger boot
|
||||
|
||||
on fs
|
||||
write /proc/bootprof "INIT:Mount_START"
|
||||
mount_all /fstab.mt8127
|
||||
|
||||
#change partition permissions
|
||||
exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/boot
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/boot
|
||||
exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/recovery
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/recovery
|
||||
exec /system/bin/chmod 0640 /dev/block/platform/mtk-msdc.0/by-name/secro
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/secro
|
||||
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/seccfg
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/seccfg
|
||||
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/proinfo
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/proinfo
|
||||
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/otp
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/otp
|
||||
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/nvram
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/nvram
|
||||
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/para
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/para
|
||||
exec /system/bin/chmod 0660 /dev/block/platform/mtk-msdc.0/by-name/logo
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/logo
|
||||
exec /system/bin/chown root:system /dev/block/platform/mtk-msdc.0/by-name/para
|
||||
write /proc/bootprof "INIT:Mount_END"
|
||||
|
||||
on post-fs
|
||||
# once everything is setup, no need to modify /
|
||||
mount rootfs rootfs / ro remount
|
||||
# mount shared so changes propagate into child namespaces
|
||||
mount rootfs rootfs / shared rec
|
||||
mount tmpfs tmpfs /mnt/secure private rec
|
||||
|
||||
# We chown/chmod /data again so because mount is run as root + defaults
|
||||
chown system system /system/data
|
||||
chmod 0777 /system/data
|
||||
|
||||
# Same reason as /data above
|
||||
chown system cache /cache
|
||||
chmod 0770 /cache
|
||||
# We restorecon /cache in case the cache partition has been reset.
|
||||
restorecon_recursive /cache
|
||||
|
||||
mkdir /cache/recovery 0770 system system
|
||||
restorecon /cache
|
||||
#mount yaffs2 mtd@nvram /nvram nandboot
|
||||
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/SEC_RO /system/secro
|
||||
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/SEC_RO /system/secro ro remount
|
||||
|
||||
# This may have been created by the recovery system with odd permissions
|
||||
chown system cache /cache/recovery
|
||||
chmod 0770 /cache/recovery
|
||||
# This may have been created by the recovery system with the wrong context.
|
||||
restorecon /cache/recovery
|
||||
|
||||
#change permissions on vmallocinfo so we can grab it from bugreports
|
||||
chown root log /proc/vmallocinfo
|
||||
chmod 0440 /proc/vmallocinfo
|
||||
|
||||
chown root log /proc/slabinfo
|
||||
chmod 0440 /proc/slabinfo
|
||||
|
||||
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
|
||||
chown root system /proc/kmsg
|
||||
chmod 0440 /proc/kmsg
|
||||
chown root system /proc/sysrq-trigger
|
||||
chmod 0220 /proc/sysrq-trigger
|
||||
chown system log /proc/last_kmsg
|
||||
chmod 0440 /proc/last_kmsg
|
||||
|
||||
# create the lost+found directories, so as to enforce our permissions
|
||||
mkdir /cache/lost+found 0770 root root
|
||||
|
||||
# make the selinux kernel policy world-readable
|
||||
chmod 0444 /sys/fs/selinux/policy
|
||||
|
||||
# create the lost+found directories, so as to enforce our permissions
|
||||
mkdir /cache/lost+found 0770 root root
|
||||
#SeLinux
|
||||
restorecon_recursive /protect_f
|
||||
restorecon_recursive /protect_s
|
||||
|
||||
on post-fs-data
|
||||
# We chown/chmod /data again so because mount is run as root + defaults
|
||||
chown system system /data
|
||||
chmod 0771 /data
|
||||
# We restorecon /data in case the userdata partition has been reset.
|
||||
restorecon /data
|
||||
|
||||
# Create dump dir and collect dumps.
|
||||
# Do this before we mount cache so eventually we can use cache for
|
||||
# storing dumps on platforms which do not have a dedicated dump partition.
|
||||
mkdir /data/dontpanic 0750 root log
|
||||
|
||||
# Collect apanic data, free resources and re-arm trigger
|
||||
copy /proc/apanic_console /data/dontpanic/apanic_console
|
||||
chown root log /data/dontpanic/apanic_console
|
||||
chmod 0640 /data/dontpanic/apanic_console
|
||||
|
||||
copy /proc/apanic_threads /data/dontpanic/apanic_threads
|
||||
chown root log /data/dontpanic/apanic_threads
|
||||
chmod 0640 /data/dontpanic/apanic_threads
|
||||
|
||||
write /proc/apanic_console 1
|
||||
# create basic filesystem structure
|
||||
mkdir /data/nvram 2770 root system
|
||||
mkdir /data/misc 01771 system misc
|
||||
mkdir /data/misc/adb 02750 system shell
|
||||
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
|
||||
mkdir /data/misc/bluetooth 0770 system system
|
||||
mkdir /data/misc/keystore 0700 keystore keystore
|
||||
mkdir /data/misc/keychain 0771 system system
|
||||
mkdir /data/misc/sms 0770 system radio
|
||||
mkdir /data/misc/vpn 0770 system vpn
|
||||
mkdir /data/misc/systemkeys 0700 system system
|
||||
# give system access to wpa_supplicant.conf for backup and restore
|
||||
mkdir /data/misc/wifi 0770 wifi wifi
|
||||
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
|
||||
mkdir /data/local 0771 shell shell
|
||||
mkdir /data/local/tmp 0771 shell shell
|
||||
mkdir /data/data 0771 system system
|
||||
mkdir /data/app-private 0771 system system
|
||||
mkdir /data/app-asec 0700 root root
|
||||
mkdir /data/app-lib 0771 system system
|
||||
mkdir /data/app 0771 system system
|
||||
mkdir /data/property 0700 root root
|
||||
mkdir /data/ssh 0750 root shell
|
||||
mkdir /data/ssh/empty 0700 root root
|
||||
|
||||
# create dalvik-cache, so as to enforce our permissions
|
||||
mkdir /data/dalvik-cache 0771 system system
|
||||
|
||||
# create resource-cache and double-check the perms
|
||||
mkdir /data/resource-cache 0771 system system
|
||||
chown system system /data/resource-cache
|
||||
chmod 0771 /data/resource-cache
|
||||
|
||||
# create the lost+found directories, so as to enforce our permissions
|
||||
mkdir /data/lost+found 0770
|
||||
mkdir /cache/lost+found 0770
|
||||
|
||||
# double check the perms, in case lost+found already exists, and set owner
|
||||
chown root root /data/lost+found
|
||||
chmod 0770 /data/lost+found
|
||||
chown root root /cache/lost+found
|
||||
chmod 0770 /cache/lost+found
|
||||
|
||||
mkdir /data/drm 0770 drm drm
|
||||
|
||||
# dhcp server
|
||||
mkdir /data/misc/dhcp 0770 dhcp dhcp
|
||||
chown dhcp dhcp /data/misc/dhcp
|
||||
|
||||
# device info interface
|
||||
#insmod /system/lib/modules/devinfo.ko
|
||||
#mknod /dev/devmap c 196 0;
|
||||
chmod 0444 /dev/devmap
|
||||
chown root system /dev/devmap
|
||||
|
||||
# load driver base driver
|
||||
insmod /system/lib/modules/mtk_drvb_75.ko
|
||||
mknod /dev/drvb c 176 0
|
||||
chmod 0666 /dev/drvb
|
||||
|
||||
start NvRAMAgent
|
||||
|
||||
## Custom pos-fs area (START)
|
||||
write /proc/sys/vm/overcommit_memory 1
|
||||
write /proc/sys/vm/min_free_order_shift 4
|
||||
chown root system /sys/module/lowmemorykiller/parameters/adj
|
||||
chmod 0664 /sys/module/lowmemorykiller/parameters/adj
|
||||
chown root system /sys/module/lowmemorykiller/parameters/minfree
|
||||
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
|
||||
|
||||
# Tweak background writeout
|
||||
write /proc/sys/vm/dirty_expire_centisecs 200
|
||||
write /proc/sys/vm/dirty_background_ratio 5
|
||||
|
||||
# Permissions for System Server and daemons.
|
||||
chown radio system /sys/android_power/state
|
||||
chown radio system /sys/android_power/request_state
|
||||
chown radio system /sys/android_power/acquire_full_wake_lock
|
||||
chown radio system /sys/android_power/acquire_partial_wake_lock
|
||||
chown radio system /sys/android_power/release_wake_lock
|
||||
chown system system /sys/power/autosleep
|
||||
chown system system /sys/power/state
|
||||
chown system system /sys/power/wakeup_count
|
||||
chown radio system /sys/power/wake_lock
|
||||
chown radio system /sys/power/wake_unlock
|
||||
chmod 0660 /sys/power/state
|
||||
chmod 0660 /sys/power/wake_lock
|
||||
chmod 0660 /sys/power/wake_unlock
|
||||
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
|
||||
|
||||
# Assume SMP uses shared cpufreq policy for all CPUs
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
|
||||
chown system system /sys/class/timed_output/vibrator/enable
|
||||
chown system system /sys/class/leds/keyboard-backlight/brightness
|
||||
chown system system /sys/class/leds/lcd-backlight/brightness
|
||||
chown system system /sys/class/leds/button-backlight/brightness
|
||||
chown system system /sys/class/leds/jogball-backlight/brightness
|
||||
chown system system /sys/class/leds/red/brightness
|
||||
chown system system /sys/class/leds/green/brightness
|
||||
chown system system /sys/class/leds/blue/brightness
|
||||
chown system system /sys/class/leds/red/device/grpfreq
|
||||
chown system system /sys/class/leds/red/device/grppwm
|
||||
chown system system /sys/class/leds/red/device/blink
|
||||
chown system system /sys/class/leds/red/brightness
|
||||
chown system system /sys/class/leds/green/brightness
|
||||
chown system system /sys/class/leds/blue/brightness
|
||||
chown system system /sys/class/leds/red/device/grpfreq
|
||||
chown system system /sys/class/leds/red/device/grppwm
|
||||
chown system system /sys/class/leds/red/device/blink
|
||||
chown system system /sys/class/timed_output/vibrator/enable
|
||||
chown system system /sys/module/sco/parameters/disable_esco
|
||||
chown system system /sys/kernel/ipv4/tcp_wmem_min
|
||||
chown system system /sys/kernel/ipv4/tcp_wmem_def
|
||||
chown system system /sys/kernel/ipv4/tcp_wmem_max
|
||||
chown system system /sys/kernel/ipv4/tcp_rmem_min
|
||||
chown system system /sys/kernel/ipv4/tcp_rmem_def
|
||||
chown system system /sys/kernel/ipv4/tcp_rmem_max
|
||||
chown root radio /proc/cmdline
|
||||
|
||||
# Define TCP buffer sizes for various networks
|
||||
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
|
||||
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
|
||||
setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
|
||||
setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
|
||||
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
|
||||
setprop net.tcp.buffersize.hspa 4094,87380,262144,4096,16384,262144
|
||||
setprop net.tcp.buffersize.hsupa 4094,87380,262144,4096,16384,262144
|
||||
setprop net.tcp.buffersize.hsdpa 4094,87380,262144,4096,16384,262144
|
||||
setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608
|
||||
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
|
||||
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
|
||||
setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144
|
||||
|
||||
# Set this property so surfaceflinger is not started by system_init
|
||||
setprop system_init.startsurfaceflinger 0
|
||||
|
||||
class_start core
|
||||
class_start main
|
||||
|
||||
# Touch Panel
|
||||
chown root diag /sys/module/tpd_setting/parameters/tpd_calmat
|
||||
chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time
|
||||
chown root diag /sys/module/tpd_debug/parameters/tpd_em_log
|
||||
chown root diag /sys/module/tpd_debug/parameters/tpd_em_log_to_fs
|
||||
|
||||
chmod 0777 /dev/pmem_multimedia
|
||||
chmod 0777 /dev/mt6516-isp
|
||||
chmod 0777 /dev/mt6516-IDP
|
||||
chmod 0777 /dev/mt9p012
|
||||
chmod 0777 /dev/mt6516_jpeg
|
||||
chmod 0777 /dev/FM50AF
|
||||
|
||||
# RTC
|
||||
mkdir /data/misc/rtc 0770 system system
|
||||
|
||||
# M4U
|
||||
#insmod /system/lib/modules/m4u.ko
|
||||
#mknod /dev/M4U_device c 188 0
|
||||
chmod 0444 /dev/M4U_device
|
||||
|
||||
# Sensor
|
||||
chmod 0666 /dev/hwmsensor
|
||||
chmod 0666 /dev/msensor
|
||||
chmod 0666 /dev/gsensor
|
||||
chmod 0666 /dev/alsps
|
||||
|
||||
#VideoCodec
|
||||
insmod /system/lib/modules/vcodec_kernel_driver.ko
|
||||
mknod /dev/Vcodec c 189 0
|
||||
chmod 0666 /dev/Vcodec
|
||||
|
||||
|
||||
mkdir /data/amit/
|
||||
|
||||
# GPIO
|
||||
chmod 0666 /dev/mtgpio
|
||||
|
||||
#NFC
|
||||
rm /data/mtknfc_server
|
||||
|
||||
## Custom pos_fs area (END)
|
||||
|
||||
# Separate location for storing security policy files on data
|
||||
mkdir /data/security 0711 system system
|
||||
|
||||
# Reload policy from /data/security if present.
|
||||
setprop selinux.reload_policy 1
|
||||
|
||||
# Set SELinux security contexts on upgrade or policy update.
|
||||
restorecon_recursive /data
|
||||
|
||||
# If there is no fs-post-data action in the init.<device>.rc file, you
|
||||
# must uncomment this line, otherwise encrypted filesystems
|
||||
# won't work.
|
||||
# Set indication (checked by vold) that we have finished this action
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
on boot
|
||||
|
||||
start drvbd
|
||||
|
||||
# basic network init
|
||||
ifup lo
|
||||
hostname localhost
|
||||
domainname localdomain
|
||||
|
||||
# Define RIL properties
|
||||
setprop rild.nw.operlist /system/etc/ril/oper.lis
|
||||
# AGPS
|
||||
chmod 0777 /system/bin/mtk_agpsd
|
||||
|
||||
# Start default class, this line is very important!!
|
||||
class_start default
|
||||
class_start core
|
||||
|
||||
on nonencrypted
|
||||
class_start main
|
||||
class_start late_start
|
||||
|
||||
on property:vold.decrypt=trigger_default_encryption
|
||||
start defaultcrypto
|
||||
|
||||
on property:vold.decrypt=trigger_encryption
|
||||
start surfaceflinger
|
||||
start encrypt
|
||||
|
||||
on property:vold.decrypt=trigger_reset_main
|
||||
class_reset main
|
||||
|
||||
on property:vold.decrypt=trigger_load_persist_props
|
||||
load_persist_props
|
||||
|
||||
on property:vold.decrypt=trigger_post_fs_data
|
||||
trigger post-fs-data
|
||||
|
||||
on property:vold.decrypt=trigger_restart_min_framework
|
||||
class_start main
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start nvram_daemon
|
||||
class_start main
|
||||
class_start late_start
|
||||
start permission_check
|
||||
|
||||
on property:vold.decrypt=trigger_shutdown_framework
|
||||
class_reset late_start
|
||||
class_reset main
|
||||
|
||||
## Daemon processes to be run by init.
|
||||
##
|
||||
|
||||
# Update the second boot logo
|
||||
# service bootlogoupdater /system/bin/boot_logo_updater
|
||||
# oneshot
|
||||
|
||||
service ueventd /sbin/ueventd
|
||||
class core
|
||||
critical
|
||||
seclabel u:r:ueventd:s0
|
||||
|
||||
service logd /system/bin/logd
|
||||
class core
|
||||
socket logd stream 0666 logd logd
|
||||
socket logdr seqpacket 0666 logd logd
|
||||
socket logdw dgram 0222 logd logd
|
||||
seclabel u:r:logd:s0
|
||||
|
||||
on property:selinux.reload_policy=1
|
||||
restart ueventd
|
||||
restart installd
|
||||
|
||||
service kisd /system/bin/kisd
|
||||
user system
|
||||
group system media
|
||||
|
||||
service console /system/bin/sh
|
||||
class core
|
||||
console
|
||||
disabled
|
||||
user shell
|
||||
group shell log
|
||||
seclabel u:r:shell:s0
|
||||
|
||||
on property:sys.powerctl=*
|
||||
powerctl ${sys.powerctl}
|
||||
|
||||
on property:ro.debuggable=1
|
||||
start console
|
||||
|
||||
# adbd is controlled via property triggers in init.<platform>.usb.rc
|
||||
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
|
||||
class core
|
||||
socket adbd stream 660 system system
|
||||
disabled
|
||||
seclabel u:r:adbd:s0
|
||||
|
||||
# adbd on at boot in emulator
|
||||
on property:ro.kernel.qemu=1
|
||||
start adbd
|
||||
service servicemanager /system/bin/servicemanager
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
critical
|
||||
|
||||
service vold /system/bin/vold
|
||||
class core
|
||||
socket vold stream 0660 root mount
|
||||
ioprio be 2
|
||||
|
||||
# One shot invocation to deal with encrypted volume.
|
||||
service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
|
||||
disabled
|
||||
oneshot
|
||||
# vold will set vold.decrypt to trigger_restart_framework (default
|
||||
# encryption) or trigger_restart_min_framework (other encryption)
|
||||
|
||||
# One shot invocation to encrypt unencrypted volumes
|
||||
service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
|
||||
disabled
|
||||
oneshot
|
||||
# vold will set vold.decrypt to trigger_restart_framework (default
|
||||
# encryption)
|
||||
|
||||
service netd /system/bin/netd
|
||||
class main
|
||||
socket netd stream 0660 root system
|
||||
socket dnsproxyd stream 0660 root inet
|
||||
socket mdns stream 0660 root system
|
||||
|
||||
#service debuggerd /system/bin/debuggerd
|
||||
# class main
|
||||
|
||||
service ril-daemon /system/bin/rild
|
||||
class main
|
||||
socket rild stream 660 root radio
|
||||
socket rild-debug stream 660 radio system
|
||||
user root
|
||||
group radio cache inet misc audio log
|
||||
|
||||
# adbd is controlled via property triggers in init.<platform>.usb.rc
|
||||
service adbd /sbin/adbd
|
||||
class core
|
||||
|
||||
service drvbd /system/bin/drvbd
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
## Custom service area (START)
|
||||
# Please add custom service below
|
||||
service nvram_daemon /system/bin/nvram_daemon
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
oneshot
|
||||
|
||||
service NvRAMAgent /system/bin/nvram_agent_binder
|
||||
user system
|
||||
group system
|
||||
|
||||
service mdlogger /system/bin/mdlogger
|
||||
class main
|
||||
user shell
|
||||
group shell system radio sdcard_rw inet
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dualmdlogger /system/bin/dualmdlogger
|
||||
class main
|
||||
user shell
|
||||
group shell system radio sdcard_rw inet
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service factory_no_image /system/bin/factory
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service factory_with_image /sbin/factory
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
#
|
||||
## Custom service area (END)
|
||||
|
||||
|
||||
on property:sys.mtk.no.factoryimage=1
|
||||
start factory_no_image
|
||||
|
||||
on property:sys.mtk.no.factoryimage=0
|
||||
start factory_with_image
|
||||
|
||||
#mass_storage,adb,acm
|
||||
on property:ro.boot.usbconfig=0
|
||||
write /sys/class/android_usb/android0/iSerial $ro.serialno
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 0e8d
|
||||
write /sys/class/android_usb/android0/idProduct 2006
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mass_storage,adb,acm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
|
||||
#acm
|
||||
on property:ro.boot.usbconfig=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/iSerial " "
|
||||
write /sys/class/android_usb/android0/idVendor 0e8d
|
||||
write /sys/class/android_usb/android0/idProduct 2007
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions acm
|
||||
write /sys/class/android_usb/android0/bDeviceClass 02
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
@@ -0,0 +1,22 @@
|
||||
# Android fstab file.
|
||||
# The filesystem that contains the filesystem checker binary (typically /system) cannot
|
||||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
|
||||
#TODO: Add 'check' as fs_mgr_flags with data partition.
|
||||
# Currently we dont have e2fsck compiled. So fs check would failed.
|
||||
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 ro,noatime,discard wait
|
||||
/dev/block/platform/mtk-msdc.0/by-name/userdata /data f2fs nosuid,nodev,noatime,nodiratime,discard,inline_xattr wait,nonremovable,check,encryptable=footer,length=-16384
|
||||
/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,encryptable=footer,length=-16384
|
||||
/dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 nosuid,nodev,barrier=1,discard wait
|
||||
|
||||
/dev/block/platform/mtk-msdc.0/by-name/boot /boot emmc defaults recoveryonly
|
||||
/dev/block/platform/mtk-msdc.0/by-name/recovery /recovery emmc defaults recoveryonly
|
||||
|
||||
/devices/platform/mtk-msdc.0/mmc_host auto vfat defaults voldmanaged=sdcard0:emmc@fat,noemulatedsd
|
||||
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto,noemulatedsd
|
||||
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
|
||||
/dev/block/zram0 nome swap defaults zramsize=67108864
|
||||
/dev/block/platform/mtk-msdc.0/by-name/MISC /misc emmc defaults defaults
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Android fstab file.
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
# The filesystem that contains the filesystem checker binary (typically /system) cannot
|
||||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,resize,encryptable=footer
|
||||
/dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check
|
||||
/devices/platform/mtk-msdc.0/mmc_host auto vfat defaults voldmanaged=sdcard0:emmc@fat,noemulatedsd
|
||||
/devices/platform/mtk-msdc.1/mmc_host auto vfat defaults voldmanaged=sdcard1:auto,noemulatedsd
|
||||
/devices/platform/mt_usb auto vfat defaults voldmanaged=usbotg:auto
|
||||
/dev/block/zram0 nome swap defaults zramsize=67108864
|
||||
/dev/block/platform/mtk-msdc.0/by-name/MISC /misc emmc defaults defaults
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
|
||||
# Not a Contribution.
|
||||
#
|
||||
# Copyright (C) 2012 The Android Open Source Project
|
||||
#
|
||||
# IMPORTANT: Do not create world writable files or directories.
|
||||
# This is a common source of Android security bugs.
|
||||
#
|
||||
# MTK variant
|
||||
#
|
||||
# init.rc content unique to Mediatek devices should go here. Otherwise,
|
||||
# put it in the common init.rc
|
||||
|
||||
on boot
|
||||
# Adjust minimum free memory space (default is 2.5M)
|
||||
write /proc/sys/vm/min_free_kbytes 16384
|
||||
|
||||
on init
|
||||
mkdir /config 0500 root root
|
||||
|
||||
service drm /system/bin/drmserver
|
||||
class main
|
||||
user drm
|
||||
group drm system inet drmrpc
|
||||
|
||||
service media /system/bin/mediaserver
|
||||
class main
|
||||
user media
|
||||
##ACOS_MOD_BEGIN {asset_storage}
|
||||
group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm drm amz_group media
|
||||
##ACOS_MOD_END {asset_storage}
|
||||
onrestart restart drm
|
||||
ioprio rt 4
|
||||
|
||||
service keystore /system/bin/keystore /data/misc/keystore
|
||||
class main
|
||||
user keystore
|
||||
group keystore drmrpc
|
||||
|
||||
service ril-daemon /system/bin/rild
|
||||
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_r sdcard_rw log dhcp net_admin
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# init.user.rc
|
||||
#
|
||||
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# PROPRIETARY/CONFIDENTIAL
|
||||
#
|
||||
# Use is subject to license terms.
|
||||
#
|
||||
|
||||
on init
|
||||
write /proc/sys/kernel/dmesg_restrict 1
|
||||
|
||||
service factoryadb /system/bin/factoryadb.sh
|
||||
class core
|
||||
oneshot
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
import init.fulldump.rc
|
||||
|
||||
on charger
|
||||
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/system /system ro wait
|
||||
start kpoc_charger
|
||||
start bat_logging
|
||||
|
||||
service kpoc_charger /system/bin/kpoc_charger
|
||||
user root
|
||||
group root
|
||||
class charger
|
||||
|
||||
#monitor battery status
|
||||
service bat_logging /system/bin/battery_lifetime_data
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
Executable
+843
@@ -0,0 +1,843 @@
|
||||
|
||||
#connectivity related init script
|
||||
import init.project.rc
|
||||
import init.connectivity.rc
|
||||
import init.charging.rc
|
||||
import init.mt8127.usb.rc
|
||||
import init.aee.rc
|
||||
import init.ssd.rc
|
||||
import init.no_ssd.rc
|
||||
import init.ssd_nomuser.rc
|
||||
|
||||
on init
|
||||
export USBOTG_STORAGE /storage/usbotg
|
||||
mount tmpfs tmpfs /mnt/media_rw/ mode=0755,uid=1000,gid=1000
|
||||
mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw
|
||||
mkdir /storage/usbotg 0700 root root
|
||||
mkdir /mnt/sqfs 0771 system system
|
||||
|
||||
# Backward compatibility
|
||||
symlink /system/etc /etc
|
||||
symlink /sys/kernel/debug /d
|
||||
|
||||
# Right now vendor lives on the same filesystem as system,
|
||||
# but someday that may change.
|
||||
symlink /system/vendor /vendor
|
||||
|
||||
# Create cgroup mount point for cpu accounting
|
||||
mkdir /acct
|
||||
mount cgroup none /acct cpuacct
|
||||
mkdir /acct/uid
|
||||
|
||||
|
||||
mkdir /system
|
||||
mkdir /data 0771 system system
|
||||
mkdir /cache 0770 system cache
|
||||
mkdir /config 0500 root root
|
||||
|
||||
mkdir /mnt/cd-rom 0000 system system
|
||||
|
||||
# Directory for putting things only root should see.
|
||||
mkdir /mnt/secure 0700 root root
|
||||
# Create private mountpoint so we can MS_MOVE from staging
|
||||
mount tmpfs tmpfs /mnt/secure mode=0700,uid=0,gid=0
|
||||
|
||||
# Directory for staging bindmounts
|
||||
mkdir /mnt/secure/staging 0700 root root
|
||||
|
||||
# Directory-target for where the secure container
|
||||
# imagefile directory will be bind-mounted
|
||||
mkdir /mnt/secure/asec 0700 root root
|
||||
|
||||
# Secure container public mount points.
|
||||
mkdir /mnt/asec 0700 root system
|
||||
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
|
||||
|
||||
# Filesystem image public mount points.
|
||||
mkdir /mnt/obb 0700 root system
|
||||
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
|
||||
|
||||
write /proc/sys/kernel/panic_on_oops 1
|
||||
write /proc/sys/kernel/hung_task_timeout_secs 0
|
||||
write /proc/cpu/alignment 4
|
||||
write /proc/sys/kernel/sched_latency_ns 10000000
|
||||
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
|
||||
write /proc/sys/kernel/sched_compat_yield 1
|
||||
write /proc/sys/kernel/sched_child_runs_first 0
|
||||
write /proc/sys/kernel/randomize_va_space 2
|
||||
write /proc/sys/kernel/kptr_restrict 2
|
||||
write /proc/sys/kernel/dmesg_restrict 1
|
||||
write /proc/sys/vm/mmap_min_addr 32768
|
||||
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
|
||||
write /proc/sys/kernel/sched_rt_runtime_us 950000
|
||||
write /proc/sys/kernel/sched_rt_period_us 1000000
|
||||
|
||||
|
||||
# Allow everybody to read the xt_qtaguid resource tracking misc dev.
|
||||
# This is needed by any process that uses socket tagging.
|
||||
chmod 0644 /dev/xt_qtaguid
|
||||
|
||||
#HWComposer fb0
|
||||
chmod 0660 /dev/graphics/fb0
|
||||
chown system graphics /dev/graphics/fb0
|
||||
|
||||
#HWComposer Vsync
|
||||
chmod 0660 /dev/mtkfb_vsync
|
||||
chown system graphics /dev/mtkfb_vsync
|
||||
|
||||
|
||||
#HWComposer fence
|
||||
chmod 0660 /dev/sw_sync
|
||||
chown system graphics /dev/sw_sync
|
||||
|
||||
# Change ION driver permission
|
||||
chmod 0666 /dev/ion
|
||||
|
||||
# Change BWC permission
|
||||
chmod 0664 /sys/bus/platform/drivers/mem_bw_ctrl/concurrency_scenario
|
||||
chown system media /sys/bus/platform/drivers/mem_bw_ctrl/concurrency_scenario
|
||||
|
||||
# Change M4U driver permission
|
||||
# chmod 0444 /dev/M4U_device
|
||||
|
||||
# Change SMI driver permission
|
||||
chmod 0660 /dev/MTK_SMI
|
||||
chown system media /dev/MTK_SMI
|
||||
|
||||
#Use uinput's default permission
|
||||
chown system net_bt_admin /dev/uinput
|
||||
|
||||
# Change SMI mtk_sched permission
|
||||
chmod 0660 /dev/mtk_sched
|
||||
chown system media /dev/mtk_sched
|
||||
|
||||
# Change DISP permission
|
||||
chmod 0660 /dev/mtk_disp
|
||||
chown system graphics /dev/mtk_disp
|
||||
|
||||
#BT SCO CVSD
|
||||
chmod 0660 /dev/ebc
|
||||
chown system audio /dev/ebc
|
||||
|
||||
# Change Camera permission
|
||||
chmod 0660 /dev/camera-sysram
|
||||
chmod 0660 /dev/camera-isp
|
||||
chmod 0660 /dev/camera-pipemgr
|
||||
chmod 0660 /dev/kd_camera_hw
|
||||
chmod 0660 /dev/kd_camera_flashlight
|
||||
chmod 0660 /dev/kd_camera_hw_bus2
|
||||
chmod 0660 /dev/FM50AF
|
||||
chmod 0660 /dev/CAM_CAL_DRV
|
||||
|
||||
chown system camera /dev/camera-sysram
|
||||
chown system camera /dev/camera-isp
|
||||
chown system camera /dev/camera-pipemgr
|
||||
chown system camera /dev/kd_camera_hw
|
||||
chown system camera /dev/kd_camera_flashlight
|
||||
chown system camera /dev/kd_camera_hw_bus2
|
||||
chown system camera /dev/FM50AF
|
||||
chown system camera /dev/CAM_CAL_DRV
|
||||
|
||||
# Change OVL permission
|
||||
chmod 0440 /dev/mtk_ovl
|
||||
chown system system /dev/mtk_ovl
|
||||
|
||||
# Change Jpeg permission
|
||||
# chmod 0444 /dev/mtk_jpeg
|
||||
# chmod 0444 /dev/mtk_gdma
|
||||
# chmod 0444 /dev/mtk_gfmt
|
||||
chmod 0440 /dev/mtk_almk
|
||||
|
||||
# otg_test
|
||||
chown root radio /dev/mt_otg_test
|
||||
chmod 0660 /dev/mt_otg_test
|
||||
|
||||
# Disable AAL
|
||||
setprop persist.sys.aal.function 0
|
||||
# Enable AAL
|
||||
setprop ro.mediatek.aal 1
|
||||
|
||||
# mount debugfs for ftrace
|
||||
mount debugfs none /sys/kernel/debug
|
||||
|
||||
# change owner
|
||||
chown system system /proc/bootprof
|
||||
chown root system /proc/mtprof/cputime
|
||||
chown root system /proc/mtprof/reboot_pid
|
||||
|
||||
# Change dynamic_boost permission
|
||||
chown system system /sys/devices/platform/dynamic_boost/dynamic_boost
|
||||
chmod 0750 /sys/devices/platform/dynamic_boost/dynamic_boost
|
||||
|
||||
on boot
|
||||
# start sensor services
|
||||
# start akmd8963
|
||||
|
||||
# start nvram
|
||||
start NvRAMAgent
|
||||
|
||||
chown system system /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base
|
||||
|
||||
on fs
|
||||
|
||||
# export EXTERNAL_STORAGE /mnt/sdcard
|
||||
# mkdir /mnt/sdcard 0000 system system
|
||||
# symlink /mnt/sdcard /sdcard
|
||||
|
||||
|
||||
# mount mtd partitions
|
||||
# Mount /system rw first to give the filesystem a chance to save a checkpoint
|
||||
#write /proc/bootprof "INIT:NAND:Mount_START"
|
||||
#mount yaffs2 mtd@system /system
|
||||
|
||||
# via: set ril and pppd
|
||||
#chown root /system/bin/pppd
|
||||
#chmod 4755 /system/bin/pppd
|
||||
#chown root /system/etc/ppp/ip-up-cdma
|
||||
#chmod 4755 /system/et/ppp/ip-up-cdma
|
||||
#chown root /system/etc/ppp/ipv6-up-cdma
|
||||
#chmod 4755 /system/etc/ppp/ipv6-up-cdma
|
||||
#chown root /system/etc/ppp/link-down-cdma
|
||||
#chmod 4755 /system/etc/ppp/link-down-cdma
|
||||
#mount yaffs2 mtd@system /system ro remount
|
||||
#mount yaffs2 mtd@userdata /data nosuid nodev
|
||||
#mount yaffs2 mtd@cache /cache nosuid nodev
|
||||
#write /proc/bootprof "INIT:NAND:Mount_END"
|
||||
|
||||
#on fs_property:ro.mount.fs=EXT4
|
||||
write /proc/bootprof "INIT:eMMC:Mount_START"
|
||||
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/system /system noatime wait ro commit=1,nodelalloc,discard,errors=panic
|
||||
exec /system/bin/ext4_resize
|
||||
mount_all /fstab.mt8127
|
||||
mount squashfs loop@/system/sqfs/container.sqfs /mnt/sqfs wait ro context=u:object_r:squashfs_file:s0
|
||||
write /proc/bootprof "INIT:eMMC:Mount_END"
|
||||
mount iso9660 loop@/system/etc/iAmCdRom.iso /mnt/cd-rom ro
|
||||
|
||||
#change partition permission
|
||||
exec /system/etc/partition_permission.sh
|
||||
|
||||
# RGX init
|
||||
service pvrsrvctl /system/vendor/bin/pvrsrvctl --start
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
|
||||
on post-fs-data
|
||||
mkdir /data/nvram 2771 root system
|
||||
mkdir /data/media 0770 media_rw media_rw
|
||||
chmod 0660 /data/misc/wifi/p2p_supplicant.conf
|
||||
|
||||
|
||||
# dhcp server
|
||||
mkdir /data/misc/dhcp 0770 dhcp wifi
|
||||
chown dhcp wifi /data/misc/dhcp
|
||||
|
||||
# dhcpv6 server
|
||||
mkdir /data/misc/wide-dhcpv6 0770 dhcp wifi
|
||||
chown dhcp wifi /data/misc/wide-dhcpv6
|
||||
|
||||
# GPS
|
||||
mkdir /data/gps_mnl 0771 gps system
|
||||
|
||||
# remove /data/system/wpa_supplicant which was created in meta mode of JB version,
|
||||
# wlan will be not able to enabled if this directory exists in L version.
|
||||
rmdir /data/system/wpa_supplicant
|
||||
|
||||
# for ppp options file
|
||||
mkdir /data/misc/ppp 0770 bluetooth net_bt
|
||||
# bluetooth
|
||||
mkdir /data/@btmtk 0770 bluetooth net_bt
|
||||
chown bluetooth bluetooth /dev/hid-keyboard
|
||||
chmod 0660 /dev/hid-keyboard
|
||||
|
||||
# NFC
|
||||
mkdir /data/nfc_socket 0771 nfc radio
|
||||
|
||||
#VideoCodec
|
||||
insmod /system/lib/modules/vcodec_kernel_driver.ko
|
||||
|
||||
# JPEG
|
||||
chmod 0440 /dev/mtk_jpeg
|
||||
chown system camera /dev/mtk_jpeg
|
||||
|
||||
# UIBC
|
||||
chown system media /dev/uibc
|
||||
chmod 0660 /dev/uibc
|
||||
|
||||
#HDMI
|
||||
chmod 0664 /dev/hdmitx
|
||||
|
||||
# Sensor
|
||||
chmod 0660 /dev/hwmsensor
|
||||
chmod 0660 /dev/msensor
|
||||
chmod 0660 /dev/gsensor
|
||||
chmod 0660 /dev/als_ps
|
||||
chmod 0660 /dev/gyroscope
|
||||
chmod 0660 /dev/aal_als
|
||||
|
||||
chmod 0660 /sys/devices/platform/msensor/driver/cpsopmode
|
||||
chmod 0660 /sys/devices/platform/msensor/driver/cpsreptxy
|
||||
chmod 0660 /sys/devices/platform/msensor/driver/cpsreptz
|
||||
chmod 0660 /sys/devices/platform/gsensor/driver/cpsopmode
|
||||
chmod 0660 /sys/devices/platform/gsensor/driver/cpsrange
|
||||
|
||||
chown system system /dev/hwmsensor
|
||||
chown system system /dev/msensor
|
||||
chown system system /dev/gsensor
|
||||
chown radio system /dev/als_ps
|
||||
chown system system /dev/gyroscope
|
||||
chown system system /dev/aal_als
|
||||
|
||||
chmod 0660 /sys/class/misc/m_acc_misc/accenablenodata
|
||||
chmod 0660 /sys/class/misc/m_acc_misc/accactive
|
||||
chmod 0660 /sys/class/misc/m_acc_misc/accdelay
|
||||
chmod 0660 /sys/class/misc/m_acc_misc/accbatch
|
||||
chmod 0660 /sys/class/misc/m_acc_misc/accflush
|
||||
chown system system /sys/class/misc/m_acc_misc/accenablenodata
|
||||
chown system system /sys/class/misc/m_acc_misc/accactive
|
||||
chown system system /sys/class/misc/m_acc_misc/accdelay
|
||||
chown system system /sys/class/misc/m_acc_misc/accbatch
|
||||
chown system system /sys/class/misc/m_acc_misc/accflush
|
||||
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magactive
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magdelay
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magbatch
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magflush
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magoactive
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magodelay
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magobatch
|
||||
chmod 0660 /sys/class/misc/m_mag_misc/magoflush
|
||||
chown system system /sys/class/misc/m_mag_misc/magactive
|
||||
chown system system /sys/class/misc/m_mag_misc/magdelay
|
||||
chown system system /sys/class/misc/m_mag_misc/magbatch
|
||||
chown system system /sys/class/misc/m_mag_misc/magflush
|
||||
chown system system /sys/class/misc/m_mag_misc/magoactive
|
||||
chown system system /sys/class/misc/m_mag_misc/magodelay
|
||||
chown system system /sys/class/misc/m_mag_misc/magobatch
|
||||
chown system system /sys/class/misc/m_mag_misc/magoflush
|
||||
chmod 0660 /sys/class/misc/m_batch_misc/batchactive
|
||||
chmod 0660 /sys/class/misc/m_batch_misc/batchdelay
|
||||
chmod 0660 /sys/class/misc/m_batch_misc/batchbatch
|
||||
chmod 0660 /sys/class/misc/m_batch_misc/batchflush
|
||||
chown system system /sys/class/misc/m_batch_misc/batchactive
|
||||
chown system system /sys/class/misc/m_batch_misc/batchdelay
|
||||
chown system system /sys/class/misc/m_batch_misc/batchbatch
|
||||
chown system system /sys/class/misc/m_batch_misc/batchflush
|
||||
|
||||
chmod 0660 /sys/class/misc/m_gyro_misc/gyroenablenodata
|
||||
chmod 0660 /sys/class/misc/m_gyro_misc/gyroactive
|
||||
chmod 0660 /sys/class/misc/m_gyro_misc/gyrodelay
|
||||
chmod 0660 /sys/class/misc/m_gyro_misc/gyrobatch
|
||||
chmod 0660 /sys/class/misc/m_gyro_misc/gyroflush
|
||||
chown system system /sys/class/misc/m_gyro_misc/gyroenablenodata
|
||||
chown system system /sys/class/misc/m_gyro_misc/gyroactive
|
||||
chown system system /sys/class/misc/m_gyro_misc/gyrodelay
|
||||
chown system system /sys/class/misc/m_gyro_misc/gyrobatch
|
||||
chown system system /sys/class/misc/m_gyro_misc/gyroflush
|
||||
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/alsactive
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/alsdelay
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/alsbatch
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/alsflush
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/psactive
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/psdelay
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/psbatch
|
||||
chmod 0660 /sys/class/misc/m_alsps_misc/psflush
|
||||
chown system system /sys/class/misc/m_alsps_misc/alsactive
|
||||
chown system system /sys/class/misc/m_alsps_misc/alsdelay
|
||||
chown system system /sys/class/misc/m_alsps_misc/alsbatch
|
||||
chown system system /sys/class/misc/m_alsps_misc/alsflush
|
||||
chown system system /sys/class/misc/m_alsps_misc/psactive
|
||||
chown system system /sys/class/misc/m_alsps_misc/psdelay
|
||||
chown system system /sys/class/misc/m_alsps_misc/psbatch
|
||||
chown system system /sys/class/misc/m_alsps_misc/psflush
|
||||
|
||||
chmod 0660 /sys/class/misc/m_baro_misc/baroenablenodata
|
||||
chmod 0660 /sys/class/misc/m_baro_misc/baroactive
|
||||
chmod 0660 /sys/class/misc/m_baro_misc/barodelay
|
||||
chmod 0660 /sys/class/misc/m_baro_misc/barobatch
|
||||
chmod 0660 /sys/class/misc/m_baro_misc/baroflush
|
||||
chown system system /sys/class/misc/m_baro_misc/baroenablenodata
|
||||
chown system system /sys/class/misc/m_baro_misc/baroactive
|
||||
chown system system /sys/class/misc/m_baro_misc/barodelay
|
||||
chown system system /sys/class/misc/m_baro_misc/barobatch
|
||||
chown system system /sys/class/misc/m_baro_misc/baroflush
|
||||
|
||||
|
||||
mkdir /data/misc/sensors 0664 system system
|
||||
mkdir /data/misc/akmd 0770 system system
|
||||
mkdir /data/acdapi/ 0770 system system
|
||||
chmod 0660 /data/misc/acdapi/calib.dat
|
||||
chmod 0660 /data/misc/acdapi/param.dat
|
||||
chmod 0660 /data/misc/acdapi/sensors.dat
|
||||
chown system /sys/devices/platform/msensor/driver/cpsopmode
|
||||
chown system /sys/devices/platform/msensor/driver/cpsreptxy
|
||||
chown system /sys/devices/platform/msensor/driver/cpsreptz
|
||||
|
||||
chown system system /system/bin/sbchk
|
||||
chmod 0771 /system/bin/sbchk
|
||||
|
||||
# encryption flow
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
# Recycle stuffs
|
||||
exec /system/bin/rm -f /cache/.ipoh.img
|
||||
|
||||
# change key_provisioning
|
||||
mkdir /data/key_provisioning
|
||||
chmod 0770 /data/key_provisioning
|
||||
chown system system /data/key_provisioning
|
||||
start kisd
|
||||
|
||||
#
|
||||
#drm operation server
|
||||
service kisd /system/bin/kisd
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start msensord
|
||||
start nvram_daemon
|
||||
start permission_check
|
||||
|
||||
#
|
||||
#sensor service (begin)
|
||||
service msensord /system/bin/msensord
|
||||
class main
|
||||
oneshot
|
||||
|
||||
service nvram_daemon /system/bin/nvram_daemon
|
||||
class main
|
||||
user root
|
||||
group system bluetooth
|
||||
oneshot
|
||||
|
||||
# write proc for test sim
|
||||
on property:gsm.sim.ril.testsim=0
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 200
|
||||
on property:gsm.sim.ril.testsim=1
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 400
|
||||
on property:gsm.sim.ril.testsim.2=0
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 200
|
||||
on property:gsm.sim.ril.testsim.2=1
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 400
|
||||
on property:gsm.sim.ril.testsim.3=0
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 200
|
||||
on property:gsm.sim.ril.testsim.3=1
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 400
|
||||
on property:gsm.sim.ril.testsim.4=0
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 0
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 200
|
||||
on property:gsm.sim.ril.testsim.4=1
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_no_window_check 1
|
||||
write /proc/sys/net/ipv4/tcp_rto_min 400
|
||||
service NvRAMAgent /system/bin/nvram_agent_binder
|
||||
user system
|
||||
group system
|
||||
|
||||
service akmd8963 /system/bin/akmd8963
|
||||
disabled
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
service akmd09911 /system/bin/akmd09911
|
||||
disabled
|
||||
user system
|
||||
group system
|
||||
class main
|
||||
|
||||
service GoogleOtaAgent /system/bin/GoogleOtaBinder
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
service dhcpcd_bt-pan /system/bin/dhcpcd -BK -dd
|
||||
class main
|
||||
user dhcp
|
||||
group net_admin net_raw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_wlan0 /system/bin/dhcpcd -ABK -dd
|
||||
class main
|
||||
user dhcp
|
||||
group net_admin net_raw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_p2p /system/bin/dhcpcd -ABK -dd
|
||||
class main
|
||||
user dhcp
|
||||
group net_admin net_raw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service iprenew_wlan0 /system/bin/dhcpcd -n
|
||||
class main
|
||||
user dhcp
|
||||
group net_admin net_raw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service iprenew_p2p /system/bin/dhcpcd -n
|
||||
class main
|
||||
user dhcp
|
||||
group net_admin net_raw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcp6cDNS_wlan0 /system/bin/dhcp6c -c "/etc/wide-dhcpv6/dhcp6cDNS.conf" -Df wlan0
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcp6c_wlan0 /system/bin/dhcp6c -c "/etc/wide-dhcpv6/dhcp6c.conf" -Df wlan0
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:service.dhcp6c_wlan0.enable=0
|
||||
stop dhcp6c_wlan0
|
||||
|
||||
on property:service.dhcp6c_wlan0.enable=1
|
||||
start dhcp6c_wlan0
|
||||
|
||||
service dhcp6c_PD /system/bin/dhcp6c -c "/etc/wide-dhcpv6/dhcp6cPD.conf" -Df
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
#
|
||||
#sensor service (end)
|
||||
#
|
||||
|
||||
#thermal service
|
||||
service thermal_manager /system/bin/thermal_manager
|
||||
class main
|
||||
user root
|
||||
oneshot
|
||||
|
||||
service thermal /system/bin/thermal
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
service thermald /system/bin/thermald
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
service aal /system/bin/aal
|
||||
class core
|
||||
user system
|
||||
group system graphics radio
|
||||
|
||||
service pq /system/bin/pq
|
||||
class main
|
||||
user system
|
||||
group system graphics
|
||||
oneshot
|
||||
|
||||
# FOTA upgrade
|
||||
service rbfota /system/bin/fota1
|
||||
class main
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
#
|
||||
# MT6620 related services (Begin)
|
||||
#
|
||||
|
||||
# monitor property and power on/off wlan
|
||||
#on property:wlan.driver.status=ok
|
||||
# write /dev/wmtWifi "1"
|
||||
|
||||
#on property:wlan.driver.status=unloaded
|
||||
# write /dev/wmtWifi "0"
|
||||
|
||||
#remove -puse_p2p_group_interface=1, our driver doesnot support this feature
|
||||
#
|
||||
service p2p_supplicant /system/bin/wpa_supplicant \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf -N \
|
||||
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin \
|
||||
-I/system/etc/wifi/p2p_supplicant_overlay.conf \
|
||||
-O/data/misc/wifi/sockets -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
|
||||
|
||||
service wpa_supplicant /system/bin/wpa_supplicant \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin \
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-O/data/misc/wifi/sockets -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
|
||||
|
||||
service ap_daemon /system/bin/wpa_supplicant \
|
||||
-iap0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
|
||||
# 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
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
#
|
||||
# MT6620 related services (End)
|
||||
#
|
||||
|
||||
## mtk printk uart controller
|
||||
on property:persist.uartconsole.enable=1
|
||||
write /proc/mtprintk 1
|
||||
|
||||
# Update the second boot logo
|
||||
# service bootlogoupdater /system/bin/boot_logo_updater
|
||||
# class core
|
||||
# oneshot
|
||||
|
||||
service auto_shutdown /system/bin/sh /system/bin/auto_shutdown.sh
|
||||
oneshot
|
||||
disabled
|
||||
seclabel u:r:shell:s0
|
||||
|
||||
service audio-daemon /system/bin/audiocmdservice_atci
|
||||
class main
|
||||
socket atci-audio stream 660 media system
|
||||
user root
|
||||
group media system sdcard_rw
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
# OTA update backup partition
|
||||
service flash_tee2 /system/etc/install-tee2.sh
|
||||
class main
|
||||
oneshot
|
||||
|
||||
# GuiExt Server init
|
||||
service guiext-server /system/bin/guiext-server
|
||||
class main
|
||||
user system
|
||||
group system graphics
|
||||
|
||||
#Define device for ATCID
|
||||
chmod 660 /dev/ttyGS0
|
||||
chown system /dev/ttyGS0
|
||||
chmod 660 /dev/ttyGS1
|
||||
chown system /dev/ttyGS1
|
||||
|
||||
service atci_service /system/bin/atci_service
|
||||
class core
|
||||
socket atci-service stream 660 radio system
|
||||
socket atci-serv-fw stream 660 radio system
|
||||
user root
|
||||
disabled
|
||||
group radio system
|
||||
oneshot
|
||||
|
||||
service atcid-daemon-u /system/bin/atcid
|
||||
class main
|
||||
user system
|
||||
group radio system media
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service atcid-daemon-e /system/bin/atcid
|
||||
class core
|
||||
user root
|
||||
group radio system
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service sbchk /system/bin/sbchk
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
|
||||
on property:init.svc.servicemanager=restarting
|
||||
restart aal
|
||||
restart pq
|
||||
|
||||
on property:init.svc.bootanim=running
|
||||
write /proc/bootprof "BOOT_Animation:START"
|
||||
|
||||
on property:init.svc.bootanim=stopped
|
||||
write /proc/bootprof "BOOT_Animation:END"
|
||||
start auto_shutdown
|
||||
|
||||
on property:ro.build.type=eng
|
||||
start atci_service
|
||||
start atcid-daemon-e
|
||||
|
||||
#emsvr service (start)
|
||||
#
|
||||
on property:ro.build.type=eng
|
||||
start emsvr
|
||||
|
||||
on property:ro.build.type=user
|
||||
start emsvr_user
|
||||
|
||||
on property:ro.build.type=userdebug
|
||||
start emsvr_user
|
||||
|
||||
service emsvr_user /system/bin/em_svr
|
||||
disabled
|
||||
user system
|
||||
group system radio diag
|
||||
|
||||
service emsvr /system/bin/em_svr
|
||||
disabled
|
||||
user root
|
||||
|
||||
#
|
||||
#emsvr service (end)
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
#ape codec service
|
||||
#
|
||||
|
||||
service MtkCodecService /system/bin/MtkCodecService
|
||||
class main
|
||||
user system
|
||||
group audio media sdcard_r
|
||||
|
||||
#MNLD daemon
|
||||
service mnld /system/xbin/mnld
|
||||
class main
|
||||
user gps
|
||||
group system gps inet misc sdcard_rw sdcard_r media_rw
|
||||
socket mnld stream 660 gps system
|
||||
|
||||
on boot
|
||||
# AGPS
|
||||
mkdir /data/agps_supl 0771 gps system
|
||||
|
||||
###########add for 3Gdongle
|
||||
|
||||
on boot
|
||||
#
|
||||
# change the right of ip-up ip-down scripts(begin)
|
||||
#
|
||||
chmod 777 /etc/ppp/ip-up
|
||||
chmod 777 /etc/ppp/ip-down
|
||||
#
|
||||
# change the right of ip-up ip-down scripts(end)
|
||||
#
|
||||
|
||||
#
|
||||
# change the right of ip-up-ppp0 ip-down-ppp0 scripts(begin)
|
||||
#
|
||||
chmod 777 /etc/ppp/ip-up-ppp0
|
||||
chmod 777 /etc/ppp/ip-down-ppp0
|
||||
#
|
||||
# change the right of ip-up ip-down scripts(end)
|
||||
#
|
||||
|
||||
#set the property of persiste.radio.reset_on_switch
|
||||
setprop persist.radio.reset_on_switch true
|
||||
#end
|
||||
|
||||
#set the property of rild.mark_switchuser
|
||||
setprop rild.mark_switchuser 0
|
||||
#end
|
||||
|
||||
chmod 0644 /system/lib/libzteevdo-ril.so
|
||||
chomd 0644 /system/lib/zterilPara
|
||||
chown root /system/bin/pppd
|
||||
chmod 4755 /system/bin/pppd
|
||||
chown root /system/bin/chat
|
||||
chmod 4755 /system/bin/chat
|
||||
|
||||
chmod 0664 /sys/class/leds/lcd-backlight/brightness
|
||||
chown system system /sys/class/leds/red/trigger
|
||||
chown system system /sys/class/leds/green/trigger
|
||||
chown system system /sys/class/leds/blue/trigger
|
||||
#
|
||||
#ril-daemon (begin)
|
||||
#
|
||||
service ril-3gddaemon /system/bin/rild_dongle
|
||||
class main
|
||||
socket rild-dongle stream 660 root radio
|
||||
socket rild-dongle-debug stream 660 radio radio
|
||||
user root
|
||||
group radio cache inet misc audio log
|
||||
disabled
|
||||
|
||||
#
|
||||
#ril-daemon (end)
|
||||
#
|
||||
|
||||
#
|
||||
#usbdongled(begin)
|
||||
#
|
||||
service usbdongled /system/bin/dongled
|
||||
class main
|
||||
user root
|
||||
group radio cache inet misc
|
||||
enabled
|
||||
oneshot
|
||||
|
||||
#
|
||||
#usbdongled(end)
|
||||
#
|
||||
|
||||
#
|
||||
# add the service for call pppd(begin)
|
||||
#
|
||||
service zpppd_gprs /system/bin/init.gprs-pppd
|
||||
user root
|
||||
group radio cache inet misc
|
||||
disabled
|
||||
oneshot
|
||||
#
|
||||
# add the service for call pppd(end)
|
||||
#
|
||||
|
||||
#
|
||||
# ipo
|
||||
#
|
||||
service ipod /system/bin/ipod
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
||||
#
|
||||
# swap
|
||||
#
|
||||
service enableswap /system/bin/sh /enableswap.sh
|
||||
class core
|
||||
oneshot
|
||||
seclabel u:r:enableswap:s0
|
||||
|
||||
#monitor battery status
|
||||
service batterywarning /system/bin/batterywarning
|
||||
class main
|
||||
user shell
|
||||
group shell
|
||||
|
||||
#dhcp service
|
||||
service dhcpcd_eth0 /system/bin/dhcpcd -BK -dd
|
||||
class main
|
||||
user dhcp
|
||||
group net_admin net_raw
|
||||
disabled
|
||||
oneshot
|
||||
Executable
+156
@@ -0,0 +1,156 @@
|
||||
on boot
|
||||
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
|
||||
write /sys/class/android_usb/android0/idVendor ${ro.usb.vid}
|
||||
write /sys/class/android_usb/android0/iProduct "Fire"
|
||||
|
||||
# Used to disable USB when switching states
|
||||
on property:sys.usb.config=none
|
||||
stop adbd
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/bDeviceClass 0
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# adb
|
||||
on property:sys.usb.config=adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor ${ro.usb.vid}
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.pid.adb}
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# mtp
|
||||
on property:sys.usb.config=mtp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor ${ro.usb.vid}
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.pid.mtp}
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# mtp,adb
|
||||
on property:sys.usb.config=mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor ${ro.usb.vid}
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.pid.mtp.adb}
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# ptp
|
||||
on property:sys.usb.config=ptp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor ${ro.usb.vid}
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.pid.ptp}
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# ptp,adb
|
||||
on property:sys.usb.config=ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor ${ro.usb.vid}
|
||||
write /sys/class/android_usb/android0/idProduct ${ro.usb.pid.ptp.adb}
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB accessory configuration
|
||||
on property:sys.usb.config=accessory
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18d1
|
||||
write /sys/class/android_usb/android0/idProduct 2d00
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB accessory configuration, with adb
|
||||
on property:sys.usb.config=accessory,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18d1
|
||||
write /sys/class/android_usb/android0/idProduct 2d01
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# audio accessory configuration
|
||||
on property:sys.usb.config=audio_source
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18d1
|
||||
write /sys/class/android_usb/android0/idProduct 2d02
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# audio accessory configuration, with adb
|
||||
on property:sys.usb.config=audio_source,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18d1
|
||||
write /sys/class/android_usb/android0/idProduct 2d03
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB and audio accessory configuration
|
||||
on property:sys.usb.config=accessory,audio_source
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18d1
|
||||
write /sys/class/android_usb/android0/idProduct 2d04
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB and audio accessory configuration, with adb
|
||||
on property:sys.usb.config=accessory,audio_source,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18d1
|
||||
write /sys/class/android_usb/android0/idProduct 2d05
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB Charging Only configuration
|
||||
on property:sys.usb.config=charging
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
setprop sys.usb.charging yes
|
||||
|
||||
on property:sys.usb.charging=yes
|
||||
write /sys/devices/platform/mt_usb/cmode 2
|
||||
|
||||
on property:sys.usb.charging=no
|
||||
write /sys/devices/platform/mt_usb/cmode 1
|
||||
|
||||
# acm third port for bt
|
||||
on property:sys.usb.config=acm_third
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 0BB4
|
||||
write /sys/class/android_usb/android0/idProduct 2006
|
||||
write /sys/class/android_usb/android0/f_acm/port_index 3
|
||||
write /sys/class/android_usb/android0/functions mass_storage,adb,acm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# adb root
|
||||
on property:service.adb.root=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
start adbd
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
|
||||
Executable
+219
@@ -0,0 +1,219 @@
|
||||
# MTK project .rc configure
|
||||
import init.coredump.rc
|
||||
import init.rc.ufsd
|
||||
|
||||
on init
|
||||
##ACOS_MOD_BEGIN {amazon_logd}
|
||||
mkdir /dev/logd 0770 logd log
|
||||
mount tmpfs tmpfs /dev/logd mode=0770,uid=1036,gid=1036,size=512K,context=u:object_r:logd_tmpfs:s0
|
||||
##ACOS_MOD_END {amazon_logd}
|
||||
|
||||
on post-fs
|
||||
# Turn on swap
|
||||
swapon_all /fstab.mt8127
|
||||
|
||||
# Swap in only 1 page at a time
|
||||
write /proc/sys/vm/page-cluster 0
|
||||
|
||||
on post-fs-data
|
||||
|
||||
#
|
||||
# Connectivity related device nodes & configuration (begin)
|
||||
#
|
||||
|
||||
#/dev/ttyMT2 for Connectivity BT/FM/GPS usage
|
||||
chmod 0660 /dev/ttyMT2
|
||||
chown system system /dev/ttyMT2
|
||||
|
||||
|
||||
# STP, WMT, GPS, FM and BT Driver
|
||||
# insmod /system/lib/modules/mtk_hif_sdio.ko
|
||||
# insmod /system/lib/modules/mtk_stp_wmt.ko
|
||||
# insmod /system/lib/modules/mtk_stp_uart.ko
|
||||
# insmod /system/lib/modules/mtk_stp_gps.ko
|
||||
# insmod /system/lib/modules/mtk_stp_bt.ko
|
||||
# insmod /system/lib/modules/mtk_fm_drv.ko
|
||||
# insmod /system/lib/modules/mtk_wmt_wifi.ko
|
||||
|
||||
insmod /system/lib/modules/mtk_wmt_detect.ko
|
||||
|
||||
# Create char device file for WMT, GPS, BT, FM, WIFI
|
||||
# mknod /dev/stpwmt c 190 0;
|
||||
# mknod /dev/stpgps c 191 0;
|
||||
# mknod /dev/stpbt c 192 0;
|
||||
|
||||
# chmod 0660 /dev/stpwmt
|
||||
# chown system system /dev/stpwmt
|
||||
#
|
||||
# chmod 0660 /dev/wmtdetect
|
||||
# chown system system /dev/wmtdetect
|
||||
|
||||
mknod /dev/wmtWifi c 153 0
|
||||
chmod 0660 /dev/wmtWifi
|
||||
chown system system /dev/wmtWifi
|
||||
|
||||
# BT
|
||||
# chmod 0660 /dev/stpbt
|
||||
# chown bluetooth radio /dev/stpbt
|
||||
|
||||
# GPS
|
||||
# chown gps gps /dev/stpgps
|
||||
chown gps gps /sys/class/gpsdrv/gps/pwrctl
|
||||
chown gps gps /sys/class/gpsdrv/gps/suspend
|
||||
chown gps gps /sys/class/gpsdrv/gps/state
|
||||
chown gps gps /sys/class/gpsdrv/gps/pwrsave
|
||||
chown gps gps /sys/class/gpsdrv/gps/status
|
||||
chmod 0660 /dev/stpgps
|
||||
|
||||
# WiFi
|
||||
mkdir /data/misc/wifi 0770 wifi wifi
|
||||
mkdir /data/misc/wifi/sockets 0770 wifi wifi
|
||||
mkdir /data/misc/wpa_supplicant 0770 wifi wifi
|
||||
chown wifi wifi /data/misc/wifi
|
||||
|
||||
# FM Radio device node
|
||||
chmod 0660 /dev/fm
|
||||
chown system media /dev/fm
|
||||
|
||||
# Volume key swapping based on rotation orientation
|
||||
chmod 0640 /dev/mtk-kpd
|
||||
chown root audio /dev/mtk-kpd
|
||||
|
||||
#Disable for one Single loader
|
||||
# Load WiFi Driver
|
||||
# insmod /system/lib/modules/wlan.ko
|
||||
|
||||
# Char device for BT 3.0 HS
|
||||
mknod /dev/ampc0 c 151 0
|
||||
chown bluetooth bluetooth /dev/ampc0
|
||||
chmod 0660 /dev/ampc0
|
||||
|
||||
#
|
||||
# Connectivity related device nodes & configuration (end)
|
||||
|
||||
on boot
|
||||
export SECONDARY_STORAGE_USB /storage/usbotg
|
||||
# Refer to http://source.android.com/devices/tech/storage/index.html
|
||||
# It said, "Starting in Android 4.4, multiple external storage devices are surfaced to developers through
|
||||
# Context.getExternalFilesDirs(), Context.getExternalCacheDirs(), and Context.getObbDirs().
|
||||
# External storage devices surfaced through these APIs must be a semi-permanent part of the device (such as an SD card slot in a battery compartment).
|
||||
# Developers expect data stored in these locations to be available over long periods of time."
|
||||
# Therefore, if the target has the SD card slot in a battery compartment, we need to specify SECONDARY_STORAGE (*** UN-Comment the following command ***)
|
||||
#
|
||||
# export SECONDARY_STORAGE /storage/sdcard1
|
||||
|
||||
service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/usbotg /storage/usbotg
|
||||
class late_start
|
||||
disabled
|
||||
|
||||
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
|
||||
class late_start
|
||||
disabled
|
||||
#
|
||||
# Connectivity related services (Begin)
|
||||
#
|
||||
|
||||
service wmtLoader /system/bin/wmt_loader
|
||||
user root
|
||||
group root
|
||||
class main
|
||||
oneshot
|
||||
|
||||
|
||||
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
|
||||
user system
|
||||
group system
|
||||
class core
|
||||
|
||||
service thermal_log /system/bin/thermal_log.sh
|
||||
class late_start
|
||||
user system
|
||||
group system
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service thermal_qa /system/bin/ThermalBenchmarkAutomation.sh
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service battery_log /system/bin/battery_log.sh
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service temperature_log /system/bin/temperature_log.sh
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service dmesg_log /system/bin/dmesg_log.sh
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service logcat_log /system/bin/logcat_log.sh
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
oneshot
|
||||
disabled
|
||||
|
||||
service amzn_drmprov /system/bin/amzn_drmprov_check
|
||||
class main
|
||||
user root
|
||||
group system
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
write /sys/kernel/mm/ksm/pages_to_scan 100
|
||||
write /sys/kernel/mm/ksm/sleep_millisecs 700
|
||||
write /sys/kernel/mm/ksm/run 1
|
||||
|
||||
on property:debug.log.thermal_qa.enable=y
|
||||
start thermal_qa
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start dmesg_log
|
||||
|
||||
on property:debug.log.battery.enable=y
|
||||
start battery_log
|
||||
|
||||
on property:debug.log.temperature.enable=y
|
||||
start temperature_log
|
||||
|
||||
on property:debug.log.dmesg.enable=y
|
||||
start dmesg_log
|
||||
|
||||
on property:debug.log.logcat.enable=y
|
||||
start logcat_log
|
||||
|
||||
#
|
||||
# Turn on/off UART kernel log
|
||||
#
|
||||
on property:persist.sys.uart.klog.enable=y
|
||||
write /sys/mtuart/conse 1
|
||||
on property:persist.sys.uart.klog.enable=n
|
||||
write /sys/mtuart/conse 0
|
||||
|
||||
#
|
||||
# Connectivity related services (End)
|
||||
#
|
||||
|
||||
|
||||
service rpmb_svc /system/bin/rpmb_svc
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
||||
on property:ro.boot.rpmb_state=1
|
||||
start rpmb_svc
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
# Loading UFSD module on boot
|
||||
on boot
|
||||
insmod /system/lib/modules/ufsd.ko
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
# This is for preloader update
|
||||
on fs
|
||||
write /sys/block/mmcblk0boot0/force_ro 0
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
# MTK project .rc configure
|
||||
|
||||
on post-fs-data
|
||||
#
|
||||
# SHARED_SDCARD related directory & configuration (begin)
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
#
|
||||
# SHARED_SDCARD related directory & configuration (end)
|
||||
#
|
||||
|
||||
on init
|
||||
# See storage config details at http://source.android.com/tech/storage/
|
||||
# fix non-shell uid process can not access shared-sd
|
||||
mkdir /mnt/shell 0700 shell shell
|
||||
#chmod 0750 /mnt/shell
|
||||
chown shell sdcard_r /mnt/shell
|
||||
mkdir /mnt/shell/emulated 0700 shell shell
|
||||
mkdir /mnt/shell/emulated/0 0700 shell shell
|
||||
mkdir /storage/emulated 0555 root root
|
||||
|
||||
mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
|
||||
mkdir /storage/sdcard1 0700 root root
|
||||
|
||||
export EXTERNAL_STORAGE /storage/emulated/legacy
|
||||
|
||||
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
|
||||
export EMULATED_STORAGE_TARGET /storage/emulated
|
||||
|
||||
export SECONDARY_STORAGE /storage/sdcard1
|
||||
|
||||
# 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
|
||||
symlink /mnt/shell/emulated/0 /storage/emulated/0
|
||||
symlink /storage/sdcard1 /mnt/sdcard2
|
||||
|
||||
on fs
|
||||
setprop ro.crypto.fuse_sdcard true
|
||||
|
||||
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
|
||||
class late_start
|
||||
|
||||
service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
|
||||
class late_start
|
||||
disabled
|
||||
@@ -0,0 +1,78 @@
|
||||
on post-fs
|
||||
|
||||
# trustzone related interface
|
||||
mknod /dev/trustzone c 197 0;
|
||||
chmod 0666 /dev/trustzone
|
||||
chown root media /dev/trustzone
|
||||
|
||||
#
|
||||
# Connectivity related modules and character device nodes (Begin)
|
||||
#
|
||||
#for 662x_launcher
|
||||
chmod 0660 /dev/ttyMT2
|
||||
chown system system /dev/ttyMT2
|
||||
|
||||
# STP, SDIO, WMT, GPS, FM and BT Driver
|
||||
# insmod /system/lib/modules/mtk_hif_sdio.ko
|
||||
# insmod /system/lib/modules/mtk_stp_wmt.ko
|
||||
# insmod /system/lib/modules/mtk_stp_uart.ko
|
||||
# insmod /system/lib/modules/mtk_stp_gps.ko
|
||||
# insmod /system/lib/modules/mtk_stp_bt.ko
|
||||
# insmod /system/lib/modules/mtk_fm_drv.ko
|
||||
# insmod /system/lib/modules/mtk_fm_priv.ko
|
||||
# insmod /system/lib/modules/mtk_wmt_wifi.ko
|
||||
|
||||
insmod /system/lib/modules/mtk_wmt_detect.ko
|
||||
|
||||
# Create char device file for WMT, GPS, BT, FM, WIFI
|
||||
mknod /dev/stpwmt c 190 0;
|
||||
mknod /dev/stpgps c 191 0;
|
||||
mknod /dev/stpbt c 192 0;
|
||||
mknod /dev/fm c 193 0;
|
||||
chmod 0660 /dev/stpwmt
|
||||
chown system system /dev/stpwmt
|
||||
chmod 0660 /dev/wmtdetect
|
||||
chown system system /dev/wmtdetect
|
||||
|
||||
# FM Radio device, FIXME: this is not a proper way to set permissions
|
||||
chmod 0666 /dev/fm
|
||||
|
||||
mknod /dev/wmtWifi c 153 0
|
||||
chmod 0666 /dev/wmtWifi
|
||||
chmod 0660 /dev/stpgps
|
||||
chmod 0660 /dev/stpbt
|
||||
chown bluetooth radio /dev/stpbt
|
||||
|
||||
# Load WiFi Driver
|
||||
#insmod /system/lib/modules/wlan.ko
|
||||
|
||||
#
|
||||
# Connectivity related modules and character device nodes (Ends)
|
||||
#
|
||||
|
||||
on boot
|
||||
|
||||
|
||||
#
|
||||
# Connectivity related services (Begin)
|
||||
#
|
||||
|
||||
service wmtLoader /system/bin/wmt_loader
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
|
||||
service conn_launcher /system/bin/6620_launcher -p /system/etc/firmware/
|
||||
user system
|
||||
group system
|
||||
|
||||
|
||||
#
|
||||
# Connectivity related services (End)
|
||||
#
|
||||
|
||||
#44.adb root
|
||||
on property:service.adb.root=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
start adbd
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
@@ -0,0 +1,446 @@
|
||||
# Copyright (C) 2012 The Android Open Source Project
|
||||
#
|
||||
# IMPORTANT: Do not create world writable files or directories.
|
||||
# This is a common source of Android security bugs.
|
||||
#
|
||||
import /init.environ.rc
|
||||
import init.ssd.rc
|
||||
import init.no_ssd.rc
|
||||
import init.ssd_nomuser.rc
|
||||
import init.fon.rc
|
||||
import init.aee.rc
|
||||
import meta_init.project.rc
|
||||
|
||||
on early-init
|
||||
# Set init and its forked children's oom_adj.
|
||||
write /proc/1/oom_score_adj -1000
|
||||
|
||||
# Apply strict SELinux checking of PROT_EXEC on mmap/mprotect calls.
|
||||
write /sys/fs/selinux/checkreqprot 0
|
||||
|
||||
# Set the security context for the init process.
|
||||
# This should occur before anything else (e.g. ueventd) is started.
|
||||
setcon u:r:init:s0
|
||||
|
||||
# Set the security context of /adb_keys if present.
|
||||
restorecon /adb_keys
|
||||
|
||||
start ueventd
|
||||
|
||||
# create mountpoints
|
||||
mkdir /mnt 0775 root system
|
||||
|
||||
on init
|
||||
|
||||
sysclktz 0
|
||||
|
||||
loglevel 5
|
||||
|
||||
# Backward compatibility
|
||||
symlink /system/etc /etc
|
||||
symlink /sys/kernel/debug /d
|
||||
|
||||
# Right now vendor lives on the same filesystem as system,
|
||||
# but someday that may change.
|
||||
symlink /system/vendor /vendor
|
||||
|
||||
# Create cgroup mount point for cpu accounting
|
||||
mkdir /acct
|
||||
mount cgroup none /acct cpuacct
|
||||
mkdir /acct/uid
|
||||
|
||||
mkdir /system
|
||||
mkdir /data 0771 system system
|
||||
mkdir /cache 0770 system cache
|
||||
mkdir /config 0500 root root
|
||||
|
||||
# See storage config details at http://source.android.com/tech/storage/
|
||||
mkdir /mnt/shell 0700 shell shell
|
||||
mkdir /mnt/media_rw 0700 media_rw media_rw
|
||||
mkdir /storage 0751 root sdcard_r
|
||||
|
||||
mkdir /mnt/cd-rom 0000 system system
|
||||
|
||||
# Directory for putting things only root should see.
|
||||
mkdir /mnt/secure 0700 root root
|
||||
|
||||
# Directory for staging bindmounts
|
||||
mkdir /mnt/secure/staging 0700 root root
|
||||
|
||||
# Directory-target for where the secure container
|
||||
# imagefile directory will be bind-mounted
|
||||
mkdir /mnt/secure/asec 0700 root root
|
||||
|
||||
# Secure container public mount points.
|
||||
mkdir /mnt/asec 0700 root system
|
||||
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
|
||||
|
||||
# Filesystem image public mount points.
|
||||
mkdir /mnt/obb 0700 root system
|
||||
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
|
||||
|
||||
write /proc/sys/kernel/panic_on_oops 1
|
||||
write /proc/sys/kernel/hung_task_timeout_secs 0
|
||||
write /proc/cpu/alignment 4
|
||||
write /proc/sys/kernel/sched_latency_ns 10000000
|
||||
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
|
||||
write /proc/sys/kernel/sched_compat_yield 1
|
||||
|
||||
# Healthd can trigger a full boot from charger mode by signaling this
|
||||
# property when the power button is held.
|
||||
on property:sys.boot_from_charger_mode=1
|
||||
class_stop charger
|
||||
trigger late-init
|
||||
|
||||
# Load properties from /system/ + /factory after fs mount.
|
||||
on load_all_props_action
|
||||
load_all_props
|
||||
|
||||
# Mount filesystems and start core system services.
|
||||
on late-init
|
||||
trigger early-fs
|
||||
trigger fs
|
||||
trigger post-fs
|
||||
trigger post-fs-data
|
||||
|
||||
# Load properties from /system/ + /factory after fs mount. Place
|
||||
# this in another action so that the load will be scheduled after the prior
|
||||
# issued fs triggers have completed.
|
||||
trigger load_all_props_action
|
||||
|
||||
trigger early-boot
|
||||
trigger boot
|
||||
|
||||
on fs
|
||||
mount ext4 /dev/block/platform/mtk-msdc.0/by-name/system /system noatime wait ro commit=1,nodelalloc,discard,errors=panic
|
||||
write /proc/bootprof "INIT:eMMC:Mount_START"
|
||||
mount_all /fstab.mt8127
|
||||
write /proc/bootprof "INIT:eMMC:Mount_END"
|
||||
|
||||
# mount secro partition
|
||||
# mount yaffs2 mtd@secstatic /system/secro ro
|
||||
# mount ext4 /dev/block/platform/mtk-msdc.0/by-name/SEC_RO /system/secro ro
|
||||
|
||||
on post-fs
|
||||
# once everything is setup, no need to modify /
|
||||
mount rootfs rootfs / ro remount
|
||||
|
||||
# We chown/chmod /cache again so because mount is run as root + defaults
|
||||
chown system cache /cache
|
||||
chmod 0770 /cache
|
||||
# We restorecon /cache in case the cache partition has been reset.
|
||||
restorecon_recursive /cache
|
||||
|
||||
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
|
||||
chown root system /proc/kmsg
|
||||
chmod 0440 /proc/kmsg
|
||||
|
||||
# make the selinux kernel policy world-readable
|
||||
chmod 0444 /sys/fs/selinux/policy
|
||||
|
||||
# create the lost+found directories, so as to enforce our permissions
|
||||
mkdir /cache/lost+found 0770 root root
|
||||
|
||||
on post-fs-data
|
||||
# We chown/chmod /data again so because mount is run as root + defaults
|
||||
chown system system /data
|
||||
chmod 0771 /data
|
||||
# We restorecon /data in case the userdata partition has been reset.
|
||||
restorecon /data
|
||||
|
||||
|
||||
# create basic filesystem structure
|
||||
mkdir /data/nvram 2771 root system
|
||||
mkdir /data/misc 01771 system misc
|
||||
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
|
||||
mkdir /data/misc/bluetooth 0770 system system
|
||||
mkdir /data/misc/keystore 0700 keystore keystore
|
||||
mkdir /data/misc/keychain 0771 system system
|
||||
mkdir /data/misc/vpn 0770 system vpn
|
||||
mkdir /data/misc/systemkeys 0700 system system
|
||||
# give system access to wpa_supplicant.conf for backup and restore
|
||||
mkdir /data/misc/wifi 0770 wifi wifi
|
||||
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
|
||||
chmod 0660 /data/misc/wifi/p2p_supplicant.conf
|
||||
mkdir /data/local 0751 root root
|
||||
# For security reasons, /data/local/tmp should always be empty.
|
||||
# Do not place files or directories in /data/local/tmp
|
||||
mkdir /data/local/tmp 0771 shell shell
|
||||
mkdir /data/data 0771 system system
|
||||
mkdir /data/app-private 0771 system system
|
||||
mkdir /data/app-asec 0700 root root
|
||||
mkdir /data/app 0771 system system
|
||||
mkdir /data/property 0700 root root
|
||||
mkdir /data/ssh 0750 root shell
|
||||
mkdir /data/ssh/empty 0700 root root
|
||||
|
||||
# create the lost+found directories, so as to enforce our permissions
|
||||
mkdir /data/lost+found 0770
|
||||
|
||||
# double check the perms, in case lost+found already exists, and set owner
|
||||
chown root root /data/lost+found
|
||||
chmod 0770 /data/lost+found
|
||||
|
||||
# H264 Decoder
|
||||
chmod 777 /dev/MT6516_H264_DEC
|
||||
|
||||
# Internal SRAM Driver
|
||||
chmod 777 /dev/MT6516_Int_SRAM
|
||||
|
||||
# MM QUEUE Driver
|
||||
chmod 777 /dev/MT6516_MM_QUEUE
|
||||
|
||||
# MPEG4 Decoder
|
||||
chmod 777 /dev/MT6516_MP4_DEC
|
||||
|
||||
# MPEG4 Encoder
|
||||
chmod 777 /dev/MT6516_MP4_ENC
|
||||
|
||||
# OpenCORE proxy config
|
||||
chmod 0666 /data/http-proxy-cfg
|
||||
|
||||
# OpenCORE player config
|
||||
chmod 0666 /etc/player.cfg
|
||||
|
||||
start NvRAMAgent
|
||||
|
||||
# WiFi
|
||||
mkdir /data/misc/wifi 0770 system wifi
|
||||
mkdir /data/misc/wifi/sockets 0770 system wifi
|
||||
mkdir /data/misc/dhcp 0770 dhcp dhcp
|
||||
chown dhcp dhcp /data/misc/dhcp
|
||||
chmod 0660 /sys/class/rfkill/rfkill1/state
|
||||
chown system system /sys/class/rfkill/rfkill1/state
|
||||
# Turn off wifi by default
|
||||
write /sys/class/rfkill/rfkill1/state 0
|
||||
|
||||
|
||||
|
||||
# Set this property so surfaceflinger is not started by system_init
|
||||
setprop system_init.startsurfaceflinger 0
|
||||
|
||||
#otp
|
||||
chmod 0660 /dev/otp
|
||||
chown root system /dev/otp
|
||||
|
||||
# Touch Panel
|
||||
chown system system /sys/touchpanel/calibration
|
||||
chmod 0660 /sys/touchpanel/calibration
|
||||
|
||||
chmod 0777 /dev/pmem_multimedia
|
||||
chmod 0777 /dev/mt6516-isp
|
||||
chmod 0777 /dev/mt6516-IDP
|
||||
chmod 0777 /dev/mt9p012
|
||||
chmod 0777 /dev/mt6516_jpeg
|
||||
chmod 0777 /dev/FM50AF
|
||||
|
||||
|
||||
|
||||
# RTC
|
||||
mkdir /data/misc/rtc 0770 system system
|
||||
|
||||
# M4U
|
||||
#insmod /system/lib/modules/m4u.ko
|
||||
#mknod /dev/M4U_device c 188 0
|
||||
chmod 0444 /dev/M4U_device
|
||||
|
||||
# Sensor
|
||||
chmod 0666 /dev/sensor
|
||||
|
||||
# GPIO
|
||||
chmod 0666 /dev/mtgpio
|
||||
|
||||
# Android SEC related device nodes
|
||||
insmod /system/lib/modules/sec.ko
|
||||
mknod /dev/sec c 182 0
|
||||
chmod 0660 /dev/sec
|
||||
chown root system /dev/sec
|
||||
|
||||
# device info interface
|
||||
#insmod /system/lib/modules/devinfo.ko
|
||||
#mknod /dev/devmap c 196 0;
|
||||
chmod 0440 /dev/devmap
|
||||
chown root system /dev/devmap
|
||||
|
||||
# change key_provisioning
|
||||
mkdir /data/key_provisioning
|
||||
chmod 0770 /data/key_provisioning
|
||||
chown system system /data/key_provisioning
|
||||
|
||||
# Separate location for storing security policy files on data
|
||||
mkdir /data/security 0711 system system
|
||||
|
||||
# Reload policy from /data/security if present.
|
||||
setprop selinux.reload_policy 1
|
||||
|
||||
# Set SELinux security contexts on upgrade or policy update.
|
||||
restorecon_recursive /data
|
||||
|
||||
# If there is no fs-post-data action in the init.<device>.rc file, you
|
||||
# must uncomment this line, otherwise encrypted filesystems
|
||||
# won't work.
|
||||
# Set indication (checked by vold) that we have finished this action
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
on boot
|
||||
chown root /remount.sh
|
||||
chmod 700 /remount.sh
|
||||
exec /remount.sh
|
||||
|
||||
start drvbd
|
||||
|
||||
# basic network init
|
||||
ifup lo
|
||||
hostname localhost
|
||||
domainname localdomain
|
||||
|
||||
class_start default
|
||||
class_start core
|
||||
|
||||
on nonencrypted
|
||||
class_start main
|
||||
class_start late_start
|
||||
|
||||
on property:vold.decrypt=trigger_default_encryption
|
||||
start defaultcrypto
|
||||
|
||||
on property:vold.decrypt=trigger_encryption
|
||||
start surfaceflinger
|
||||
start encrypt
|
||||
|
||||
on property:vold.decrypt=trigger_reset_main
|
||||
class_reset main
|
||||
|
||||
on property:vold.decrypt=trigger_load_persist_props
|
||||
load_persist_props
|
||||
|
||||
on property:vold.decrypt=trigger_post_fs_data
|
||||
trigger post-fs-data
|
||||
|
||||
on property:vold.decrypt=trigger_restart_min_framework
|
||||
class_start main
|
||||
|
||||
on property:vold.decrypt=trigger_restart_framework
|
||||
start nvram_daemon
|
||||
class_start main
|
||||
class_start late_start
|
||||
start permission_check
|
||||
|
||||
on property:vold.decrypt=trigger_shutdown_framework
|
||||
class_reset late_start
|
||||
class_reset main
|
||||
|
||||
service ueventd /sbin/ueventd
|
||||
class core
|
||||
critical
|
||||
seclabel u:r:ueventd:s0
|
||||
|
||||
service logd /system/bin/logd
|
||||
class core
|
||||
socket logd stream 0666 logd logd
|
||||
socket logdr seqpacket 0666 logd logd
|
||||
socket logdw dgram 0222 logd logd
|
||||
seclabel u:r:logd:s0
|
||||
|
||||
service console /system/bin/sh
|
||||
class core
|
||||
console
|
||||
disabled
|
||||
user shell
|
||||
group shell log
|
||||
seclabel u:r:shell:s0
|
||||
|
||||
on property:sys.powerctl=*
|
||||
powerctl ${sys.powerctl}
|
||||
|
||||
on property:ro.debuggable=1
|
||||
start console
|
||||
|
||||
# adbd is controlled via property triggers in init.<platform>.usb.rc
|
||||
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
|
||||
class core
|
||||
socket adbd stream 660 system system
|
||||
disabled
|
||||
seclabel u:r:adbd:s0
|
||||
|
||||
service vold /system/bin/vold
|
||||
class core
|
||||
socket vold stream 0660 root mount
|
||||
ioprio be 2
|
||||
|
||||
# One shot invocation to deal with encrypted volume.
|
||||
service defaultcrypto /system/bin/vdc --wait cryptfs mountdefaultencrypted
|
||||
disabled
|
||||
oneshot
|
||||
# vold will set vold.decrypt to trigger_restart_framework (default
|
||||
# encryption) or trigger_restart_min_framework (other encryption)
|
||||
|
||||
# One shot invocation to encrypt unencrypted volumes
|
||||
service encrypt /system/bin/vdc --wait cryptfs enablecrypto inplace default
|
||||
disabled
|
||||
oneshot
|
||||
# vold will set vold.decrypt to trigger_restart_framework (default
|
||||
# encryption)
|
||||
|
||||
service meta_tst /system/bin/meta_tst
|
||||
|
||||
#drm operation server
|
||||
service kisd /system/bin/kisd
|
||||
|
||||
service servicemanager /system/bin/servicemanager
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
critical
|
||||
service nvram_daemon /system/bin/nvram_daemon
|
||||
class main
|
||||
user root
|
||||
group system bluetooth
|
||||
oneshot
|
||||
|
||||
service NvRAMAgent /system/bin/nvram_agent_binder
|
||||
user system
|
||||
group system
|
||||
|
||||
service drvbd /system/bin/drvbd
|
||||
class main
|
||||
user system
|
||||
group system
|
||||
|
||||
service debuggerd /system/bin/debuggerd
|
||||
class main
|
||||
|
||||
service debuggerd64 /system/bin/debuggerd64
|
||||
class main
|
||||
|
||||
|
||||
service mobile_log_d /system/bin/mobile_log_d
|
||||
class main
|
||||
|
||||
on property:ro.boot.mblogenable=0
|
||||
stop mobile_log_d
|
||||
|
||||
on property:ro.boot.mblogenable=1
|
||||
start mobile_log_d
|
||||
|
||||
#mass_storage,adb,acm
|
||||
on property:ro.boot.usbconfig=0
|
||||
write /sys/class/android_usb/android0/iSerial $ro.serialno
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 0e8d
|
||||
write /sys/class/android_usb/android0/idProduct 2006
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mass_storage,adb,acm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
|
||||
#acm
|
||||
on property:ro.boot.usbconfig=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/iSerial " "
|
||||
write /sys/class/android_usb/android0/idVendor 0e8d
|
||||
write /sys/class/android_usb/android0/idProduct 2007
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions acm
|
||||
write /sys/class/android_usb/android0/bDeviceClass 02
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
@@ -0,0 +1,56 @@
|
||||
/dev/pvrsrvkm 0766 root root
|
||||
/dev/pvr_sync 0766 root root
|
||||
/dev/stpwmt 0660 system system
|
||||
/dev/stpbt 0660 bluetooth radio
|
||||
/dev/stpgps 0660 gps gps
|
||||
/dev/Vcodec 0660 media system
|
||||
/dev/wmtWifi 0660 system system
|
||||
/dev/sec 0660 root system
|
||||
/dev/preloader 0640 root system
|
||||
/dev/misc-sd 0640 root system
|
||||
/dev/sec_ro 0640 root system
|
||||
/dev/recovery 0640 root system
|
||||
/dev/seccfg 0660 root system
|
||||
/dev/block/mmcblk0 0660 root root
|
||||
/dev/block/platform/mtk-msdc.0/by-name/PRO_INFO 0660 root system
|
||||
/dev/trustzone 0660 root drmrpc
|
||||
/dev/devmap 0444 root media
|
||||
/dev/mali 0666 system graphics
|
||||
/dev/gps 0660 gps system
|
||||
/dev/ttyGS2 0660 bluetooth radio
|
||||
/dev/dvt-adc 0660 root camera
|
||||
|
||||
# sysfs properties
|
||||
|
||||
/sys/devices/virtual/thermal/thermal_zone* mode 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trips 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* policy 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* polling 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* cdevs 0660 system system
|
||||
/sys/devices/virtual/thermal/cooling_device* cur_state 0660 system system
|
||||
/sys/devices/virtual/thermal/cooling_device* levels 0660 system system
|
||||
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_0_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_0_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_1_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_1_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_2_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_2_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_3_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_3_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_4_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_4_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_5_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_5_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_6_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_6_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_7_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_7_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_8_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_8_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_9_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_9_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_10_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_10_hyst 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_11_temp 0660 system system
|
||||
/sys/devices/virtual/thermal/thermal_zone* trip_point_11_hyst 0660 system system
|
||||
Reference in New Issue
Block a user