From f6158eb918fb86f94e418244a9351379ad568563 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Tue, 11 Jun 2019 16:09:07 -0700 Subject: Support starting fuse from a block map 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 --- minadbd/fuse_adb_provider.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'minadbd/fuse_adb_provider.h') diff --git a/minadbd/fuse_adb_provider.h b/minadbd/fuse_adb_provider.h index c5561e57d..43c07d28e 100644 --- a/minadbd/fuse_adb_provider.h +++ b/minadbd/fuse_adb_provider.h @@ -29,6 +29,10 @@ class FuseAdbDataProvider : public FuseDataProvider { bool ReadBlockAlignedData(uint8_t* buffer, uint32_t fetch_size, uint32_t start_block) const override; + bool Valid() const override { + return fd_ != -1; + } + private: // The underlying source to read data from (i.e. the one that talks to the host). int fd_; -- cgit v1.2.3