--- /dev/null
+// Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#include "common/step/security/step_recover_privilege_compatibility.h"
+
+#include "common/step/security/step_privilege_compatibility.h"
+
+namespace common_installer {
+namespace security {
+
+Step::Status StepRecoverPrivilegeCompatibility::RecoveryUpdate() {
+ StepPrivilegeCompatibility step(context_, internal_priv_type_);
+ Status status = step.precheck();
+ if (status != Status::OK)
+ return status;
+ return step.process();
+}
+
+} // namespace security
+} // namespace common_installer
--- /dev/null
+// Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+// Use of this source code is governed by an apache-2.0 license that can be
+// found in the LICENSE file.
+
+#ifndef COMMON_STEP_SECURITY_RECOVER_STEP_PRIVILEGE_COMPATIBILITY_H_
+#define COMMON_STEP_SECURITY_RECOVER_STEP_PRIVILEGE_COMPATIBILITY_H_
+
+#include <manifest_parser/utils/logging.h>
+
+#include "common/installer_context.h"
+#include "common/step/recovery/step_recovery.h"
+#include "common/step/security/step_privilege_compatibility.h"
+
+namespace common_installer {
+namespace security {
+
+/**
+ * @brief Recovers privilege compatibility
+ *
+ * This is the part of Recovery Mode that is responsible for converting
+ * privilieges declared in package manifest to the privileges for current
+ * platform version
+ */
+class StepRecoverPrivilegeCompatibility : public recovery::StepRecovery {
+ public:
+ using StepRecovery::StepRecovery;
+
+ StepRecoverPrivilegeCompatibility(InstallerContext* context,
+ StepPrivilegeCompatibility::InternalPrivType internal_priv_type)
+ : StepRecovery(context),
+ internal_priv_type_(internal_priv_type) {}
+
+ Status RecoveryNew() override { return Status::OK; }
+ Status RecoveryUpdate() override;
+
+ private:
+ StepPrivilegeCompatibility::InternalPrivType internal_priv_type_;
+
+ STEP_NAME(RecoverPrivilegeCompatibility)
+};
+
+} // namespace security
+} // namespace common_installer
+
+#endif // COMMON_STEP_SECURITY_STEP_RECOVER_PRIVILEGE_COMPATIBILITY_H_