aboutsummaryrefslogtreecommitdiffstats
path: root/fuse_sideload.cpp
Commit message (Collapse)AuthorAgeFilesLines
* recovery: increase free memory for sideload cacheTom Marshall2020-03-251-1/+1
| | | | | | | | | | | * Too low of a value causes out of memory exceptions when sideloading big files (compared to the device's available ram) * 400MB was determined by increasingly trying different values, 100MB at a time, on a 2GB device when sideloading 1.9GB of data. Change-Id: I8faac2deb7b1c2ddbd9dcb21914e34d6cd672575
* recovery: Provide caching for sideload filesTom Marshall2019-04-041-1/+105
| | | | | | | | | | | | | | | Create a cache of block data received via adb. The cache size is set to ensure that there is at least 100mb 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
* recovery: Provide sideload cancellationTom Marshall2019-04-041-17/+21
| | | | Change-Id: I13f0c9ae5444652a2141442ef24258679a78d320
* Clean up fuse_sideload and add a testcase.Tao Bao2017-11-031-291/+254
| | | | | | | | | | | | 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
* fuse_sideload: Change the minimal block size to 4096.Tao Bao2017-05-021-138/+140
| | | | | | | | | | | | | | | | | | | run_fuse_sideload() is passing the block size as the max_read option, so it will only handle a request that involves at most two blocks at a time. However, the minimal allowed value was set to 1024 prior to this CL, which is inconsistent with the kernel code (fs/fuse/inode.c) that sets it to the greater of 4096 and the passed-in max_read option. This would fail the calls with a block size / max_read less than 4096 due to the wrongly computed block indices. Note that we didn't observe real issue in practice, because we have been using 64 KiB block sizes for both of adb and sdcard sideload calls. The issue only shows up in my local CL (to come later) that uses 1024 block size in run_fuse_sideload() tests. Test: recovery_component_test Test: adb sideload with the new recovery image on angler Change-Id: Id9f0cfea13d0d193dcb7cd41a1553a23739545f2
* libfusesideload: Clean up the CFLAGS for the module.Tao Bao2017-04-271-2/+4
| | | | | | | | Remove "-DADB_HOST=0" since it doesn't include adb related stuff. Test: mmma bootable/recovery Test: sideload on marlin Change-Id: Ia83a8edd31eedd803435d687513d561c873ffabe
* Convert recovery to use BoringSSL instead of mincrypt.Mattias Nissler2016-04-061-9/+10
| | | | | | | This changes the verification code in bootable/recovery to use BoringSSL instead of mincrypt. Change-Id: I37b37d84b22e81c32ac180cd1240c02150ddf3a7
* recovery: Switch fuse_* to C++.Tao Bao2015-07-241-0/+524
Change-Id: Id50c3e6febd0ab61f10a654b9b265cf21a2d1701 (cherry picked from commit 71dc365f25676cfb3f62dbb7163697a8c3c5243d)