From 008697afb68eddfbb3c8036bce0da6be5af4609b Mon Sep 17 00:00:00 2001 From: Stricted Date: Sun, 6 May 2018 20:13:18 +0200 Subject: [PATCH] [WIP] ramdisk cleanup Change-Id: Ib5c7ff2dcc33a788813c22fcb9e7f3cc7d3e1ea4 --- ramdisk/factory_init.project.rc | 71 --- ramdisk/factory_init.rc | 689 -------------------------- ramdisk/init.environ2.rc | 13 - ramdisk/init.mt8127.rc | 250 ---------- ramdisk/init.ssd_nomuser.rc | 0 ramdisk/init.tct.mt8127.rc | 837 -------------------------------- ramdisk/init.tct.rc | 660 ------------------------- ramdisk/meta_init.project.rc | 73 --- ramdisk/meta_init.rc | 444 ----------------- 9 files changed, 3037 deletions(-) delete mode 100644 ramdisk/factory_init.project.rc delete mode 100644 ramdisk/factory_init.rc delete mode 100644 ramdisk/init.environ2.rc delete mode 100644 ramdisk/init.ssd_nomuser.rc delete mode 100644 ramdisk/init.tct.mt8127.rc delete mode 100644 ramdisk/init.tct.rc delete mode 100644 ramdisk/meta_init.project.rc delete mode 100644 ramdisk/meta_init.rc diff --git a/ramdisk/factory_init.project.rc b/ramdisk/factory_init.project.rc deleted file mode 100644 index 186c873..0000000 --- a/ramdisk/factory_init.project.rc +++ /dev/null @@ -1,71 +0,0 @@ -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) -# - diff --git a/ramdisk/factory_init.rc b/ramdisk/factory_init.rc deleted file mode 100644 index faa6e5b..0000000 --- a/ramdisk/factory_init.rc +++ /dev/null @@ -1,689 +0,0 @@ -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 - - # 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..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 - -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..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..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 diff --git a/ramdisk/init.environ2.rc b/ramdisk/init.environ2.rc deleted file mode 100644 index 4a030a9..0000000 --- a/ramdisk/init.environ2.rc +++ /dev/null @@ -1,13 +0,0 @@ -# set up the global environment -on init - export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin - export ANDROID_BOOTLOGO 1 - export ANDROID_ROOT /system - export ANDROID_ASSETS /system/app - export ANDROID_DATA /data - export ANDROID_STORAGE /storage - export ASEC_MOUNTPOINT /mnt/asec - export LOOP_MOUNTPOINT /mnt/obb - export BOOTCLASSPATH /system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/mediatek-telephony-common.jar - export SYSTEMSERVERCLASSPATH /system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar - export LD_PRELOAD libsigchain.so diff --git a/ramdisk/init.mt8127.rc b/ramdisk/init.mt8127.rc index e9fef35..ce323bb 100644 --- a/ramdisk/init.mt8127.rc +++ b/ramdisk/init.mt8127.rc @@ -5,9 +5,6 @@ import init.connectivity.rc import init.charging.rc import init.mt8127usb.rc import init.aee.rc -import init.ssd.rc -import init.no_ssd.rc -import init.ssd_nomuser.rc on init # export LD_PRELOAD "libxlog.so" @@ -168,7 +165,6 @@ on init 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 @@ -186,7 +182,6 @@ on fs # 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 @@ -201,13 +196,10 @@ on fs #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_all /fstab.mt8127 setprop ro.crypto.fuse_sdcard true - write /proc/bootprof "INIT:eMMC:Mount_END" mount iso9660 loop@/system/etc/iAmCdRom.iso /mnt/cd-rom ro write /sys/class/misc/tp_cfg/data_is_mount 1 @@ -455,114 +447,19 @@ service akmd09911 /system/bin/akmd09911 user system group system class main - -service GoogleOtaAgent /system/bin/GoogleOtaBinder - class main - user system - group system - -# workaround: disable mtkbt to avoid NE -service mtkbt /system/bin/mtkbt - class late_start - socket bt.int.adp dgram 660 bluetooth net_bt - socket bt.a2dp.stream dgram 660 bluetooth net_bt - user bluetooth - group system vpn net_admin inet net_raw net_bt bluetooth net_bt_admin net_bt_stack sdcard_r - oneshot - -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 -BK -dd - class main - user dhcp - group net_admin net_raw - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -BK -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 - disabled - oneshot -service thermal /system/bin/thermal - class main - user system - group system - disabled - -service thermald /system/bin/thermald - class main - user system - group system - disabled - -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) # @@ -614,13 +511,6 @@ service ap_daemon /system/bin/wpa_supplicant \ disabled oneshot -service mobile_log_d /system/bin/mobile_log_d - class main - -service netdiag /system/bin/netdiag - class main - socket netdiag stream 0660 root inet - # # MT6620 related services (End) # @@ -634,10 +524,6 @@ service bootlogoupdater /system/bin/boot_logo_updater class core oneshot -service auto_shutdown /system/bin/sh /auto_shutdown.sh - oneshot - disabled - service audio-daemon /system/bin/audiocmdservice_atci class main socket atci-audio stream 660 media system @@ -646,11 +532,6 @@ service audio-daemon /system/bin/audiocmdservice_atci 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 @@ -667,75 +548,12 @@ service guiext-server /system/bin/guiext-server chmod 0660 /dev/ttyGS2 chown bluetooth radio /dev/ttyGS2 -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 # @@ -745,13 +563,6 @@ service MtkCodecService /system/bin/MtkCodecService user system group audio media sdcard_r -#MNLD daemon -service mnld /system/xbin/mnld - class main - user gps - group gps inet misc sdcard_rw sdcard_r media_rw system - socket mnld stream 660 gps system - on boot # AGPS mkdir /data/agps_supl 0771 gps system @@ -800,64 +611,3 @@ 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 - -# -#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 diff --git a/ramdisk/init.ssd_nomuser.rc b/ramdisk/init.ssd_nomuser.rc deleted file mode 100644 index e69de29..0000000 diff --git a/ramdisk/init.tct.mt8127.rc b/ramdisk/init.tct.mt8127.rc deleted file mode 100644 index a91a68b..0000000 --- a/ramdisk/init.tct.mt8127.rc +++ /dev/null @@ -1,837 +0,0 @@ - -#connectivity related init script -#import init.project.rc -#import init.connectivity.rc -import init.charging.rc -#import init.mt8127usb.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 - mount tmpfs tmpfs /storage/usbotg mode=0755,uid=1000,gid=1000 - -# 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 0666 /dev/graphics/fb0 - chown system graphics /dev/graphics/fb0 - -#HWComposer Vsync - chmod 0666 /dev/mtkfb_vsync - chown system graphics /dev/mtkfb_vsync - - -#HWComposer fence - chmod 0666 /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 0666 /dev/mtk_disp - chown system system /dev/mtk_disp - -# 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 - -# 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 - -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_all /fstab.mt8127 - 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 2770 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 - - # change key_provisioning - mkdir /data/key_provisioning - chmod 0770 /data/key_provisioning - chown system system /data/key_provisioning - restorecon /data/key_provisioning - - # encryption flow - setprop vold.post_fs_data_done 1 - - # Recycle stuffs - exec /system/bin/rm -f /cache/.ipoh.img - -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 - -# -#drm operation server -service kisd /system/bin/kisd - class main - -service nvram_daemon /system/bin/nvram_daemon - class main - user root - group system - 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 - -# workaround: disable mtkbt to avoid NE -service mtkbt /system/bin/mtkbt - class late_start - socket bt.int.adp dgram 660 bluetooth net_bt - socket bt.a2dp.stream dgram 660 bluetooth net_bt - user bluetooth - group system vpn net_admin inet net_raw net_bt bluetooth net_bt_admin net_bt_stack sdcard_r - oneshot - -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 -BK -dd - class main - user dhcp - group net_admin net_raw - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -BK -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 -ddd \ - -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 -ddd \ - -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 -ddd - # 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 - -service mobile_log_d /system/bin/mobile_log_d - class main - -service netdiag /system/bin/netdiag - class main - socket netdiag stream 0660 root inet - -# -# 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 /auto_shutdown.sh - oneshot - disabled - -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 - -# -#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 diff --git a/ramdisk/init.tct.rc b/ramdisk/init.tct.rc deleted file mode 100644 index 736678e..0000000 --- a/ramdisk/init.tct.rc +++ /dev/null @@ -1,660 +0,0 @@ -# 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.usb.rc -import /init.tct.${ro.hardware}.rc -#import /init.${ro.zygote}.rc -#import /init.trace.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 6 #### - write /proc/bootprof "INIT: on init start" #### - - # 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 - - # Create cgroup mount point for memory - mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000 - mkdir /sys/fs/cgroup/memory 0750 root system - mount cgroup none /sys/fs/cgroup/memory memory - write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1 - chown root system /sys/fs/cgroup/memory/tasks - chmod 0660 /sys/fs/cgroup/memory/tasks - mkdir /sys/fs/cgroup/memory/sw 0750 root system - write /sys/fs/cgroup/memory/sw/memory.swappiness 100 - write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1 - chown root system /sys/fs/cgroup/memory/sw/tasks - chmod 0660 /sys/fs/cgroup/memory/sw/tasks - - ##bsp config enable - write /sys/class/misc/tp_cfg/cfg_load_enable 1 - - 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 - - # 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 - - # memory control cgroup - mkdir /dev/memcg 0700 root system - mount cgroup none /dev/memcg memory - - 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/vm/mmap_min_addr 32768 - write /proc/sys/net/ipv4/ping_group_range "0 2147483647" - write /proc/sys/net/unix/max_dgram_qlen 300 - write /proc/sys/kernel/sched_rt_runtime_us 950000 - write /proc/sys/kernel/sched_rt_period_us 1000000 - - # reflect fwmark from incoming packets onto generated replies - write /proc/sys/net/ipv4/fwmark_reflect 1 - write /proc/sys/net/ipv6/fwmark_reflect 1 - - # set fwmark on accepted sockets - write /proc/sys/net/ipv4/tcp_fwmark_accept 1 - - # Create cgroup mount points for process groups - 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 - - 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 - - # qtaguid will limit access to specific data based on group memberships. - # net_bw_acct grants impersonation of socket owners. - # net_bw_stats grants access to other apps' detailed tagged-socket stats. - chown root net_bw_acct /proc/net/xt_qtaguid/ctrl - chown root net_bw_stats /proc/net/xt_qtaguid/stats - - # 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 - - # Create location for fs_mgr to store abbreviated output from filesystem - # checker programs. - mkdir /dev/fscklogs 0770 root system - - # pstore/ramoops previous console log - mount pstore pstore /sys/fs/pstore - chown system log /sys/fs/pstore/console-ramoops - chmod 0440 /sys/fs/pstore/console-ramoops - - # ion device - chmod 0666 /dev/ion - -# 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 - -# Indicate to fw loaders that the relevant mounts are up. -on firmware_mounts_complete - rm /dev/.booting - -# 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 - - # Remove a file to wake up anything waiting for firmware. - trigger firmware_mounts_complete - - trigger early-boot - trigger boot - - -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 - - # 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 - - # This may have been created by the recovery system with odd permissions - chown system cache /cache/recovery - chmod 0770 /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 - - # 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 - - # Avoid predictable entropy pool. Carry over entropy from previous boot. - copy /data/system/entropy.dat /dev/urandom - - # 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/misc 01771 system misc - mkdir /data/misc/adb 02750 system shell - mkdir /data/misc/bluedroid 0770 bluetooth net_bt_stack - mkdir /data/misc/bluetooth 0770 system system - mkdir /data/misc/keystore 0700 keystore keystore - mkdir /data/misc/keychain 0771 system system - mkdir /data/misc/net 0750 root shell - mkdir /data/misc/radio 0770 system radio - mkdir /data/misc/sms 0770 system radio - mkdir /data/misc/zoneinfo 0775 system system - mkdir /data/misc/vpn 0770 system vpn - mkdir /data/misc/shared_relro 0771 shared_relro shared_relro - mkdir /data/misc/systemkeys 0700 system system - mkdir /data/misc/wifi 0770 wifi wifi - mkdir /data/misc/wifi/sockets 0770 wifi wifi - mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi - mkdir /data/misc/ethernet 0770 system system - mkdir /data/misc/dhcp 0770 dhcp dhcp - mkdir /data/misc/user 0771 root root - # give system access to wpa_supplicant.conf for backup and restore - chmod 0660 /data/misc/wifi/wpa_supplicant.conf - mkdir /data/local 0751 root root - mkdir /data/misc/media 0700 media media - - # 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-lib 0771 system system - mkdir /data/app 0771 system system - mkdir /data/property 0700 root root - - # create dalvik-cache, so as to enforce our permissions - mkdir /data/dalvik-cache 0771 root root - mkdir /data/dalvik-cache/profiles 0711 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 root root - - # create directory for DRM plug-ins - give drm the read/write access to - # the following directory. - mkdir /data/drm 0770 drm drm #### - # mkdir /data/drm 0774 drm system #### - - # create directory for MediaDrm plug-ins - give drm the read/write access to - # the following directory. - mkdir /data/mediadrm 0770 mediadrm mediadrm - - # symlink to bugreport storage location - symlink /data/data/com.android.shell/files/bugreports /data/bugreports - - # Separate location for storing security policy files on data - mkdir /data/security 0711 system system - - # add for mediaserver data - mkdir /data/mediaserver 0775 media media - restorecon /data/mediaserver - - # 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..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 - # basic network init - ifup lo - hostname localhost - domainname localdomain - - # set RLIMIT_NICE to allow priorities from 19 to -20 - setrlimit 13 40 40 - - # Memory management. Basic kernel parameters, and allow the high - # level system server to be able to adjust the kernel OOM driver - # parameters to match how it is managing things. - 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 0220 /sys/module/lowmemorykiller/parameters/adj - chown root system /sys/module/lowmemorykiller/parameters/minfree - chmod 0220 /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/timer_slack - chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack - 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/target_loads - chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads - 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 - chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy - - # 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/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 default initial receive window size in segments. - setprop net.tcp.default_init_rwnd 60 - - 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:sys.init_log_level=* - loglevel ${sys.init_log_level} - -on charger - class_start charger - -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 - class_start main - class_start late_start - -on property:vold.decrypt=trigger_shutdown_framework - class_reset late_start - class_reset main - -on property:sys.powerctl=* - powerctl ${sys.powerctl} - -# system server cannot write to /proc/sys files, -# and chown/chmod does not work for /proc/sys/ entries. -# So proxy writes through init. -on property:sys.sysctl.extra_free_kbytes=* - write /proc/sys/vm/extra_free_kbytes ${sys.sysctl.extra_free_kbytes} - -# "tcp_default_init_rwnd" Is too long! -on property:sys.sysctl.tcp_def_init_rwnd=* - write /proc/sys/net/ipv4/tcp_default_init_rwnd ${sys.sysctl.tcp_def_init_rwnd} - - -## Daemon processes to be run by init. -## -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 healthd /sbin/healthd - class core - critical - seclabel u:r:healthd:s0 - -service console /system/bin/sh - class core - console - disabled - user shell - seclabel u:r:shell:s0 - -on property:ro.debuggable=1 - start console - -# adbd is controlled via property triggers in init..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 lmkd /system/bin/lmkd -# class core -# critical -# socket lmkd seqpacket 0660 system system - -#service servicemanager /system/bin/servicemanager -# class core -# user system -# group system -# critical -# onrestart restart healthd -# onrestart restart zygote -# onrestart restart media -# onrestart restart surfaceflinger -# onrestart restart drm - -#service vold /system/bin/vold -# class core -# socket vold stream 0660 root mount -# ioprio be 2 - -#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 -# socket fwmarkd stream 0660 root inet - -#service debuggerd /system/bin/debuggerd -# class main - -#service debuggerd64 /system/bin/debuggerd64 -# class main - -# for using TK init.modem.rc rild-daemon setting -#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 - -#service surfaceflinger /system/bin/surfaceflinger -# class core -# user system -# group graphics drmrpc -# onrestart restart zygote - -#make sure drm server has rights to read and write sdcard #### -#service drm /system/bin/drmserver -# class main -# user drm - # group drm system inet drmrpc #### -# group drm system inet drmrpc sdcard_r #### - -#service media /system/bin/mediaserver -# class main -# user root #### -# google default #### -# user media #### -# group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm media sdcard_r system net_bt_stack #### -# google default #### -# group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc mediadrm #### - -# ioprio rt 4 - -# 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 bootanim /system/bin/bootanimation -# class core -# user graphics -# group graphics audio #### -# group graphics media audio #### -# disabled -# oneshot - -#service installd /system/bin/installd -# class main -# socket installd stream 600 system system - -#service flash_recovery /system/bin/install-recovery.sh -# class main -# seclabel u:r:install_recovery:s0 -# oneshot - -#service racoon /system/bin/racoon -# class main -# socket racoon stream 600 system system - # IKE uses UDP port 500. Racoon will setuid to vpn after binding the port. -# group vpn net_admin inet -# disabled -# oneshot - -#service mtpd /system/bin/mtpd -# class main -# socket mtpd stream 600 system system -# user vpn -# group vpn net_admin inet net_raw -# disabled -# oneshot - -#service keystore /system/bin/keystore /data/misc/keystore -# class main -# user keystore -# group keystore drmrpc - -#service dumpstate /system/bin/dumpstate -s -# class main -# socket dumpstate stream 0660 shell log -# disabled -# oneshot - -#service mdnsd /system/bin/mdnsd -# class main -# user mdnsr -# group inet net_raw -# socket mdnsd stream 0660 mdnsr inet -# disabled -# oneshot - -#service pre-recovery /system/bin/uncrypt -# class main -# disabled -# oneshot diff --git a/ramdisk/meta_init.project.rc b/ramdisk/meta_init.project.rc deleted file mode 100644 index b0e0af2..0000000 --- a/ramdisk/meta_init.project.rc +++ /dev/null @@ -1,73 +0,0 @@ -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) -# - diff --git a/ramdisk/meta_init.rc b/ramdisk/meta_init.rc deleted file mode 100644 index e5b246b..0000000 --- a/ramdisk/meta_init.rc +++ /dev/null @@ -1,444 +0,0 @@ -# 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 - -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 - 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 2770 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..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..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 - 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 -- 2.20.1