From 42a0fed78b761ab06f220786c29f51459265bdec Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Fri, 20 Jan 2017 12:08:10 -0800 Subject: [PATCH] init: don't start tombstoned until /data is mounted. When vold mounts the encrypted /data partition, it first checks for and kills processes that have open fds to the tmpfs placeholder at /data. This resulted in a 20 second boot-time regression (vold's timeout period) when tombstoned was started before vold. Bug: http://b/34461270 Test: boot is faster, no messages from vold in console spew Test: tombstoned still started by init Change-Id: Ib5e9ddb05f40c9da852f00e103861c6ff2d94888 --- debuggerd/tombstoned/tombstoned.rc | 2 -- rootdir/init.rc | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/debuggerd/tombstoned/tombstoned.rc b/debuggerd/tombstoned/tombstoned.rc index 3aacf332f..eaae9c475 100644 --- a/debuggerd/tombstoned/tombstoned.rc +++ b/debuggerd/tombstoned/tombstoned.rc @@ -1,6 +1,4 @@ service tombstoned /system/bin/tombstoned - class core - user tombstoned group system diff --git a/rootdir/init.rc b/rootdir/init.rc index 791d67ffd..c2e25e8ce 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -356,14 +356,13 @@ on post-fs-data # We restorecon /data in case the userdata partition has been reset. restorecon /data - # start debuggerd to make debugging early-boot crashes easier. - start debuggerd - start debuggerd64 - # Make sure we have the device encryption key. start vold installkey /data + # start tombstoned to record early-boot crashes. + start tombstoned + # Start bootcharting as soon as possible after the data partition is # mounted to collect more data. mkdir /data/bootchart 0755 shell shell