summaryrefslogtreecommitdiffstats
path: root/fuse_sideload/fuse_provider.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-01Fix non-ab fuse ota fail bugCheng Chang1-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
2019-06-20Support starting fuse from a block mapTianjie Xu1-1/+6
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
2019-05-01Implement FuseBlockDataProviderxunchang1-0/+79
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
2019-03-19Create a FuseDataProvider base classxunchang1-0/+71
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