SHARE
TWEET

Xperia acro HD (IS12S) init.rc (6.0.D.0.274)

huhka_com Jun 24th, 2012 447 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on early-init
  2.     start ueventd
  3.  
  4. on init
  5.  
  6. sysclktz 0
  7.  
  8. loglevel 3
  9.  
  10. # setup the global environment
  11.     export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
  12.     export LD_LIBRARY_PATH /vendor/lib:/system/lib
  13.     export ANDROID_BOOTLOGO 1
  14.     export ANDROID_ROOT /system
  15.     export ANDROID_ASSETS /system/app
  16.     export ANDROID_DATA /data
  17.     export EXTERNAL_STORAGE /mnt/sdcard
  18.     export ASEC_MOUNTPOINT /mnt/asec
  19.     export LOOP_MOUNTPOINT /mnt/obb
  20.     export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
  21.  
  22. # Backward compatibility
  23.     symlink /system/etc /etc
  24.     symlink /sys/kernel/debug /d
  25.  
  26. # Right now vendor lives on the same filesystem as system,
  27. # but someday that may change.
  28.     symlink /system/vendor /vendor
  29.  
  30. # create mountpoints
  31.     mkdir /mnt 0775 root system
  32.     mkdir /mnt/sdcard 0000 system system
  33.  
  34. # Create cgroup mount point for cpu accounting
  35.     mkdir /acct
  36.     mount cgroup none /acct cpuacct
  37.     mkdir /acct/uid
  38.  
  39. # Backwards Compat - XXX: Going away in G*
  40.     symlink /mnt/sdcard /sdcard
  41.  
  42.     mkdir /system
  43.     mkdir /data 0771 system system
  44.     mkdir /cache 0770 system cache
  45.     mkdir /config 0500 root root
  46.  
  47.     # Directory for putting things only root should see.
  48.     mkdir /mnt/secure 0700 root root
  49.  
  50.     # Directory for staging bindmounts
  51.     mkdir /mnt/secure/staging 0700 root root
  52.  
  53.     # Directory-target for where the secure container
  54.     # imagefile directory will be bind-mounted
  55.     mkdir /mnt/secure/asec  0700 root root
  56.  
  57.     # Secure container public mount points.
  58.     mkdir /mnt/asec  0700 root system
  59.     mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
  60.  
  61.     # Filesystem image public mount points.
  62.     mkdir /mnt/obb 0700 root system
  63.     mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
  64.  
  65.     write /proc/sys/kernel/panic_on_oops 1
  66.     write /proc/sys/kernel/hung_task_timeout_secs 0
  67.     write /proc/cpu/alignment 4
  68.     write /proc/sys/kernel/sched_latency_ns 10000000
  69.     write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
  70.     write /proc/sys/kernel/sched_compat_yield 1
  71.     write /proc/sys/kernel/sched_child_runs_first 0
  72.  
  73. # Create cgroup mount points for process groups
  74.     mkdir /dev/cpuctl
  75.     mount cgroup none /dev/cpuctl cpu
  76.     chown system system /dev/cpuctl
  77.     chown system system /dev/cpuctl/tasks
  78.     chmod 0777 /dev/cpuctl/tasks
  79.     write /dev/cpuctl/cpu.shares 1024
  80.  
  81.     mkdir /dev/cpuctl/fg_boost
  82.     chown system system /dev/cpuctl/fg_boost/tasks
  83.     chmod 0777 /dev/cpuctl/fg_boost/tasks
  84.     write /dev/cpuctl/fg_boost/cpu.shares 1024
  85.  
  86.     mkdir /dev/cpuctl/bg_non_interactive
  87.     chown system system /dev/cpuctl/bg_non_interactive/tasks
  88.     chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
  89.     # 5.0 %
  90.     write /dev/cpuctl/bg_non_interactive/cpu.shares 52
  91.  
  92. on early-fs
  93.     mount rootfs rootfs / ro remount
  94.  
  95. on post-fs
  96.     # once everything is setup, no need to modify /
  97.     mount rootfs rootfs / ro remount
  98.  
  99.     # We chown/chmod /data again so because mount is run as root + defaults
  100.     chown system system /data
  101.     chmod 0771 /data
  102.  
  103.     # Create dump dir and collect dumps.
  104.     # Do this before we mount cache so eventually we can use cache for
  105.     # storing dumps on platforms which do not have a dedicated dump partition.
  106.    
  107.     mkdir /data/dontpanic
  108.     chown root log /data/dontpanic
  109.     chmod 0750 /data/dontpanic
  110.  
  111.     # Collect apanic data, free resources and re-arm trigger
  112.     copy /proc/apanic_console /data/dontpanic/apanic_console
  113.     chown root log /data/dontpanic/apanic_console
  114.     chmod 0640 /data/dontpanic/apanic_console
  115.  
  116.     copy /proc/apanic_threads /data/dontpanic/apanic_threads
  117.     chown root log /data/dontpanic/apanic_threads
  118.     chmod 0640 /data/dontpanic/apanic_threads
  119.  
  120.     write /proc/apanic_console 1
  121.  
  122.     # Same reason as /data above
  123.     chown system cache /cache
  124.     chmod 0770 /cache
  125.  
  126.     # This may have been created by the recovery system with odd permissions
  127.     mkdir /cache/recovery
  128.     chown system cache /cache/recovery
  129.     chmod 0770 /cache/recovery
  130.  
  131.     #change permissions on vmallocinfo so we can grab it from bugreports
  132.     chown root log /proc/vmallocinfo
  133.     chmod 0440 /proc/vmallocinfo
  134.  
  135.     #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
  136.     chown root system /proc/kmsg
  137.     chmod 0440 /proc/kmsg
  138.     chown root system /proc/sysrq-trigger
  139.     chmod 0220 /proc/sysrq-trigger
  140.  
  141. # create basic filesystem structure
  142.     mkdir /data/misc 01771 system misc
  143.     mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
  144.     mkdir /data/misc/bluetooth 0770 system system
  145.     mkdir /data/misc/keystore 0700 keystore keystore
  146.     mkdir /data/misc/vpn 0770 system system
  147.     mkdir /data/misc/systemkeys 0700 system system
  148.     mkdir /data/misc/vpn/profiles 0770 system system
  149.     # give system access to wpa_supplicant.conf for backup and restore
  150.     mkdir /data/misc/wifi 0770 wifi wifi
  151.     chmod 0770 /data/misc/wifi
  152.     chmod 0660 /data/misc/wifi/wpa_supplicant.conf
  153.     mkdir /data/local 0771 shell shell
  154.     mkdir /data/local/tmp 0771 shell shell
  155.     mkdir /data/data 0771 system system
  156.     mkdir /data/app-private 0771 system system
  157.     mkdir /data/app 0771 system system
  158.     mkdir /data/property 0700 root root
  159.  
  160.     # create dalvik-cache and double-check the perms
  161.     mkdir /data/dalvik-cache 0771 system system
  162.     chown system system /data/dalvik-cache
  163.     chmod 0771 /data/dalvik-cache
  164.  
  165.     # create resource-cache and double-check the perms
  166.     mkdir /data/resource-cache 0771 system system
  167.     chown system system /data/resource-cache
  168.     chmod 0771 /data/resource-cache
  169.  
  170.     # create the lost+found directories, so as to enforce our permissions
  171.     mkdir /data/lost+found 0770
  172.     mkdir /cache/lost+found 0770
  173.  
  174.     # double check the perms, in case lost+found already exists, and set owner
  175.     chown root root /data/lost+found
  176.     chmod 0770 /data/lost+found
  177.     chown root root /cache/lost+found
  178.     chmod 0770 /cache/lost+found
  179.  
  180.     # create data/drm directory
  181.     mkdir /data/drm 0774 drm drm
  182.     chown drm drm /data/drm
  183.     chmod 0774 /data/drm
  184.  
  185. on boot
  186. # basic network init
  187.     ifup lo
  188.     hostname localhost
  189.     domainname localdomain
  190.  
  191. # set RLIMIT_NICE to allow priorities from 19 to -20
  192.     setrlimit 13 40 40
  193.  
  194. # Define the oom_adj values for the classes of processes that can be
  195. # killed by the kernel.  These are used in ActivityManagerService.
  196.     setprop ro.FOREGROUND_APP_ADJ 0
  197.     setprop ro.VISIBLE_APP_ADJ 1
  198.     setprop ro.PERCEPTIBLE_APP_ADJ 2
  199.     setprop ro.HEAVY_WEIGHT_APP_ADJ 3
  200.     setprop ro.SECONDARY_SERVER_ADJ 4
  201.     setprop ro.BACKUP_APP_ADJ 5
  202.     setprop ro.HOME_APP_ADJ 6
  203.     setprop ro.HIDDEN_APP_MIN_ADJ 7
  204.     setprop ro.EMPTY_APP_ADJ 15
  205.  
  206. # Define the memory thresholds at which the above process classes will
  207. # be killed.  These numbers are in pages (4k).
  208.     setprop ro.FOREGROUND_APP_MEM 2048
  209.     setprop ro.VISIBLE_APP_MEM 3072
  210.     setprop ro.PERCEPTIBLE_APP_MEM 4096
  211.     setprop ro.HEAVY_WEIGHT_APP_MEM 4096
  212.     setprop ro.SECONDARY_SERVER_MEM 6144
  213.     setprop ro.BACKUP_APP_MEM 6144
  214.     setprop ro.HOME_APP_MEM 6144
  215.     setprop ro.HIDDEN_APP_MEM 7168
  216.     setprop ro.EMPTY_APP_MEM 8192
  217.  
  218. # Write value must be consistent with the above properties.
  219. # Note that the driver only supports 6 slots, so we have combined some of
  220. # the classes into the same memory level; the associated processes of higher
  221. # classes will still be killed first.
  222.     write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
  223.  
  224.     write /proc/sys/vm/overcommit_memory 1
  225.     write /proc/sys/vm/min_free_order_shift 4
  226.     write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
  227.  
  228.     # Set init its forked children's oom_adj.
  229.     write /proc/1/oom_adj -16
  230.  
  231.     # Tweak background writeout
  232.     write /proc/sys/vm/dirty_expire_centisecs 200
  233.     write /proc/sys/vm/dirty_background_ratio  5
  234.  
  235.     # Permissions for System Server and daemons.
  236.     chown radio system /sys/android_power/state
  237.     chown radio system /sys/android_power/request_state
  238.     chown radio system /sys/android_power/acquire_full_wake_lock
  239.     chown radio system /sys/android_power/acquire_partial_wake_lock
  240.     chown radio system /sys/android_power/release_wake_lock
  241.     chown radio system /sys/power/state
  242.     chown radio system /sys/power/wake_lock
  243.     chown radio system /sys/power/wake_unlock
  244.     chmod 0660 /sys/power/state
  245.     chmod 0660 /sys/power/wake_lock
  246.     chmod 0660 /sys/power/wake_unlock
  247.     chown system system /sys/class/timed_output/vibrator/enable
  248.     chown system system /sys/class/leds/keyboard-backlight/brightness
  249.     chown system system /sys/class/leds/lcd-backlight/brightness
  250.     chown system system /sys/class/leds/button-backlight/brightness
  251.     chown system system /sys/class/leds/jogball-backlight/brightness
  252.     chown system system /sys/class/leds/red/brightness
  253.     chown system system /sys/class/leds/green/brightness
  254.     chown system system /sys/class/leds/blue/brightness
  255.     chown system system /sys/class/leds/red/device/grpfreq
  256.     chown system system /sys/class/leds/red/device/grppwm
  257.     chown system system /sys/class/leds/red/device/blink
  258.     chown system system /sys/class/leds/red/brightness
  259.     chown system system /sys/class/leds/green/brightness
  260.     chown system system /sys/class/leds/blue/brightness
  261.     chown system system /sys/class/leds/red/device/grpfreq
  262.     chown system system /sys/class/leds/red/device/grppwm
  263.     chown system system /sys/class/leds/red/device/blink
  264.     chown system system /sys/class/timed_output/vibrator/enable
  265.     chown system system /sys/module/sco/parameters/disable_esco
  266.     chown system system /sys/kernel/ipv4/tcp_wmem_min
  267.     chown system system /sys/kernel/ipv4/tcp_wmem_def
  268.     chown system system /sys/kernel/ipv4/tcp_wmem_max
  269.     chown system system /sys/kernel/ipv4/tcp_rmem_min
  270.     chown system system /sys/kernel/ipv4/tcp_rmem_def
  271.     chown system system /sys/kernel/ipv4/tcp_rmem_max
  272.     chown root radio /proc/cmdline
  273.  
  274. # Define TCP buffer sizes for various networks
  275. #   ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  276.     setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
  277.     setprop net.tcp.buffersize.wifi    4095,87380,110208,4096,16384,110208
  278.     setprop net.tcp.buffersize.umts    4094,87380,110208,4096,16384,110208
  279.     setprop net.tcp.buffersize.edge    4093,26280,35040,4096,16384,35040
  280.     setprop net.tcp.buffersize.gprs    4092,8760,11680,4096,8760,11680
  281.  
  282.     class_start default
  283.  
  284. ## Daemon processes to be run by init.
  285. ##
  286. service ueventd /sbin/ueventd
  287.     critical
  288.  
  289. service console /system/bin/sh
  290.     console
  291.     disabled
  292.     user shell
  293.     group log
  294.  
  295. on property:ro.secure=0
  296.     start console
  297.  
  298. # adbd is controlled by the persist.service.adb.enable system property
  299. service adbd /sbin/adbd
  300.     disabled
  301.  
  302. # adbd on at boot in emulator
  303. on property:ro.kernel.qemu=1
  304.     start adbd
  305.  
  306. on property:persist.service.adb.enable=1
  307.     start adbd
  308.  
  309. on property:persist.service.adb.enable=0
  310.     stop adbd
  311.  
  312. service servicemanager /system/bin/servicemanager
  313.     user system
  314.     critical
  315.     onrestart restart zygote
  316.     onrestart restart media
  317.  
  318. service vold /system/bin/vold
  319.     console
  320.     socket vold stream 0660 root mount
  321.     ioprio be 2
  322.  
  323. service netd /system/bin/netd
  324.     socket netd stream 0660 root system dbus_access
  325.     socket dnsproxyd stream 0660 root inet
  326.  
  327. service debuggerd /system/bin/debuggerd
  328.  
  329. service ril-daemon /system/bin/rild
  330.     socket rild stream 660 root radio
  331.     socket rild-debug stream 660 radio system
  332.     user root
  333.     group radio cache inet misc audio sdcard_rw net_raw dbus_access
  334.  
  335. service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
  336.     socket zygote stream 666
  337.     onrestart write /proc/sysrq-trigger c
  338.  
  339. service drm /system/bin/drmserver
  340.     user drm
  341.     group system root inet
  342.  
  343. service bootanim /system/bin/bootanimation
  344.     user graphics
  345.     group graphics
  346.     disabled
  347.     oneshot
  348.  
  349. service dbus /system/bin/dbus-daemon --system --nofork
  350.     socket dbus stream 660 bluetooth bluetooth
  351.     socket dbus_ste stream 660 bluetooth dbus_access
  352.     user bluetooth
  353.     group bluetooth net_bt_admin dbus_access
  354.  
  355. service bluetoothd /system/bin/bluetoothd -n
  356.     socket bluetooth stream 660 bluetooth bluetooth
  357.     socket dbus_bluetooth stream 660 bluetooth bluetooth
  358.     # init.rc does not yet support applying capabilities, so run as root and
  359.     # let bluetoothd drop uid to bluetooth with the right linux capabilities
  360.     group bluetooth net_bt_admin misc
  361.     disabled
  362.  
  363. service hfag /system/bin/sdptool add --channel=10 HFAG
  364.     user bluetooth
  365.     group bluetooth net_bt_admin
  366.     disabled
  367.     oneshot
  368.  
  369. service hsag /system/bin/sdptool add --channel=11 HSAG
  370.     user bluetooth
  371.     group bluetooth net_bt_admin
  372.     disabled
  373.     oneshot
  374.  
  375. service opush /system/bin/sdptool add --channel=12 OPUSH
  376.     user bluetooth
  377.     group bluetooth net_bt_admin
  378.     disabled
  379.     oneshot
  380.  
  381. service pbap /system/bin/sdptool add --channel=19 PBAP
  382.     user bluetooth
  383.     group bluetooth net_bt_admin
  384.     disabled
  385.     oneshot
  386.  
  387. service installd /system/bin/installd
  388.     socket installd stream 600 system system
  389.  
  390. service flash_recovery /system/etc/install-recovery.sh
  391.     oneshot
  392.  
  393. service racoon /system/bin/racoon
  394.     socket racoon stream 600 system system
  395.     # racoon will setuid to vpn after getting necessary resources.
  396.     group net_admin
  397.     disabled
  398.     oneshot
  399.  
  400. service mtpd /system/bin/mtpd
  401.     socket mtpd stream 600 system system
  402.     user vpn
  403.     group vpn net_admin net_raw
  404.     disabled
  405.     oneshot
  406.  
  407. service keystore /system/bin/keystore /data/misc/keystore
  408.     user keystore
  409.     group keystore
  410.     socket keystore stream 666
  411.  
  412. service dumpstate /system/bin/dumpstate -s
  413.     socket dumpstate stream 0660 shell log
  414.     disabled
  415.     oneshot
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top