From dee5d309723d3559cce0da380c5b3413310f61ce Mon Sep 17 00:00:00 2001 From: Howard Chen Date: Wed, 5 Feb 2020 10:58:29 +0800 Subject: Make gsi_tool able to wipe an interrupted installation Bug: 146183082 Test: adb root adb shell gsi_tool install --gsi-size $(du -b system.raw|cut -f1) < system.raw --- Ctrl + C --- adb gsi_tool status --- there should be some existing partitions adb gsi_tool wipe adb gsi_tool status --- All the gsi partitions should been cleaned up Change-Id: Id63e4a52623c8363f65bc423d06eccfdf01de1f0 --- gsi_service.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/gsi_service.cpp b/gsi_service.cpp index 611f855..7a1af31 100644 --- a/gsi_service.cpp +++ b/gsi_service.cpp @@ -316,6 +316,7 @@ binder::Status GsiService::removeGsi(bool* _aidl_return) { // Can't remove gsi files while running. *_aidl_return = UninstallGsi(); } else { + installer_ = {}; *_aidl_return = RemoveGsiFiles(install_dir); } return binder::Status::ok(); -- cgit v1.2.3