summaryrefslogtreecommitdiffstats
path: root/recovery.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add TWFunc::Exec_Cmd() with no 'result' agrumentVojtech Bocek2013-09-121-3/+2
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
* Update to latest AOSP masterDees_Troy2013-09-041-16/+135
|\ | | | | | | Merge in latest commits from AOSP master and fix merge conflicts
| * am d51bfc9b: Merge "Fix the potential segmentation fault"Doug Zongker2013-06-041-1/+7
| |\ | | | | | | | | | | | | * commit 'd51bfc9b1fe89321af3c629e7b23a747050332e1': Fix the potential segmentation fault
| | * 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>
| * | 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
| * | recovery: turn on text display for install errors in debug buildsDoug Zongker2013-05-211-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | more font improvements and cleanupDoug Zongker2013-03-071-1/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the notion of a font's "ascent"; the reference point for drawing is the top-left corner of the character box rather than the baseline. Add some more space between the menu entries and make the highlight bar around the text. Replace the default font.png with two images; the build system will include one or the other based on the resolutions of the device. Restore the original compiled-in bitmap font, to fall back on when font.png can't be found (eg, in the charger binary). Add support for bold text (when a font.png image is used). Change-Id: I6d211a486a3636f20208502b1cd2aeae8b9f5b02
| * resolved conflicts for merge of 78afed1c to jb-mr1-dev-plus-aospKenny Root2012-10-171-2/+0
| |\ | | | | | | | | | Change-Id: I861e3a6aa07c448909b2ae54618bba178bd6e457
| | * Remove HAVE_SELINUX guardsKenny Root2012-10-161-2/+0
| | | | | | | | | | | | Change-Id: Ia96201f20f7838d7d9e8926208977d3f8318ced4
| * | recovery: fix failure to unmount "/cache"Devin Kim2012-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | At load_locale_from_cache() function, LOCALE_FILE must get closed after it is opened and used. Otherwise it causes a failure to unmount "/cache" after load_locale_from_cache() function is called. Change-Id: I9cec0f29a8ec4452c8a6a52e2f3c8ce9930d5372 Signed-off-by: Iliyan Malchev <malchev@google.com>
| * | display error state on OTA failureDoug Zongker2012-09-241-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | We need prompt_with_wait() to show either the ERROR or NO_COMMAND state as appropriate. Bug: 7221068 Change-Id: I191526cf12630d08b7a8250a2a81e724a4a5d972
| * | localization for recovery messagesDoug Zongker2012-09-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add images of text for all locales we support. Make the progress bar fill the correct way for RTL languages. (Flip the direction the spinner turns, too, just for good measure.) Bug: 7064142 Change-Id: I5dddb26e02ee5275c57c4dc4a03c6d68432ac7ba
| * | recovery locale handling fixesDoug Zongker2012-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - change locale filename to "last_locale" so the main system doesn't delete it - clean up some chatty logging - update images with real German (other languages TBD) Change-Id: I2ebb4ed4e054bd1808a3042d9efbb2c18f3a044d
| * | change recovery images to android with spinnerDoug Zongker2012-08-231-9/+12
| | | | | | | | | | | | | | | | | | Also make writing the locale a bit more robust. Change-Id: I803dd0aa0b9d6661fad74ea13fb085682402323c
| * | add simple text to recovery UIDoug Zongker2012-08-231-10/+53
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | - recovery takes a --locale argument, which will be passed by the main system - the locale is saved in cache, in case the --locale argument is missing (eg, when recovery is started from fastboot) - we include images that have prerendered text for many locales - we split the background states into four (installing update, erasing, no command, error) so that appropriate text can be shown. Change-Id: I731b8108e83d5ccc09a4aacfc1dbf7e86b397aaf
* | fixes for fakeflash zipsjt11342013-02-271-1/+1
| | | | | | | | | | | | | | | | For some reason fakeflash doesn't like to have superuser/su in /res, move it to its own subdir in /supersu. This allows a fakeflash zip built with 'make recoveryzip' to work correctly. Change-Id: I32e2e0f6dba55281d5c917e931c3ef0034964bcb
* | use libblkid to get filesystem typebigbiff bigbiff2013-02-251-0/+2
| | | | | | | | we can now use libblkid to detect exfat
* | Move removal of stock recovery to shutdown sequenceDees_Troy2013-02-211-20/+22
| |
* | Check for root and root perms and offer to install/fixDees_Troy2013-02-211-0/+31
| | | | | | | | | | | | Also fix sort order for file selector by date and file sizes Change-Id: Idff9fe4232c19d4ed1082e78fabe6f921aa0a114
* | Use GUI for ORS instead of console onlyDees_Troy2013-01-251-29/+10
| |
* | Convert AOSP commands to ORS for encrypted devicesDees_Troy2013-01-241-15/+39
| | | | | | | | Change-Id: I6a76a51cd9efd7db67d7abeeb26f9bdd0eebf5a9
* | Fix problem with AOSP wipe_cache commandDees_Troy2013-01-171-0/+1
| |
* | Add libtar to TWRP instead of using busybox tarbigbiff bigbiff2013-01-091-5/+5
| | | | | | | | | | | | | | Add proper mkdosfs tool Add fuse to TWRP Add experimental exfat-fuse to TWRP Convert all system() functions to use new Exec_Cmd function
* | Update injecttwrp for Epic 4G TouchDees_Troy2012-10-161-1/+8
| |
* | Unmount system after boot, backup, and restoreDees_Troy2012-10-121-0/+1
| |
* | Fix derp with ORS during startupDees_Troy2012-10-081-1/+0
| |
* | Rename stock recovery fileDees_Troy2012-10-031-0/+4
| |
* | Create busybox symlinks during compileDees_Troy2012-10-021-3/+1
| |
* | Update ORS and recovery commandsDees_Troy2012-10-011-5/+26
| |
* | Fix output of version numberDees_Troy2012-10-011-1/+0
| |
* | Revert busybox for CM7 compatibility, add exclamation point to format dataDees_Troy2012-09-281-0/+2
| |
* | Save version number to storageDees_Troy2012-09-271-5/+1
| |
* | Create symlinks at compile time for busyboxDees_Troy2012-09-271-2/+5
| |
* | Update sdcard partitioning to C++Dees_Troy2012-09-271-1/+0
| |
* | Port reboot functions to C++Dees_Troy2012-09-271-2/+3
| |
* | Add backup size checkingDees_Troy2012-09-261-1/+1
| | | | | | | | | | Converted bootloader.cpp to TWRP and removed AOSP fstab parsing from startup
* | Add and improve OpenRecoveryScript supportDees_Troy2012-09-201-1/+13
| | | | | | | | | | Improve zip finding in ORS engine Add support for restoring with just a backup name
* | Improve adb sideload - use storage vs tmpDees_Troy2012-09-191-2/+2
| |
* | Improve adb sideload -- add cancelDees_Troy2012-09-191-3/+4
| | | | | | | | | | Also copy zip from /tmp to storage and remove from /tmp to prevent running out of RAM.
* | Cleanup extra-functionsDees_Troy2012-09-181-6/+4
| |
* | Add wipe functions, compiles in CM7, text shows in UI, zips installDees_Troy2012-09-141-0/+8
| | | | | | | | | | | | | | | | Zip install works, had to move mincrypt code into TWRP to prevent a crash when checking the zip signature. Added wipe functions Made it compile in CM7 Made text show up in console and logging
* | Make text appear in GUI console, Zip install works.Dees_Troy2012-09-121-3/+2
| | | | | | | | | | | | | | Move TW zip install code to C++ so that it can use the ui->functions. Bring in mincrypt code to fix a crash during signature checking.
* | Improve storage size code, mount, unmountDees_Troy2012-09-101-2/+3
| | | | | | | | Add flag parsing from recovery.fstab
* | Add processing of fstab, mounting, and decryptDees_Troy2012-09-071-6/+4
| |
* | Hax to make it bootDees_Troy2012-09-061-13/+65
|/
* am e5d5ac76: minor recovery changesDoug Zongker2012-04-121-2/+6
|\ | | | | | | | | * commit 'e5d5ac76cc8e5d11867aeff6a1d068215c1c3a7c': minor recovery changes
| * minor recovery changesDoug Zongker2012-04-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | - add the --just_exit option to make recovery exit normally without doing anything - make it possible to build updater extensions in C++ - add the clear_display command so that the updater binary can request recovery switch to the NONE background UI These are all used to support the notion of using OTA as a factory reflash mechanism. Change-Id: Ib00d1cbf540feff38f52a61a2cf198915b48488c
| * support "sideload over ADB" modeDoug Zongker2012-01-181-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than depending on the existence of some place to store a file that is accessible to users on an an unbootable device (eg, a physical sdcard, external USB drive, etc.), add support for sideloading packages sent to the device with adb. This change adds a "minimal adbd" which supports nothing but receiving a package over adb (with the "adb sideload" command) and storing it to a fixed filename in the /tmp ramdisk, from where it can be verified and sideloaded in the usual way. This should be leave available even on locked user-build devices. The user can select "apply package from ADB" from the recovery menu, which starts minimal-adb mode (shutting down any real adbd that may be running). Once minimal-adb has received a package it exits (restarting real adbd if appropriate) and then verification and installation of the received package proceeds. always initialize usb product, vendor, etc. for adb in recovery Set these values even on non-debuggable builds, so that the mini-adb now in recovery can work.
| * move key processing to RecoveryUIDoug Zongker2011-11-011-3/+1
| | | | | | | | | | | | | | | | | | Move the key for handling keys from ScreenRecoveryUI to RecoveryUI, so it can be used by devices without screens. Remove the UIParameters struct and replace it with some new member variables in ScreenRecoveryUI. Change-Id: I4c0e659edcbedc0b9e86ed261ae4dbb3c6097414
| * C++ class for device-specific codeDoug Zongker2011-10-311-36/+34
| | | | | | | | | | | | | | | | | | | | Replace the device-specific functions with a class. Move some of the key handling (for log visibility toggling and rebooting) into the UI class. Fix up the key handling so there is less crosstalk between the immediate keys and the queued keys (an increasing annoyance on button-limited devices). Change-Id: I8bdea6505da7974631bf3d9ac3ee308f8c0f76e1
| * refactor ui functions into a classDoug Zongker2011-10-291-44/+51
| | | | | | | | | | | | | | | | | | | | | | Move all the functions in ui.c to be members of a ScreenRecoveryUI class, which is a subclass of an abstract RecoveryUI class. Recovery then creates a global singleton instance of this class and then invoke the methods to drive the UI. We use this to allow substitution of a different RecoveryUI implementation for devices with radically different form factors (eg, that don't have a screen). Change-Id: I7fd8b2949d0db5a3f47c52978bca183966c86f33
| * turn recovery into a C++ binaryDoug Zongker2011-10-281-0/+826
| | | | Change-Id: I68a67a4c8edec9a74463b3d4766005ce27b51316
* Update merge for SELinux to compileKenny Root2012-04-081-1/+1
| | | | | | | | The contribution of SELinux things to AOSP had a call to the old ui_print that merged cleanly. This changes that call into the newer call so it will actually compile when enabled. Change-Id: I8368e937219b01d0bef06007fa46302415256d07
* resolved conflicts for merge of 0b1fee1b to masterKenny Root2012-03-311-1/+16
| | | | Change-Id: I2e8298ff5988a96754f56f80a5186c9605ad9928
* support "sideload over ADB" modeDoug Zongker2012-01-101-0/+32
| | | | | | | | | | | | | | | | | | | | | Rather than depending on the existence of some place to store a file that is accessible to users on an an unbootable device (eg, a physical sdcard, external USB drive, etc.), add support for sideloading packages sent to the device with adb. This change adds a "minimal adbd" which supports nothing but receiving a package over adb (with the "adb sideload" command) and storing it to a fixed filename in the /tmp ramdisk, from where it can be verified and sideloaded in the usual way. This should be leave available even on locked user-build devices. The user can select "apply package from ADB" from the recovery menu, which starts minimal-adb mode (shutting down any real adbd that may be running). Once minimal-adb has received a package it exits (restarting real adbd if appropriate) and then verification and installation of the received package proceeds. Change-Id: I6fe13161ca064a98d06fa32104e1f432826582f5
* mount cache before sideloading from external storageDoug Zongker2011-12-141-0/+4
| | | | | | | | Some packages expect to find cache mounted, since it always is for "real" OTAs. Bug: 5739915 Change-Id: I7a7cdd88a60c61e4bc7dc3e1f99956f6487c42e1
* move key processing to RecoveryUIDoug Zongker2011-11-041-3/+1
| | | | | | | | | Move the key for handling keys from ScreenRecoveryUI to RecoveryUI, so it can be used by devices without screens. Remove the UIParameters struct and replace it with some new member variables in ScreenRecoveryUI. Change-Id: I70094ecbc4acbf76ce44d5b5ec2036c36bdc3414
* C++ class for device-specific codeDoug Zongker2011-10-311-36/+34
| | | | | | | | | | Replace the device-specific functions with a class. Move some of the key handling (for log visibility toggling and rebooting) into the UI class. Fix up the key handling so there is less crosstalk between the immediate keys and the queued keys (an increasing annoyance on button-limited devices). Change-Id: I698f6fd21c67a1e55429312a0484b6c393cad46f
* refactor ui functions into a classDoug Zongker2011-10-311-44/+51
| | | | | | | | | | | Move all the functions in ui.c to be members of a ScreenRecoveryUI class, which is a subclass of an abstract RecoveryUI class. Recovery then creates a global singleton instance of this class and then invoke the methods to drive the UI. We use this to allow substitution of a different RecoveryUI implementation for devices with radically different form factors (eg, that don't have a screen). Change-Id: I76bdd34eca506149f4cc07685df6a4890473f3d9
* turn recovery into a C++ binaryDoug Zongker2011-10-311-0/+826
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555