9 years agoSecurity: Fix typo in recovery EOCD detection. master
Steve Kondik [Wed, 9 Dec 2009 06:31:06 +0000]
Security: Fix typo in recovery EOCD detection.

This issue results in the ability to modify the contents of a signed
OTA recovery image.

9 years agomerge from eclair
Jean-Baptiste Queru [Sun, 15 Nov 2009 20:05:33 +0000]
merge from eclair

9 years agoeclair snapshot tegra-9.12.5 tegra-9.12.5-baseline tegra-9.12.6 tegra-9.12.6-baseline
Jean-Baptiste Queru [Fri, 13 Nov 2009 02:45:15 +0000]
eclair snapshot

9 years agomerge from donut
Jean-Baptiste Queru [Thu, 3 Sep 2009 21:12:45 +0000]
merge from donut

9 years agoNot all failures to fopen_root_path() are serious.
Jay Freeman (saurik) [Mon, 17 Nov 2008 01:56:05 +0000]
Not all failures to fopen_root_path() are serious.
Example: E:Can't open /cache/recovery/command.

9 years agomerge from donut
Jean-Baptiste Queru [Wed, 29 Jul 2009 21:56:48 +0000]
merge from donut

9 years agoMerge korg/donut into korg/master
Jean-Baptiste Queru [Sun, 26 Jul 2009 00:48:00 +0000]
Merge korg/donut into korg/master

9 years agoonly build flash_image for eng
Doug Zongker [Thu, 23 Jul 2009 22:17:00 +0000]
only build flash_image for eng

With the recovery image being installed by applypatch, the flash_image
tool isn't needed any more.  Continue to build it for eng just in case
it's handy for debugging.

9 years agoremove amend
Doug Zongker [Tue, 14 Jul 2009 23:31:56 +0000]
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.

9 years agoskip over all-zero blocks when reading MTD partition
Doug Zongker [Wed, 1 Jul 2009 19:09:29 +0000]
skip over all-zero blocks when reading MTD partition

We fail to detect certain bad blocks (marked in the factory as bad, I
think?) when reading mtd partitions.  These come back as a block of
all zeros.  Since it's fairly unlikely a legitimate boot or recovery
block will contain 128k of zeros, change mtdutils to skip over such
blocks.

Arve says https://review.source.android.com/10535 may be a long-term
fix for this, but he isn't yet sure.

9 years agoMerge change 5545 into donut
Android (Google) Code Review [Fri, 26 Jun 2009 21:42:37 +0000]
Merge change 5545 into donut

* changes:
  remove updater from the user system image

9 years agoremove updater from the user system image
Doug Zongker [Fri, 26 Jun 2009 20:38:55 +0000]
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.

9 years agofix off-by-one error in set_perm()
Doug Zongker [Thu, 25 Jun 2009 20:37:31 +0000]
fix off-by-one error in set_perm()

We were inadvertently skipping over the first filename in the list of
arguments.

9 years agoimprove updater progress bar
Doug Zongker [Wed, 24 Jun 2009 16:36:20 +0000]
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.

9 years agoadd file_getprop() to updater
Doug Zongker [Thu, 18 Jun 2009 17:11:50 +0000]
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.

9 years agolet the "firmware" command take the file straight from the package
Doug Zongker [Thu, 18 Jun 2009 00:29:40 +0000]
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.

9 years agoadd less_than_int, greater_than_int to edify
Doug Zongker [Fri, 12 Jun 2009 23:13:52 +0000]
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.

9 years agofixes to edify and updater script
Doug Zongker [Fri, 12 Jun 2009 19:24:39 +0000]
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".

9 years agoedify extensions for OTA package installation, part 2
Doug Zongker [Fri, 12 Jun 2009 00:21:44 +0000]
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.

9 years agofix sim build in donut, too
Doug Zongker [Fri, 12 Jun 2009 00:32:55 +0000]
fix sim build in donut, too

9 years agoedify extensions for OTA package installation, part 1
Doug Zongker [Wed, 10 Jun 2009 21:11:53 +0000]
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).

9 years agoMerge change 3514 into donut
Android (Google) Code Review [Wed, 10 Jun 2009 15:10:29 +0000]
Merge change 3514 into donut

* changes:
  core of edify, an eventual replacement for amend

9 years agocore of edify, an eventual replacement for amend
Doug Zongker [Tue, 9 Jun 2009 00:35:39 +0000]
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.

9 years agoallow OTA package to provide binary instead of script
Doug Zongker [Thu, 4 Jun 2009 17:24:53 +0000]
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.

9 years agoremove unused permissions scheme from amend
Doug Zongker [Tue, 2 Jun 2009 22:30:11 +0000]
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.

