broken recovery console in ICS MR1

142 views
Skip to first unread message

Andrew Boie

unread,
Jan 30, 2012, 7:00:35 PM1/30/12
to android-platform
The following commit appears to break the recovery console in ICS MR1.
If booting into the recovery console manually to apply an OTA update,
the UI calls finish_recovery() in the context of prompt_and_wait().
finish_recovery(), with this patch, now un-mounts the cache partition.
If you use the menu to select an OTA update zip file on an sdcard,
applying this update will fail if it is an incremental update because
with /cache un-mounted, there is no temporary space for applypatch to
do its magic.

I'm going to try to work up a fix which preserves the intended
semantics of the new wipe_cache() command, but thought I'd give a
heads-up.

-- Install /sdcard ...
Finding update package...
I:Update location: /tmp/sideload/package.zip
Opening update package...
I:1 key(s) loaded from /res/keys
Verifying update package...
I:comment is 1738 bytes; signature 1720 bytes from end
I:whole-file signature verified against key 0
I:verify_file returned 0
Installing update...
Verifying current system...
Verifying boot image...
0 bytes free on /cache (4769792 needed)
error opening /cache/recovery/otatest: No such file or directory
0 regular files in deletable directories
no files can be deleted to free space on /cache
unable to make 4769792 bytes available on /cache
script aborted: assert failed: apply_patch_space(4769792)
assert failed: apply_patch_space(4769792)
E:Error in /tmp/sideload/package.zip


Author: Doug Zongker <do...@android.com> 2011-10-19 10:51:12
Committer: Doug Zongker <do...@android.com> 2011-10-19 11:26:18
Parent: 441031dadc4f5e8c1487468229781702bc08fb14 (minui: add ability
to synchronize current key state)
Child: fadc5ac81d6400ebdd041f7d4ea64021596d6b7d (merge in ics-release
history after reset to master)
Branches: remotes/m/ics, remotes/otc-private/ics/alpha, remotes/otc-
private/ics/aosp-rebasing, remotes/otc-private/ics/master, remotes/otc-
private/mirrors/google/ics-mr1, remotes/otc-private/mirrors/google/ics-
mr1-release, remotes/otc-private/mirrors/google/master
Follows: android-2.3.5_r1, android-2.3.6_r0.9, android-2.3.6_r1,
android-2.3.7_r1, android-2.3.7_r1_ia, android-cts-2.3_r4, android-
cts-2.3_r5, android-sdk-adt_r12, android-sdk-tools_r12
Precedes:

allow recovery packages to wipe cache

updater now has a function "wipe_cache();" which causes recovery
to
wipe the cache partition after the successful installation of the
package. Move log copying around a bit so logs and the
last_install
flag file are copied to cache after it's wiped.

Bug: 5314244
Change-Id: Id35a9eb6dcd626c8f3a3a0076074f462ed3d44bd

Andrew Boie

unread,
Jan 30, 2012, 7:53:53 PM1/30/12
to android-platform
In case anyone on the inside sees this, I have a related supplemental
concern:

Incremental updates assume that /cache is mounted, you can see the
Edify command CacheFreeSpaceCheck() is done as part of the sanity
checks in ota_from_target_files. However, there is no explicit code in
the recovery console which ensures that it is mounted before starting
updater; the only reason why it is mounted in the first place is due
to an ensure_path_mounted() in the get_args() function which might not
even happen if arguments are provided on the command line.

It seems to me that it's necessary to make this more explicit, and I
propose it would be best to do this as an Edify command in the updater
script, and have all filesystems un-mounted before the update starts.
The reason why I say this is that would leave the door open to a
future enhancement where OTA updates could use libdiskconfig to re-
partition the disk during an update, for those situations where the
existing partition layout isn't suitable.

At any rate, to do it inside updater, we'd need to parse the
recovery.fstab again so that we could look up the device node for /
cache and mount it. Would there be any opposition to a patch which
does this?

xkcdcode

unread,
Feb 20, 2012, 9:37:02 AM2/20/12
to android-platform
Hi,

I am basically having this exact problem while trying to update my
Google Nexus S to ICS 4.0.3 to fix the in call volume problem. The
exact error I get is:-

Verifying current system...
assert failed: apply_patch_space(15428056)
E:Error in /tmp/sideload/package.zip
(Status 7)
Installation aborted.

How can I fix this please? Thanks.

-- Al
Reply all
Reply to author
Forward
0 new messages