aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* recovery: fix rebootingDoug Zongker2013-08-302-1/+4
| | | | | | | | Change I84c0513acb549720cb0e8c9fcbda0050f5c396f5 moved reboot functionality into init but did not update the recovery partition; so "adb reboot" and /system/bin/reboot in recovery are both broken. Change-Id: Ie2d14627a686ffb5064256b6c399723636dff116
* recovery: install packages in a known mount environmentDoug Zongker2013-08-215-11/+35
| | | | | | | | | | | When installing a package, we should have /tmp and /cache mounted and nothing else. Ensure this is true by explicitly mounting them and unmounting everything else as the first step of every install. Also fix an error in the progress bar that crops up when you do multiple package installs in one instance of recovery. Change-Id: I4837ed707cb419ddd3d9f6188b6355ba1bcfe2b2
* notify about pending long pressDoug Zongker2013-07-315-27/+102
| | | | | | | | | | | | | | | | | | Recovery changes: - add a method to the UI class that is called when a key is held down long enough to be a "long press" (but before it is released). Device-specific subclasses can override this to indicate a long press. - do color selection for ScreenRecoveryUI's menu-and-log drawing function. Subclasses can override this to customize the colors they use for various elements. - Include the value of ro.build.display.id in the menu headers, so you can see on the screen what version of recovery you are running. Change-Id: I426a6daf892b9011638e2035aebfa2831d4f596d
* Merge "start healthd in recovery"Todd Poynor2013-07-261-0/+4
|\
| * start healthd in recoveryTodd Poynor2013-06-181-0/+4
| | | | | | | | Change-Id: I16e3e0ddb8ca062431deb4be83c5be5eb786d76f
* | Update OTA installer to understand SELinux filesystem labelsNick Kralevich2013-07-183-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the OTA installer to understand SELinux filesystem labels. We do this by introducing new set_perm2 / set_perm2_recursive calls, which understand SELinux filesystem labels. These filesystem labels are applied at the same time that we apply the UID / GID / permission changes. For compatibility, we preserve the behavior of the existing set_perm / set_perm_recursive calls. If the destination kernel doesn't support security labels, don't fail. SELinux isn't enabled on all kernels. Bug: 8985290 Change-Id: I99800499f01784199e4918a82e3e2db1089cf25b
* | am a69b50c5: am 901b898d: recovery: remove O_DIRECT, use O_SYNC onlyDoug Zongker2013-07-111-2/+2
|\ \ | | | | | | | | | | | | * commit 'a69b50c567d46afad73c4d6ab9e57f078ee73327': recovery: remove O_DIRECT, use O_SYNC only
| * \ am 901b898d: recovery: remove O_DIRECT, use O_SYNC onlyDoug Zongker2013-07-111-2/+2
| |\ \ | | | | | | | | | | | | | | | | * commit '901b898d5e4d7cc555974b8132f83f948f8fbaee': recovery: remove O_DIRECT, use O_SYNC only
| | * | recovery: remove O_DIRECT, use O_SYNC onlyDoug Zongker2013-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | O_DIRECT writes fail with EINVAL due to alignment issues. Change-Id: If8cf38a636313e4f4b4e61e66287dc903c473e5b
* | | | am 660637f3: am e8d953aa: recovery: more cargo-cult programmingDoug Zongker2013-07-111-2/+2
|\| | | | | | | | | | | | | | | | | | | * commit '660637f3fc6fe20e8b7f47b98152138c2c92b7ec': recovery: more cargo-cult programming
| * | | am e8d953aa: recovery: more cargo-cult programmingDoug Zongker2013-07-111-2/+2
| |\| | | | | | | | | | | | | | | | | | * commit 'e8d953aa7ed0c16beb1b03a05d16cb23dd85e198': recovery: more cargo-cult programming
| | * | recovery: more cargo-cult programmingDoug Zongker2013-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add O_DIRECT|O_SYNC when opening partitions for write. Change-Id: I9825ad8e60fba87e482f8abc5593d6f54a1e3a1c
* | | | am 51ffaf54: (-s ours) Reconcile with jb-mr2-release - do not mergeThe Android Open Source Project2013-07-110-0/+0
|\| | | | | | | | | | | | | | | | | | | * commit '51ffaf54a56441bba053d37a00122761c3a18f16': recovery: sleep after writing partition and closing it
| * | | Reconcile with jb-mr2-release - do not mergeThe Android Open Source Project2013-07-110-0/+0
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: Id35004f465f5152c1de0796eb66989f234185208
| | * | | recovery: sleep after writing partition and closing itDoug Zongker2013-07-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another speculative attempt to get everything we write actually stored to the device. Change-Id: Icf40b0741b4c535e55ea34848073a97d90dc0e70
* | | | | am fbcfad33: am bf4a69ac: recovery: sleep after writing partition and closing itDoug Zongker2013-07-111-2/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit 'fbcfad33face5d3b9e6b8cb04379168bceb517df': recovery: sleep after writing partition and closing it
| * | | | am bf4a69ac: recovery: sleep after writing partition and closing itDoug Zongker2013-07-101-2/+7
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | * commit 'bf4a69ac41696fe78f6cc67b10cf1816186f1c5d': recovery: sleep after writing partition and closing it
| | * | | recovery: sleep after writing partition and closing itDoug Zongker2013-07-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another speculative attempt to get everything we write actually stored to the device. Change-Id: Icf40b0741b4c535e55ea34848073a97d90dc0e70
* | | | | am e352c88f: (-s ours) Reconcile with jb-mr2-release - do not mergeThe Android Open Source Project2013-07-110-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e352c88fbcfd917f6614597364d2e550aa691e79': recovery: write partitions more conservatively recovery: try to write EMMC partitions more reliably
| * | | | Reconcile with jb-mr2-release - do not mergeThe Android Open Source Project2013-07-090-0/+0
| |\ \ \ \ | | | |/ / | | |/| | | | | | | Change-Id: Ib99b7cd6aede63006c91be2635112e16dd0f2b24
| | * | | recovery: write partitions more conservativelyDoug Zongker2013-07-091-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write and verify partitions using write(2) and read(2) rather than the stdio functions. Read and write in 4kb blocks. When writing, fsync() every 1MB. Bug: 9602014 Change-Id: Ie98ce38e857786fc0f4ebf36bb5ffc93b41bc96f
| | * | | recovery: try to write EMMC partitions more reliablyDoug Zongker2013-07-092-7/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nexus 4 has flash errors that manifest during large writes (eg, of the radio partition). Writes of some blocks seem to be dropped silently, without any errors being returned to the user level. Make two changes to the partition-writing code: - break it up into 1MB writes instead of writing partitions with a single fwrite() call. Pause for 50ms in between every chunk. - read the partition back after writing and verify that we read what we wrote. Drop caches before reading so we (hopefully) are reading off the actual flash and not some cache. Neither of these should be necessary. Bug: 9602014 Change-Id: Ice2e24dd4c11f1a57968277b5eb1468c772f6f63
* | | | | am 2148133d: am c870a99c: recovery: write partitions more conservativelyDoug Zongker2013-07-111-24/+46
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '2148133d46cb875316b01947dd5719ed995f7d67': recovery: write partitions more conservatively
| * | | | am c870a99c: recovery: write partitions more conservativelyDoug Zongker2013-07-091-24/+46
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | * commit 'c870a99c4aeb9e232ee68951e666b5fa670d1680': recovery: write partitions more conservatively
| | * | | recovery: write partitions more conservativelyDoug Zongker2013-07-091-24/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write and verify partitions using write(2) and read(2) rather than the stdio functions. Read and write in 4kb blocks. When writing, fsync() every 1MB. Bug: 9602014 Change-Id: Ie98ce38e857786fc0f4ebf36bb5ffc93b41bc96f
* | | | | Merge "recovery: preserve recovery logs across cache wipes"Doug Zongker2013-07-091-2/+76
|\ \ \ \ \
| * | | | | recovery: preserve recovery logs across cache wipesDoug Zongker2013-07-091-2/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a cache wipe or a factory reset (which includes a cache wipe), save any last* log files in the /cache/recovery directory and write them back after reformatting the partition, so that wiping data doesn't lose useful log information. Change-Id: I1f52ae9131760b5e752e136645c19f71b7b166ee
* | | | | | recovery: move log output to stdoutDoug Zongker2013-07-098-72/+72
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recovery currently has a random mix of messages printed to stdout and messages printed to stderr, which can make logs hard to read. Move everything to stdout. Change-Id: Ie33bd4a9e1272e731302569cdec918e0534c48a6
* | | | | am 0ccaccf7: am 044a0b4d: recovery: try to write EMMC partitions more reliablyDoug Zongker2013-07-082-7/+73
|\| | | | | | | | | | | | | | | | | | | | | | | | * commit '0ccaccf7d0f50bb9555ee13a841c246a1fea80f2': recovery: try to write EMMC partitions more reliably
| * | | | am 044a0b4d: recovery: try to write EMMC partitions more reliablyDoug Zongker2013-07-082-7/+73
| |\| | | | | | | | | | | | | | | | | | | | | | | * commit '044a0b4d49a11edfa13471ce20914b0514eb7e0e': recovery: try to write EMMC partitions more reliably
| | * | | recovery: try to write EMMC partitions more reliablyDoug Zongker2013-07-082-7/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nexus 4 has flash errors that manifest during large writes (eg, of the radio partition). Writes of some blocks seem to be dropped silently, without any errors being returned to the user level. Make two changes to the partition-writing code: - break it up into 1MB writes instead of writing partitions with a single fwrite() call. Pause for 50ms in between every chunk. - read the partition back after writing and verify that we read what we wrote. Drop caches before reading so we (hopefully) are reading off the actual flash and not some cache. Neither of these should be necessary. Bug: 9602014 Change-Id: Ice2e24dd4c11f1a57968277b5eb1468c772f6f63
* | | | | am 4d4b233e: am 2f6877a0: recovery: init backgroundIcon properly to avoid ↵yetta_wu2013-07-080-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recovery mode crash * commit '4d4b233eae51d5580b58cb00d3aa45ecbb1b255e': recovery: init backgroundIcon properly to avoid recovery mode crash
| * | | | am 2f6877a0: recovery: init backgroundIcon properly to avoid recovery mode crashyetta_wu2013-06-251-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | * commit '2f6877a0220475303907203308c018d789ea1a53': recovery: init backgroundIcon properly to avoid recovery mode crash
| | * | | recovery: init backgroundIcon properly to avoid recovery mode crashyetta_wu2013-06-251-0/+4
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We met factory issue that some devices would crash in recovery mode because the backgroundIcon array did not reset to NULL when initializing. Bug: 9568624 Change-Id: I13c7a7cc1053a7ffdbadd71740c1a2b4a2af6bba Signed-off-by: yetta_wu <yetta_wu@asus.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | | recovery: init backgroundIcon properly to avoid recovery mode crashyetta_wu2013-07-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We met factory issue that some devices would crash in recovery mode because the backgroundIcon array did not reset to NULL when initializing. Bug: 9568624 Change-Id: I13c7a7cc1053a7ffdbadd71740c1a2b4a2af6bba Signed-off-by: yetta_wu <yetta_wu@asus.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | | recovery: copy logs to cache more aggressivelyDoug Zongker2013-07-021-9/+17
| |_|/ |/| | | | | | | | | | | | | | | | | | | | Copy logs to /cache immediately upon a package installation failure; don't wait for recovery to finish. (If the user reboots without exiting recovery the "right" way, the logs never get copied at all.) Change-Id: Iee342944e7ded63da5a4af33d11ebc876f6c0835
* | | am 8cd12112: am d51bfc9b: Merge "Fix the potential segmentation fault"Doug Zongker2013-06-041-1/+7
|\| | | | | | | | | | | | | | * commit '8cd12112e444e01163526fe6ab237f6164b0018b': Fix the potential segmentation fault
| * | am d51bfc9b: Merge "Fix the potential segmentation fault"Doug Zongker2013-06-041-1/+7
| |\ \ | | |/ | |/| | | | | | | * commit 'd51bfc9b1fe89321af3c629e7b23a747050332e1': Fix the potential segmentation fault
| | * Merge "Fix the potential segmentation fault"Doug Zongker2013-06-041-1/+7
| | |\
| | | * Fix the potential segmentation faultJin Feng2013-06-041-1/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Extral newline can trigger recovery segmentation fault Test case: host$ adb shell 'echo -en "--update_package=ota_update.zip\n--show_text\n\n" > /cache/recovery/command' host$ adb reboot recovery Change-Id: If1781c1f5ad94a273f1cb122b67cedd9fb562433 Signed-off-by: Jin Feng <jin88.feng@gmail.com>
* | | am da1ebaef: recovery: save logs from the last few invocations of recoveryDoug Zongker2013-05-210-0/+0
|\| | | | | | | | | | | | | | * commit 'da1ebaef0aa8e38db6edf8bfc3d96290461a424f': recovery: save logs from the last few invocations of recovery
| * | recovery: save logs from the last few invocations of recoveryDoug Zongker2013-05-211-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | Extends the last_log mechanism to save logs from the last six invocations of recovery, so that we're more likely to have useful logs even if the device has repeatedly booted into recovery. Change-Id: I08ae7a09553ada45f9e0733fe1e55e5a22efd9f9
* | | am 7c3ae45e: recovery: turn on text display for install errors in debug buildsDoug Zongker2013-05-210-0/+0
|\| | | | | | | | | | | | | | * commit '7c3ae45ef9306d2ff4b491e0488c8849bf15ce90': recovery: turn on text display for install errors in debug builds
| * | recovery: turn on text display for install errors in debug buildsDoug Zongker2013-05-213-8/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully this will reduce the number of OTA "bugs" reported that are really just someone having changed their system partition, invalidating future incremental OTAs. Also fixes a longstanding TODO about putting LOGE() output in the on-screen display. Change-Id: I44e5be65b2dee7ebce2cce28ccd920dc3d6e522e
* | | recovery: save logs from the last few invocations of recoveryDoug Zongker2013-05-161-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | Extends the last_log mechanism to save logs from the last six invocations of recovery, so that we're more likely to have useful logs even if the device has repeatedly booted into recovery. Change-Id: I08ae7a09553ada45f9e0733fe1e55e5a22efd9f9
* | | recovery: turn on text display for install errors in debug buildsDoug Zongker2013-05-163-8/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully this will reduce the number of OTA "bugs" reported that are really just someone having changed their system partition, invalidating future incremental OTAs. Also fixes a longstanding TODO about putting LOGE() output in the on-screen display. Change-Id: I44e5be65b2dee7ebce2cce28ccd920dc3d6e522e
* | | Merge "verifier: update to support certificates using SHA-256"Doug Zongker2013-04-1113-109/+254
|\ \ \
| * | | verifier: update to support certificates using SHA-256Doug Zongker2013-04-1013-109/+254
| | | | | | | | | | | | | | | | Change-Id: Ifd5a29d459acf101311fa1c220f728c3d0ac2e4e
* | | | am 4e21482d: Add liblogYing Wang2013-04-093-2/+3
|\ \ \ \ | |/ / / |/| / / | |/ / | | | * commit '4e21482d979f6f81b34f92e664adf137555d4504': Add liblog
| * | Add liblogYing Wang2013-04-093-2/+3
| | | | | | | | | | | | | | | Bug: 8580410 Change-Id: Ie60dade81c06589cb0daee431611ded34adef8e6