diff options
author | David Anderson <dvander@google.com> | 2019-01-14 19:09:27 -0800 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-01-16 09:17:56 +0000 |
commit | a141ba8b1e18e9ad65f923cf1eb0f6976c51354e (patch) | |
tree | 786c151914c7fe4f1c5118665507462a70626dd2 /include | |
parent | b3aff184cac0cbea6a587c4bf290fe2ae83b85b1 (diff) | |
download | gsid-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 'include')
-rw-r--r-- | include/libgsi/libgsi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libgsi/libgsi.h b/include/libgsi/libgsi.h index ba5dd71..b3d1202 100644 --- a/include/libgsi/libgsi.h +++ b/include/libgsi/libgsi.h @@ -37,6 +37,9 @@ bool IsGsiInstalled(); // GSI was bootable, false is returned. bool UninstallGsi(); +// Set the GSI as no longer bootable, without removing its installed files. +bool DisableGsi(); + // Returns true if init should attempt to boot into a live GSI image, false // otherwise. If true, then the path to the liblp metadata file is set. If // false, an error message is set instead. |