summaryrefslogtreecommitdiffstats
path: root/minadbd/fuse_adb_provider.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-06-20Support starting fuse from a block mapTianjie Xu1-0/+4
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-04-26minadbd: Support rescue install and getprop commands.Tao Bao1-2/+0
Bug: 128415917 Test: Enter rescue mode on taimen. Send the following commands: `adb rescue getprop ro.build.fingerprint` `adb rescue getprop ro.build.date.utc` `adb rescue install /path/to/package.zip` Test: Sideload on taimen w/ `adb sideload /path/to/package.zip`. Change-Id: Ibc25daf9fd13f7002e54789f67aaf85d06976bb8 Merged-In: Ibc25daf9fd13f7002e54789f67aaf85d06976bb8 (cherry picked from commit ed717ca17d0b1a35f2d2e57802e2381a6004fdd1)
2019-04-26Remove the FD parameter from FuseDataProvider ctor.Tao Bao1-8/+7
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 Merged-In: I106bbaad05201227bbc5fe28890bbbb06fdcb67e (cherry picked from commit 2be9737cf449dd0650c85ee5168d09b12d386077)
2019-04-19minadbd: Support rescue install and getprop commands.Tao Bao1-2/+0
Bug: 128415917 Test: Enter rescue mode on taimen. Send the following commands: `adb rescue getprop ro.build.fingerprint` `adb rescue getprop ro.build.date.utc` `adb rescue install /path/to/package.zip` Test: Sideload on taimen w/ `adb sideload /path/to/package.zip`. Change-Id: Ibc25daf9fd13f7002e54789f67aaf85d06976bb8
2019-04-16Remove the FD parameter from FuseDataProvider ctor.Tao Bao1-8/+7
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
2019-03-19Remove the provider_vtabxunchang1-2/+0
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
2019-03-19Create a FuseDataProvider base classxunchang1-6/+14
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
2017-11-04Clean up fuse_sideload and add a testcase.Tao Bao1-4/+4
This CL mainly changes: a) moving the interface in struct provider_vtab to std::function; b) code cleanup, such as moving the declaration closer to the uses, using explicit type conversion. Test: recovery_component_test Test: minadbd_test Test: Sideload a package on marlin. Change-Id: Id0e3c70f1ada54a4cd985b54c84438c23ed4687e
2015-04-10Switch minadb over to C++.Elliott Hughes1-10/+1
Change-Id: I5afaf70caa590525627c676c88b445d3162de33e
2015-02-27Add tests for read_block_adb.Dan Albert1-0/+11
These tests aren't completely representative in that they don't run in the recovery image. We might want to look in to adding a self-test option to the recovery UI. Until then, these can be run on a normal device (which is easier to do anyway). Bug: 19522788 Change-Id: Idb20feb55d10c62905c2480ab1b61a2e4b5f60d8
2015-02-18Add extern "C" to all the headers.Dan Albert1-0/+8
Change-Id: Idc249ff1b199b7c455f90092ff2c8a48b539faf4
2014-07-10refactor fuse sideloading codeDoug Zongker1-3/+3
Split the adb-specific portions (fetching a block from the adb host and closing the connections) out from the rest of the FUSE filesystem code, so that we can reuse the fuse stuff for installing off sdcards as well. Change-Id: I0ba385fd35999c5f5cad27842bc82024a264dd14
2014-07-02sideload without holding the whole package in RAMDoug Zongker1-4/+4
Implement a new method of sideloading over ADB that does not require the entire package to be held in RAM (useful for low-RAM devices and devices using block OTA where we'd rather have more RAM available for binary patching). We communicate with the host using a new adb service called "sideload-host", which makes the host act as a server, sending us different parts of the package file on request. We create a FUSE filesystem that creates a virtual file "/sideload/package.zip" that is backed by the ADB connection -- users see a normal file, but when they read from the file we're actually fetching the data from the adb host. This file is then passed to the verification and installation systems like any other. To prevent a malicious adb host implementation from serving different data to the verification and installation phases of sideloading, the FUSE filesystem verifies that the contents of the file don't change between reads -- every time we fetch a block from the host we compare its hash to the previous hash for that block (if it was read before) and cause the read to fail if it changes. One necessary change is that the minadbd started by recovery in sideload mode no longer drops its root privileges (they're needed to mount the FUSE filesystem). We rely on SELinux enforcement to restrict the set of things that can be accessed. Change-Id: Ida7dbd3b04c1d4e27a2779d88c1da0c7c81fb114
2009-06-12edify extensions for OTA package installation, part 1Doug Zongker1-7/+5
Adds the following edify functions: mount unmount format show_progress delete delete_recursive package_extract symlink set_perm set_perm_recursive This set is enough to extract and install the system part of a (full) OTA package. Adds the updater binary that extracts an edify script from the OTA package and then executes it. Minor changes to the edify core (adds a sleep() builtin for debugging, adds "." to the set of characters that can appear in an unquoted string).
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-0/+24
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-24/+0