| Commit message (Collapse) | Author | Files | Lines |
|
Allow "adb remount" on deduplicated filesystems to reboot into recovery
and run e2fsck to undo deduplication. The e2fsck binary is copied from
the system partition into tmpfs, and the system partition is unmounted
so e2fsck can run safely.
Bug: 64109868
Test: recovery with --fsck_unshare_blocks; adb remount
Change-Id: I7558749b018b58f3c4339e51a95831dbd5be1ae3
|
|
Move more common setup into the main function.
Main() handles all 1 time setup, such as ui,
logging, and secontext. Recovery_main()
takes in command line arguments, does any
necessary recovery work, and can be called
multiple times from main().
Test: Recovery works
Bug: 78793464
Change-Id: I2d2595fc342b4ddfa80f4e06b30e44263132acd9
Merged-In: I2d2595fc342b4ddfa80f4e06b30e44263132acd9
|
|
Move more common setup into the main function.
Main() handles all 1 time setup, such as ui,
logging, and secontext. Recovery_main()
takes in command line arguments, does any
necessary recovery work, and can be called
multiple times from main().
Test: Recovery works
Bug: 78793464
Change-Id: I2d2595fc342b4ddfa80f4e06b30e44263132acd9
|
|
This prepares for moving more codes from recovery into librecovery, so
that they will become more easily testable. recovery_main.cpp will be
the source code for recovery module, with the rest moved into
librecovery. recovery_main.cpp mainly does the initializations, such as
setting up the logger.
Test: mmma -j bootable/recovery
Test: recovery_component_test
Test: Build and boot into recovery image on marlin.
Change-Id: I8e846524546b6f3f0e32ed869e851f62261eef23
Merged-In: I8e846524546b6f3f0e32ed869e851f62261eef23
|
|
adb_server_main in adb refers to the adb server on the host, not adbd.
Since there doesn't seem to be a good reason to reuse the declaration
from adb's headers, give minadbd a main function of its own.
Change-Id: I748f1a6822dc14c726cb73ef3b533c57a6615608
|
|
(Cherry-pick back from master.)
Bug: 16984795
Change-Id: Ifa3d8345c5e2a0be86fb28faa080ca82592a96b4
|
|
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
|
|
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
|
|
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).
|
|
|
|
|