summaryrefslogtreecommitdiffstats
path: root/fuse_sideload (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix non-ab fuse ota fail bugCheng Chang2022-03-011-2/+7
| | | | | | | | | | Fix the 'Calculate the offset to last partial block' logic in ReadBlockAligndData. If file_size % fuse_block_size_ < source_block_size_, the origin map logic will get a wrong block address of last block. This bug leads to the non-ab fuse ota fail. Test: compare the md5 of origin pkg and pkg reading from fuse. Change-Id: Ic5132a7e9919cc2e91390231be342b97421ea23e
* Fix the fuse error that cannot handle the OTA package larger than 4 GiBluoqiangwei12021-10-121-1/+1
| | | | | | | | | | | | 1. That read data will be blocked when adb sideload OTA package 2. An error(Out of bound read) occurs when installing OTA package by fuse Test: as follows - adb sideload OTA package - install OTA package by install_with_fuse parameter Change-Id: Ie53510d157f6ea4c92606b289fcb745d441918c8 Signed-off-by: luoqiangwei1 <luoqiangwei1@xiaomi.com>
* [LSC] Add LOCAL_LICENSE_KINDS to bootable/recoveryBob Badour2021-02-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added SPDX-license-identifier-Apache-2.0 to: applypatch/Android.bp bootloader_message/Android.bp edify/Android.bp fuse_sideload/Android.bp install/Android.bp minadbd/Android.bp minui/Android.bp otautil/Android.bp recovery_ui/Android.bp recovery_utils/Android.bp tests/Android.bp tools/image_generator/Android.bp tools/recovery_l10n/Android.bp uncrypt/Android.bp update_verifier/Android.bp updater/Android.bp updater/Android.mk updater_sample/Android.bp updater_sample/tests/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT SPDX-license-identifier-OFL to: Android.bp Android.mk Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I3da761b525452838977297f773974000d4de7bd6
* Support starting fuse from a block mapTianjie Xu2019-06-202-4/+20
| | | | | | | | | | | | | | | | | Factor out a new function from ApplyFromSdcard that installs a package from a local path. Inside this function, we start the fuse and choose the type of data provider depending on the path string. And similar to the existing logic, we treat the package as a block map if the path starts with a '@'. This is part of the effort to install larger than 2GiB packages on ILP32 devices. Bug: 127071893 Test: Build a 32 bit sailfish and create a 3GiB OTA package. Sideload the package, uncrypt and install the package from sdcard. Change-Id: I328ea34fa530731acbce7554bfc3059313ad6ece
* Implement FuseBlockDataProviderxunchang2019-05-013-0/+111
| | | | | | | | | | Adds a fuse data provider that parses the metadata from a block map, reads the data from the given ranges of the block device; and provides the data to the fuse. Bug: 127071893 Test: unit tests pass, install a package from block map Change-Id: Ie9925ee9144e98642505b3f5e1a4a186d2b21ed0
* Remove the FD parameter from FuseDataProvider ctor.Tao Bao2019-04-161-12/+11
| | | | | | | | | | | This leaves the FD implementation details to subclasses. In particular, it allows minadbd to do additional works with the FD after sideloading. Bug: 128415917 Test: atest recovery_component_test Test: atest minadbd_test Test: Sideload package on taimen. Change-Id: I106bbaad05201227bbc5fe28890bbbb06fdcb67e
* Fix bogus error checking on unique_fdBernie Innocenti2019-03-281-1/+1
| | | | | | | | | The expression "!fd" calls the implicit conversion to int, but comparing the raw fd against 0 does not work, since open() and other POSIX calls returning a file descriptor use -1 to signal an error. Test: m recovery Change-Id: I0847c276f39cb9dd09c7ffb96951276113418fc8
* Remove the provider_vtabxunchang2019-03-193-18/+14
| | | | | | | | | It's no longer needed with the newly added FuseDataProvider class. Also cleans up the parameters for run_fuse_sideload. Bug: 127071893 Test: unit tests pass, run a sideload Change-Id: I1ccd6798d187cfc6ac9f559ffb3f3edf08dad55c
* Create a FuseDataProvider base classxunchang2019-03-195-5/+153
| | | | | | | | | | | | The fuse data provider for adb/sdcard shares common code and structures. This cl creates a FuseDataProvider base class and provides implementations for adb and sdcard. In the follow cls, we can kill the provider_vtab struct; and also add another implementation to parse a block map file and provides data. Test: unit tests pass, sideload a package, apply a package from sdcard Change-Id: If8311666a52a2e3c0fbae0ee9688fa6d01e4ad09
* Build `recovery` with Soong.Tao Bao2018-08-101-1/+2
| | | | | | | | | | | | | | Fixes: 110380063 Test: `mmma -j bootable/recovery` with aosp_taimen-userdebug Test: Build and boot into recovery on taimen. Check the basic functionalities (`Apply update from ADB`, `View recovery logs`, `Run graphics test`). Test: Run recovery_unit_test and recovery_component_test on marlin. Test: Modify `recovery.cpp` locally to trigger the call to is_battery_ok(). Check that the battery info is reported correctly. Test: `build/soong/build_test.bash --dist` Change-Id: I391eb201d57c760e457ba2bf2410ceb72596795c
* `recovery` uses more shared libraries.Tao Bao2018-08-081-1/+1
| | | | | | | | | | Bug: 110380063 Test: `m -j installclean && mmma -j bootable/recovery` with aosp_taimen-userdebug Test: Build (`m -j bootimage`) and boot into recovery. Check that `adb sideload` and `Run graphics test` both work. Test: Run recovery_unit_test and recovery_component_test on marlin. Change-Id: Ie6ed0e7cafa352d5faff9d1b6ccef724a0415e65
* Revert "Build and use minadbd as a shared library."Tao Bao2018-08-081-2/+1
| | | | | | | | | | | | | | | | | | | This reverts commit 4fd4f89591fe826cf26167bccaeb2802f14fbdc8. The reverted CL has a side effect that unintentionally installs a copy of libminadbd_services.so to the system image. This breaks the check with `build/soong/build_test.bash --dist` which detects and prevents vendor modules from installing files to the system image. Prior to fully converting `recovery` to be built with Soong, we have to statically link recovery-specific modules into `recovery`. Bug: 110380063 Test: `m -j bootimage` with aosp_marlin-userdebug Test: Run minadbd_test on marlin. Test: Boot into recovery and verify that sideloading still works. Test: `build/soong/build_test.bash --dist` Change-Id: I290d55c82e17aa60a5afdf2ff7f896afc4dae8b3
* Build and use minadbd as a shared library.Tao Bao2018-08-071-1/+2
| | | | | | | | | | | | | | | | | The former `minadbd` module is now built as a shared library (`libminadbd_services.so`) that serves sideloading under recovery, with a dynamic dependency on `libadbd.so`. This allows sharing and reusing libadbd code on device (both of `adbd` and `recovery` now uses `libadbd.so`). As a result, it reduces the size of `recovery` binary from 1407360-byte to (1272880 + 33032)-byte (aosp_marlin-userdebug). Bug: 78793464 Test: `m -j bootimage` with aosp_marlin-userdebug Test: Run minadbd_test on marlin. Test: Boot into recovery and verify that sideloading still works. Change-Id: I6c2bc3d351d5af71220a9b9f956c8c039e52c781
* Export fuse_sideload.h for libfusesideload.Tao Bao2018-03-073-0/+569
Move the module into a separate directory so that we can export only the expected header. With this change, minadbd no longer needs to include bootable/recovery. Test: mmma -j bootable/recovery Change-Id: I69b888ceb160a33a67d79c5bda208dc17ad6ed86