summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix some compiler warningsthat2014-11-041-1/+1
| | | | Change-Id: I23c490e6228b0fcf656c76ac314c69508ba2329d
* display cpu temperature in twrpJenkins2014-10-141-0/+6
| | | | | | | use TW_NO_CPU_TEMP := true to disable display use TW_CPU_CUSTOM_PATH := path to set custom path Change-Id: Id260ecbb4ec36a78442387329944f67003d0f6a0
* performance profile supportTom Hite2014-10-081-0/+11
| | | | | | | | | | | 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-0/+18
| | | | | | Big thanks to Dees_Troy for helping with the implementation. Change-Id: I6c9c522b9c9de5dc139e2ecb0141008182ba07f0
* Support reading since_epoch and secondary brightness filesxNUTx2014-08-101-4/+70
| | | | | | | | | | | | | | | 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/+18
| | | | | | | | * 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>
* Check the crash counter instead of date in TWFunc::Fixup_Time_On_Boot()Vojtech Bocek2014-07-091-10/+0
| | | | | | | * Some devices (Sony) have RTC counting up from year 2009, Change-Id: I2cf1928e1b05c7e8b184963f8130582e0319ddc4 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Track backup and restore progressEthan Yonker2014-07-091-0/+24
| | | | | | | | Track backup and restore progress based on the sizes of the files as they are being added to the tar backup file. Update the progress bar based on the sizes of the files. Change-Id: Idf649efa1db3e91830b4b2add86203a3f30042ff
* Whitespace and minor code cleanupMatt Mower2014-06-041-2/+2
| | | | | | This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
* Add support for actions triggered by key combinationVojtech Bocek2014-04-161-0/+20
| | | | | Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix skipping of relative paths and lost+found in twrpDUVojtech Bocek2014-03-131-0/+25
| | | | | Change-Id: Ib79029fd6237502338b041a6bc2f9e539536d6ad Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Change qcom time error messages to infoDees Troy2014-03-061-3/+3
| | | | Change-Id: I5a22b2df87920333974d8d18fb29f4ff1627a405
* Check auto generated backup names for invalid charactersEthan Yonker2014-02-261-0/+4
| | | | | | | Change name to date/time only if the auto generated backup name contains any invalid characters. Change-Id: I73e9e546373088ee7852fa31015060ce95a1d020
* fix slash between directoriesbigbiff bigbiff2014-02-231-1/+1
| | | | | | | add fixing contexts of Android directory for apps that store stuff here fix data/data contexts to be recursive Change-Id: I1122559c83845c3af0a351a4034cd7ad6da83fa5
* ifdef some functions that depend on other TWRP partsEthan Yonker2014-02-121-186/+168
| | | | | | | End goal is to create a twrpTar binary that can run from the command line. Change-Id: I14f07a425b7755bd09dbce95a5918da1430964fc
* Update SuperSUEthan Yonker2014-02-081-4/+12
| | | | Change-Id: I0f450357595e7f5f56a7c120b899101faf7f6360
* Separate out function for reading /system/build.prop valuesEthan Yonker2014-02-081-25/+31
| | | | Change-Id: I9e398aa3f4f5be0728435ffdab333d4090cdab22
* Add option to print render time of each frame to log fileVojtech Bocek2014-02-061-0/+6
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Id158a6375fbadf4cdf0a8c7d143759e602419e7f
* Load RTC offset on Qualcomm Krait chips, fixes the broken time & dateVojtech Bocek2014-02-041-0/+93
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I04ad07f3e6be961003e063be8c648e191e2f9431
* Create a TWRP Disk Usage Class to retain state about a directory and whether we should skip it in other classes like twrpTar.bigbiff bigbiff2013-12-191-33/+0
| | | | | | Moved Get_Folder_Size to this new class. Change-Id: If0a0220f900eb109581f2eeaf7b76e3f7d6886f1
* Update licenses to all matchDees Troy2013-10-221-0/+18
|
* Remove trailing spaces on auto generated backup namesDees Troy2013-10-171-0/+7
| | | | | Trailing spaces sometimes cause folder creation depending on what file system is in use (e.g. vfat).
* Improvements to Update_Log_FileDees Troy2013-09-191-8/+19
| | | | Change-Id: I5596759b0cb39e4448b6be382f9224feed70a5ea
* Never generate empty backup nameVojtech Bocek2013-09-171-1/+2
| | | | | | | * Backup would then go to /sdcard/TWRP/*serial_num*/ (without any subfolder) and restore would not be able to find it. Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Add TWFunc::Exec_Cmd() with no 'result' agrumentVojtech Bocek2013-09-121-15/+32
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
* Pull ROM info from build.prop for backup namesDees Troy2013-09-121-0/+48
| | | | Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
* Really fix TWFunc::tw_chmod() for 3-character mode stringVojtech Bocek2013-08-301-32/+41
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I8f03d46235e1c71e8ee510309c9418cde802f50b
* Update SuperSU for 4.3 SELinux, 2.6.1.0Dees_Troy2013-08-301-0/+62
| | | | Change-Id: Ib7f882db8a8c61d1156c03468208205124132b6c
* ignore lost+found in all the placesbigbiff bigbiff2013-08-281-1/+1
|
* Unify indentation and little clean-up in TWRP filesVojtech Bocek2013-08-241-14/+15
| | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix TWFunc::tw_chmod() for 3-character mode stringVojtech Bocek2013-08-241-1/+2
|
* Revert "Rewrite TWFunc::Exec_Cmd() to use pipe() instead of popen()"Dees_Troy2013-08-241-43/+12
| | | | | This reverts commit c5754cf9355056ee5f2aebaa15a47b62c5cbeb42. popen already uses fork and pipe and __popen works on more devices.
* Rewrite TWFunc::Exec_Cmd() to use pipe() instead of popen()Vojtech Bocek2013-07-031-12/+43
| | | | * popen causes crashes on some devices
* Support encrypted backup filesDees_Troy2013-06-221-0/+199
| | | | | | | | | | | | | | | 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
* Move all AOSP code out of recovery binaryDees_Troy2013-04-041-128/+106
| | | | | | Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
* use md5.c for computation of md5sumsbigbiff bigbiff2013-03-071-43/+15
| | | | | | create a framework for computing digests and reading digests in TWRP add space for backwards compatibility with bb md5sum Change-Id: Ia18e3f430eed5eba22e5052d39b9b8d88ecd4536
* fixes for fakeflash zipsjt11342013-02-271-2/+2
| | | | | | | | 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
* Fix compiling on CM7Dees_Troy2013-02-221-1/+5
|
* Check for root and root perms and offer to install/fixDees_Troy2013-02-211-62/+265
| | | | | | 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/+49
| | | | | | | | | | | | | | | 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
* Add write buffer for tar writesDees_Troy2013-02-071-4/+4
| | | | | | | update fuse to 2.9.2 catch return from unlink so that we don't print error messages when things work Change-Id: I1115039a0fa5d9d73f78ef1abd79755d7ffd9d96
* Use only std::string in TWFunc::Get_Folder_SizeVojtech Bocek2013-02-021-14/+5
| | | | | * Fixes crash which could occur with too deep path because of too much memory allocated on stack
* Fix fail over to vfat from exfatDees_Troy2013-02-011-2/+1
| | | | | | | Fix issues with MD5 checking using chdir and leaving the working dir in a subfolder that prevented unmounting sometimes. Change-Id: I01a563d722f474297ed3f7a30064c3a61748ade3
* exFAT improvements, fixesDees_Troy2013-01-281-4/+12
| | | | | | | | | Move Exec_Cmd to libcrecovery __popen Provide opt out build flag for exFAT Default fstype to exfat on external storage if exfat support is present and fstype is vfat or auto Fix invalid unmount errors Improve handling of unencrypted sdcards on Samsung devices
* file manager updates for exFATDees_Troy2013-01-281-0/+21
| | | | Change-Id: I06fa6120a975cbc3d4eef9bc2ca034ec716740ee
* Remove sockets and FIFOS when removing filesbigbiff bigbiff2013-01-201-1/+1
|
* Fix wiping problems and save ecrypt keyDees_Troy2013-01-091-26/+26
| | | | | | Fix problems with the wiping of data/media devices Save and restore the ecryptfs key for external sdcard on Samsung encrypted devices.
* Add libtar to TWRP instead of using busybox tarbigbiff bigbiff2013-01-091-70/+136
| | | | | | | Add proper mkdosfs tool Add fuse to TWRP Add experimental exfat-fuse to TWRP Convert all system() functions to use new Exec_Cmd function
* Increase array size to fix crashes on some devicesDees_Troy2012-12-201-1/+1
|
* Fix output of version numberDees_Troy2012-10-011-25/+0
|
* Fix compiler warningsDees_Troy2012-09-281-1/+1
|
* Save version number to storageDees_Troy2012-09-271-0/+26
|
* Port reboot functions to C++Dees_Troy2012-09-271-0/+128
|
* Add backup size checkingDees_Troy2012-09-261-2/+10
| | | | | Converted bootloader.cpp to TWRP and removed AOSP fstab parsing from startup
* Unify portrait layouts againDees_Troy2012-09-261-0/+23
|
* Fix fstab and unmount problemsDees_Troy2012-09-201-4/+3
| | | | | | Fix a problem parsing some recovery.fstab files. Fixed a problem with MD5 checking that prevented unmounting after md5 checking.
* Cleanup extra-functionsDees_Troy2012-09-181-19/+14
|
* Update backup and restore code, adb sideloadDees_Troy2012-09-171-0/+71
| | | | | | | 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-0/+164
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