1# Copyright (C) 2016 The Android Open Source Project 2# 3# IMPORTANT: Do not create world writable files or directories. 4# This is a common source of Android security bugs. 5# 6on post-fs-data 7 mkdir /data/misc/bootstat 0700 root root 8 9# Record the time at which the user has successfully entered the pin to decrypt 10# the device, /data is decrypted, and the system is entering the main boot phase. 11# 12# post-fs-data: /data is writable 13# property:init.svc.bootanim=running: The boot animation is running 14on post-fs-data && property:init.svc.bootanim=running 15 exec - root root -- /system/bin/bootstat -r post_decrypt_time_elapsed 16 17# Boot animation stopped, is considered the point at which 18# the user may interact with the device, so it is a good proxy for the boot 19# complete signal. 20on property:init.svc.bootanim=stopped 21 # Record boot_complete and related stats (decryption, etc). 22 exec - root root -- /system/bin/bootstat --record_boot_complete 23 24on property:dev.bootcomplete=1 25 exec - root root -- /system/bin/bootstat -r dev_bootcomplete 26 # Log all boot events. 27 exec - root root -- /system/bin/bootstat -l 28 29on property:boot.car_service_created=1 30 exec - root root -- /system/bin/bootstat -r car_service_created 31 32on property:init.svc.zygote=running 33 exec - root root -- /system/bin/bootstat -r zygote_running 34