Commit Graph

214 Commits

Author SHA1 Message Date
Doug Zongker
40f0d3b4e0 am d7d42089: remove unneeded partition roots
Merge commit 'd7d4208976125d114d0b8e44438e2417d5275098' into gingerbread-plus-aosp

* commit 'd7d4208976125d114d0b8e44438e2417d5275098':
  remove unneeded partition roots
2010-09-17 13:30:15 -07:00
Doug Zongker
d7d4208976 remove unneeded partition roots
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-17 13:02:48 -07:00
Brian Swetland
1dcd2fd0c7 am 792b0071: do not merge - update to match ext4utils api
Merge commit '792b00712bb1411d3b0583bcea95b43b3107fb95' into gingerbread-plus-aosp

* commit '792b00712bb1411d3b0583bcea95b43b3107fb95':
  do not merge - update to match ext4utils api
2010-09-15 18:07:22 -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
85bcf776e1 am 8a8e6cc3: (cherry-pick) EMMC support in applypatch
Merge commit '8a8e6cc33cc0dcfe7e184b59d5ef1f1c29095509' into gingerbread-plus-aosp

* commit '8a8e6cc33cc0dcfe7e184b59d5ef1f1c29095509':
  (cherry-pick) EMMC support in applypatch
2010-09-15 11:17:34 -07:00
Doug Zongker
9f89b0e467 am 56c5105b: support for ext4/EMMC filesystems in updater binary
Merge commit '56c5105bd7096704eaed35329b2c8c84cc282867' into gingerbread-plus-aosp

* commit '56c5105bd7096704eaed35329b2c8c84cc282867':
  support for ext4/EMMC filesystems in updater binary
2010-09-15 11:14:51 -07:00
Doug Zongker
76445f3aef am 8674a726: (cherry-pick) support installing any .zip file on the sdcard
Merge commit '8674a726ff05a4a6c09c6934778c251635f130a8' into gingerbread-plus-aosp

* commit '8674a726ff05a4a6c09c6934778c251635f130a8':
  (cherry-pick) support installing any .zip file on the sdcard
2010-09-15 11:12:34 -07:00
Doug Zongker
8a8e6cc33c (cherry-pick) EMMC support in applypatch
Let applypatch read and write EMMC partitions as well as MTD ones.
This enables incremental updates that include boot image changes, as
well as OTA of new recovery partitions.

Change-Id: Ib1861219c7ca66dff29ad02d6a0a14e5f03eb4d8
2010-09-15 11:12:11 -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
8674a726ff (cherry-pick) support installing any .zip file on the sdcard
Replaces the "install sdcard:update zip" menu option with one that
displays a menu of zip files (and subdirs) on the sdcard and lets you
pick which one to install.

Change-Id: Icff541525f2fdfc8939a91af626ecc386ac9dd07
2010-09-15 11:08:23 -07:00
Doug Zongker
858f0a763d am 8e5e4dad: close update package before installing; allow remount
Merge commit '8e5e4dada713609c9b2c45ea9cf4572bb89ef761' into gingerbread-plus-aosp

* commit '8e5e4dada713609c9b2c45ea9cf4572bb89ef761':
  close update package before installing; allow remount
2010-09-14 21:32:14 -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
Doug Zongker
bd4bc088e2 am d12560aa: add the ability to seek to a raw location while reading MTD partition
Merge commit 'd12560aa2134d3af21a1220cd4873553f9c51743' into gingerbread-plus-aosp

* commit 'd12560aa2134d3af21a1220cd4873553f9c51743':
  add the ability to seek to a raw location while reading MTD partition
2010-09-14 15:32:07 -07:00
Doug Zongker
d12560aa21 add the ability to seek to a raw location while reading MTD partition
Change-Id: Id1563ca667c50e61cf1bb15d2cf783a50937eece
2010-09-14 15:28:54 -07:00
Doug Zongker
f94a3575d7 am 61ba7a83: stop treating all-zero blocks as bad
Merge commit '61ba7a83ef46494689801ddaad569d7d174153b1' into gingerbread-plus-aosp

