summaryrefslogtreecommitdiff
path: root/Android.bp
AgeCommit message (Collapse)Author
2021-07-23Make libgsi vendor_ramdisk_available.android-s-beta-5android-s-beta-5David Anderson
This is needed to make libfs_mgr vendor_ramdisk_available. Bug: 193833730 Test: builds Change-Id: Ie7d26c4121f7b6a33794d2a57751856a039f401d
2021-06-14Add ramdisk_available to init_first_stage's depsInseob Kim
Bug: 187196593 Test: boot Change-Id: I23cf4f9753a934e7053a70ef11cfafaa8fa4bd62
2021-03-22Make DSU metadata files globally readableYi-Yo Chiang
libfstab (fs_mgr_fstab.cpp) could be statically linked into unpriviledged processes, and calling fs_mgr_fstab.cpp:ReadFstabFromFile() from an unpriviledged process while inside of a DSU system would return an incorrect Fstab, because ReadFstabFromFile() needs to read the DSU metadata files to return the correct result. To remedy this, we make DSU metadata files that are required by libfstab to be globally readable (0644). We also split the sepolicy label gsi_metadata_filea into two part, gsi_metadata_file and gsi_public_metadata_file, and make gsi_public_metadata_file:file readable by other domain (not banned by neverallow). Bug: 181110285 Test: Write a small utility program to validate the result of ReadFstabFromFile() in DSU. Change-Id: Ia7c8c584b23752195198cc43698c71a31cabc00e
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to system/gsidBob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp tests/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I5a601b271460864c0460a86464da0ab31fce398e
2020-12-30Add IGsiService::suggestScratchSize()Yo Chiang
DSU installation service could call this method to get a suggested scratch partition size, if the DSU guest system would need overlayFS (remount) feature. This size is just a suggestion, and is not guaranteed to work. The caller (framework) should still check if the DSU scratch partition is allocated successfully. The scratch partition allocation could fail if the suggested size is larger than available free space. Bug: 165925766 Test: TH Change-Id: Ie6202d15a76a21f59219a80dc3a20e9405ed7f66
2020-10-13Destroy DSU metadata encryption key when wiping an installationYo Chiang
Call IVold::destroyDsuMetadataKey() to destroy the old key. This ensures that wiping and reinstalling a DSU system would generate different metadata encryption keys, albeit using the same key dir. Bug: 168571434 Test: 1. Install a DSU system. 2. Boot the DSU system and reboot back to the host system. 3. Wipe the DSU installation. 4. DSU metadata key dir /metadata/vold/metadata_encryption/dsu/dsu is destroyed. Change-Id: I5b66c6ac440f857a7bb22341d5dc70480a4075b2
2020-10-08Remove vts10 related configsDan Shi
vts_config is a test wrapper used for VTS10 harness. The test is replaced by generic gtest and vts10 harness will be removed from S release. VtsGsiBootTest is replaced by vts_gsi_boot_test. Bug: 169584384 Test: build Change-Id: Ie02852be511fcfe49e10755d83d690d65ff95f6f
2020-07-14Add missing shared library dependencies from system/core/libutils/Android.bpStephen Hines
Without these shared library dependencies, our updated lld detects missing symbols like android_load_sphal_library and SetTaskProfiles. Bug: http://b/155835175 Test: m for aosp_blueline Change-Id: I5190ea8c139acb12feb13366fa58f52d71ef80b1
2020-04-20Mark some aidl_interface modules as unstableJiyong Park
With b/152655547, all aidl_interface modules are considered as stable unless it is explicitly with "unstable: true". This change marks the aidl_interface that are not used across updatable module bounraries as unstable, so that the build system does not run the API dumping/checking on them. Exempt-From-Owner-Approval: cherry-pick from internal Bug: 152655547 Test: m Merged-In: Ic16f45803a4532ffd818e74e3ca4b90f788113cc (cherry picked from commit 5e06a0a2fb83f921ad8c9a25c7b70c241dc675e8) Change-Id: Ic16f45803a4532ffd818e74e3ca4b90f788113cc
2020-03-11Cleanup unused dependenciesandroid-r-preview-4android-r-preview-3android-r-preview-2Yo Chiang
* Cleanup unused headers * Cleanup libgsid unused dependencies Test: Build and boot Change-Id: I22456c176dde524bc51a435bca6fc45d37240f56
2020-03-03Convert gsid to use the dynamic AIDL service infrastructureHoward Chen
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
2020-03-03Provide oneway method for methods required by system_serverHoward Chen
Bug: 149790245 Bug: 149716497 Test: 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: I472566bd84591422ef67c9838b9c94a0a6f1e8aa
2020-02-05Add getAvbPublicKey to IGsiService and IImageServiceYo Chiang
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
2020-01-16Merge "Support multiple DSU installations"Howard Chen
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
2020-01-06ImageManager returns FiemapStatus.Yifan Hong
IImageManager::CreateBackingImage and ZeroFillNewImage now returns FiemapStatus, which indicates the source of error. Put the error code in binder::Status object as service specific error. Test: libsnapshot_test Bug: 138808058 Change-Id: I8b93c05ac7cceeb500e98945b16e43d5fde2cc4c
2019-12-18Linking to libfiemap_passthrough is no longer necessary.David Anderson
Bug: 134949511 Test: builds Change-Id: I7dd6e67ab71560ddf420d044020a6085f862e7d3
2019-11-12RefactoringHoward Chen
* 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
2019-10-29Convert Android.mk file to Android.bpSasha Smundak
See build/soong/README.md for more information. Fixes: 143559126 Test: vts-tradefed run commandAndExit vts-kernel --primary-abi-only --module VtsGsiBootTest && vts-tradefed run commandAndExit vts-kernel --primary-abi-only --module VtsFiemapWriterTest Change-Id: Ibf378b2ef6fae1eb9feba62c404626c369aa7ef7
2019-10-02Add a binder call to retrieve device-mapper tables for diagnostics.David Anderson
The binder call is exposed through "gsid dump-device-mapper". Since this requires linking to libgsid, also take the opportunity to move gsid dependencies to static linkage. Bug: 140204341 Test: dumpstate Change-Id: I8858fde00cd5159be7794b22791fe14914af9a1c
2019-09-09Factor GetGsiService into a helper library.David Anderson
Bug: 140204341 Test: gsi_tool Change-Id: I40fb2ff6ad58346d0711b971de5d1a7d3fba6774
2019-08-21Set path property in the filegroupJiyong Park
Set the path property to the base directory of the AIDL files so that include paths are automatically extracted from filegroup module Bug: 70046217 Test: m Change-Id: I54395ca22ba74238d8f4015b848832cf0ae4b8d5
2019-08-14libfiemap: Do not use weak linkage.Yifan Hong
Move the passthrough IImageManager::Open function to libfiemap_passthrough The weak function can then be removed, avoid accidental linkages. Clients will link to libfiemap_passthrough or libfiemap_binder explicitly. Also, clean up libfiemap/Android.bp. Test: builds Test: fiemap_writer_test Test: fiemap_image_test Change-Id: I10aa4f3cf2e61ca32fb29950fc5ba29ad3b50146
2019-08-01Add a library to wrap libfiemap differences between recovery and normal AOSP.David Anderson
libsnapshot has to work both in normal boot and in recovery. Normally, we want libfiemap to be used through gsid, via binder, to consolidate the necessary SELinux permissions. However binder is not available in recovery, so instead we introduce a compile-time abstraction layer. Recovery should link to libfiemap; otherwise, libfiemap_binder should be used instead. They both present the same API. Bug: 134536978 Test: manual test Change-Id: I60370af2175723141e61f0ee301cad40d2f331c1
2019-07-29Only shut down gsid when it has no more consumers.David Anderson
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
2019-07-17Introduce a library to contain gsid's image creation logic.David Anderson
README.md contains a full explanation. GsiInstaller's logic will be removed in a follow-up CL. Bug: 134536978 Test: libgsi_image_test gtest Change-Id: I76f273e06bd8633c6c16e3f3c76ade28e59efe6f
2019-07-15Revert "Revert "Move libfiemap_writer from fs_mgr to gsid.""David Anderson
This reverts commit 437290104689da057b26d57d254a5ef3184aa132. Reason for revert: re-landing Change-Id: I45f064e4f3b0bfacba1a179e186123f9d4b7c141
2019-07-15Revert "Move libfiemap_writer from fs_mgr to gsid."David Anderson
This reverts commit b60553bfbed5ef2b1694a2ed12db4924c310eee2. Reason for revert: broke build Change-Id: I81e0ae15c2c6dd74ca251d04aa6a62cbd50927e0
2019-07-11Move libfiemap_writer from fs_mgr to gsid.David Anderson
The only consumer of this library is gsid. This CL moves it from fs_mgr. The code is identical with one exception: the namespace and library have been renamed to "libfiemap". Bug: 134536978 Test: gsid, fiemap_writer_test build Change-Id: I2eb3c5224a92c49b36bcc816306b40cc2c79a001
2019-06-17Merge "Add a wipe-data command to gsi_tool and IGsiService."David Anderson
2019-06-11Add a wipe-data command to gsi_tool and IGsiService.David Anderson
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
2019-06-10Verify that GSI images resolve to /dev/block/by-name/userdata.David Anderson
Bug: 134536978 Test: manual test Change-Id: Ib9bcbc4a179fa2f5c8cdbc313c1a2a225dc0f5be
2019-05-28Merge "Add end-to-end test for Dynamic System Updates"Paul Trautrim
2019-05-20Add end-to-end test for Dynamic System UpdatesPaul Trautrim
Bug: 116513434 Test: lunch aosp_cf_x86_phone-userdebug, atest -v DSUEndtoEndTest -- --test-arg \ com.android.tradefed.testtype.HostTest:set-option:system_image_path:/full/path/to/system.img Change-Id: Iac5e28d499908830bd8956a5c2ee0bb39539514d
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-20Add basic tests around booting GSIs.David Anderson
Bug: 129000341 Test: gsi_boot_tests gtests Change-Id: If0a23b57912c56b103050efec4ecb0550139da76
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-02-24Remove duplicate "libgsi" here.LongPing Wei
Test: make Change-Id: I37b46db082627e1a664a1ffb4bd0ed0a5eb83e97
2019-01-24Check f2fs pin status before writes and before rebooting.David Anderson
Bug: 122556707 Test: manual test Change-Id: I3f551cc373d74e0977705e575f074953d6b4da5b
2019-01-17Quell libdm warnings during cleanup.David Anderson
DestroyLogicalPartitions logs errors when the named partition doesn't exist. This can be confusing because IGsiService calls it regardless, and finding actual errors in the log gets trickier. Instead only destroy the partitions if they were created. Bug: 122556707 Test: manual test Change-Id: I30015576c9734cdb2a67db1f161fed8d4feed542
2019-01-17Add a progress bar API to gsid and use it in gsi_tool.David Anderson
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
2019-01-14Implement a boot attempt counter.David Anderson
Bug: 122556707 Test: manual test Change-Id: I75457b95aef9d74bbf4121850f2f29fdc887386c
2019-01-14Fix gsid buildSandeep Patil
.. added the missing libgsi dependency. Bug: 122556707 Test: lunch aosp_crosshatch-userdebug; cd system/gsid; mma -j Merged-In: Ib09a21bd7ce0c65e9d3ecab9ee2dad5aa03e8e09 Change-Id: If2760cd8b03da5a7d22e02bdc06b424000bb04e4 Signed-off-by: Sandeep Patil <sspatil@google.com> Change-Id: Ib7422d208b18edb13414f1682d75840a078a6e87
2019-01-11Introduce a daemon (gsid) for managing GSI installs.David Anderson
Bug: 122556707 Test: manual test Change-Id: I96d833f77740e6b791992336e590dd1a089895c9
2019-01-10Add host_supported: trueHoward Chen
The libfstab now has a host_supported: true property thus all dependent libraries should has this property as well. Test: Build pass with a Pixel 3 target Change-Id: I9125aed2299f26832d00a96605f26ab287e71dad
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