Add proto tombstones to dropbox directly.
Avoid truncation and mangling the byte contents with a text header by adding to the dropbox directly. Bug: http://b/75261590 Test: `crasher; dumpsys dropbox --print` Change-Id: I6de1c203d4723b1f9bb40a197b234f4b4b1e334e
This commit is contained in:
@@ -479,9 +479,13 @@ public class BootReceiver extends BroadcastReceiver {
|
||||
final String bootReason = SystemProperties.get("ro.boot.bootreason", null);
|
||||
HashMap<String, Long> timestamps = readTimestamps();
|
||||
try {
|
||||
final String headers = getBootHeadersToLogAndUpdate();
|
||||
addFileToDropBox(db, timestamps, headers, tombstone.getPath(), LOG_SIZE,
|
||||
proto ? TAG_TOMBSTONE_PROTO : TAG_TOMBSTONE);
|
||||
if (proto) {
|
||||
db.addFile(TAG_TOMBSTONE_PROTO, tombstone, 0);
|
||||
} else {
|
||||
final String headers = getBootHeadersToLogAndUpdate();
|
||||
addFileToDropBox(db, timestamps, headers, tombstone.getPath(), LOG_SIZE,
|
||||
TAG_TOMBSTONE);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Slog.e(TAG, "Can't log tombstone", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user