* commit '61ba7a83ef46494689801ddaad569d7d174153b1':
  stop treating all-zero blocks as bad
2010-09-12 14:23:25 -07:00
Doug Zongker
61ba7a83ef stop treating all-zero blocks as bad
Change-Id: If49fa6485f66598d16a7e44fce3129de55fab422
2010-09-12 13:36:40 -07:00
Doug Zongker
a2c9a1e8a2 am aaf3f56c: block is bad if ioctl() returns nonzero
Merge commit 'aaf3f56c44c37dca4ef9cc9efde68727ca26105f' into gingerbread-plus-aosp

* commit 'aaf3f56c44c37dca4ef9cc9efde68727ca26105f':
  block is bad if ioctl() returns nonzero
2010-09-09 16:59:05 -07:00
Doug Zongker
aaf3f56c44 block is bad if ioctl() returns nonzero
Change-Id: I6fc4ce796bc663d05035927c0af0ce7ab6d07218
2010-09-09 16:54:35 -07:00
Doug Zongker
28cae98c83 am 4bc98062: add --show_text option to recovery
Merge commit '4bc980626c1cf6f1ea7d36e4b54e0023c896c9de' into gingerbread-plus-aosp

* commit '4bc980626c1cf6f1ea7d36e4b54e0023c896c9de':
  add --show_text option to recovery
2010-09-03 11:20:50 -07:00
Doug Zongker
4bc980626c add --show_text option to recovery
Change-Id: Ie6c6c920260dfa759fbb15b1f352d6bb0fa7146c
2010-09-03 11:18:36 -07:00
Ying Wang
4c7c2f73af am 532c8600: Revert 21f0f97eba
Merge commit '532c86002bb89db43094b27ec50f001ae173c650' into gingerbread-plus-aosp

* commit '532c86002bb89db43094b27ec50f001ae173c650':
  Revert 21f0f97eba
2010-09-01 14:56:27 -07:00
Ying Wang
17b44ee3d8 am 21f0f97e: Fix for crespo.
Merge commit '21f0f97ebabb47adcbfe8d38b02685f2019b4eb3' into gingerbread-plus-aosp

* commit '21f0f97ebabb47adcbfe8d38b02685f2019b4eb3':
  Fix for crespo.
2010-09-01 14:53:32 -07:00
Ying Wang
532c86002b Revert 21f0f97eba
Change-Id: I46e4d7fe76e4219207e46f19e50188e38bb932b7
2010-09-01 14:52:22 -07:00
Ying Wang
21f0f97eba Fix for crespo.
Change-Id: I008510bf614606a46a630c7adc39464ce1143ec3
2010-08-30 17:26:53 -07:00
Jean-Baptiste Queru
979002871d am 965f9dc4: merge -s ours from froyo-release so that upgrading to gingerbread is a git fast-forward
Merge commit '965f9dc45345486e885b59b4776f0ca5e765ec20' into gingerbread-plus-aosp

* commit '965f9dc45345486e885b59b4776f0ca5e765ec20':
  fix bug in applying patches
  remove shadowed variable declaration
2010-08-23 19:10:18 -07:00
Jean-Baptiste Queru
965f9dc453 merge -s ours from froyo-release so that upgrading to gingerbread is a git fast-forward
Change-Id: I4d56dc0235f3df1306736c42144dccb26b876b74
2010-08-23 19:07:40 -07:00
Doug Zongker
dff87121ad fix bug in applying patches
When restarting a patch from crashing in the middle of a large file,
we're not finding the correct patch to apply to the copy saved in
cache.

