summaryrefslogtreecommitdiff
path: root/file_paths.h
AgeCommit message (Collapse)Author
2020-01-14Support multiple DSU installationsHoward Chen
Bug: 144247097 Test: adb shell gsi_tool install --gsi-size $(du -b system.raw|cut -f1) < system.raw Change-Id: I17f4292fc3038040cc5848ce00081e96c79ae769
2019-09-20Extract kDsuLpMetadataFile from CanBootIntoGsiHoward Chen
This CL extracts the kDsuLpMetadataFile from CanBootIntoGsi for 2nd init to get the logical partition metadata. Bug: 140092208 Test: gsi_tool install & reboot Change-Id: I66b5bbb4d1a79ccfef5118a6463bf153f9e14afc
2019-07-19Refactor GsiService/GsiInstaller to use ImageManager.David Anderson
Since ImageManager was mostly lifted from gsi_installer.cpp, it is straightforward to remove this code and transition entirely to the new libfiemap. Bug: 134536978 Test: gsi_tool install, enable/disable, status, wipe Change-Id: Ic5e19906cfce9018fd5f9029e1e4de3852dbc5a9
2019-07-19Rename internal constants from kGsi* to kDsu*.David Anderson
As we add support for multiple types of images, we need to disambiguate the "gsi" acronym. So for Dynamic System Updates, use "Dsu" in identifiers instead of Gsi. Bug: N/A Test: builds Change-Id: I4f7dbc494b7b8650e05b96e596d665cebd6d14c4
2019-05-25Place GSI files into subfolders.David Anderson
This moves /data/gsi to /data/gsi/dsu and /metadata/gsi to /metadata/gsi/dsu. Bug: 133435561 Test: adb shell gsi_tool install Change-Id: I6ca999f8e7ae8ea294766f40c806b8822935e1b8
2019-05-13Refactor gsid to separate the installer code.David Anderson
GsiService is getting to be pretty unreadable, in part because it's a lot of code, but also because it mixes a lot of state in with the rest of GsiService. It's not always clear when it's okay for GsiService to rely on state set by the install process. To make this much more clear, this patch separates all the installer code into a separate GsiInstaller class, which has its own header and source files. GsiService will instantiate a GsiInstaller as needed and destroy it to either cancel or complete an install. As an added bonus, install cleanup can now be handled in the GsiInstaller destructor, rather than on an ad-hoc basis in GsiService. Bug: N/A Test: gsi_tool install gsi_tool disable gsi_tool enable gsi_tool wipe gsi_tool cancel Change-Id: I26b2a48487a1df903d1805de80b0c6f2a074f997
2019-03-12Allow specifying the GSI install path.David Anderson
This patch follows up on the previous change which removed hardcoding of /data/gsi. Now, the install path can be specified by gsi_tool or IGsiService::beginGsiInstall. The path is normalized and then validated. Currently, only /data/gsi is allowed, however this will be changed in the near future. This patch also introduces a new GsiInstallParams parcelable and startGsiInstall will be deprecated. Bug: 126230649 Test: gsi_tool --install-dir=/data/gsi works Change-Id: Ic654f7c7475c17855b65e5917ebcb9ee60e32b79
2019-03-07Do not hardcode /data/gsi in GsiService.android-q-preview-1David Anderson
This patch removes hardcoding of /data/gsi. Instead, StartInstall is given an installation directory, and this is saved in /metadata/gsi/install_dir. When wiping or re-enabling a GSI, image paths are recovered from install_dir. This does not actually make the path configurable: it is a refactoring to no longer rely on hardcoded image paths. Included are some minor cleanups to ensure that cancelled installs delete files properly. Bug: 126230649 Test: gsi_tool install, enable, wipe Change-Id: Ieb788e84d19127e8e3375909f3c522e16462d384
2019-03-06Allow gsi_tool to set whether GSI installs are single-boot or not.David Anderson
Previously, init would always write "disabled" back to /metadata/gsi/install_status, to effectively restore the host image after the GSI reboots. This is not always desirable, so this patch introduces a new "one_shot_boot" file. If present, the GSI will only boot once, otherwise, it can persist until manually disabled. This also adds a new getGsiBootStatus() method to IGsiService, so the UI can determine whether the GSI is in single-boot mode or not. Bug: 126148526 Test: install GSI, reboot twice - back to normal image gsi_tool enable --single-boot, reboot twice, back to normal image gsi_tool enable, reboot twice, still in GSI Change-Id: I49bffea09bc9871502ce7bf3c27518a435357ecd
2019-01-23Move gsi image files to /data/gsi.David Anderson
Bug: 122556707 Test: manual test Change-Id: I87d952498865bf8372ba2bbd86e3fa91cd05be5e
2019-01-16Allow disabling and re-enabling GSI.David Anderson
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
2019-01-14Implement a boot attempt counter.David Anderson
Bug: 122556707 Test: manual test Change-Id: I75457b95aef9d74bbf4121850f2f29fdc887386c
2019-01-11Introduce a daemon (gsid) for managing GSI installs.David Anderson
Bug: 122556707 Test: manual test Change-Id: I96d833f77740e6b791992336e590dd1a089895c9
2019-01-08Introduce libgsi, gsi_tool.David Anderson
libgsi is a very small library to communicate critical gsi knowledge to init and fs_mgr, to avoid hardcoding path names and constants. gsi_tool is a shell wrapper to talk to gsid through binder. gsid (currently in vold, will be moved shortly) is the daemon to manage gsi installs. Bug: 121210348 Test: N/A Change-Id: I7942af56cb8e6ed69d28189bcf8d9806aa5e3e45