9 years agodon't say "install complete" when it really isn't
Doug Zongker [Fri, 29 May 2009 02:02:45 +0000]
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."

9 years agoundo temporary alignment hack
Doug Zongker [Fri, 8 May 2009 16:43:28 +0000]
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.

9 years agoalign data passed to write() on 32k boundaries
Doug Zongker [Wed, 6 May 2009 00:50:21 +0000]
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).

9 years agohandle short writes when unzipping files
Doug Zongker [Wed, 29 Apr 2009 23:52:04 +0000]
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.

9 years agomerge cupcake into donut
Jean-Baptiste Queru [Thu, 23 Apr 2009 00:56:50 +0000]
merge cupcake into donut

10 years agoAI 144130: Don't build OTA package keys into the recovery binary; read
Doug Zongker [Wed, 1 Apr 2009 22:48:46 +0000]
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

10 years agoAI 144082: Remove the unused "unpacking" recovery icon.
Doug Zongker [Wed, 1 Apr 2009 21:39:15 +0000]
AI 144082: Remove the unused "unpacking" recovery icon.

Automated import of CL 144082

10 years agoAI 144070: Add an option to wipe cache (only) to the recovery menu.
Doug Zongker [Wed, 1 Apr 2009 20:57:40 +0000]
AI 144070: Add an option to wipe cache (only) to the recovery menu.

Automated import of CL 144070

10 years agoMerge commit 'korg/cupcake'
The Android Open Source Project [Fri, 27 Mar 2009 22:30:35 +0000]
Merge commit 'korg/cupcake'

10 years agoAI 143128: Use PNG instead of BMP for recovery image icons. This saves
Doug Zongker [Fri, 27 Mar 2009 20:25:30 +0000]
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

10 years agoAutomated import from //branches/donutburger/...@142141,142141
Doug Zongker [Wed, 25 Mar 2009 04:30:32 +0000]
Automated import from //branches/donutburger/...@142141,142141

10 years agoAutomated import from //branches/cupcake/...@142138,142138
Doug Zongker [Wed, 25 Mar 2009 02:03:53 +0000]
Automated import from //branches/cupcake/...@142138,142138

10 years agoAutomated import from //branches/donutburger/...@140818,140818
Dianne Hackborn [Wed, 25 Mar 2009 01:36:43 +0000]
Automated import from //branches/donutburger/...@140818,140818

10 years agoauto import from //branches/cupcake_rel/...@141571
The Android Open Source Project [Fri, 20 Mar 2009 06:08:36 +0000]
auto import from //branches/cupcake_rel/...@141571

10 years agoMerge commit 'remotes/korg/cupcake' into cupcake_to_master
Jean-Baptiste Queru [Wed, 18 Mar 2009 23:57:16 +0000]
Merge commit 'remotes/korg/cupcake' into cupcake_to_master

10 years agoauto import from //depot/cupcake/@135843
The Android Open Source Project [Wed, 4 Mar 2009 03:28:42 +0000]
auto import from //depot/cupcake/@135843

10 years agoauto import from //depot/cupcake/@135843
The Android Open Source Project [Wed, 4 Mar 2009 02:28:14 +0000]
auto import from //depot/cupcake/@135843

10 years agoauto import from //depot/cupcake/@132589
The Android Open Source Project [Tue, 3 Mar 2009 22:03:51 +0000]
auto import from //depot/cupcake/@132589

10 years agoauto import from //depot/cupcake/@137055
The Android Open Source Project [Tue, 3 Mar 2009 06:54:15 +0000]
auto import from //depot/cupcake/@137055

10 years agoRemove obsolete OTA tools
Jean-Baptiste Queru [Mon, 2 Mar 2009 20:33:57 +0000]
Remove obsolete OTA tools

Resolves http://code.google.com/p/android/issues/detail?id=2077

10 years agoauto import from //branches/cupcake/...@130745
The Android Open Source Project [Tue, 10 Feb 2009 23:43:56 +0000]
auto import from //branches/cupcake/...@130745

10 years agoMerge branch 'cupcake'
The Android Open Source Project [Sat, 10 Jan 2009 02:03:37 +0000]
Merge branch 'cupcake'

10 years agoauto import from //branches/cupcake/...@125939
The Android Open Source Project [Sat, 10 Jan 2009 01:50:54 +0000]
auto import from //branches/cupcake/...@125939

10 years agoCode drop from //branches/cupcake/...@124589
The Android Open Source Project [Thu, 18 Dec 2008 02:03:49 +0000]
Code drop from //branches/cupcake/...@124589

10 years agoInitial Contribution
The Android Open Source Project [Tue, 21 Oct 2008 14:00:00 +0000]
Initial Contribution