blob: 1b41a851f7e2541cdb71459f867fb4650c1e346b [file] [log] [blame]
Alex Deymoaea4c1c2015-08-19 20:24:43 -07001//
2// Copyright (C) 2013 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070016
17#include "update_engine/constants.h"
18
19namespace chromeos_update_engine {
20
21const char kPowerwashMarkerFile[] =
Chris Sosaaa18e162013-06-20 13:20:30 -070022 "/mnt/stateful_partition/factory_install_reset";
23
Thiemo Nagel513599c2014-12-15 19:17:45 +010024const char kPowerwashCommand[] = "safe fast keepimg reason=update_engine\n";
Chris Sosaaa18e162013-06-20 13:20:30 -070025
Alex Deymodd132f32015-09-14 19:12:07 -070026const char kPowerwashSafePrefsSubDirectory[] = "update_engine/prefs";
Chris Sosaaa18e162013-06-20 13:20:30 -070027
Alex Deymodd132f32015-09-14 19:12:07 -070028const char kPrefsSubDirectory[] = "prefs";
Chris Sosaaa18e162013-06-20 13:20:30 -070029
30const char kStatefulPartition[] = "/mnt/stateful_partition";
Jay Srinivasan1c0fe792013-03-28 16:45:25 -070031
Jay Srinivasand29695d2013-04-08 15:08:05 -070032// Constants defining keys for the persisted state of update engine.
David Zeuthen4e1d1492014-04-25 13:12:27 -070033const char kPrefsAttemptInProgress[] = "attempt-in-progress";
Jay Srinivasand29695d2013-04-08 15:08:05 -070034const char kPrefsBackoffExpiryTime[] = "backoff-expiry-time";
Alex Deymodd132f32015-09-14 19:12:07 -070035const char kPrefsBootId[] = "boot-id";
Jay Srinivasand29695d2013-04-08 15:08:05 -070036const char kPrefsCertificateReportToSendDownload[] =
37 "certificate-report-to-send-download";
38const char kPrefsCertificateReportToSendUpdate[] =
39 "certificate-report-to-send-update";
Jay Srinivasan19409b72013-04-12 19:23:36 -070040const char kPrefsCurrentBytesDownloaded[] = "current-bytes-downloaded";
Jay Srinivasand29695d2013-04-08 15:08:05 -070041const char kPrefsCurrentResponseSignature[] = "current-response-signature";
42const char kPrefsCurrentUrlFailureCount[] = "current-url-failure-count";
43const char kPrefsCurrentUrlIndex[] = "current-url-index";
David Zeuthen985b1122013-10-09 12:13:15 -070044const char kPrefsDailyMetricsLastReportedAt[] =
45 "daily-metrics-last-reported-at";
Jay Srinivasand29695d2013-04-08 15:08:05 -070046const char kPrefsDeltaUpdateFailures[] = "delta-update-failures";
Alex Deymo820cc702013-06-28 15:43:46 -070047const char kPrefsFullPayloadAttemptNumber[] = "full-payload-attempt-number";
David Zeuthen639aa362014-02-03 16:23:44 -080048const char kPrefsInstallDateDays[] = "install-date-days";
Jay Srinivasand29695d2013-04-08 15:08:05 -070049const char kPrefsLastActivePingDay[] = "last-active-ping-day";
50const char kPrefsLastRollCallPingDay[] = "last-roll-call-ping-day";
51const char kPrefsManifestMetadataSize[] = "manifest-metadata-size";
David Zeuthen33bae492014-02-25 16:16:18 -080052const char kPrefsMetricsAttemptLastReportingTime[] =
53 "metrics-attempt-last-reporting-time";
54const char kPrefsMetricsCheckLastReportingTime[] =
55 "metrics-check-last-reporting-time";
Chris Sosabe45bef2013-04-09 18:25:12 -070056const char kPrefsNumReboots[] = "num-reboots";
David Zeuthena573d6f2013-06-14 16:13:36 -070057const char kPrefsNumResponsesSeen[] = "num-responses-seen";
Alex Deymo8e18f932015-03-27 16:16:59 -070058const char kPrefsOmahaCohort[] = "omaha-cohort";
59const char kPrefsOmahaCohortHint[] = "omaha-cohort-hint";
60const char kPrefsOmahaCohortName[] = "omaha-cohort-name";
David Zeuthen27a48bc2013-08-06 12:06:29 -070061const char kPrefsP2PEnabled[] = "p2p-enabled";
David Zeuthen639aa362014-02-03 16:23:44 -080062const char kPrefsP2PFirstAttemptTimestamp[] = "p2p-first-attempt-timestamp";
63const char kPrefsP2PNumAttempts[] = "p2p-num-attempts";
Jay Srinivasand29695d2013-04-08 15:08:05 -070064const char kPrefsPayloadAttemptNumber[] = "payload-attempt-number";
65const char kPrefsPreviousVersion[] = "previous-version";
66const char kPrefsResumedUpdateFailures[] = "resumed-update-failures";
Chris Sosaaa18e162013-06-20 13:20:30 -070067const char kPrefsRollbackVersion[] = "rollback-version";
Alex Deymo85616652015-10-15 18:48:31 -070068const char kPrefsChannelOnSlotPrefix[] = "channel-on-slot-";
David Zeuthene4c58bf2013-06-18 17:26:50 -070069const char kPrefsSystemUpdatedMarker[] = "system-updated-marker";
Alex Deymo42432912013-07-12 20:21:15 -070070const char kPrefsTargetVersionAttempt[] = "target-version-attempt";
71const char kPrefsTargetVersionInstalledFrom[] = "target-version-installed-from";
72const char kPrefsTargetVersionUniqueId[] = "target-version-unique-id";
Jay Srinivasan19409b72013-04-12 19:23:36 -070073const char kPrefsTotalBytesDownloaded[] = "total-bytes-downloaded";
Jay Srinivasand29695d2013-04-08 15:08:05 -070074const char kPrefsUpdateCheckCount[] = "update-check-count";
75const char kPrefsUpdateCheckResponseHash[] = "update-check-response-hash";
Alex Deymo906191f2015-10-12 12:22:44 -070076const char kPrefsUpdateCompletedBootTime[] = "update-completed-boot-time";
77const char kPrefsUpdateCompletedOnBootId[] = "update-completed-on-boot-id";
David Zeuthencc6f9962013-04-18 11:57:24 -070078const char kPrefsUpdateDurationUptime[] = "update-duration-uptime";
Jay Srinivasand29695d2013-04-08 15:08:05 -070079const char kPrefsUpdateFirstSeenAt[] = "update-first-seen-at";
Alex Deymof4867c42013-06-28 14:41:39 -070080const char kPrefsUpdateOverCellularPermission[] =
81 "update-over-cellular-permission";
Jay Srinivasand29695d2013-04-08 15:08:05 -070082const char kPrefsUpdateServerCertificate[] = "update-server-cert";
David Zeuthen41996ad2013-09-24 15:43:24 -070083const char kPrefsUpdateStateNextDataLength[] = "update-state-next-data-length";
David Zeuthen639aa362014-02-03 16:23:44 -080084const char kPrefsUpdateStateNextDataOffset[] = "update-state-next-data-offset";
Jay Srinivasand29695d2013-04-08 15:08:05 -070085const char kPrefsUpdateStateNextOperation[] = "update-state-next-operation";
86const char kPrefsUpdateStateSHA256Context[] = "update-state-sha-256-context";
87const char kPrefsUpdateStateSignatureBlob[] = "update-state-signature-blob";
88const char kPrefsUpdateStateSignedSHA256Context[] =
89 "update-state-signed-sha-256-context";
David Zeuthen9a017f22013-04-11 16:10:26 -070090const char kPrefsUpdateTimestampStart[] = "update-timestamp-start";
David Zeuthencc6f9962013-04-18 11:57:24 -070091const char kPrefsUrlSwitchCount[] = "url-switch-count";
92const char kPrefsWallClockWaitPeriod[] = "wall-clock-wait-period";
Jay Srinivasand29695d2013-04-08 15:08:05 -070093
Alex Vakulenkod2779df2014-06-16 13:19:00 -070094} // namespace chromeos_update_engine