Change-Id: I41cb2b87d096bb7a28a10c4cf3902facd45d4c9d
2010-08-13 11:50:54 -07:00
Doug Zongker
beecac49da remove shadowed variable declaration
An accidental variable declaration ("int enough_space = ..." instead
of "enough_space = " inside a block) shadowing the real one meant we
were always using the copy-to-cache path for patching, even when not
necessary.  Remove it.  Enforce an absolute minimum of free space as
well, to avoid running into problems patching small files, now that
the copy-to-cache path is (inadvertently) well-tested.

Change-Id: Idb7d57241a9adcda2e11001fa44f0cd67ce40d19
2010-08-13 11:47:56 -07:00
Doug Zongker
c080bc549a am fbd7ae7a: am 201cd466: remove shadowed variable declaration
Merge commit 'fbd7ae7a1ce0060221241ed02c576983c1f48d34' into gingerbread-plus-aosp

* commit 'fbd7ae7a1ce0060221241ed02c576983c1f48d34':
  remove shadowed variable declaration
2010-08-13 10:02:51 -07:00
Doug Zongker
fbd7ae7a1c am 201cd466: remove shadowed variable declaration
Merge commit '201cd46680f5789e21a57fb4476ab0ba0c0ed4c0' into gingerbread

* commit '201cd46680f5789e21a57fb4476ab0ba0c0ed4c0':
  remove shadowed variable declaration
2010-08-13 09:59:52 -07:00
Doug Zongker
201cd46680 remove shadowed variable declaration
An accidental variable declaration ("int enough_space = ..." instead
of "enough_space = " inside a block) shadowing the real one meant we
were always using the copy-to-cache path for patching, even when not
necessary.  Remove it.  Enforce an absolute minimum of free space as
well, to avoid running into problems patching small files, now that
the copy-to-cache path is (inadvertently) well-tested.

Change-Id: Idb7d57241a9adcda2e11001fa44f0cd67ce40d19
2010-08-13 09:41:21 -07:00
Doug Zongker
c4e3200578 am 17986e6b: am 8cd9e4f3: fix bug in applying patches
Merge commit '17986e6b8766ef9bdaa49efc7099e3867ca1978a' into gingerbread-plus-aosp

* commit '17986e6b8766ef9bdaa49efc7099e3867ca1978a':
  fix bug in applying patches
2010-08-12 17:55:24 -07:00
Doug Zongker
17986e6b87 am 8cd9e4f3: fix bug in applying patches
Merge commit '8cd9e4f3d4eba481b411482331293c8079ab24b2' into gingerbread

* commit '8cd9e4f3d4eba481b411482331293c8079ab24b2':
  fix bug in applying patches
2010-08-12 17:52:34 -07:00
Doug Zongker
8cd9e4f3d4 fix bug in applying patches
When restarting a patch from crashing in the middle of a large file,
we're not finding the correct patch to apply to the copy saved in
cache.

Change-Id: I41cb2b87d096bb7a28a10c4cf3902facd45d4c9d
2010-08-12 17:38:09 -07:00
Doug Zongker
c02c37a1e6 am 23ceeea8: make a copy of sideloaded packages in /tmp before verifying
Merge commit '23ceeea85e6a3555dd3d7140128e310954cadf7f' into gingerbread-plus-aosp

* commit '23ceeea85e6a3555dd3d7140128e310954cadf7f':
  make a copy of sideloaded packages in /tmp before verifying
2010-07-08 17:50:26 -07:00
Doug Zongker
23ceeea85e make a copy of sideloaded packages in /tmp before verifying
Copy a sideloaded package into /tmp, then verify and install the copy,
to prevent malicious users from overwriting the package between
verification and install.

Bug: 2826890 package can be replaced during verification
Bug: 2058160 Recovery should copy sideloaded (sd card) update ...
Change-Id: I3de148b0f1a671f1974782b6855527caeaefda23
2010-07-08 17:27:55 -07:00
The Android Open Source Project
60faafcf01 merge from open-source master
Change-Id: I9d0122dbf1a9c2bd1898c41766c5bf4320f2313a
2010-06-30 15:51:09 -07:00
Kenny Root
4fef81a5a9 am ecc76ba5: Set adbd to be disabled by default in recovery
Merge commit 'ecc76ba5516d62a886f9c290906e0ca50702c9ab' into froyo-plus-aosp

