aboutsummaryrefslogtreecommitdiffstats
path: root/recovery.cpp
Commit message (Collapse)AuthorAgeFilesLines
* recovery: Add wipe system partition optionMichael Bestas2016-04-051-0/+18
| | | | Change-Id: Id606cef249a7464037443de6265055803c290d82
* recovery: Implement sysbarTom Marshall2016-03-071-2/+21
| | | | | | | | | | | | Add a system bar (navigation bar) similar to the main Android system with back and home buttons. This makes it easier for users to figure out how to go back on devices that lack hardware buttons, and also provides a quick way to get back to the main menu. Note only buttons that do not have a hardware equivalent are shown, in order to prevent redundancy and confusion. Change-Id: I7538749978837571a8c250c3c8e54ac127b39d84
* recovery: handle back button when navigating recovery logsScott Mertz2016-02-241-1/+2
| | | | | | | | Fixes the crash when a user presses a hardware back button instead of the on screen menu item. OPO-521 Change-Id: I579d2720cdf7256a269358d037582121425d7c25
* recovery: Remove empty header lineTom Marshall2016-02-151-1/+0
| | | | Change-Id: I15d5dc734adba58ca4d44a5818c23115481e0470
* recovery: Minimize headers for "Apply update" menusTom Marshall2016-02-081-2/+2
| | | | | | | The touch UI takes 3 text lines per menu item, so minimize header text to compensate. Change-Id: I468f404e1a3de6ef9dee63301bb050b64f8de211
* recovery: Show menu headersTom Marshall2016-02-081-3/+8
| | | | | | | | Most headers in recovery aren't very useful and so have historically not been shown in the touch UI. But certain headers, such as those shown by yes_no(), should be shown. Change-Id: I8536c528d3b4b4fd6d506ecef25378149b4e9746
* recovery: Offer to format if data wipe failsTom Marshall2016-02-041-1/+12
| | | | Change-Id: I76587c4fa234c5aab52882492da295e70029f522
* recovery: Menu rewrites and cleanupsTom Marshall2016-02-041-8/+10
| | | | | | | | | | | | | | * Introduce a menu stack for navigating sub-menus. The menu data structure format is a bit messy, but necessary in order to provide a string list for the ui. * Create "advanced" sub-menu for rarely used and dangerous commands. * Create "factory reset" sub-menu for various reset and wipe commands. * Separate "wipe data" and "factory reset" items. Change-Id: Ib9bc6967b98d022880cfe7fa8e324cd64b07d248
* recovery: Fix media wipePat Erley2016-02-021-0/+1
| | | | | | | | | During the Android 6 rebase, the 'm' options was missed in the getopt handler, breaking the ability to do a full wipe triggered from inside of Android. CYNGNOS-1817 Change-Id: Ic88006abd18cc83dd4a9d7917f34d6c6c8115538
* recovery: Enable the menu for User buildsPat Erley2016-01-051-6/+2
| | | | | | | | Upstream recovery doesn't provide a menu for non ENG/UserDebug builds. OPO-321 Change-Id: I01b285a40287be4147d15a70b91ad17a3c93da68
* recovery: Remove "Supported API" messageMichael Bestas2015-12-041-2/+0
| | | | Change-Id: Iac2153403ee66c8544c7d809f7b037aedeaf9d21
* sr: Fix build when oemlock plugin is enabledSteve Kondik2015-11-261-2/+3
| | | | Change-Id: Ic600231c9883a6e951ad951455b5af426fd4207a
* recovery: Allow devices to reboot to download modeAndreas Blaesius2015-11-251-0/+5
| | | | Change-Id: Ib6ccf98ed68efacbb3b8c8238945da60b23a20d7
* sr: Fix all the graphics issuesSteve Kondik2015-11-251-4/+4
| | | | | | | | | * Get rid of all the jank and flicker. * Fix preserved backbuffer * Simplify the code, all drawing happens on a single thread now. Change-Id: I36e1deee0663defd8aea1eba985e3ecbd408eac0
* recovery: Headless modeTom Marshall2015-11-251-1/+12
| | | | Change-Id: I6b54bde65264aee99cb51a19436e82054b31fe74
* sr: Fix the progress barSteve Kondik2015-11-251-10/+3
| | | | | | | | | | | | | | | | | | | | | | | | | * The progress thread is running all the time, which causes the device to heat up while in recovery. Start this thread only when the progress mode is set to something other than EMPTY, and add a terminating condition so that it exits when finished. * Incorporate Tom's patch to keep it updated when visible, since both are needed to get working progress indications without killing batteries. * Clear buffer in draw_progress_locked() and always call this in update_progress_locked(). This is necessary to ensure that all backing frames in the graphics implementation get updated because we aren't guaranteed to have any particular number of backing frames. * Remove dialogs on wipe operations since we are using the progress animation now. * Set progress indicator after showing "Formatting" text to avoid momentary flicker. Change-Id: Ib70d2cb25f01d9920ffb698b5b5b47af827ef483
* sr: Touch UITom Marshall2015-11-251-3/+36
| | | | Change-Id: I4ee87f3474aec0496c47bb561ddecc74e151cbbf
* sr: Return to main menu after selectionTom Marshall2015-11-251-28/+26
| | | | Change-Id: Ib6fd1904b6516a651ffaad20f66b2eaf42c31619
* recovery: Handle oemunlock commandTom Marshall2015-11-251-4/+56
| | | | | | | * Conditionally compile support based on TARGET_HAVE_OEMLOCK. * Use liboemunlock for device specific support. Change-Id: I1cf1fef8e30075b0586bb86625b7df49723974cb
* recovery: datamedia supportTom Marshall2015-11-251-4/+33
| | | | Change-Id: I4cef82973a15111bee92cd7c81f0e1db8d211991
* recovery: Provide sideload cancellationTom Marshall2015-11-251-12/+26
| | | | 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-251-75/+145
| | | | | | A minimal vold client for recovery. Change-Id: Id25d955dc1861a910e5f5fc27d9a19e245d66833
* Add back and home key handling.Steve Kondik2015-11-201-1/+10
| | | | Change-Id: I5abac0f1b59d480b859f77ce16126f13fccd440b
* sr: Get a proper shell environment in recoverySteve Kondik2015-11-201-0/+71
| | | | | | | | | * Secure ADB support * Toybox applets * mksh * Various other tools Change-Id: I80b0e2aa5eb7142eaa9f157709f4e029077d8dfa
* recovery: Add timestamps in update logs.Tao Bao2015-11-071-16/+98
| | | | | | | | | | | | | | | 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
* recovery: Remove redirect_stdio() when calling ShowFile().Tao Bao2015-11-071-3/+0
| | | | | | | | | 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
* 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-071-2/+17
| | | | | | | | | | | 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
* Unmount sdcard if no package file is selected.caozhiyuan2015-11-071-0/+1
| | | | Change-Id: I12b4f880802135a98dbc11a19e74172a3a5ef921
* recovery: Switch to clangTao Bao2015-11-071-6/+15
| | | | | | And a few trival fixes to suppress warnings. Change-Id: I38734b5f4434643e85feab25f4807b46a45d8d65
* recovery: Allow device-specific reboot reasonDavid Ng2015-10-061-1/+3
| | | | | | Allow overriding of reboot reason. Change-Id: I73d9debaed8224bf6877008b15aa95c6c404c624
* Split WipeData into PreWipeData and PostWipeData.Elliott Hughes2015-06-101-17/+12
| | | | | | Bug: http://b/21760064 Change-Id: Idde268fe4d7e27586ca4469de16783f1ffdc5069 (cherry picked from commit 945548ef7b3eee5dbfb46f6291465d4b0b6d02e1)
* Add an alternate screen for viewing recovery logs.Elliott Hughes2015-05-061-4/+5
| | | | | | | | | | This makes it easier to go back and forth without losing current output. Also make the display more like regular more(1). Bug: http://b/20834540 Change-Id: Icc5703e9c8a378cc7072d8ebb79e34451267ee1b (cherry picked from commit c049163234003ef463bca018920622bc8269c69b)
* Keep multiple kernel logsTao Bao2015-05-051-82/+73
| | | | | | | | | Currently we are keeping one copy of the kernel log (LAST_KMSG_FILE). This CL changes to keep up to KEEP_LOG_COUNT copies for kernel logs. Bug: http://b/18092237 Change-Id: Ied862b5b70cbbae7775f59c78c32ec62aeeca655 (cherry picked from commit bef39710ff50cedf6a4de8eb6c7802f66930aab4)
* Turn on text display for debuggable buildsTao Bao2015-05-041-0/+7
| | | | | | | | | | For userdebug and eng builds, turn on the text display automatically if no command is specified. (cherry-pick of 785d22c88cda46972331c04ebc9df97371a696da.) Bug: http://b/17489952 Change-Id: I38377c45f2a8e45ca788e5506695aa88c769cbcf
* Move the menu header out of the menu.Elliott Hughes2015-04-131-10/+4
| | | | | | | | | | | This makes it easier for us to deal with arbitrary information at the top, and means that headers added by specific commands don't overwrite the default ones. Add the fingerprint back, but broken up so it fits even on sprout's display. Change-Id: Id71da79ab1aa455a611d72756a3100a97ceb4c1c
* Add missing \n after "Mounting /system." message.Elliott Hughes2015-04-131-1/+1
| | | | Change-Id: I280a478526f033f5c0041d7e8a818fce6177d732
* Revert "Append kernel logs to last_log file"Tao Bao2015-04-111-46/+42
| | | | | | This reverts commit 2ec803f4350f7b72f5dd65c5f27656c6807e2966. Change-Id: I419025a772ef99db4c0a78bfa7ef66767f3fa062
* Append kernel logs to last_log fileTao Bao2015-04-101-42/+46
| | | | | | | | Currently we are keeping one copy of the kernel log (LAST_KMSG_FILE). This CL changes to append it to the recovery log. Bug: 18092237 Change-Id: I06ad5629016846927153064f1663753a90296f79
* Switch minadb over to C++.Elliott Hughes2015-04-101-2/+0
| | | | Change-Id: I5afaf70caa590525627c676c88b445d3162de33e
* Fix ScreenRecoveryUI to handle devices without power/up/down.Elliott Hughes2015-04-101-4/+2
| | | | | | | | Currently fugu has a custom subclass to handle this. The default code supports devices with trackballs but not all shipping Nexus devices? That's just silly. Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
* Move "Mount /system" to the main menu.Elliott Hughes2015-04-101-5/+7
| | | | | | | Everyone's adding secret key combinations for this anyway, and it's very useful when debugging. Change-Id: Iad549452b872a7af963dd649f283ebcd3ea24234
* Move the recovery image version out of the menu header.Elliott Hughes2015-04-091-21/+7
| | | | | | | | Rather than add code to wrap menu items, let's just put output the recovery version to the log. It'll be visible at the bottom of the screen and automatically wrap. Change-Id: I158fe2d85bc56b195e00619fba455321743923bd
* Move file paging into ScreenRecoveryUI.Elliott Hughes2015-04-081-57/+6
| | | | | | This fixes the N9 performance problem. Change-Id: I00c10d4162ff266a6243285e5a5e768217f6f799
* Enable printf format argument checking.Elliott Hughes2015-04-081-1/+1
| | | | | | | The original attempt missed the fact that Print is a member function, so the first argument is the implicit 'this'. Change-Id: I963b668c5432804c767f0a2e3ef7dea5978a1218
* Rotate logs only when there are actual operationsTao Bao2015-04-071-9/+28
| | | | | | | | | | Currently it rotates the log files every time it boots into the recovery mode. We lose useful logs after ten times. This CL changes the rotation condition so that it will rotate only if it performs some actual operations that modify the flash (installs, wipes, sideloads and etc). Bug: 19695622 Change-Id: Ie708ad955ef31aa500b6590c65faa72391705940
* Refactor the codes to call wipe_data/wipe_cache functionsTao Bao2015-03-311-22/+36
| | | | | | | It also changes the return type of wipe_data/wipe_cache to bool, so the caller can get the status accordingly. Change-Id: I3022dcdadd6504dac757a52c2932d1176ffd1918
* Revert "Erase PST partition if its marked to be erased."Andres Morales2015-03-311-2/+0
| | | | | | | | | | | This now gets done at the framework level. Doing it here breaks the signature on the partition. This reverts commit ee19387905650cab5da7dd97ada5502cd17ac93d. Bug: 19967123 Change-Id: I2a977cb0f0ba94defa1bf9091219398ddc1d3528 (cherry picked from commit 037444642bc32d8fed3bb996823b6a62faa57195)