summaryrefslogtreecommitdiffstats
path: root/install.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-09-12Make text appear in GUI console, Zip install works.Dees_Troy1-1/+1
Move TW zip install code to C++ so that it can use the ui->functions. Bring in mincrypt code to fix a crash during signature checking.
2012-09-06Hax to make it bootDees_Troy1-1/+1
2012-04-12minor recovery changesDoug Zongker1-0/+2
- add the --just_exit option to make recovery exit normally without doing anything - make it possible to build updater extensions in C++ - add the clear_display command so that the updater binary can request recovery switch to the NONE background UI These are all used to support the notion of using OTA as a factory reflash mechanism. Change-Id: Ib00d1cbf540feff38f52a61a2cf198915b48488c
2011-10-31refactor ui functions into a classDoug Zongker1-14/+20
Move all the functions in ui.c to be members of a ScreenRecoveryUI class, which is a subclass of an abstract RecoveryUI class. Recovery then creates a global singleton instance of this class and then invoke the methods to drive the UI. We use this to allow substitution of a different RecoveryUI implementation for devices with radically different form factors (eg, that don't have a screen). Change-Id: I76bdd34eca506149f4cc07685df6a4890473f3d9
2011-10-31turn recovery into a C++ binaryDoug Zongker1-29/+33
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
2011-10-28turn recovery into a C++ binaryDoug Zongker1-310/+0
Change-Id: I68a67a4c8edec9a74463b3d4766005ce27b51316
2011-10-19allow recovery packages to wipe cacheDoug Zongker1-11/+12
updater now has a function "wipe_cache();" which causes recovery to wipe the cache partition after the successful installation of the package. Move log copying around a bit so logs and the last_install flag file are copied to cache after it's wiped. Bug: 5314244 Change-Id: Id35a9eb6dcd626c8f3a3a0076074f462ed3d44bd
2011-04-12save a last_install file with the result of the last package install attemptDoug Zongker1-2/+24
When installing a package, create /cache/recovery/last_install, which contains the filename of the package and a 1 or 0 for success or failure. Also, don't mount ext4 and vfat filesystems as read-only (on devices where /cache is ext4, we need it to be read-write). Change-Id: I0cf2a1921bbd65e06343aa74e2006577fac77c2c
2010-09-21remove the notion of "root path"; support mixed flash typesDoug Zongker1-11/+4
Remove the wacky notion of "roots" and "root paths" (those things that look like "FOO:some/path" instead of just "/foo/some/path"). Let each device specify its own table of available partitions and how to mount them (needed for devices that use both MTD/yaffs2 and EMMC/ext4 partitions). (Cherrypicked from gingerbread w/slight edits.) Change-Id: I2479ce76b13e73f1d12035c89386c3a82b3edf51
2010-09-21remove the notion of "root path"; support mixed flash types (do not merge)Doug Zongker1-11/+4
Remove the wacky notion of "roots" and "root paths" (those things that look like "FOO:some/path" instead of just "/foo/some/path"). Let each device specify its own table of available partitions and how to mount them (needed for devices that use both MTD/yaffs2 and EMMC/ext4 partitions). Change-Id: I18b0a572a71c5e087e0b7ae11b1774388339bfd1
2010-09-17remove unneeded partition rootsDoug Zongker1-13/+2
Recovery itself no longer needs to access all these partitions; manipulation of them is done by the updater binary. This is a small first step towards removing roots entirely. Change-Id: I3fbcada32079a37db4cc097861dfa91e0a08da30
2010-09-15support for ext4/EMMC filesystems in updater binaryDoug Zongker1-1/+1
Make the mount and format functions take extra parameters describing the filesystem type and add support for mounting and formatting ext4 filesystems on EMMC. Change recovery to consistently use stdout for status messages instead of mixing stdout and stderr.
2010-09-15close update package before installing; allow remountDoug Zongker1-1/+3
Close the update package before invoking the binary, to allow the installer to unmount /cache if it wants to. Add a function to allow remounting of a mount as read-only. Change-Id: Idfcc96c3da66083295177f729263560be58034e4
2010-07-02support for ext4/EMMC filesystems in updater binaryDoug Zongker1-1/+1
Make the mount and format functions take extra parameters describing the filesystem type and add support for mounting and formatting ext4 filesystems on EMMC. Change recovery to consistently use stdout for status messages instead of mixing stdout and stderr.
2010-06-25Add __attribute__((format(printf, a, b))) to printf like functions.Nick Kralevich1-1/+1
Fix potential string format bug. Change-Id: Ie05aac53b2c45a48bd68e340b76ccb21edfd28b7
2010-02-03bump updater API version to 3; deprecate firmware update commandDoug Zongker1-84/+7
Remove support for the HTC-specific "firmware" update command and the corresponding edify function write_firmware_update(). This functionality is now done by an edify extension library that lives in vendor/htc. Change-Id: I80858951ff10ed8dfff98aefb796bef009e05efb
2010-01-29fix parsing of dumpkeys outputDoug Zongker1-4/+4
%i can't be used to read unsigned ints (though it happens to work with bionic). Change to %x and %u as appropriate. Change-Id: I8ea9ca16a939501757cf70fc5953abee26c8231c http://b/2402231 - Parser for /res/keys interprets n0inv as a signed int
2009-11-13eclair snapshotJean-Baptiste Queru1-16/+18
2009-08-17do not merge: cherry-picked 60151a295ccf726238dc47456d80b427db6d6a38 from master branchDoug Zongker1-16/+18
2009-08-15verify whole-file signature instead of jarsigner signaturesDoug Zongker1-16/+18
In recovery, verify a signature that covers the entire zip file, instead of using the jarsigner format to verify individual files. Bug: 1328985
2009-07-15remove amendDoug Zongker1-103/+2
Yank all the code to install OTA packages out of the recovery binary itself. Now packages are installed by a binary included in the package (run as a child of recovery), so we can make improvements in the installation process without waiting for a new release to use them.
2009-06-24improve updater progress barDoug Zongker1-1/+13
Let recovery accept set_progress commands to control progress over the 'current segment' of the bar. Add a set_progress() builtin to the updater binary.
2009-06-18let the "firmware" command take the file straight from the packageDoug Zongker1-22/+44
To do a firmware-install-on-reboot, the update binary tells recovery what file to install before rebooting. Let this file be specified as "PACKAGE:<foo>" to indicate taking the file out of the OTA package, avoiding an extra copy to /tmp. Bump the API version number to reflect this change.
2009-06-12fixes to edify and updater scriptDoug Zongker1-0/+10
A few more changes to edify: - fix write_raw_image(); my last change neglected to close the write context, so the written image was corrupt. - each expression tracks the span of the source code from which it was compiled, so that assert()'s error message can include the source of the expression that failed. - the 'cookie' argument to each Function is replaced with a State object, which contains the cookie, the source script (for use with the above spans), and the current error message (replacing the global variables that were used for this purpose). - in the recovery image, a new command "ui_print" can be sent back through the command pipe to cause text to appear on the screen. Add a new ui_print() function to print things from scripts. Rename existing "print" function to "stdout".
2009-06-12edify extensions for OTA package installation, part 2Doug Zongker1-1/+2
Adds more edify functions for OTAs: is_mounted getprop apply_patch apply_patch_check apply_patch_space write_raw_image write_firmware_image package_extract_file This allows us to install radios, hboots, boot images, and install incremental OTA packages. Fixes a couple of dumb bugs in edify itself: - we were doubling the size of the function table each time it was *not* full, rather than each time it was full - "no such function" errors weren't visible to the parser, so they didn't prevent execution of the script.
2009-06-12edify extensions for OTA package installation, part 1Doug Zongker1-1/+1
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-06-05allow OTA package to provide binary instead of scriptDoug Zongker1-1/+169
Allow installation of OTA packages which do not contain an update-script, but instead contain an update-binary.
2009-05-29don't say "install complete" when it really isn'tDoug Zongker1-1/+1
Change the recovery UI so that when there is a hboot or radio update pending (which the user most do a home+back reboot to actually install), the UI tells them so, instead of saying "Install from sdcard complete."
2009-04-02AI 144132: am: CL 144130 Don't build OTA package keys into the recovery binary; readDoug Zongker1-8/+88
them from an external file in the recovery image. Use the test-keys for all builds. Original author: dougz Merged from: //branches/donutburger/... Automated import of CL 144132
2009-04-02AI 144130: Don't build OTA package keys into the recovery binary; readDoug Zongker1-8/+88
them from an external file in the recovery image. Use the test-keys for all builds. Automated import of CL 144130
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-0/+186
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-186/+0