summaryrefslogtreecommitdiffstats
path: root/updater/install.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix write_raw_image to work with mmcDees_Troy2013-04-201-56/+4
|
* am 78911bdf: am 2a4ab824: Merge "Change the format command to always take the mount point as an argument."Kenny Root2012-04-071-13/+4
|\ | | | | | | | | * commit '78911bdf4f9dfff6583f3f8150a3257212ceea13': Change the format command to always take the mount point as an argument.
| * Change the format command to always take the mount point as an argument.Stephen Smalley2012-04-031-13/+4
| | | | | | | | | | | | Requires I5a63fd61a7e74d386d0803946d06bcf2fa8a857e Change-Id: Ica5fb73d6f2ffb981b74d1896538988dbc4d9b24
* | resolved conflicts for merge of 0b1fee1b to masterKenny Root2012-03-311-7/+39
|\| | | | | | | Change-Id: I2e8298ff5988a96754f56f80a5186c9605ad9928
| * Extend recovery and updater to support setting file security contexts.Stephen Smalley2012-03-301-7/+39
| | | | | | | | | | | | | | Extend minzip, recovery, and updater to set the security context on files based on the file_contexts configuration included in the package. Change-Id: Ied379f266a16c64f2b4dca15dc39b98fcce16f29
* | fail edify script if set_perm() or symlink() failsDoug Zongker2012-03-221-0/+13
| | | | | | | | | | | | | | | | It's surprising if these fail, so abort the whole edify script to catch any problems early. Bug: 2284848 Change-Id: Ia2a0b60e7f086fc590b242616028905a229c9e05
* | remove retouching code from updaterDoug Zongker2012-02-281-118/+0
| | | | | | | | | | | | | | | | | | | | | | Removes the retouch_binaries and undo_retouch_binaries from updater; newly generated OTA packages should not call them any more. Note that applypatch retains the ability to unretouch a file as it reads it. This will be needed as long as we want to support OTAs from devices that were installed with retouching. Change-Id: Ib3f6baeae90c84ba85983f626d821ab7e436ceb2
* | C++ class for device-specific codeDoug Zongker2011-10-311-1/+2
|/ | | | | | | | | | Replace the device-specific functions with a class. Move some of the key handling (for log visibility toggling and rebooting) into the UI class. Fix up the key handling so there is less crosstalk between the immediate keys and the queued keys (an increasing annoyance on button-limited devices). Change-Id: I698f6fd21c67a1e55429312a0484b6c393cad46f
* allow recovery packages to wipe cacheDoug Zongker2011-10-191-0/+10
| | | | | | | | | | 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
* make write_raw_image able to take a blobDoug Zongker2011-04-131-27/+40
| | | | | | | write_raw_image() can now take either a blob or a filename as the source. The blob format eliminates the need for a temp file. Change-Id: I0c6effec53d47862040efcec75e64b7c951cdcf7
* Reserve the last 16 Kbytes of /data for the crypto footer.Ken Sumrall2011-01-201-8/+11
| | | | | | | When formatting /data, if it's an ext4 filesystem, reserve the last 16 Kbytes for the crypto footer. Change-Id: I7b401d851ee87732e5da5860df0287a1c331c5b7
* Update arguments to make_ext4fsColin Cross2010-12-291-1/+1
| | | | Change-Id: Id96e98da76b3091987b01651f980797b1d6b49d8
* add missing sparseness parameterDoug Zongker2010-09-161-1/+1
| | | | Change-Id: Ie6e309b127e80cd6475f1deaa5dbadf9f5cc2746
* resolved conflicts for merge of 9f89b0e4 to masterDoug Zongker2010-09-161-1/+1
|\ | | | | | | Change-Id: Id458df96fd56830fdb35397e95a80274761ecff5
| * support for ext4/EMMC filesystems in updater binaryDoug Zongker2010-09-151-24/+57
| | | | | | | | | | | | | | | | | | 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.
* | Changes to work with updated make_ext4fs tool that supports creating sparse images.Ken Sumrall2010-08-141-1/+1
| | | | | | | | | | | | | | An extra parameter was added to the make_ext4fs() function, we these tools need to be updated to match. Change-Id: Id640a7f2b03153eb333b00337f0f991ff5332349
* | Working ASLR implementationHristo Bojinov2010-08-021-2/+122
| | | | | | | | | | | | | | | | | | | | Separate files for retouch functionality are in minelf/* ASLR for shared libraries is controlled by "-a" in ota_from_target_files. Binary files are self-contained. Retouch logic can recover from crashes. Signed-off-by: Hristo Bojinov <hristo@google.com> Change-Id: I76c596abf4febd68c14f9d807ac62e8751e0b1bd
* | support for ext4/EMMC filesystems in updater binaryDoug Zongker2010-07-021-24/+57
|/ | | | | | | | | 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.
* refactor applypatch and friendsDoug Zongker2010-02-231-65/+107
| | | | | | | | | | | | | | | | | | | Change the applypatch function to take meaningful arguments instead of argc and argv. Move all the parsing of arguments into main.c (for the standalone binary) and into install.c (for the updater function). applypatch() takes patches as Value objects, so we can pass in blobs extracted from the package without ever writing them to temp files. The patching code is changed to read the patch from memory instead of a file. A bunch of compiler warnings (mostly about signed vs unsigned types) are fixed. Support for the IMGDIFF1 format is dropped. (We've been generating IMGDIFF2 packages for some time now.) Change-Id: I217563c500012750f27110db821928a06211323f
* relocate applypatch; add type system and new functions to edifyDoug Zongker2010-02-181-52/+184
| | | | | | | | | | | | | | | | | | | | | | | | | - Move applypatch to this package (from build). - Add a rudimentary type system to edify: instead of just returning a char*, functions now return a Value*, which is a struct that can carry different types of value (currently just STRING and BLOB). Convert all functions to this new scheme. - Change the one-argument form of package_extract_file to return a Value of the new BLOB type. - Add read_file() to load a local file and return a blob, and sha1_check() to test a blob (or string) against a set of possible sha1s. read_file() uses the file-loading code from applypatch so it can read MTD partitions as well. This is the start of better integration between applypatch and the rest of edify. b/2361316 - VZW Issue PP628: Continuous reset to Droid logo: framework-res.apk update failed (CR LIBtt59130) Change-Id: Ibd038074749a4d515de1f115c498c6c589ee91e5
* bump updater API version to 3; deprecate firmware update commandDoug Zongker2010-02-031-39/+0
| | | | | | | | | 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
* add a one-argument version of package_extract_fileDoug Zongker2010-02-011-24/+69
| | | | | | | | | | | Add a version of package_extract_file that returns the file data as its return value (to be consumed by some other edify function that expects to receive a bunch of binary data as an argument). Lets us avoid having two copies of a big file in memory (extracting it into /tmp, which is a ramdisk, and then having something load it into memory) when doing things like radio updates. Change-Id: Ie26ece5fbae457eb0ddcd8a13d74d78a769fbc70
* delete files before symlinking; log error messagesDoug Zongker2009-09-191-3/+21
| | | | | | The symlink() function should remove existing files before creating symlinks, so scripts are idempotent. Log messages when various system calls fail (but don't make the whole script fail).
* add a run_program() function to edifyDoug Zongker2009-09-101-0/+49
| | | | | Handy for producing debugging OTA packages (eg, running sqlite3 or whatever in recovery).
* fix off-by-one error in set_perm()Doug Zongker2009-06-251-1/+1
| | | | | We were inadvertently skipping over the first filename in the list of arguments.
* improve updater progress barDoug Zongker2009-06-241-3/+21
| | | | | | 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.
* add file_getprop() to updaterDoug Zongker2009-06-181-11/+100
| | | | | | | Add a function to read a property from a ".prop"-formatted file (key=value pairs, one per line, ignore # comment lines and blank lines). Move ErrorAbort to the core of edify; it's not specific to updater now that errors aren't stored in the app cookie.
* fixes to edify and updater scriptDoug Zongker2009-06-121-62/+104
| | | | | | | | | | | | | | | | | | | | | 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".
* edify extensions for OTA package installation, part 2Doug Zongker2009-06-121-3/+272
| | | | | | | | | | | | | | | | | | 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.
* edify extensions for OTA package installation, part 1Doug Zongker2009-06-121-0/+370
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).