Age | Commit message (Collapse) | Author |
|
Call closePartition() to check error status after each partition
installation, so that we don't enable and reboot a DSU while the
installation fails.
Bug: 165471299
Test: gsi_tool install
Change-Id: Ie1e5a97ee486af17c0d435853257d17e436a4553
|
|
`gsi_tool create-partition [-p <name>] [-s <size>] [--readwrite]`
is a debugging API used to create DSU partitions. Readwritable
partitions such as userdata and scratch should be created with the
"--readwrite" flag.
This is like `gsi_tool install` but `create-partition` is more primitive
and does less things (doesn't auto-create userdata, doesn't auto-reboot.)
This is a debugging API so don't depend on its behavior and don't expect
it to be stable.
Bug: 165925766
Test: adb shell gsi_tool create-partition --readwrite \
--partition scratch --size $((200 * 1024 * 1024))
Change-Id: I9ce463220534ba46c948ea48e9c52bdc0ff762b1
|
|
`gsi_tool` is `dup()`-ing FD 1, which is the STDOUT_FILENO, and
sending it to `gsid`, and `gsid` is calling `read()` on the FD.
`gsi_tool` should actually be sending FD 0, the STDIN, to `gsid`.
Bug: 166589508
Test: gzip -c system.raw | adb shell "zcat | gsi_tool install ..."
Change-Id: I9d7bb5f2a1146d3c5ac7332eae34a67963a6eb5d
|
|
* Cleanup unused headers
* Cleanup libgsid unused dependencies
Test: Build and boot
Change-Id: I22456c176dde524bc51a435bca6fc45d37240f56
|
|
Replace the original on demand start mechanism with the new dynamic
AIDL service infrastructure to resolve a possible race condition.
Bug: 149130673
Test: gsi_tool status
Change-Id: I141475b56191eb82efe222bf7522350fc66a7dac
|
|
Bug: 149962466
Test: gsi_tool wipe-data
Change-Id: I3265805c95ebad4ed37c4f0f0df2840214e232d4
|
|
Retrieves AVB public key from an image's VBMeta block.
Bug: 146418878
Test: adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
--el KEY_USERDATA_SIZE 8589934592 \
-d file:///storage/emulated/0/Download/aosp_arm64-dsu_test.zip
Test: adb shell gsi_tool status \
// command should show sha1 of public key for each partition
Change-Id: Ic529275a2678e6c1ce341910e4dbbe9af66742a7
|
|
Bug: 144247097
Test: adb shell gsi_tool install --gsi-size $(du -b system.raw|cut -f1) < system.raw
Change-Id: I17f4292fc3038040cc5848ce00081e96c79ae769
|
|
Bug: 146386624
Test: DSUEndtoEndTest
Change-Id: I376f253c740575d8350b14faed1d04743d038f81
|
|
Test: TH presubmit
Change-Id: Ide39c9f71d2daf06591096d50ad9a5aa59aa68db
|
|
* Remove GsiInstallParams.aidl
* GsiInstaller -> PartitionInstaller
* beginGsiInstall -> open, close, createPartition
* wipeUserdata -> zeroPartition
* GetInstallation returns current installation
* SaveInstallation save current installation
Test: gsi_tool install & reboot
adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system.raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
--el KEY_USERDATA_SIZE 8589934592
Change-Id: I2be8b12130bd0a5f768a496c3a0ca8a3b2682c45
|
|
The gsid may function abnormally when an installation get interrupted.
case 1.
$ gsi_tool install
... use ctrl+C to stop ...
$ gsi_tool wipe
Could not remove GSI install.
case 2
When it's interrupted. The installer destructor does not have the
the chance to run therefore it can be a resource leak because the
backing files, e.g. system_gsi and userdata_gsi are not released.
Neither can they be enabled because the IsGsiInstalled() == false.
This CL fixes cases above by making a integrity model based on
IsGsiInstalled() as an atomic switch, e.g.
if (IsGsiInstalled()) {
The installation must be complete and the enableGsi() must work.
} else {
All resources that have been allocated must be cleaned up.
a. Clean up methods and command must work.
b. runStartup method must do the clean up.
}
All corresponding changes are based on this model.
Bug: 140014207
Test: \
1. gsi_tool install & reboot
2. gsi_tool install & ctrl+C & gsi_tool status & gsi_tool wipe & gsi_tool status
3. gsi_tool install & ctrl+C & gsi_tool status & reboot & gsi_tool status
Change-Id: I0dcf043d65b50f0dd82eac1f428a295e94c81812
|
|
Make gsid to support multiple partitions in a generic way.
Bug: 139402092
Test: \
adb shell gsi_tool install -n --gsi-size $(du -b system.raw|cut -f1) -w < system.raw
adb shell gsi_tool install -n --gsi-size $(du -b vendor.raw|cut -f1) -p vendor < vendor.raw
Change-Id: Iaf5259cc059daa61cf52efab20bf23a433909b7a
|
|
* changes:
Use Ashmem to reduce buffer copies.
Clean up legacy methods and naming
|
|
remove: startGsiInstall
framework does not use the old prototype any more.
remove: getGsiStatus
framework does not use it any more.
rename: setGsiBootable -> enableGsi
make it consistent with its reverse action: disableGsi
rename: removeGsiInstall -> removeGsi
rename: disableGsiInstall -> disableGsi
the word install now refers to the installation session.
rename for consistency.
Bug: 138544413
Test: gsi_tool install/enable/disable
adb shell am start-activity \
-n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
-a android.os.image.action.START_INSTALL \
-d file:///storage/emulated/0/Download/system.raw.gz \
--el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
--el KEY_USERDATA_SIZE 8589934592
Change-Id: I974d781d1eca82cecd813ad7bf557c5aec6f8f45
Merged-In: I974d781d1eca82cecd813ad7bf557c5aec6f8f45
|
|
Bug: 140204341
Test: gsi_tool
Change-Id: I40fb2ff6ad58346d0711b971de5d1a7d3fba6774
|
|
Add the getAllBackImages to get all installed backing image names.
This method is needed to support DSU with multiple partitions.
Test: gsi_tool status
Bug: 139402092
Change-Id: I91b83398c0a3c9874a38de94140d8a5f00fcf924
|
|
Consumers of gsiservice must now use IGsid for its top-level interface.
IGsiService can be acquired through IGsid::getClient. When the last
reference to IGsiService is dropped, gsid will cleanly exit. Callers
should no longer stop gsid through init.
Bug: 133528572
Test: gsid cleanly exits after gsi_tool runs
Change-Id: Ie5cb80fa63e61b143f9f27cca96999a5c71dab2c
Merged-In: Ie5cb80fa63e61b143f9f27cca96999a5c71dab2c
|
|
Bug: 134185850
Test: gsi_tool install
reboot; skip setup wizard
reboot
gsi_tool wipe-data
gsi_tool enable
reboot; expect setup wizard
Change-Id: I44b676f9e08a890b14f056c7ab095c42158d9eb4
|
|
Bug: N/A
Test: gsid builds
Change-Id: Ica52e0c7cc7cba214df274df85bfaf7d533b446e
|
|
In order to re-enable the Gsi from framework, we need a method to
query the current enable status.
Bug: 125079548
Test: use the status command
Change-Id: Ia6c0ae12e2e6613f112a241d2cf5733f8bf22984
|
|
The StartInstall may take more than one mintue. This CL adds an
aborting_ flag to notify the allocating procedure to exit once
the flag is set. It also adds a "cancel" command to gsi_tool for
testing purpose.
Test: open two adb consoles: one starts the installation and
another uses the cancel command to abort.
Bug: 125599267
Change-Id: I8f8fc460df526abda81ed6e0ac8f7176a28e9df3
|
|
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
|
|
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
|
|
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
|
|
With this patch, gsid is disabled by default. It can be enabled
on-demand via setting the ctl.start property to "gsid".
In addition, this patch cleans up error reporting in gsi_tool to
distinguish between binder and IGsiService errors, and fixes a bug where
"gsi_tool enable" would not work from a non-root shell.
Bug: 126622385
Test: gsid not running by default
Change-Id: Icd6350f146d12e71befafa91ac859cf438376bc1
|
|
Bug: 123716647
Test: manual test
Change-Id: Ia7987ed007e9de57e32df87cd63d999d76402ccc
|
|
Bug: N/A
Test: manual test
Change-Id: I168be339e00e2e3ecf495902056554d8ca884da3
|
|
This patch makes the following changes to gsid:
- It now runs on startup and is no longer a one-shot service.
- /data/gsi is now created via init, with the appropriate permissions.
- gsi_tool no longer starts/stops gsid.
- /metadata/gsi is readable by the system group, so system_server can
read /metadata/gsi/booted.
Bug: 122556707
Test: manual test
Change-Id: I08c0c6e9a155a0dea113c8535e71bda5aeda0ff6
|
|
Bug: 122556707
Test: manual test
Change-Id: I8bcb5ce7fd02a6bbf40595a66a5f25c0e2ac1a54
|
|
If the progress bar receives a sequence like:
T+0 "create system" 99%
T+1 "write gsi" 1%
It'll draw the "create system" bar at 99% and leave it there forever.
Ensure that FinishLastBar() gets called before moving onto a new
operation.
Bug: 122556707
Test: manual test
Change-Id: Ic27ebdd41a088f621a2885a9c2d1db7079ab5223
|
|
The gsi_tool status command may show
"running" : gsi is running
"installed": gsi is installed
"normal":
Test: gsi_tool status
Change-Id: Ib789b5ce90e9a60085fd629df56a610a84d66537
|
|
Bug: 122556707
Test: manual test
Change-Id: I3f551cc373d74e0977705e575f074953d6b4da5b
|
|
It is useful to distinguish errors like "not enough free space" from "random
syscall failed for unknown reason". To do this, let's introduce some
error codes to IGsiService::startGsiInstall and setGsiBootable.
Bug: 122556707
Test: manual test
Change-Id: I227720129cb0d44599ae7d6f797a071431e0b057
|
|
This is asking for trouble, and will be properly supported by the
migration story rather than nesting images within nested images.
Bug: 122556707
Test: manual test
Change-Id: I2f2a0c2d737f49b8b8264ddcfd7e7985105c76d1
|
|
This patch introduces a getInstallProgress API call to IGsiService. It
is intended to be called while startGsiInstall or
commitGsiChunkFromStream are in progress, and will return details about
the current state. These details include the number of bytes left to
process and which step of the function is blocking.
Callers should invoke getInstallProgress on a separate thread. It is
safe to invoke when no operations are in progress. The caller must take
care to handle state transitions that are missed due to delays or sleep
calls. For example, call #1 may return step A at 50%, and call #2 may
return step B at 10%. It is the caller's responsibility to note that
the previous step successfully completed. gsi_tool contains sample code
for using this API.
Bug: 122556707
Test: manual test
Change-Id: I9af952368834bc3b5b5dadbbee6e91094d237cad
|
|
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
|
|
Bug: 122556707
Test: m platform-java
Change-Id: Ib0dcb332d049c2f240cd8ffd29a628ba04622191
Merged-In: Ib0dcb332d049c2f240cd8ffd29a628ba04622191
Signed-off-by: Sandeep Patil <sspatil@google.com>
|
|
Bug: 122556707
Test: manual test
Change-Id: I96d833f77740e6b791992336e590dd1a089895c9
|
|
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
|