Commit Graph

31 Commits

Author SHA1 Message Date
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
e3da02e7bc add less_than_int, greater_than_int to edify
Add functions less_than_int() and greater_than_int() that interpret
their args as ints and do the comparison.  ("<" and ">" operators, if
implemented, should do string comparison.)  This lets us do the build
time check currently done by the check_prereq binary.
2009-06-12 16:13:52 -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
9dbc027b5f fix sim build in donut, too 2009-06-11 17:32:55 -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
Android (Google) Code Review
9b9c2114bd Merge change 3514 into donut
* changes:
  core of edify, an eventual replacement for amend
2009-06-10 08:10:29 -07:00
Doug Zongker
37bee62aef core of edify, an eventual replacement for amend
Edify is a simple scripting language for OTA installation, to be used
when we move to OTAs being installed via binaries shipped with the
package.
2009-06-09 17:37:19 -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
f28c916e73 remove unused permissions scheme from amend
Amend (aka the recovery command language) had a half-implemented
scheme of limiting which commands OTA packages were allowed to
execute.  It's not clear what this was ever supposed to be good for.
Remove it.
2009-06-02 15:41:00 -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
1c4ceae38f undo temporary alignment hack
Remove the memory alignment that mysteriously made OTA installs work,
in anticipation of a kernel that fixes the actual problem.  Handle
EINTR properly.
2009-05-08 09:43:28 -07:00
Doug Zongker
683c462803 align data passed to write() on 32k boundaries
In donut, OTA installation often encounters the write() system call
doing short writes -- which is legal but unexpected -- or failing with
ENOSPC when plenty of space is available.  Passing aligned memory
buffers to write() appears to prevent (or at least reduce the
frequency) of these problems.  b/1833052 has been filed to look at the
underlying problem, but this change aligns buffers we use with write()
so we can OTA for now (or see if this problem still occurs).
2009-05-06 08:40:28 -07:00
Doug Zongker
596271fa71 handle short writes when unzipping files
minzip fails if write() doesn't write all the data in one call.
Apparently this was good enough before, but it causes OTAs to fail all
the time now (maybe due to the recently-submitted kernel)?  Change
code to attempt continuing after short writes.
2009-04-29 17:35:34 -07:00
Jean-Baptiste Queru
f554ceb050 merge cupcake into donut 2009-04-22 17:56:50 -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
Doug Zongker
49283858fb AI 144082: Remove the unused "unpacking" recovery icon.
Automated import of CL 144082
2009-04-01 14:39:15 -07:00
Doug Zongker
1066d2c319 AI 144070: Add an option to wipe cache (only) to the recovery menu.
Automated import of CL 144070
2009-04-01 13:57:40 -07:00
Doug Zongker
58bde316e2 AI 143128: Use PNG instead of BMP for recovery image icons. This saves
about 60k from the recovery and system images.

Automated import of CL 143128
2009-03-27 13:25:30 -07:00
Doug Zongker
bc012de46e Automated import from //branches/donutburger/...@142141,142141 2009-03-24 21:30:32 -07:00
Doug Zongker
d105f8f84f Automated import from //branches/cupcake/...@142138,142138 2009-03-24 19:03:53 -07:00
Dianne Hackborn
cf5b17055b Automated import from //branches/donutburger/...@140818,140818 2009-03-24 18:36:43 -07:00
The Android Open Source Project
73e8e9ba08 auto import from //branches/cupcake_rel/...@141571 2009-03-19 23:08:36 -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
d4ae69739e auto import from //depot/cupcake/@132589 2009-03-03 14:03:51 -08:00
The Android Open Source Project
15bb56d89a auto import from //depot/cupcake/@137055 2009-03-02 22:54:15 -08:00
The Android Open Source Project
8b7334b3c2 auto import from //branches/cupcake/...@130745 2009-02-10 15:43:56 -08:00
The Android Open Source Project
928d471ef2 auto import from //branches/cupcake/...@125939 2009-01-09 17:50:54 -08:00
The Android Open Source Project
ff3d93821e Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:49 -08:00
The Android Open Source Project
23580ca27a Initial Contribution 2008-10-21 07:00:00 -07:00