File: bootstat.rc

package info (click to toggle)
android-platform-system-core 1%3A7.0.0%2Br33-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,464 kB
  • sloc: cpp: 96,742; ansic: 39,563; asm: 3,482; python: 1,571; sh: 666; lex: 311; java: 169; makefile: 65; xml: 19
file content (31 lines) | stat: -rw-r--r-- 1,303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This file is the LOCAL_INIT_RC file for the bootstat command.

on post-fs-data
    mkdir /data/misc/bootstat 0700 root root

# Record the time at which the user has successfully entered the pin to decrypt
# the device, /data is decrypted, and the system is entering the main boot phase.
#
# post-fs-data: /data is writable
# property:init.svc.bootanim=running: The boot animation is running
on post-fs-data && property:init.svc.bootanim=running
    exec - root root -- /system/bin/bootstat -r post_decrypt_time_elapsed

# The first marker, boot animation stopped, is considered the point at which
# the user may interact with the device, so it is a good proxy for the boot
# complete signal.
#
# The second marker ensures an encrypted device is decrypted before logging
# boot time data.
on property:init.svc.bootanim=stopped && property:vold.decrypt=trigger_restart_framework
    # Record boot_complete and related stats (decryption, etc).
    exec - root root -- /system/bin/bootstat --record_boot_complete

    # Record the boot reason.
    exec - root root -- /system/bin/bootstat --record_boot_reason

    # Record time since factory reset.
    exec - root root -- /system/bin/bootstat --record_time_since_factory_reset

    # Log all boot events.
    exec - root root -- /system/bin/bootstat -l