Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f1b3279 authored by James Hawkins's avatar James Hawkins Committed by Android (Google) Code Review
Browse files

Merge "bootstat: Record the time since factory reset on init." into nyc-dev

parents 426799d7 c0188da2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ analysis.
      -p, --print           Dump the boot event records to the console
      -r, --record          Record the timestamp of a named boot event
      --record_boot_reason  Record the reason why the device booted
      --record_time_since_factory_reset Record the time since the device was reset

## Relative time ##

+3 −2
Original line number Diff line number Diff line
@@ -80,7 +80,8 @@ void ShowHelp(const char *cmd) {
          "  -l, --log             Log all metrics to logstorage\n"
          "  -p, --print           Dump the boot event records to the console\n"
          "  -r, --record          Record the timestamp of a named boot event\n"
          "  --record_boot_reason  Record the reason why the device booted\n");
          "  --record_boot_reason  Record the reason why the device booted\n"
          "  --record_time_since_factory_reset Record the time since the device was reset\n");
}

// Constructs a readable, printable string from the givencommand line
@@ -192,7 +193,7 @@ int main(int argc, char **argv) {

  int option_index = 0;
  static const char boot_reason_str[] = "record_boot_reason";
  static const char factory_reset_str[] = "record_factory_reset";
  static const char factory_reset_str[] = "record_time_since_factory_reset";
  static const struct option long_options[] = {
    { "help",            no_argument,       NULL,   'h' },
    { "log",             no_argument,       NULL,   'l' },
+3 −0
Original line number Diff line number Diff line
@@ -13,5 +13,8 @@ on property:init.svc.bootanim=stopped
    # 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