Commit Graph

53 Commits

Author SHA1 Message Date
Robert Burns
d87b8df56d Remove random offset message during installation
Change-Id: I2281a571e37ba9fac2b99806ce9c63e591b4d39f
2012-02-13 16:18:53 -05:00
Koushik Dutta
21ad8d04dd remove dedupe 2011-11-16 18:28:20 -08:00
Koushik Dutta
0df56f4db4 wip 2011-11-16 16:00:35 -08:00
Steve Kondik
0d651b1b70 Merge branch 'gingerbread' of git://android.git.kernel.org/platform/bootable/recovery into upstream-2.3.5 2011-07-26 13:06:34 -04:00
Michael Ward
6242a8bc9b Support multiple recovery updater extensions.
Change-Id: I787c086223b674050c0a12fc575add9badb471af
2011-07-14 15:12:20 -07:00
Koushik Dutta
cf5195aa79 fix boot image not flashing properly, prevent the error in the future.
Change-Id: I6163e5a519ef28e9e9ea12d5a46d525d1d9d8fb2
2011-05-29 18:45:42 -07:00
Ying Wang
b7b7b37457 Mute unharmful build warning at the top of the build log:
diff: out/target/product/generic/obj/PACKAGING/updater_extensions_intermediates/register.inc.list:
No such file or directory

Change-Id: I269b1703b6091b343db45b1c5cdd0962c738788b
2011-05-24 16:11:05 -07:00
Koushik Dutta
0b4eac9e01 also set UPDATE_PACKAGE in updater for old recoveries
Change-Id: I90e3feb0c1655279d58751ce800f299d9b4f3d03
2011-05-16 13:32:01 -07:00
Doug Zongker
179b2d9895 make write_raw_image able to take a blob
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
2011-04-12 16:48:49 -07:00
Ken Sumrall
8f132ed870 Reserve the last 16 Kbytes of /data for the crypto footer.
When formatting /data, if it's an ext4 filesystem, reserve the
last 16 Kbytes for the crypto footer.

Change-Id: I7b401d851ee87732e5da5860df0287a1c331c5b7
2011-01-19 17:12:47 -08:00
Koushik Dutta
b4c5fd6305 Support for ext2 and ext3 update-binary.
Change-Id: Ide34392bd8ac56878aa3e992b275a39d6b6bc7cf
2011-01-02 22:54:31 -08:00
Colin Cross
264f549b7d Update arguments to make_ext4fs
Change-Id: Id96e98da76b3091987b01651f980797b1d6b49d8
2010-12-29 14:18:26 -08:00
Koushik Dutta
7c1bffefeb Fix the build
Change-Id: I2ae07e94eb68dd261b3978671aec88c25cd2518e
2010-12-18 19:44:33 -08:00
Koushik Dutta
8637c73757 revert updater changes except what is necesary to do a write_raw_image on emmc devices.
Change-Id: I674c7b5873b7758bf15f0b55c34ec01513e6f23c
2010-12-18 18:18:44 -08:00
Koushik Dutta
df1e406782 Merge from ClockworkMod recovery
Change-Id: Id5b312147173ced559a62d97029acede6c2f8766
2010-12-18 17:42:31 -08:00
Steve Kondik
4123b58299 recovery: Autodetection of device flash type
Detect flash type at runtime rather than requiring this to be set in the
device configuration. The detection is based on the existence of /proc/mtd,
/proc/emmc, or /dev/block/bml1.

Change-Id: I464962a567022c5862c249f06d36c2d1cddeacba
2010-11-14 22:40:30 -05:00
Koushik Dutta
1b86754eaa Fix up updater to use the new refactored block device support.
Change-Id: I597f3d83ef14d2640192e0026a0fe1a93023bfc6
2010-11-10 23:52:09 -08:00
Koushik Dutta
19447c0550 Refactor recovery's block device handling to work across variant hardware in a cleaner fashion.
Re add firmware update

Change-Id: I699ad22390ed14e597d17a7bcb32ad1b1af00b4b

support mmc misc

Change-Id: Iff02f8d03db6835f501d052140cebeefee521305

fix compile errors

Change-Id: I032edbd157a8a15f561bb83330c715ebaa008d18

fix compile errors

Change-Id: Idff3449be3376f22fceefc2c35637527f8df8f3f

Initial work to clean up the block devices.

Change-Id: I4be20ac124864a281be9cd116e211a2618404a27

all done

Change-Id: I0338f62f6a045556ebe90b0200685be113178319

fix up nandroid

Change-Id: I886f00271183e6d2921c080b0939341f2cf12a4d
2010-11-10 23:31:34 -08:00
Shashank Mittal
815ca5d230 [recovery]: Add support for OTA upgrade on mmc devices.
Change-Id: I8f230dfa5be4e9f142765797d949e10434e1fdeb
2010-10-12 18:46:30 -07:00
Doug Zongker
dc49ce453e add missing sparseness parameter
Change-Id: Ie6e309b127e80cd6475f1deaa5dbadf9f5cc2746
2010-09-15 18:05:10 -07:00
Brian Swetland
792b00712b do not merge - update to match ext4utils api
Change-Id: I9d34e491022d7dfed653a861b0728a0a656f1fbe
2010-09-15 18:03:58 -07:00
Doug Zongker
a66c32ab1d resolved conflicts for merge of 9f89b0e4 to master
Change-Id: Id458df96fd56830fdb35397e95a80274761ecff5
2010-09-15 17:40:14 -07:00
Doug Zongker
6b1ff61f62 am 858f0a76: am 8e5e4dad: close update package before installing; allow remount
Merge commit '858f0a763d0f736eb721f54257b6164886bfcbfc'

