1 // 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 // 16 17 #include "update_engine/common/constants.h" 18 19 namespace chromeos_update_engine { 20 21 const char kPowerwashMarkerFile[] = 22 "/mnt/stateful_partition/factory_install_reset"; 23 24 const char kPowerwashCommand[] = "safe fast keepimg reason=update_engine\n"; 25 26 const char kPowerwashSafePrefsSubDirectory[] = "update_engine/prefs"; 27 28 const char kPrefsSubDirectory[] = "prefs"; 29 30 const char kStatefulPartition[] = "/mnt/stateful_partition"; 31 32 const char kPostinstallDefaultScript[] = "postinst"; 33 34 // Constants defining keys for the persisted state of update engine. 35 const char kPrefsAttemptInProgress[] = "attempt-in-progress"; 36 const char kPrefsBackoffExpiryTime[] = "backoff-expiry-time"; 37 const char kPrefsBootId[] = "boot-id"; 38 const char kPrefsCurrentBytesDownloaded[] = "current-bytes-downloaded"; 39 const char kPrefsCurrentResponseSignature[] = "current-response-signature"; 40 const char kPrefsCurrentUrlFailureCount[] = "current-url-failure-count"; 41 const char kPrefsCurrentUrlIndex[] = "current-url-index"; 42 const char kPrefsDailyMetricsLastReportedAt[] = 43 "daily-metrics-last-reported-at"; 44 const char kPrefsDeltaUpdateFailures[] = "delta-update-failures"; 45 const char kPrefsFullPayloadAttemptNumber[] = "full-payload-attempt-number"; 46 const char kPrefsInstallDateDays[] = "install-date-days"; 47 const char kPrefsLastActivePingDay[] = "last-active-ping-day"; 48 const char kPrefsLastRollCallPingDay[] = "last-roll-call-ping-day"; 49 const char kPrefsManifestMetadataSize[] = "manifest-metadata-size"; 50 const char kPrefsManifestSignatureSize[] = "manifest-signature-size"; 51 const char kPrefsMetricsAttemptLastReportingTime[] = 52 "metrics-attempt-last-reporting-time"; 53 const char kPrefsMetricsCheckLastReportingTime[] = 54 "metrics-check-last-reporting-time"; 55 const char kPrefsNumReboots[] = "num-reboots"; 56 const char kPrefsNumResponsesSeen[] = "num-responses-seen"; 57 const char kPrefsOmahaCohort[] = "omaha-cohort"; 58 const char kPrefsOmahaCohortHint[] = "omaha-cohort-hint"; 59 const char kPrefsOmahaCohortName[] = "omaha-cohort-name"; 60 const char kPrefsP2PEnabled[] = "p2p-enabled"; 61 const char kPrefsP2PFirstAttemptTimestamp[] = "p2p-first-attempt-timestamp"; 62 const char kPrefsP2PNumAttempts[] = "p2p-num-attempts"; 63 const char kPrefsPayloadAttemptNumber[] = "payload-attempt-number"; 64 const char kPrefsPreviousVersion[] = "previous-version"; 65 const char kPrefsResumedUpdateFailures[] = "resumed-update-failures"; 66 const char kPrefsRollbackVersion[] = "rollback-version"; 67 const char kPrefsChannelOnSlotPrefix[] = "channel-on-slot-"; 68 const char kPrefsSystemUpdatedMarker[] = "system-updated-marker"; 69 const char kPrefsTargetVersionAttempt[] = "target-version-attempt"; 70 const char kPrefsTargetVersionInstalledFrom[] = "target-version-installed-from"; 71 const char kPrefsTargetVersionUniqueId[] = "target-version-unique-id"; 72 const char kPrefsTotalBytesDownloaded[] = "total-bytes-downloaded"; 73 const char kPrefsUpdateCheckCount[] = "update-check-count"; 74 const char kPrefsUpdateCheckResponseHash[] = "update-check-response-hash"; 75 const char kPrefsUpdateCompletedBootTime[] = "update-completed-boot-time"; 76 const char kPrefsUpdateCompletedOnBootId[] = "update-completed-on-boot-id"; 77 const char kPrefsUpdateDurationUptime[] = "update-duration-uptime"; 78 const char kPrefsUpdateFirstSeenAt[] = "update-first-seen-at"; 79 const char kPrefsUpdateOverCellularPermission[] = 80 "update-over-cellular-permission"; 81 const char kPrefsUpdateServerCertificate[] = "update-server-cert"; 82 const char kPrefsUpdateStateNextDataLength[] = "update-state-next-data-length"; 83 const char kPrefsUpdateStateNextDataOffset[] = "update-state-next-data-offset"; 84 const char kPrefsUpdateStateNextOperation[] = "update-state-next-operation"; 85 const char kPrefsUpdateStateSHA256Context[] = "update-state-sha-256-context"; 86 const char kPrefsUpdateStateSignatureBlob[] = "update-state-signature-blob"; 87 const char kPrefsUpdateStateSignedSHA256Context[] = 88 "update-state-signed-sha-256-context"; 89 const char kPrefsUpdateTimestampStart[] = "update-timestamp-start"; 90 const char kPrefsUrlSwitchCount[] = "url-switch-count"; 91 const char kPrefsWallClockWaitPeriod[] = "wall-clock-wait-period"; 92 93 const char kPayloadPropertyFileSize[] = "FILE_SIZE"; 94 const char kPayloadPropertyFileHash[] = "FILE_HASH"; 95 const char kPayloadPropertyMetadataSize[] = "METADATA_SIZE"; 96 const char kPayloadPropertyMetadataHash[] = "METADATA_HASH"; 97 const char kPayloadPropertyAuthorization[] = "AUTHORIZATION"; 98 const char kPayloadPropertyUserAgent[] = "USER_AGENT"; 99 100 } // namespace chromeos_update_engine 101