Loading fastboot/device/commands.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -659,7 +659,7 @@ bool SnapshotUpdateHandler(FastbootDevice* device, const std::vector<std::string return device->WriteFail("No snapshot merge is in progress"); } auto sm = SnapshotManager::NewForFirstStageMount(); auto sm = SnapshotManager::New(); if (!sm) { return device->WriteFail("Unable to create SnapshotManager"); } Loading fs_mgr/libsnapshot/snapshot.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -94,7 +94,11 @@ std::unique_ptr<SnapshotManager> SnapshotManager::New(IDeviceInfo* info) { if (!info) { info = new DeviceInfo(); } return std::unique_ptr<SnapshotManager>(new SnapshotManager(info)); auto sm = std::unique_ptr<SnapshotManager>(new SnapshotManager(info)); if (info->IsRecovery()) { sm->ForceLocalImageManager(); } return sm; } std::unique_ptr<SnapshotManager> SnapshotManager::NewForFirstStageMount(IDeviceInfo* info) { Loading Loading @@ -3180,7 +3184,7 @@ bool SnapshotManager::HandleImminentDataWipe(const std::function<void()>& callba auto slot_number = SlotNumberForSlotSuffix(device_->GetSlotSuffix()); auto super_path = device_->GetSuperDevice(slot_number); if (!CreateLogicalAndSnapshotPartitions(super_path)) { if (!CreateLogicalAndSnapshotPartitions(super_path, 20s)) { LOG(ERROR) << "Unable to map partitions to complete merge."; return false; } Loading Loading @@ -3220,7 +3224,7 @@ bool SnapshotManager::FinishMergeInRecovery() { auto slot_number = SlotNumberForSlotSuffix(device_->GetSlotSuffix()); auto super_path = device_->GetSuperDevice(slot_number); if (!CreateLogicalAndSnapshotPartitions(super_path)) { if (!CreateLogicalAndSnapshotPartitions(super_path, 20s)) { LOG(ERROR) << "Unable to map partitions to complete merge."; return false; } Loading Loading @@ -3366,7 +3370,7 @@ CreateResult SnapshotManager::RecoveryCreateSnapshotDevices( auto slot_suffix = device_->GetOtherSlotSuffix(); auto slot_number = SlotNumberForSlotSuffix(slot_suffix); auto super_path = device_->GetSuperDevice(slot_number); if (!CreateLogicalAndSnapshotPartitions(super_path)) { if (!CreateLogicalAndSnapshotPartitions(super_path, 20s)) { LOG(ERROR) << "Unable to map partitions."; return CreateResult::ERROR; } Loading fs_mgr/libsnapshot/snapuserd.rc +1 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,4 @@ service snapuserd /system/bin/snapuserd disabled user root group root system seclabel u:r:snapuserd:s0 Loading
fastboot/device/commands.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -659,7 +659,7 @@ bool SnapshotUpdateHandler(FastbootDevice* device, const std::vector<std::string return device->WriteFail("No snapshot merge is in progress"); } auto sm = SnapshotManager::NewForFirstStageMount(); auto sm = SnapshotManager::New(); if (!sm) { return device->WriteFail("Unable to create SnapshotManager"); } Loading
fs_mgr/libsnapshot/snapshot.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -94,7 +94,11 @@ std::unique_ptr<SnapshotManager> SnapshotManager::New(IDeviceInfo* info) { if (!info) { info = new DeviceInfo(); } return std::unique_ptr<SnapshotManager>(new SnapshotManager(info)); auto sm = std::unique_ptr<SnapshotManager>(new SnapshotManager(info)); if (info->IsRecovery()) { sm->ForceLocalImageManager(); } return sm; } std::unique_ptr<SnapshotManager> SnapshotManager::NewForFirstStageMount(IDeviceInfo* info) { Loading Loading @@ -3180,7 +3184,7 @@ bool SnapshotManager::HandleImminentDataWipe(const std::function<void()>& callba auto slot_number = SlotNumberForSlotSuffix(device_->GetSlotSuffix()); auto super_path = device_->GetSuperDevice(slot_number); if (!CreateLogicalAndSnapshotPartitions(super_path)) { if (!CreateLogicalAndSnapshotPartitions(super_path, 20s)) { LOG(ERROR) << "Unable to map partitions to complete merge."; return false; } Loading Loading @@ -3220,7 +3224,7 @@ bool SnapshotManager::FinishMergeInRecovery() { auto slot_number = SlotNumberForSlotSuffix(device_->GetSlotSuffix()); auto super_path = device_->GetSuperDevice(slot_number); if (!CreateLogicalAndSnapshotPartitions(super_path)) { if (!CreateLogicalAndSnapshotPartitions(super_path, 20s)) { LOG(ERROR) << "Unable to map partitions to complete merge."; return false; } Loading Loading @@ -3366,7 +3370,7 @@ CreateResult SnapshotManager::RecoveryCreateSnapshotDevices( auto slot_suffix = device_->GetOtherSlotSuffix(); auto slot_number = SlotNumberForSlotSuffix(slot_suffix); auto super_path = device_->GetSuperDevice(slot_number); if (!CreateLogicalAndSnapshotPartitions(super_path)) { if (!CreateLogicalAndSnapshotPartitions(super_path, 20s)) { LOG(ERROR) << "Unable to map partitions."; return CreateResult::ERROR; } Loading
fs_mgr/libsnapshot/snapuserd.rc +1 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,4 @@ service snapuserd /system/bin/snapuserd disabled user root group root system seclabel u:r:snapuserd:s0