* commit '858f0a763d0f736eb721f54257b6164886bfcbfc':
  close update package before installing; allow remount
2010-09-15 16:32:52 -07:00
Doug Zongker
56c5105bd7 support for ext4/EMMC filesystems in updater binary
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-15 11:10:02 -07:00
Doug Zongker
8e5e4dada7 close update package before installing; allow remount
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-09-14 21:26:38 -07:00
Koushik Dutta
28a41b4df2 initial support for bml backup and restore
Change-Id: I7e6f1a76371c0d1c1f4cfac0413ba6fa7743f17a
2010-09-13 14:55:17 -07:00
Koushik Dutta
b5a36a0e20 add bmlutils
Change-Id: Ia402c4fcd2881cfb7cf7318718933ed64a19ec6b
2010-09-13 14:33:15 -07:00
Koushik Dutta
e5678e9249 initial support for flashing samsung kernels via redbend_ua
Change-Id: I9033146899d596c6d0a4ba8a5fad080d799d96ae
2010-09-13 13:25:11 -07:00
Ken Sumrall
8101125ee5 Changes to work with updated make_ext4fs tool that supports creating sparse images.
An extra parameter was added to the make_ext4fs() function, we these tools need
to be updated to match.

Change-Id: Id640a7f2b03153eb333b00337f0f991ff5332349
2010-08-13 19:22:47 -07:00
Hristo Bojinov
db314d69f0 Working ASLR implementation
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
2010-08-02 14:17:33 -07:00
Ying Wang
b4277c25c6 Mute unwanted error message
This CL removes the following line from the top of build logs:
"diff: out/target/product/*/obj/PACKAGING/updater_extensions_intermediates/register.inc.list: No such file or directory"

Change-Id: I79c15a69a0b1b0da0e45620b45a7a0fea5625250
2010-07-20 17:31:04 -07:00
Doug Zongker
3d177d055c support for ext4/EMMC filesystems in updater binary
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-07-01 15:42:28 -07:00
Koushik Dutta
0eb14b30e0 Merge from Froyo. 2010-06-23 17:38:05 -07:00
Koushik Dutta
ada3f3ba33 publish update-binary as a utility 2010-05-01 21:30:55 -07:00
Doug Zongker
c4351c7910 refactor applypatch and friends
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
2010-02-22 15:30:33 -08:00
Doug Zongker
512536a54a relocate applypatch; add type system and new functions to edify
- 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
2010-02-18 14:22:12 -08:00
Doug Zongker
e08991e02a bump updater API version to 3; deprecate firmware update command
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-02-03 09:20:07 -08:00
Doug Zongker
6aece33b3f add a one-argument version of package_extract_file
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
2010-02-01 14:40:12 -08:00
Doug Zongker
60babf8ba7 delete files before symlinking; log error messages
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).
2009-09-18 15:11:24 -07:00
Doug Zongker
a3f89eabb7 add a run_program() function to edify
Handy for producing debugging OTA packages (eg, running sqlite3 or
whatever in recovery).
2009-09-10 14:20:53 -07:00
Android (Google) Code Review
fc382dfc75 am d8f7c9b8: Merge change 5545 into donut
Merge commit 'd8f7c9b85e25fab93fef2221a84b60edc2e7b837'

* commit 'd8f7c9b85e25fab93fef2221a84b60edc2e7b837':
  remove updater from the user system image
2009-06-29 16:39:15 -07:00
Android (Google) Code Review
d8f7c9b85e Merge change 5545 into donut
* changes:
  remove updater from the user system image
2009-06-26 14:42:37 -07:00
Doug Zongker
ad3db099d5 remove updater from the user system image
updater (which is only needed in OTA packages) is getting included in
/system/bin, where it just takes up (quite a bit of) space.  Use the
hack of including it only in eng builds so it's not there for user
builds.
2009-06-26 13:38:55 -07:00
Doug Zongker
898ef399d3 am 0bbfe3d9: fix off-by-one error in set_perm()
Merge commit '0bbfe3d901885c1f0ab006e8d4cc1029c44a7376'

* commit '0bbfe3d901885c1f0ab006e8d4cc1029c44a7376':
  fix off-by-one error in set_perm()
2009-06-25 14:34:03 -07:00
Doug Zongker
0bbfe3d901 fix off-by-one error in set_perm()
We were inadvertently skipping over the first filename in the list of
arguments.
2009-06-25 13:37:31 -07:00
Doug Zongker
4275c3cfc8 am fbf3c10e: improve updater progress bar
Merge commit 'fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454'

* commit 'fbf3c10e45c20f8fe6bd1ac49ffe220035b9c454':
  improve updater progress bar
2009-06-24 17:39:16 -07:00
Doug Zongker
fbf3c10e45 improve updater progress bar
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-24 09:36:20 -07:00
Doug Zongker
2b0fdc6571 add device extension mechanism to updater
Allow devices (in BoardConfig.mk) to define additional static
libraries to be linked in to updater, to make device-specific
functions available in edify scripts.  Modify the updater makefile to
arrange for device libraries to register their edify functions.
2009-06-22 14:00:44 -07:00
Doug Zongker
47cace9836 add file_getprop() to updater
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.
2009-06-18 10:11:50 -07:00
Doug Zongker
fb2e3af3f9 let the "firmware" command take the file straight from the package
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-17 18:12:16 -07:00