summaryrefslogtreecommitdiff
path: root/file_paths.h
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-01-14 19:09:27 -0800
committerDavid Anderson <dvander@google.com>2019-01-16 09:17:56 +0000
commita141ba8b1e18e9ad65f923cf1eb0f6976c51354e (patch)
tree786c151914c7fe4f1c5118665507462a70626dd2 /file_paths.h
parentb3aff184cac0cbea6a587c4bf290fe2ae83b85b1 (diff)
downloadgsid-a141ba8b1e18e9ad65f923cf1eb0f6976c51354e.tar.gz
Allow disabling and re-enabling GSI.
This change introduces two new commands to gsi_tool: enable and disable. Disable is similar to "wipe", in that it allows reboot back into the normal system image. However unlike "wipe" the GSI images will not be deleted on startup. The GSI install can then be re-enabled with the "enable" command. Unfortunately, this currently has a high probability of hitting a bug in F2FS where the file cannot be repinned. This can happen if the device has been used or rebooted extensively in between disabling and re-enabling the GSI. In addition, the semantics of the "install" command have changed. It will now attempt to re-use an existing userdata if one exists. To force a clean userdata, the --wipe parameter can be specified. To disable a GSI install: gsi_tool disable adb reboot To re-enable a GSI install: gsi_tool enable adb reboot To install a GSI and preserve userdata: gsi_tool install --gsi-size=SIZE < image To install a GSI and create a userdata if none exists: gsi_tool install --gsi-size=SIZE --userdata-size=SIZE < image To install a GSI and wipe userdata: gsi_tool install --gsi-size=SIZE --userdata-size=SIZE --wipe < image Bug: 122556707 Test: manual test Change-Id: Ia55ca930b0b7f6b2b97a6390568555b4166e2605
Diffstat (limited to 'file_paths.h')
-rw-r--r--file_paths.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/file_paths.h b/file_paths.h
index b305db3..7c5fd14 100644
--- a/file_paths.h
+++ b/file_paths.h
@@ -26,12 +26,12 @@ static constexpr char kSystemFile[] = "/data/unencrypted/gsi/system_gsi.img";
static constexpr char kGsiMetadataFolder[] = "/metadata/gsi";
static constexpr char kGsiLpMetadataFile[] = "/metadata/gsi/lp_metadata";
-static constexpr char kGsiMetadata[] = "/metadata/gsi/lp_metadata";
// This file can contain the following values:
// [int] - boot attempt counter, starting from 0
// "ok" - boot was marked successful
// "disabled" - boot into GSI no longer allowed
+// "wipe" - boot into GSI not allowed; next reboot will delete gsi
static constexpr char kGsiInstallStatusFile[] = "/metadata/gsi/install_status";
} // namespace gsi