aboutsummaryrefslogtreecommitdiff
path: root/fuse_sideload/fuse_sideload.cpp
Commit message (Collapse)AuthorAgeFilesLines
* recovery: Provide caching for sideload filesTom Marshall2022-08-231-1/+105
| | | | | | | | | | | | | | | Create a cache of block data received via adb. The cache size is set to ensure that there is at least 400mb available for the installer. When the cache is large enough to hold the entire file, each block is read via adb at most once. When the cache is not large enough to hold the entire file, the cache will need to be pruned. Because files tend to be read sequentially during install, the pruning algorithm attempts to discard blocks that are behind the current file position. Change-Id: Id8fc7fa5b38f1d80461eb576b1a1b5d53453cfc1
* 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>
* 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-191-7/+9
| | | | | | | | | 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-191-2/+3
| | | | | | | | | | | | 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
* Export fuse_sideload.h for libfusesideload.Tao Bao2018-03-071-0/+492
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