summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Chen <howardsoc@google.com>2020-02-05 10:58:29 +0800
committerHoward Chen <howardsoc@google.com>2020-02-05 11:00:08 +0800
commitdee5d309723d3559cce0da380c5b3413310f61ce (patch)
tree698beaeeba991b5b505f6807132baf5a9f15df6c
parent4a3bcc6b7a3f8453c295a32a230e6b18ca954f26 (diff)
downloadgsid-dee5d309723d3559cce0da380c5b3413310f61ce.tar.gz
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
-rw-r--r--gsi_service.cpp1
1 files changed, 1 insertions, 0 deletions
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();