summaryrefslogtreecommitdiffstats
path: root/adb_install.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-04fix adb sideloadthat1-31/+23
- "Cancel" button handling requires another thread - simplify handling of child pid - merge duplicated code for reinjecting TWRP after installation - fix error that showed on host PC after sideload finished - fix problem where adbd sometimes does not stop correctly Change-Id: I536877f024b606756c6a3289c6ddfdba423a60d6
2014-11-08Update adb sideload featureEthan Yonker1-24/+27
Change-Id: Ib503d0e87434e1a28430779302d6565211c26592
2014-11-06Fix up libaosprecoveryEthan Yonker1-4/+6
Change-Id: I5a6d0c3c5f9a3a474464c0f06d6b09045459eebb
2014-07-10refactor fuse sideloading codeDoug Zongker1-5/+6
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-16/+51
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
2013-04-04Move all AOSP code out of recovery binaryDees_Troy1-20/+16
Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
2012-09-24Update tablet layouts with ADB sideloadDees_Troy1-1/+1
2012-09-21Add init.htc.rc and modify ADB sideload messagesDees_Troy1-0/+10
2012-09-19Improve adb sideload - use storage vs tmpDees_Troy1-15/+3
2012-09-19Improve adb sideload -- add cancelDees_Troy1-1/+15
Also copy zip from /tmp to storage and remove from /tmp to prevent running out of RAM.
2012-09-17Update backup and restore code, adb sideloadDees_Troy1-1/+3
Fixed a problem with using make_ext4fs by making its lib a dynamic lib. Added ADB sideload zip install feature - no way to cancel it yet. Improve backup and restore code.
2012-01-18support "sideload over ADB" modeDoug Zongker1-0/+110
Rather than depending on the existence of some place to store a file that is accessible to users on an an unbootable device (eg, a physical sdcard, external USB drive, etc.), add support for sideloading packages sent to the device with adb. This change adds a "minimal adbd" which supports nothing but receiving a package over adb (with the "adb sideload" command) and storing it to a fixed filename in the /tmp ramdisk, from where it can be verified and sideloaded in the usual way. This should be leave available even on locked user-build devices. The user can select "apply package from ADB" from the recovery menu, which starts minimal-adb mode (shutting down any real adbd that may be running). Once minimal-adb has received a package it exits (restarting real adbd if appropriate) and then verification and installation of the received package proceeds. always initialize usb product, vendor, etc. for adb in recovery Set these values even on non-debuggable builds, so that the mini-adb now in recovery can work.
2012-01-10support "sideload over ADB" modeDoug Zongker1-0/+110
Rather than depending on the existence of some place to store a file that is accessible to users on an an unbootable device (eg, a physical sdcard, external USB drive, etc.), add support for sideloading packages sent to the device with adb. This change adds a "minimal adbd" which supports nothing but receiving a package over adb (with the "adb sideload" command) and storing it to a fixed filename in the /tmp ramdisk, from where it can be verified and sideloaded in the usual way. This should be leave available even on locked user-build devices. The user can select "apply package from ADB" from the recovery menu, which starts minimal-adb mode (shutting down any real adbd that may be running). Once minimal-adb has received a package it exits (restarting real adbd if appropriate) and then verification and installation of the received package proceeds. Change-Id: I6fe13161ca064a98d06fa32104e1f432826582f5