* commit 'ecc76ba5516d62a886f9c290906e0ca50702c9ab':
  Set adbd to be disabled by default in recovery
2010-06-28 12:24:46 -07:00
Kenny Root
c78a9698dd am ecc76ba5: Set adbd to be disabled by default in recovery
Merge commit 'ecc76ba5516d62a886f9c290906e0ca50702c9ab' into gingerbread

* commit 'ecc76ba5516d62a886f9c290906e0ca50702c9ab':
  Set adbd to be disabled by default in recovery
2010-06-28 12:24:16 -07:00
Kenny Root
ecc76ba551 Set adbd to be disabled by default in recovery
Change-Id: I74fa6edc4b001247b20be52e8301d18407fede2c
2010-06-28 09:01:22 -07:00
Nick Kralevich
21b97ed569 Add __attribute__((format(printf, a, b))) to printf like functions.
Fix potential string format bug.

Change-Id: Ie05aac53b2c45a48bd68e340b76ccb21edfd28b7
2010-06-24 16:11:17 -07:00
Colin Cross
dd6a0412b5 recovery: Add ueventd service
Change-Id: Iad448bc1608f88c5db2108475f35b88ea2877b07
2010-05-14 13:44:13 -07:00
Bruce Beare
be42930f0b am 97ca48e7: generic_x86 support
Merge commit '97ca48e7f4ac8d3842f74f92b8f40d0e74733f38' into kraken

* commit '97ca48e7f4ac8d3842f74f92b8f40d0e74733f38':
  generic_x86 support
2010-05-03 16:14:51 -07:00
Bruce Beare
97ca48e7f4 generic_x86 support
Add in Makefiles and support files for x86 builds
  Based on changes by: wonjong.lee <wonjong.lee@windriver.com>
  Additional changes by: Mark Gross <mark.gross@intel.com>
  Additional changes by: Bruce Beare <brucex.j.beare@intel.com>

Change-Id: I71fcf58f116e4e9047e7d03fdb28e3308553ce5c
2010-05-03 15:58:50 -07:00
Oscar Montemayor
52219a68a8 DO NOT MERGE
Encrypted File Systems integration. Recovery changes.

Change-Id: I932f73a6f937aac061128e1134eab08c30f0471d
2010-04-01 17:14:57 -07:00
Oscar Montemayor
51282faa8c am 2654f5aa: (-s ours) DO NOT MERGE Removing unused recovey options. Please refer to Bug#2502219 for more info.
Merge commit '2654f5aae18c67ad9aff6dbcdf9bc67b62e37d2d' into kraken

* commit '2654f5aae18c67ad9aff6dbcdf9bc67b62e37d2d':
  DO NOT MERGE
2010-03-29 16:19:49 -07:00
Oscar Montemayor
2654f5aae1 DO NOT MERGE
Removing unused recovey options.
Please refer to Bug#2502219 for more info.

Change-Id: I2fe3cdb0c8b93ed7e1cc4093824fbe181f5f0aea
2010-03-26 16:03:44 -07:00
Jean-Baptiste Queru
dcc38b3c15 Add an empty CleanSpec.mk
Change-Id: Icd177bd26120e0c8929faa8d1007f6c5bd446cb8
2010-03-08 18:04:03 -08:00
Doug Zongker
5b695f393e make StringValue wrapper okay to call on NULL
The docs say "don't do this", but it's trivial to make safe.  Make
StringValue(NULL) return NULL instead of crashing.

Change-Id: I2221bcb4c98d8adb4e25c764d7bdcfa787822bcf
2010-02-24 15:05:07 -08: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