aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | recovery: Provide sideload cancellationTom Marshall2015-11-259-93/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I13f0c9ae5444652a2141442ef24258679a78d320
* | | | | | | | | Blank screen during shutdown and rebootPat Erley2015-11-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some hardware doesn't like having the panel on and still active during pwoer cycles, so just turn it off. Change-Id: Ied1f0802f5a2d45980ee33abf2456a291ba64beb
* | | | | | | | | recovery: turn on the backlight in recovery modeTom Marshall2015-11-251-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The backlight is not turned on by default in some devices. This leads to nothing displayed in recovery mode. Change-Id: Iae5b0440f79fdcb79e103744a242e12c96b02c00
* | | | | | | | | recovery: Awakening of MiniVoldTom Marshall2015-11-2516-112/+961
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A minimal vold client for recovery. Change-Id: Id25d955dc1861a910e5f5fc27d9a19e245d66833
* | | | | | | | | sr: Include vendor init triggerMatt Mower2015-11-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vendor_load_properties() lives in load_persist_props() now. Change-Id: I8f18af1ac5d7bdf0bc066ba28d37c99ad696e0dd
* | | | | | | | | Add back and home key handling.Steve Kondik2015-11-203-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5abac0f1b59d480b859f77ce16126f13fccd440b
* | | | | | | | | sr: Clean up f2fs tools (part of fstools now)Steve Kondik2015-11-202-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Also update for new pigz version Change-Id: I93b2c9b659f911cb6fd0646e15dbb48781c254b8
* | | | | | | | | sr: Add fstools, update build configurationSteve Kondik2015-11-204-9/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make sure we create any dirs before trying to put symlinks in them * Create a new "fstools" target which aggregates all of our filesystem tools into a single multi-call binary. This reduces the overall recovery image size by a megabyte, and also removes GPL code from the main recovery binary. Change-Id: I5fc2a61d564915085071ccbbcb3136f45c640a60
* | | | | | | | | OMGRainbowsCEnnis912015-11-204-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer will we get bad reviews on CWM recovery for its lack of rainbows! Originally design by gweedo767, this patch brings back the wrap count mechanism from v2.0.2.4 to toggle Rainbow Mode for the user. In the original design, every character has a different color, but that method requires modifying graphics.c which will cause breakage in devices with custom graphics.c. This Rainbow Mode has a different color for each line, instead. The wrap_count has been set to 5 instead of the previous 3 so the toggle won't occur as often, if on accident. (port to CM12.1 by cyanogen) Change-Id: Ie9f6f1b6ed94ee69d4d8d9fe27f9a5417cc3f212 improve Rainbow Mode * Require 5 consecutive menu "wraps" in the same direction to help prevent accidental toggling * Align colors into stripes (i.e. columns) a) less prone to induce dizziness in some people when they change b) better resembles a rainbow * Move the stripes to the right when the selection moves up and move the stripes to the left when the selection moves down Change-Id: I3feae173b22f5703c554ca33e634881749ff54cf
* | | | | | | | | sr: Enable zip/unzip commandsSteve Kondik2015-11-202-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I938dc855742d4e1a5ba0b09fd74851b0d155f0a1
* | | | | | | | | sr: Puke out an /etc/fstab so stuff like Busybox is happySteve Kondik2015-11-201-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * And disregard special mount flags on purpose because of certain dubious packages which "exec busybox mount". Change-Id: I163702c9bd7fca3d40676fd6d8476e8deb13acc0
* | | | | | | | | sr: Get a proper shell environment in recoverySteve Kondik2015-11-205-8/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Secure ADB support * Toybox applets * mksh * Various other tools Change-Id: I80b0e2aa5eb7142eaa9f157709f4e029077d8dfa
* | | | | | | | | recovery: Add timestamps in update logs.Tao Bao2015-11-072-16/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fork a logger process and send over the log lines through a pipe. Prepend a timestamp to each line for debugging purpose. Timestamps are relative to the start of the logger. Example lines with the change in this CL: [ 445.948393] Verifying update package... [ 446.279139] I:comment is 1738 bytes; signature 1720 bytes from end [ 449.463652] I:whole-file signature verified against RSA key 0 [ 449.463704] I:verify_file returned 0 Change-Id: I139d02ed8f2e944c1618c91d5cc43282efd50b99
* | | | | | | | | imgdiff: Fix compilation warningsSteve Kondik2015-11-071-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I17da2a21967f4484d7244f10f3bc5e74c6e559bf
* | | | | | | | | uncrypt: remove O_SYNC to avoid time-out failuresJaegeuk Kim2015-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes costly O_SYNC flag for encrypted block device. After writing whole decrypted blocks, fsync should guarantee their consistency from further power failures. This patch reduces the elapsed time significantly consumed by upgrading packages on an encrypted partition, so that it could avoid another time-out failures too. Change-Id: I1fb9022c83ecc00bad09d107fc87a6a09babb0ec Signed-off-by: Jaegeuk Kim <jaegeuk@motorola.com>
* | | | | | | | | minadbd: use strdup() to create argument for sideload thread.Yabin Cui2015-11-071-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So sideload thread will not use argument which is to be freed in the main thread. Bug: 23968770 Change-Id: I9d6dadc6c33cfbe4b5759382a80fe14cd0d54355
* | | | | | | | | Suppress some compiler warnings due to signedness.Tao Bao2015-11-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I63f28b3b4ba4185c23b972fc8f93517295b1672a
* | | | | | | | | recovery: Remove redirect_stdio() when calling ShowFile().Tao Bao2015-11-072-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling ScreenRecoveryUI::ShowFile(), the only thing that gets inadequately logged is the progress bar. Replace the call to ScreenRecoveryUI::Print() with ScreenRecoveryUI::PrintOnScreenOnly() for the progress bar, so we can avoid calling redirect_stdio(). Change-Id: I4d7c5d5b39bebe0d5880a99d7a72cee4f0b8f325
* | | | | | | | | imgdiff: fix file descriptor leakJeremy Compostella2015-11-071-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mkstemp() allocates a file description that is never released. If MakePatch() is called too many time, imgdiff reaches the Operating System EMFILE (too many open files) limit. Change-Id: Icbe1399f6f6d32cfa1830f879cacf7d75bbd9fc3 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
* | | | | | | | | recovery: Fix the bug that truncates menu entries.Tao Bao2015-11-071-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are 20 entries (like 10 last_log* and 10 last_kmg* in "view recovery logs"), there's no "Back" entry. Because the number of entries (21) exceeds text_rows (20) in WearRecoveryUI::StartMenu(). Since we have scrollable menu, having more entries than text_rows won't be an issue. Bug: 23752519 Change-Id: I12573d7a34852a1a3d130c9e88522cee737eb08f
* | | | | | | | | recovery: Factor out wear_ui.{cpp,h} into bootable/recovery.Tao Bao2015-11-073-0/+788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every watch has a (mostly identical) copy of the wear_ui. Factor them out into a single copy for easier maintenance. Device-specific settings should be defined in recovery_ui.cpp that inherits WearRecoveryUI class. Bug: 22451422 Change-Id: Id07efca37d1b1d330e6327506c7b73ccf6ae9241
* | | | | | | | | Fix potential crashJeremy Compostella2015-11-071-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Malloc might fail when replacing package path. In this case, print a clear error message in the logs and let the OTA fails. Change-Id: I7209d95edc025e3ee1b4478f5e04f6e852d97205 Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
* | | | | | | | | recovery: Allow "Mount /system" for system_root_image.Tao Bao2015-11-073-19/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When system images contain the root directory, there is no entry of "/system" in the fstab. Change it to look for "/" instead if ro.build.system_root_image is true. We actually mount the partition to /system_root instead, and create a symlink to /system_root/system for /system. This allows "adb shell" to work properly. Bug: 22855115 Change-Id: Ibac493a5a9320c98ee3b60bd2cc635b925f5454a
* | | | | | | | | updater: Hoist fsync() to outer loop.Tao Bao2015-11-071-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the fsync() inside write_all() may be called multiple times when performing a command. Move that to the outer loop and call it only after completing the command. Also remove the O_SYNC flag when writing a stash. Change-Id: I71e51d76051a2f7f504eef1aa585d2cb7a000d80
* | | | | | | | | recovery: Switch fuse_* to C++.Tao Bao2015-11-075-29/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id50c3e6febd0ab61f10a654b9b265cf21a2d1701 (cherry picked from commit 71dc365f25676cfb3f62dbb7163697a8c3c5243d)
* | | | | | | | | Clean up LOG functions.Tao Bao2015-11-073-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For fatal errors, use LOGE to show messages. Bug: 22236461 Change-Id: I2b7d761576894ac37fcbadcba690ae14affe8f07 (cherry picked from commit d7d0f7503456c3d275a49f90be35e03f02c51bbd)
* | | | | | | | | recovery: Use xxhdpi resources for 560dpi devicesTao Bao2015-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a symbolic link to res-xxhdpi for res-560dpi. 560dpi devices (like shamu) are currently using a fallback option of xhdpi (320dpi) resources. Now they can get closer ones (480dpi), such as larger fonts on UI screen. Change-Id: I427c3091d7e9892d9a7a1886be6adca14c122b06
* | | | | | | | | Just use fstat in sysMapFile.Elliott Hughes2015-11-073-71/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also turn on -Werror and remove a dead function. Change-Id: I436f0a91c40e36db985190b3b98b0a4527cf0eeb
* | | | | | | | | Unmount sdcard if no package file is selected.caozhiyuan2015-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I12b4f880802135a98dbc11a19e74172a3a5ef921
* | | | | | | | | recovery: Switch to clangTao Bao2015-11-0713-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
* | | | | | | | | Fix build: fprintf without modifierTao Bao2015-11-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I66ae21a25a25fa3c70837bc54a7d406182d4cf37
* | | | | | | | | Log update outputs in orderTao Bao2015-11-076-13/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although stdout and stderr are both redirected to log file with no buffering, we are seeing some outputs are mixed in random order. This is because ui_print commands from the updater are passed to the recovery binary via a pipe, which may interleave with other outputs that go to stderr directly. In recovery, adding ui::PrintOnScreenOnly() function to handle ui_print command, which skips printing to stdout. Meanwhile, updater prints the contents to stderr in addition to piping them to recovery. Change-Id: Idda93ea940d2e23a0276bb8ead4aa70a3cb97700
* | | | | | | | | recovery: change the way of rebooting when using power key comboGaelle Nassiet2015-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The power key combo allow to reboot from recovery mode by pressing power button 7 times in a row. It calls directly the function android_reboot() and lead to permission denial errors because of SE Linux rules enforcement. The right way to reboot from recovery is to set the property "sys.powerctl" and let init handle it. Change-Id: Ic7b81e446c3ee13dfbad10cda13a6a1f93123b76 Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
* | | | | | | | | Stop using libstdc++.Dan Albert2015-11-073-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are already getting libc++, so it isn't necessary. If any of the other static libraries (such as adb) use new or delete from libc++, there will be symbol collisions. Change-Id: I55e43ec60006d3c2403122fa1174bde06f18e09f
* | | | | | | | | Add error and range checks to parse_rangeSami Tolvanen2015-11-071-10/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only trusted input is passed to parse_range, but check for invalid input to catch possible problems in transfer lists. Bug: 21033983 Bug: 21034030 Bug: 21034172 Bug: 21034406 Change-Id: Ia17537a2d23d5f701522fbc42ed38924e1ee3366
* | | | | | | | | init sets the default PATH itself, better.Elliott Hughes2015-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes 'su' and 'strace' in the recovery image. Change-Id: I83c2664d32a15da92bb6092fbdfc772184013c88
* | | | | | | | | sr: Use pathmap for recoveryTom Marshall2015-11-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6350618e1e04819d52f1049f9f2fb61c833a1b45
* | | | | | | | | mtdutils: Fix mounting partitions by-nameMichael Bestas2015-11-071-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devices that have yaffs2 partitions must adjust their fstab. Example: system /system yaffs2 ro wait becomes /dev/block/mtd/by-name/system /system yaffs2 ro wait Change-Id: I8314bb94bf5bcd9576995cd2ecdc5133c5f5ea11
* | | | | | | | | bootloader: Silence /misc partition errorMatt Mower2015-11-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOGE has been changed to LOGI for "Cannot load volume /misc!" since many devices do not define a /misc partition in fstab. Change-Id: I53c440f820fd4614b0af79e9283baa8c48453373
* | | | | | | | | Remove ext4 guardsMichael Bestas2015-11-073-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix compilation on yaffs targets Change-Id: Icd571dce3ee8c232b13ae199df6e0a4feeb7fb68
* | | | | | | | | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-052-4/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 6.0.0 release 26
| * \ \ \ \ \ \ \ \ merge in mnc-dr-release history after reset to mnc-dr-devThe Android Automerger2015-08-050-0/+0
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | |
| | * | | | | | | | uncrypt: Support file level encryption.Tao Bao2015-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 22534003 Change-Id: Iaf42a6e5b40cfef904de66e212ae8b77b2953ef7
| | * | | | | | | | merge in mnc-dr-release history after reset to mnc-dr-devThe Android Automerger2015-07-140-0/+0
| | |\ \ \ \ \ \ \ \
| | | * | | | | | | | Revert "Change init sequence to support file level encryption"Paul Lawrence2015-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98c1a3de23ae8b589c36e74939193c44d25cac65. Change-Id: I524060418de18f97c3865ebc4435f501015e92ee
| | | * | | | | | | | merge in mnc-dr-release history after reset to mnc-dr-devThe Android Automerger2015-07-060-0/+0
| | | |\ \ \ \ \ \ \ \
| * | | \ \ \ \ \ \ \ \ am be19dce8: udpater: Call fsync() after rename().Tao Bao2015-08-041-0/+20
| |\ \ \ \ \ \ \ \ \ \ \ | | | |_|_|/ / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'be19dce86ce7d4a83f1cfcd11db393f8be8f4397': udpater: Call fsync() after rename().
| * | | | | | | | | | | uncrypt: Support file level encryption.Tao Bao2015-07-161-1/+1
| | |/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 22534003 Change-Id: Iaf42a6e5b40cfef904de66e212ae8b77b2953ef7
| * | | | | | | | | | Change init sequence to support file level encryptionPaul Lawrence2015-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | File level encryption must get the key between mounting userdata and calling post_fs_data when the directories are created. This requires access to keymaster, which in turn is found from a system property. Split property loaded into system and data, and load in right order. Bug: 22233063 Change-Id: I409c12e3f4a8cef474eb48818e96760fe292cc49
* | | | | | | | | | | Allow f2fs to reserve bytes for footer when formattingKeith Mok2015-10-191-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket: SAMBAR-729 Change-Id: I66630d2e24434e5b5587f0b0cb43e3e7543c960c