| James Hawkins | 6bff639 | 2016-01-21 15:16:36 -0800 | [diff] [blame] | 1 | # This file is the LOCAL_INIT_RC file for the bootstat command. | 
|  | 2 |  | 
|  | 3 | on post-fs-data | 
|  | 4 | mkdir /data/misc/bootstat 0700 root root | 
|  | 5 |  | 
| James Hawkins | c08e996 | 2016-03-11 14:59:50 -0800 | [diff] [blame] | 6 | # Record the time at which the user has successfully entered the pin to decrypt | 
|  | 7 | # the device, /data is decrypted, and the system is entering the main boot phase. | 
|  | 8 | # | 
|  | 9 | # post-fs-data: /data is writable | 
|  | 10 | # property:init.svc.bootanim=running: The boot animation is running | 
|  | 11 | on post-fs-data && property:init.svc.bootanim=running | 
|  | 12 | exec - root root -- /system/bin/bootstat -r post_decrypt_time_elapsed | 
|  | 13 |  | 
| James Hawkins | 5e655f0 | 2016-03-03 14:36:22 -0800 | [diff] [blame] | 14 | # The first marker, boot animation stopped, is considered the point at which | 
| James Hawkins | 6bff639 | 2016-01-21 15:16:36 -0800 | [diff] [blame] | 15 | # the user may interact with the device, so it is a good proxy for the boot | 
|  | 16 | # complete signal. | 
| James Hawkins | 5e655f0 | 2016-03-03 14:36:22 -0800 | [diff] [blame] | 17 | # | 
|  | 18 | # The second marker ensures an encrypted device is decrypted before logging | 
|  | 19 | # boot time data. | 
|  | 20 | on property:init.svc.bootanim=stopped && property:vold.decrypt=trigger_restart_framework | 
| James Hawkins | c08e996 | 2016-03-11 14:59:50 -0800 | [diff] [blame] | 21 | # Record boot_complete and related stats (decryption, etc). | 
|  | 22 | exec - root root -- /system/bin/bootstat --record_boot_complete | 
| James Hawkins | 6bff639 | 2016-01-21 15:16:36 -0800 | [diff] [blame] | 23 |  | 
| James Hawkins | a4a1a4a | 2016-02-09 15:32:38 -0800 | [diff] [blame] | 24 | # Record the boot reason. | 
|  | 25 | exec - root root -- /system/bin/bootstat --record_boot_reason | 
|  | 26 |  | 
| James Hawkins | 53684ea | 2016-02-23 16:18:19 -0800 | [diff] [blame] | 27 | # Record time since factory reset. | 
|  | 28 | exec - root root -- /system/bin/bootstat --record_time_since_factory_reset | 
|  | 29 |  | 
| James Hawkins | 6bff639 | 2016-01-21 15:16:36 -0800 | [diff] [blame] | 30 | # Log all boot events. | 
|  | 31 | exec - root root -- /system/bin/bootstat -l |