Commit Graph

41 Commits

Author SHA1 Message Date
Koushik Dutta
0df56f4db4 wip 2011-11-16 16:00:35 -08:00
Koushik Dutta
7f13e150cf more cwr5 work.
Change-Id: I72bb14ef25a9067ccde3e40ea989c7990512687a
2011-09-08 16:55:35 -07:00
Koushik Dutta
d79b7541f3 whoops
Change-Id: Ided86fe1991e5d9d6a707465429ec35ccc09743a
2011-05-25 10:47:41 -07:00
Koushik Dutta
63605f1d45 Merge branch 'gingerbread' of git://github.com/CyanogenMod/android_bootable_recovery into gingerbread 2011-05-15 18:49:22 -07:00
Koushik Dutta
20b516a408 set the env for UPDATE_PACKAGE (the source zip) for update-binary. This allows shell scripts to use the source zip.
Change-Id: Ia8118b31408f687780dd45e14f540a7e76619cba
2011-05-15 18:48:17 -07:00
Koushik Dutta
49553c7561 Do not close the zip archive prematurely. It may be accessed later for a firmware update.
Change-Id: I31c298f75bbcdc7998221aa2b3aa334926343139
2011-05-13 13:01:26 -07:00
Doug Zongker
469243e536 save a last_install file with the result of the last package install attempt
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
2011-04-12 09:28:10 -07:00
Koushik Dutta
67c381a6fa 3.0.0.4. Provide an error message if an Amend zip is provided.
Change-Id: Ia740686a138cff01de2c1475acc0abccb18d9c2d
2011-01-02 12:26:35 -08:00
Koushik Dutta
df1e406782 Merge from ClockworkMod recovery
Change-Id: Id5b312147173ced559a62d97029acede6c2f8766
2010-12-18 17:42:31 -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
Doug Zongker
cc8cd3f3ca remove the notion of "root path"; support mixed flash types
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-21 14:13:45 -07:00
Doug Zongker
d4208f9f9d remove the notion of "root path"; support mixed flash types (do not merge)
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-20 18:07:31 -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
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
fad25ab75b merge with eclair recovery 2010-08-26 10:40:57 -07:00
Koushik Dutta
5aaa8238f7 galaxys 2010-07-20 16:23:18 -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
Koushik Dutta
0eb14b30e0 Merge from Froyo. 2010-06-23 17:38:05 -07:00
Koushik K. Dutta
707fa6d289 null terminate script. wrapping menus. 1.7.7 2010-03-23 11:44:33 -07:00
Koushik K. Dutta
581bd861d1 run update-binary first. revert recovery API version to 2. use RECOVERY_VERSION for the actual display version. 2010-03-20 01:08:55 -07:00
Koushik K. Dutta
e923487ff6 working recovery image! 2010-02-12 00:43:24 -08:00
Koushik K. Dutta
1f14c9a1f1 Need to call register_package_root prior to installing the package. The subsequent unregistering made me think that it was being registered at some point, but it was removed in the transition to eclair. The unregistration was dead code. It is being used now though. 2010-02-11 23:08:23 -08:00
Koushik K. Dutta
6060e5c6df update.zip somewhat working now... 2010-02-11 22:27:06 -08:00
Koushik K. Dutta
4c1eed2573 Initial reintegration of legacy update process that used update-script 2010-02-11 18:59:58 -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
aa062531aa fix parsing of dumpkeys output
%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
2010-01-28 16:51:00 -08:00
Doug Zongker
54e2e86c57 do not merge: cherry-picked 60151a295c from master branch 2009-08-17 13:21:04 -07:00
Doug Zongker
60151a295c verify whole-file signature instead of jarsigner signatures
In recovery, verify a signature that covers the entire zip file,
instead of using the jarsigner format to verify individual files.

Bug: 1328985
2009-08-14 17:26:33 -07:00
Doug Zongker
64893ccc09 remove amend
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-07-14 16:58:42 -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
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
Doug Zongker
d9c9d10d9d fixes to edify and updater script
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-12 14:05:03 -07:00
Doug Zongker
8edb00c990 edify extensions for OTA package installation, part 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-12 09:40:37 -07:00
Doug Zongker
9931f7f3c1 edify extensions for OTA package installation, part 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-11 16:25:29 -07:00
Doug Zongker
b2ee9201be allow OTA package to provide binary instead of script
Allow installation of OTA packages which do not contain an
update-script, but instead contain an update-binary.
2009-06-04 16:45:32 -07:00
Doug Zongker
07e1dca706 don't say "install complete" when it really isn't
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-05-28 19:02:45 -07:00
Doug Zongker
d1b19b9c98 AI 144130: Don't build OTA package keys into the recovery binary; read
them from an external file in the recovery image.  Use the
  test-keys for all builds.

Automated import of CL 144130
2009-04-01 15:48:46 -07:00
The Android Open Source Project
c24a8e688a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
ffb48f64fe auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
23580ca27a Initial Contribution 2008-10-21 07:00:00 -07:00