summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix image flashingEthan Yonker2016-11-301-8/+1
| | | | | | | | | | PS2: full_filename is not a dir PS3: use a consistent format of always assuming directory is missing the trailing / + fix whitespace alignment Change-Id: Ib963473ae10571b3d069b326d024ca04c7224dda (cherry picked from commit fa4ff144374474c541351d153549ad11d4396614)
* Clean up PartitionSettingsEthan Yonker2016-09-131-3/+5
| | | | | | | | | | | | The PartitionSettings struct contains some data elements that are duplicates of data elements in the TWPartition class that is contained within the PartitionsSettings.Part element. We will eliminate this duplication to help reduce the chances for programming bugs. Specifically, this fixes problems where the current file system does not match the backed up file system. Change-Id: I02f236e72093362050556a2e53a09d1dbb9a269d
* Make it backwards compatible with 4.4Ethan Yonker2016-08-251-1/+1
| | | | Change-Id: I668604cddc8e8afbf78709f3f872bea4e9f4aa06
* GUI: Add countdown & cancel to install auto-rebootMatt Mower2016-08-191-6/+18
| | | | | | | Provide a countdown from 5 sec for the automated reboot after install. Include a cancel button to interrupt the process. Change-Id: Ib5e1447918adfde45eba361c088800812b690890
* Remove curtainClose() remnantsMatt Mower2016-08-011-4/+0
| | | | Change-Id: I6ae96b60d34fa4e4b23cd1e5a4fffff3d00451c7
* Remove unused identifier from NotifyTouchMatt Mower2016-08-011-1/+1
| | | | | | | The 'state' parameter in GUIAction::NotifyTouch() is used in the function. Change-Id: I0744c7aa1542d771dbd2916638fbdd53e9681f86
* Move cursor after appending date to backup nameMatt Mower2016-08-011-0/+2
| | | | | | * Send the cursor to the end of the input text Change-Id: Id4f20717134cd38188cc1107f73dcd6bb995f377
* ADB: Add adb backup for TWRP.bigbiff2016-08-011-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Functionality for client side to backup tar and image streams over adbd to the client under backup.ab. Using adb backup on the client side you can backup the partitions TWRP knows about. On the client side you can do the following: adb backup -f <filename> --twrp <options> where options are --compress: compress data system: backup system cache: backup cache data: backup data boot: backup boot etc for each partition. You can string multiple options, i.e. adb backup -f <filename> --twrp --compress cache system data adb backup in TWRP will take any option corresponding to TWRP fstab partitions, e.g. efs boot as well. If you do not specify the filename with the -f option, adb will backup your data to a filename backup.ab on the client. You can then rename the file and encrypt it with desktop tools. If you don't want to use command line arguments: adb backup --twrp will bring up the gui and allow you to choose partitions from the backup page. To restore the backup use the following convention: adb restore <filename> Structures are used to store metadata in binary inside of the file itself. If the metadata structure is modified, update the adb version so that it will invalidate older backups and not cause issues on restore. When restoring, we currently do not support picking specific partitions. It's all or nothing. Change-Id: Idb92c37fc9801dc8d89ed2a4570e9d12e76facf8
* TWRP Install Reboot Optionbigbiff2016-03-311-0/+7
| | | | | | | | This is a simple patch to allow users to reboot after installation of zip queue. Current timeout is 5 seconds before reboot. Change-Id: I1a18cbf7025086e35031ab7241b330babebb8343
* Replace fix permissions with fix contexts for emulated storageEthan Yonker2016-01-291-4/+10
| | | | | | | | | | Fix permissions rarely fixed anything on more recent versions of Android and usually made things worse. Instead we will replace it with a more dumbed down option that should fix contexts on /data/media with a few improvements to ensure that contexts get fixed for multiple users and on adopted storage. Change-Id: If5523781936a0b04196e2ad871cae767ebae2583
* Update minuitwrp graphics in line with latest minuiEthan Yonker2016-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Note: events.cpp is still old code renamed to cpp to make it easier to call functions like gr_fb_width(). I had to modify AOSP fbdev code to provide a separate memory surface for drawing to as drawing directly to the framebuffer resulted in rendering taking about 5 times longer. I also modified AOSP adf code to provide a separate memory surface for drawing for the same performance reasons. The Nexus 9 supports adf graphics. Overlay graphics work on at least one device. Overlay provides a separate memory buffer already so performance is good. I do not have a drm device yet that I know of. I made some attempt to update the drm code to determine the correct pixel format based on the drm graphics format, but what is available in pixel flinger and what is available in drm do not line up all that well. Reports are that the Pixel C is using drm graphics, but performance is slow, likely due to the use of a mmap instead of a memory buffyer. Change-Id: Ibd45bccca6ac2cb826037aa9b2aa5065cf683eed
* Adopted Storage supportEthan Yonker2016-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | -Detects, decrypts, and mounts an adopted SD card if a secondary block device is defined (usually mmcblk1) -Handles unified storage -Displays the adopted storage in MTP along with internal -Factory Reset - wiped just like a data media device, we retain the keys folder and the storage.xml during a factory reset -Backup / Restore -Disable mass storage when adopted storage is present -Read storage nickname from storage.xml and apply it to display names in the GUI -Read storage.xml and determine what storage location is in use for /sdcard and remap accordingly libgpt_twrp is source code mostly kanged from an efimanager project. It is GPL v2 or higher, so we will opt for GPL v3. Change-Id: Ieda0030bec5155ba8d2b9167dc0016cebbf39d55
* Fix (Auto Generate) handling for backup namesEthan Yonker2016-01-221-3/+2
| | | | Change-Id: I29f3823d03c005fb55a0e0a98818d40bd1eb039d
* Android 6.0 needs permission +x to create screenshot filesXuefer2016-01-221-1/+1
| | | | | Change-Id: Id4a6c04712238b86787696337874239591082d39 Signed-off-by: Xuefer <xuefer@gmail.com>
* Fix a bunch of messagesMatt Mower2016-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Find and rename/remove duplicate string variable names * Add missing string variables to en language file * Fix display of some strings missing @ in front of variable name * Fix several %s --> {1} * Be consistent in usage of cancelled vs. canceled (both spellings acceptable) Tip for finding strings missing from language files: 1) Find all messages: egrep -hr "gui_msg.+=" > /tmp/msgs.txt 2) Regex replace to trim them down WHAT: ^\s+gui_msg(?:[^"]+)"([a-zA-Z0-9_]+)=([^"]+).+ WITH: $1 Note that $2 can be used to retain the message 3) Find missing strings: for i in $(cat /tmp/msgs.txt); do if ! grep -q $i gui/theme/common/languages/en.xml; then echo $i; fi done Change-Id: Ic193162e4b5468bf027472928a370be39840ea1d
* gui: fix return value of NotifyKeythat2016-01-191-2/+5
| | | | | | | Only the last action got its keys and ate all of them (om nom nom). This fixes the power button action that activates the lock screen. Change-Id: Ia724568b159090c2c14a282cf3927915b2dc70e7
* Do not require mounting during zip flashing if path existsEthan Yonker2016-01-181-2/+9
| | | | Change-Id: Ideb4bb39b5e864a43b62e807c38b6395c56a8466
* Improve sdcard partitioning processEthan Yonker2016-01-141-26/+33
| | | | | | | | | | | | | | | | | -Improve code for partitioning sdcards -Allow user to select a device for partitioning (must be removable) -Use sgdisk to partition sdcards -Set default sizes for ext and swap to 0 -Change increments for ext to 256MB and swap to 64MB Note: sgdisk is included in 6.0. I have included a static prebuilt sgdisk for trees that do not have sgdisk, however the prebuilt sgdisk is a decent bit larger than the old parted binary. The old parted binary is quite old at this point and we only have it for armv7a. sgdisk should be maintained by AOSP and can be built from source so it should work across architectures. Change-Id: Ib80882d9b5776e5e9358b11340fba392e6f1ae09
* gui: add keyboard support for Ctrl layer and more special keysthat2016-01-071-6/+3
| | | | | | | | | | | - rename NotifyKeyboard to NotifyCharInput - input: handle arrow keys in NotifyKey with standard KEY_* codes - fix page handler to return 0 from NotifyKey if key was handled - fix GUIAction::NotifyKey to not swallow all keys - change home button code from KEY_HOME to KEY_HOMEPAGE (to avoid collision with Home/End, conforms to Android 3.0+) Change-Id: Ib138afa492df8d0c1975415e8b5334c8778ccc90
* gui: fix screenshot_saved messagethat2015-12-291-1/+1
| | | | Change-Id: I7d047fe3436100dbe7c7515860a143a97f7ef0d4
* get rid of console thread for OpenRecoveryScriptthat2015-12-291-31/+13
| | | | | | | | | | | - CLI commands run in a threaded action "twcmd" - Console is displayed via "singleaction_page" - move ORS execution code from GUI action to OpenRecoveryScript class - remove unused function gui_changePackage - don't change PageManager package in home action - fix that /tmp/openrecoveryscript was not deleted after execution Change-Id: Ic688c0b04647ce09e9db979b0bc5123f47cf4f70
* Set twrp.action_complete after completing actionLuK13372015-12-231-0/+2
| | | | Change-Id: I078f0659696cc57564b5db0076a0ed9aaea822d4
* exfat: Build fsck and update path to mkfsMatt Mower2015-12-221-1/+1
| | | | | | | | | * Usage of fsck.exfat is already included in partition.cpp, but the tool is missing. * Update the path to mkexfatfs so the button is available when changing filesystem. Change-Id: I5f4e27357c6b5a8606043d1bdc2488cc83e55d90
* Multiple Language SupportEthan Yonker2015-12-191-35/+49
| | | | | | | | | | | | | | | | | | | | | | | This is similar to https://gerrit.omnirom.org/#/c/14014 A lot of the features built in the older patch set have been split out into separate patches, most of which have already been merged. The remaining functionality here should all be directly related to language selection and loading. We always load English as a base before loading other languages over the top of the base. The idea is that if another language is missing a translation, then we will still display the English. Maybe still to do: read the /cache/recovery/last_locale file and load a language based on that. For me, this file contains just: en_US We probably won't bother with region specific translations so we would have to look at either trimming off the _US or using some other method like perhaps a symlink or a combination of the two. Thanks to _that for twmsg.cpp class Change-Id: I9647a22e47883a3ddd2de1da51f64aab7c328f74
* Update dosfstoolsMatt Mower2015-11-261-1/+1
| | | | | | | | | | | | | * Version 3.0.28 * Update filenames in source * Remove unnecessary symlink to fsck * Commit "Recode short filenames from DOS codepage (default 437)." has been reverted since we do not have access to iconv * Commits cherry-picked on top of 3.0.28: - mkfs.fat: fix incorrect int type - Prevent out of bound array read in date_dos2unix() Change-Id: I50310235c62ec2e6bc90afcd10f2814d3afb5113
* Move reloading of theme outside of the action threadEthan Yonker2015-11-091-20/+7
| | | | | | | | | | | | | | | | | | | | | Reloading the GUI while the GUI is running and rendering is very dangerous as we may be deleting GUI resources before or while we are trying to render those same items. This change will allow us to safely load new resources and delete the old ones. Fixed a double free situation that was causing a crash on every other theme reload. Clear parsed xml documents when we are done loading the theme instead of keeping them in memory for the life of the theme to help save a little memory. Store starting page so that if we request a reload, we can enter the theme at the same starting point, which may come in handy if we allow for language selection on alternate starting pages such as the decrypt prompt or the system read only prompt. Change-Id: I45a7e3fb3daeefac56d70f8d4936938eb1244b99
* Treat /vendor like /system for read onlyEthan Yonker2015-11-051-0/+15
| | | | | | | The vendor partition is verity checked just like system so we should treat vendor as read only same as system. Change-Id: Ida65c9f44d8610e52fcdcef0b4a50faf5c7110d2
* Fix a bunch of warningsEthan Yonker2015-10-251-38/+38
| | | | | | Mostly adding __unused where needed. Change-Id: Ia4f675b9b360782728c361ed1699db0cc277c3a5
* Merge up to AOSP marshmallow-releaseEthan Yonker2015-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to maintain compatibility with older trees, we now have minadbd.old and minui.old. I had to use a TARGET_GLOBAL_CFLAG to handle ifdef issues in minui/minui.d because healthd includes minui/minui.h and there was no other alternative to make minui.h compatible with older trees without having to modify healthd rules which is outside of TWRP. Note that the new minui does not currently have support for qcom overlay graphics. Support for this graphics mode will likely be added in a later patch set. If you are building in a 6.0 tree and have a device that needs qcom overlay graphics, be warned, as off mode charging may not work properly. A dead battery in this case could potentially brick your device if it is unable to charge as healthd handles charging duties. Update rules for building toolbox and add rules for making toybox Use permissive.sh in init.rc which will follow symlinks so we do not have to worry about what binary is supplying the setenforce functionality (toolbox, toybox, or busybox). Fix a few warnings in the main recovery binary source code. Fix a few includes that were missing that prevented compiling in 6.0 Change-Id: Ia67aa2107d260883da5e365475a19bea538e8b97
* ORS: Report success if AOSP script succeedsMatt Mower2015-08-091-0/+1
| | | | | | | | When AOSP recovery commands are processed, the GUI reports a failure just before reboot even when all commands succeeded. Set op_status before reboot to indicate success. Change-Id: I09e9357b04cd81f418264bf00a75311f48357414
* Make sure that adbd restarts after sideloadDees Troy2015-06-171-1/+1
| | | | Change-Id: I7d82b95cd8749c6f8569739162708705faa6f1f7
* Fix ORS scripts displaying an error after completingEthan Yonker2015-06-171-2/+5
| | | | Change-Id: I1329705fca870b4e3017607ad7c7875aa00d664b
* gui: set tw_file to the currently flashed file name without paththat2015-06-011-3/+7
| | | | | | To allow themes to show more of the file name on narrow displays. Change-Id: I4962eed5e4a01f73a3cde126f2ba56428209fccc
* Fix unable to uncheck the mount read only check boxEthan Yonker2015-05-301-1/+1
| | | | Change-Id: I1bbc25df6f35f79549f1eb06feb4db9ec0475aa5
* remove useless memset and \nXuefer2015-05-291-1/+0
| | | | | | | fgets reads up to one byte less than size then with \0 at the end adding \n after \0 is useless too Change-Id: I7758d7a8f885bdde2b491a9cb75800f831d77c1f
* Add resize2fs and ability to run resize2fs via GUIEthan Yonker2015-05-281-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Note: Only works on ext2/3/4 partitions. Only tested on ext4. We can use this in some cases to resize the data partition if an incorrect fstab caused recovery to not reserve the 16KB for a crypto footer. Sometimes the BoardConfig for a custom ROM does not have the correct size for the system partition and if the ROM flashes a raw system image, that image will not take up the full block device. Running resize2fs can fix the size and may allow more room in the system partition for customizations like busybox or a larger gapps package. Sometimes flashing a factory image may flash userdata with an image with a file system that does not take up the full size of the block device (e.g. factory images for the Nexus 6 will flash userdata with a ~24GB userdata image, wasting ~30GB of space). Using resize2fs we can easily fix this issue without having to do a full format data. Change-Id: I631f5c6f567bbc6a9241e5dd95f1e435820a1b13
* Mount system as read-only by defaultEthan Yonker2015-05-271-0/+54
| | | | | | | | | | | | | | Mounting system as rw can prevent future OTA updates. The purpose of this patch set is to prevent TWRP from mounting sytem as rw on the first boot. Device maintainers should update their twrp.fstab files on these devices to include an additional line: /system_image emmc /dev/block/../system This line will allow TWRP to create a raw system image backup to ensure that the user can return to an original state for future OTA updates. Change-Id: I8929d85bc3a5b96cc564bc7f734b58d5612ec833
* minuitwrp: fix crash issue, when the console use TTF font to display unicode font.xiaolu2015-03-051-2/+1
| | | | | | gui: fix terminal command unusual line breaks and missing characters at the end of a read buf. Change-Id: I8d3d740b6066b1594c5148b2012f0e7bcbecc22b
* GUI: Terminal command: minor improvementsMatt Mower2015-03-051-0/+4
| | | | | | | * Use mono font for terminal command input * Recognize 'exit' command (go to main page) Change-Id: I5f383cd8d19959a49d2ae0b18f839b86e4145693
* GUI: Support styles in xml to reduce xml file sizeEthan Yonker2015-02-211-4/+4
| | | | | | | Also allow sliders to have their own text label instead of requiring a whole separate text object for the label in the xml. Change-Id: I6e314efb4bb454d496555ff7e003d743063a1308
* Disable stock recovery replacing TWRP during ORSEthan Yonker2015-02-021-0/+2
| | | | | | | | -Create a separate function to disable stock recovery flashing -Add a call to that function to the reboot section of the ORS action so that an OTA update will not inadvertantly replace TWRP Change-Id: I43eae81e0e76971b6e8d34c38785dc73772242d2
* gui: run cancel action in another threadthat2015-01-301-32/+76
| | | | | | | | | | | Some actions did not have an operation_end where needed especially when dealing with cancel actions. Cancel actions now do not run operation_start or operation_end and let the original action handle the operation_end so that the GUI waits until the original action acutally cancels. Change-Id: I28e6260abb058acb982cecd108c09fc89e0ffeed
* Use macro to add actions to the action mapVojtech Bocek2015-01-291-56/+58
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I283b33087817eb87dae916a3183a9024dd35effd
* Add cancel backup capability.bigbiff2015-01-271-9/+43
| | | | | | | | | | | This will stop the iteration of the partition objects, kill the current twrpTar thread and remove the backup directory. Implement TWAtomicInt class to give us a wrapper that automatically uses mutexes before the read and write to help ensure that the reads and writes will be atomic based on documentation. Change-Id: I645b22bc980a292e9c7202acb24ffd22ebe68c63
* Use /twres instead of /res for theme resourcesDees Troy2015-01-221-1/+1
| | | | | | | | | AOSP and other ROM trees now do a rm -rf of the res folder during the ramdisk creation process that removes the TWRP resources. Using /twres instead of /res works around this issue making TWRP more compatible with AOSP and other build trees. Change-Id: I0d4c7e06ca381ac5aa0069b6f2b8c47f7dec49e7
* Hide some non critical error messagesEthan Yonker2015-01-221-1/+1
| | | | Change-Id: I6e43242e44ce63cea9472c75a9f7fedf1b34fbbe
* Fix handling of custom themes after decryptEthan Yonker2015-01-131-34/+8
| | | | | | | | Loading a custom theme from the decrypt action was preventing the runPage function from exiting. This moves the loading of a custom theme out of the action. Change-Id: I86904b63a67a25ded56e3e1e569fe906264dc055
* Fix some crashes during theme (re)loadingVojtech Bocek2015-01-121-4/+3
| | | | | Change-Id: I01405fbe86a48ae79f2cbe633b89f2dcfb1ef266 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix some actions being incorrectly threadedVojtech Bocek2015-01-121-1/+1
| | | | | Change-Id: Ic8406344994ef2a9972207f9281b52e64e22826b Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* gui: simplify blanktimerthat2015-01-111-8/+0
| | | | | | | | | - get rid of separate thread, check timer in rendering thread instead - use an enum for the blanking state instead of magic integers - move #ifdefs for TW_NO_SCREEN_TIMEOUT inside blanktimer class - move some #includes and enum TOUCH_STATE to pages.hpp Change-Id: Id4b104e3680dc5db41d8ba85e32d722cf4086299
* Improve GUI handling of zip flashingEthan Yonker2015-01-091-11/+9
| | | | | | | | | | | - change the page sooner so that users cannot activate the slider twice - improve GUI messaging if a zip requests a cache wipe - move update of the file count to the end so it is less visible to the user (e.g. during a cache wipe the counter should not read 0) Change-Id: I5d478f07effe61ca37f3521a77c9e9243a9cb692
* Allow flashing of images via the GUIEthan Yonker2015-01-091-0/+19
| | | | | | | | | | | - Use the Images... button in the lower right of the zip install page - Unify image flashing functions between restore and image flash - boot and recovery partitions are flashable by default - use fstab flag flashimg=1 or 0 to override defaults - file system partitions are currently not flashable Change-Id: I822dc446030543c55d2153e219d67a1292374ffc
* gui: fix action threading if background thread is busythat2015-01-091-9/+15
| | | | | | | | | | When the background thread is already running and we have at least one threaded action in the list, we should not run any non-threaded actions before ignoring the threaded action and following ones - it might cause invalid state variables to be set. Run or ignore the whole list in the background thread instead. Change-Id: Ie634105b80f038893898a21539886bd757eb47ce
* Run some actions in a separate threadthat2015-01-091-154/+192
| | | | | | | | | Some actions need to be threaded so we will run those in a separate thread and deny requests to thread more actions if new requests come in while a thread is already running. Change-Id: I966c538e67860a6d8fe556e5a2eb7f7d1a987e74 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Thread openrecoveryscript action to properly display action pageEthan Yonker2015-01-051-22/+38
| | | | | | | | | The action page fails to display properly during ORS processing unless we thread the ORS action. Based upon the work done in this patch set by _that: https://gerrit.omnirom.org/#/c/11226 Change-Id: I6dac790ac26d9b3a02df778516fea011d67aea70
* fix adb sideloadthat2015-01-041-82/+87
| | | | | | | | | | - "Cancel" button handling requires another thread - simplify handling of child pid - merge duplicated code for reinjecting TWRP after installation - fix error that showed on host PC after sideload finished - fix problem where adbd sometimes does not stop correctly Change-Id: I536877f024b606756c6a3289c6ddfdba423a60d6
* Fix GUIAction::operation_startEthan Yonker2015-01-031-1/+1
| | | | | | | | | | We need to set the value of tw_operation_state a little sooner to make the decrypt page work correctly. Without this change, decrypt would incorrectly display the main page during the first decrypt cycle. This fix may also fix ORS and possibly other things that use the runPage function. Change-Id: I85ad6e4add6726a2746eeb7116f3eab3f7ff5d84
* gui: Move action functions to function pointer map.that2014-12-301-1055/+1081
| | | | | | | | | | | | | | | | This allows the functions to be more readable and make doActions readable. Patch set 5: gui: remove threading in GUIAction Multiple actions were started in another thread that was joined immediately after starting it, so the input thread was blocked anyway. Selected single actions were started in their own thread, but this caused bugs like being able to install the same package twice in parallel by quickly swiping the slider twice. Change-Id: I28adadaedd032efc7bff3aaa48e659627aa3a3b3
* MTP add/remove storage instead of disabling MTPEthan Yonker2014-12-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a pipe between TWRP and MTP to allow TWRP to tell MTP to remove storage partitions as they become unavailable (e.g. during a wipe, unmount, etc) instead of disabling MTP completely. This includes some fixes and improvements in destructors to properly remove / delete various items. This also means that we will not be toggling adb off and on quite as often. I do not like that we had to add another thread, but we were unable to use select() on the mtp_usb character device because this device does not support polling. Select always returned indicating that the mtp file descriptor was ready to be read and the resulting read would block. The read block prevented us from being able to include reading of the pipe between TWRP and MTP in the main MTP thread. We might want to add a return pipe letting TWRP know if the removal of the storage device was successful, but I am not sure how we want to implement this. It would invovle timeouts in both TWRP and MTP to ensure that we returned a failure indicator in a timely manner to TWRP and prevent deleting the storage device in the case of a failure. Right now we make no attempt to ensure that an MTP operation is underway like a large file transfer, but we were not doing anything like this in the past. In some respects we have limited control over what happens. If the user installs a zip that unmounts a storage partition, we will not know about the change in storage status anyway. Regular Android does not have these troubles because partitions rarely get unmounted like in recovery. At some point, we have to hold the user accountable for performing actions that may remove a storage partition while they are using MTP anyway. Ideally we do not want to toggle the USB IDs and thus toggle adb off and on during early boot, but I am not sure what the best way to handle that at this time. Change-Id: I9343e5396bf6023d3b994de1bf01ed91d129bc14
* Toggle MTP during ADB sideloadEthan Yonker2014-12-181-0/+2
| | | | | | | | Windows does not do very well if you try to sideload while MTP is enabled due to drivers. This will toggle MTP off and back on if MTP is currently enabled before and after a sideload operation. Change-Id: I022dbedecc97565b50b6ae1fda8922b822f63440
* Attempt to set the proper uid/gid/contexts on new files and dirsEthan Yonker2014-12-121-0/+8
| | | | | | | | | | Files and folders that we create during backups, copy log, or MTP operations often do not have the proper uid/gid/contexts assigned. We will attempt to read the proper contexts from the settings storage path and assign those same contexts to any files or dirs that we create. Change-Id: I769f9479854122b49b499de2175e6e2d026f8afd
* Update adb sideload featureEthan Yonker2014-11-081-22/+36
| | | | Change-Id: Ib503d0e87434e1a28430779302d6565211c26592
* Fix zip installEthan Yonker2014-11-071-26/+1
| | | | | | | | We never used the feature for running a custom theme during zip install. We can re-implement this later if we like. For now, we will remove this feature until we are ready to make it work. Change-Id: Ice71b0b863c7ef17376e3f973d48b810be567c33
* performance profile supportTom Hite2014-10-081-0/+4
| | | | | | | | | | | Many device trees support the recovery.perf.mode property to set various core frequencies and online/offline mode. TWRP is highly threaded, and support for multiple cores on many operations dramatically recudes the time, e.g., backups, zip flashes, etc. p2: removed user notifications Change-Id: I957b8ca40b241c0af0471327eeb329cce1816017
* add mtp responder to TWRP.bigbiff bigbiff2014-09-031-1/+26
| | | | | | Big thanks to Dees_Troy for helping with the implementation. Change-Id: I6c9c522b9c9de5dc139e2ecb0141008182ba07f0
* Support reading since_epoch and secondary brightness filesxNUTx2014-08-101-0/+5
| | | | | | | | | | | | | | | TWFunc::Fixup_Time_On_Boot: Will now try to read /sys/class/rtc/rtc0/since_epoch to correct time, if that fails it will try to use the ats files to correct time. TWFunc::Set_Brightness: One single function to set brightness from both the automated functions and the gui actions. It is able to set a second brightness path if present, it will set them both the same value. Many Sony devices have 2 brightness files in the sysfs that must be set to properly set the brightness. Change-Id: I7ca582109085dfbcb46b8de73ad031e4b7903fca
* Implement "take a screenshot" featureVojtech Bocek2014-07-091-0/+49
| | | | | | | | * Like in android - press power+volume down, screenshots are saved in /sdcard/Pictures/Screenshots (if /sdcard is mounted) or /tmp Change-Id: Iaefa15b11a1d5fdfac57d77388db1621f378a8d4 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Refresh after partition changesjrior0012014-07-071-2/+2
| | | | Change-Id: Id16c84f815b1c4b8e95da142648a5a759116ee6e
* Whitespace and minor code cleanupMatt Mower2014-06-041-11/+11
| | | | | | This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
* Add options to repair or change file systemEthan Yonker2014-06-041-0/+133
| | | | Change-Id: I9043e98e1e1ed4722f05c13a60b43d2d0bf739f6
* Add support for actions triggered by key combinationVojtech Bocek2014-04-161-11/+43
| | | | | Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Allow building of an OEM friendly TWRPEthan Yonker2014-04-041-1/+2
| | | | | | | | Disable theming Disable creating the TWRP folder for the settings file Change factory reset on data/media devices to a full wipe Change-Id: I3104282b5dd3f55dfff7c8cf39c72750af08563d
* Allow sideloading from /tmpEthan Yonker2014-02-261-4/+5
| | | | Change-Id: I7ba9a8a496536ed55241e45e18297bd824d7e28c
* Remove some unneeded codeEthan Yonker2014-02-161-79/+8
| | | | Change-Id: I52b34a316950e92a3aa4c1675475fca8dc08d2c8
* Cache results of GUIObject::isConditionTrue()Vojtech Bocek2014-02-121-7/+4
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Ia50f7c365b2dc0a65ee046bb42972e3594264878
* Conditional -> GUIObject and make all gui objects children of GUIObjectVojtech Bocek2014-02-121-1/+1
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Ic0a7d6354dabe5919b83942f2f1aa0715625e522
* Expansion of vibrate optionsEthan Yonker2014-02-071-1/+1
| | | | | | | Improve location / timing of vibration Split out vibrate settings for buttons, keyboard, and long actions Change-Id: I282825cc5f3e44ed6dcabe65dc1f4cb21b407b67
* Add haptic feedbackSamer Diab (S.a.M.e.R_d)2014-02-061-0/+6
| | | | Change-Id: I15d723f73c0b0bb4a40645d1c3f4c1c616f36998
* Update partition sizes after sideloadDees Troy2013-11-261-0/+1
| | | | Change-Id: I4dbb4677f1c3bcfa0b0a9248ae0b411c155f927e
* Add TWFunc::Exec_Cmd() with no 'result' agrumentVojtech Bocek2013-09-121-14/+10
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
* Make fixing su perms automaticDees Troy2013-09-121-2/+3
| | | | | | | | In 4.3+ with SELinux, su perms will be lost on every reboot so users will get the prompt to fix su perms in TWRP every time. Make fixing the su perms automatic instead of nagging the user. Change-Id: Ia8a2652018db5e1f6ffc5fec2a4ac0db3a8f32bb
* Pull ROM info from build.prop for backup namesDees Troy2013-09-121-2/+23
| | | | Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
* Add a TW_NO_TIMEOUT optionRicardo Gomez2013-08-251-1/+6
| | | | Change-Id: Ifb3a5bd9f1e6c2e9810c90b0aec198e91d5956fc
* Unify indentation and little clean-up in TWRP filesVojtech Bocek2013-08-241-249/+249
| | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix some issues with wipe partition listDees_Troy2013-07-011-0/+7
| | | | Change-Id: Ie7d5878faf86b8fa824b72211be7fd3596b471d7
* Support encrypted backup filesDees_Troy2013-06-221-4/+33
| | | | | | | | | | | | | | | Also includes features merged from: Update twrpTar by kokotas Revised function entryExists(). Added function to get archive's uncompressed size. Added option to exclude item(s) from the archive. Revised forks() http://review.teamw.in/#/c/590/ Change-Id: I01fa2c81643161984eff2625247af75990684bd9
* Add new SliderValue GUI widgetVojtech Bocek2013-04-041-0/+27
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Ic5d44314f501341140dd7059d1cb753341f5844c
* Move all AOSP code out of recovery binaryDees_Troy2013-04-041-61/+67
| | | | | | Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
* Add partition list GUI elementDees_Troy2013-03-301-1/+62
| | | | | | | | | | | | Add partition list GUI element and update backup, restore, mount, storage selection, and wipe sections of GUI and partition manager code to reflect the new GUI element. Update ORS engine to handle new backup and restore setup. Fix a bug with decrypt. Add 1080x1920 layout. Change-Id: Iaa2f44cb707167e66f935452f076ba00e68a2aa4
* Check for root and root perms and offer to install/fixDees_Troy2013-02-211-19/+39
| | | | | | Also fix sort order for file selector by date and file sizes Change-Id: Idff9fe4232c19d4ed1082e78fabe6f921aa0a114
* This adds a 60 second screen timeout for TWRP. Might consider making this configurable in the future.bigbiff bigbiff2013-02-131-0/+3
| | | | | | | | | | | | | | | Will also set overlay to lockscreen so we don't have inadvetent screen selections. Touching the screen will bring the display back up. add back check script for poweroff move diff time function to twrp-functions.cpp make sure we chmod after copy_file add read_file and write_file functions to twrp-functions.cpp make single thread try to force update screen add forceRender drop caches after tar processing Change-Id: I3c5c509dd39dbb05451bbfe5d8b56d53c90d8d1b
* Remove thread logging from actions.cppDees_Troy2013-01-281-3/+0
| | | | Change-Id: I2d2af963f4d6990191d91a336f682516af61d734
* adding sideload page with wipe cache and dalvikbigbiff bigbiff2013-01-251-3/+9
| | | | | fix variable Change-Id: I72eed7b4d709a184e53cc94165a1817a7dcf041e
* Use GUI for ORS instead of console onlyDees_Troy2013-01-251-23/+30
|
* Convert AOSP commands to ORS for encrypted devicesDees_Troy2013-01-241-0/+12
| | | | Change-Id: I6a76a51cd9efd7db67d7abeeb26f9bdd0eebf5a9
* change tar create to pthreadbigbiff bigbiff2013-01-241-1/+2
| | | | Change-Id: I5a33d207ec6683de20da37e6f4f174c67785fc52
* Improve ORS sideload to display GUI with cancel buttonDees_Troy2013-01-181-2/+4
|
* Fix problems with thread creation on some devicesDees_Troy2013-01-161-1/+35
| | | | | | | | This fixes a problem with not reaching the backup completed page after a backup is complete on certain devices (GNex, Note2). Changing the stack size to 512KB seems to be the actual fix but leaving the other changes in place as they may be helpful or are better practices.
* Add libtar to TWRP instead of using busybox tarbigbiff bigbiff2013-01-091-28/+29
| | | | | | | 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/+23
|
* Finalize 2.3.0.0Dees_Troy2012-10-101-14/+4
| | | | | | Fix permission setting for other Add new fix permissions to GUI actions Update version number
* Fix output of version numberDees_Troy2012-10-011-1/+0
|
* Save version number to storageDees_Troy2012-09-271-0/+1
|
* Update sdcard partitioning to C++Dees_Troy2012-09-271-68/+4
|
* Port backup name checking to Partition ManagerDees_Troy2012-09-271-3/+2
|
* Port reboot functions to C++Dees_Troy2012-09-271-12/+11
|
* Add option to wipe android secureDees_Troy2012-09-261-0/+2
|
* Fix permissions updatesDees_Troy2012-09-261-8/+17
| | | | | Also redirect stderr output on terminal commands for display in GUI console
* Fix SDCard partitioningDees_Troy2012-09-261-3/+11
|
* Add and improve OpenRecoveryScript supportDees_Troy2012-09-201-3/+3
| | | | | Improve zip finding in ORS engine Add support for restoring with just a backup name
* Fix ext storage and zip pathsDees_Troy2012-09-191-0/+26
| | | | | | Fix a bug with handling external storage during boot. Check zip root path when switching storage and ensure that the path is in the new storage path to prevent user confusion.
* Improve adb sideload - use storage vs tmpDees_Troy2012-09-191-11/+8
|
* Improve adb sideload -- add cancelDees_Troy2012-09-191-4/+30
| | | | | Also copy zip from /tmp to storage and remove from /tmp to prevent running out of RAM.
* Cleanup extra-functionsDees_Troy2012-09-181-27/+13
|
* Update backup and restore code, adb sideloadDees_Troy2012-09-171-5/+38
| | | | | | | Fixed a problem with using make_ext4fs by making its lib a dynamic lib. Added ADB sideload zip install feature - no way to cancel it yet. Improve backup and restore code.
* Add wipe functions, compiles in CM7, text shows in UI, zips installDees_Troy2012-09-141-39/+34
| | | | | | | | 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-0/+3
| | | | | | | 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.
* Zip install works againDees_Troy2012-09-111-9/+14
|
* Improve storage size code, mount, unmountDees_Troy2012-09-101-15/+7
| | | | Add flag parsing from recovery.fstab
* Add processing of fstab, mounting, and decryptDees_Troy2012-09-071-20/+20
|
* Hax to make it bootDees_Troy2012-09-061-4/+4
|
* TWRP-ify AOSP codeDees_Troy2012-09-051-0/+1134
Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere