Commit Graph

54 Commits

Author SHA1 Message Date
Vojtech Bocek
03fd6c56fe Implement "take a screenshot" feature
* 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>
2014-07-09 17:35:36 +02:00
Vojtech Bocek
67351dca66 Check the crash counter instead of date in TWFunc::Fixup_Time_On_Boot()
* Some devices (Sony) have RTC counting up from year 2009,

Change-Id: I2cf1928e1b05c7e8b184963f8130582e0319ddc4
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-07-09 15:57:59 +02:00
Ethan Yonker
1b7a31bd65 Track backup and restore progress
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
2014-07-09 08:52:18 -05:00
Matt Mower
fb1c4ffaaf Whitespace and minor code cleanup
This is by no means comprehensive, but is quite a bit better already.

Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
2014-06-04 09:13:37 -05:00
Vojtech Bocek
0b7fe504dc Add support for actions triggered by key combination
Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-04-16 17:51:17 +02:00
Vojtech Bocek
05f87d6cca Fix skipping of relative paths and lost+found in twrpDU
Change-Id: Ib79029fd6237502338b041a6bc2f9e539536d6ad
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-03-13 14:55:12 +01:00
Dees Troy
3e254b9c89 Change qcom time error messages to info
Change-Id: I5a22b2df87920333974d8d18fb29f4ff1627a405
2014-03-06 20:24:54 +00:00
Ethan Yonker
92d48e0696 Check auto generated backup names for invalid characters
Change name to date/time only if the auto generated backup name
contains any invalid characters.

Change-Id: I73e9e546373088ee7852fa31015060ce95a1d020
2014-02-26 12:06:08 -06:00
bigbiff bigbiff
731df79eb7 fix slash between directories
add fixing contexts of Android directory for apps that store stuff here
fix data/data contexts to be recursive

Change-Id: I1122559c83845c3af0a351a4034cd7ad6da83fa5
2014-02-22 20:12:02 -05:00
Ethan Yonker
af2897c4c2 ifdef some functions that depend on other TWRP parts
End goal is to create a twrpTar binary that can run from the
command line.

Change-Id: I14f07a425b7755bd09dbce95a5918da1430964fc
2014-02-12 15:08:31 +00:00
Ethan Yonker
0385f51857 Update SuperSU
Change-Id: I0f450357595e7f5f56a7c120b899101faf7f6360
2014-02-07 21:54:33 -06:00
Ethan Yonker
b555789d44 Separate out function for reading /system/build.prop values
Change-Id: I9e398aa3f4f5be0728435ffdab333d4090cdab22
2014-02-07 21:43:20 -06:00
Vojtech Bocek
e5ffcd1af2 Add option to print render time of each frame to log file
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Id158a6375fbadf4cdf0a8c7d143759e602419e7f
2014-02-06 21:18:08 +01:00
Vojtech Bocek
d0e38bc2f4 Load RTC offset on Qualcomm Krait chips, fixes the broken time & date
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I04ad07f3e6be961003e063be8c648e191e2f9431
2014-02-04 18:27:05 +01:00
bigbiff bigbiff
34684ff313 Create a TWRP Disk Usage Class to retain state about a directory and whether we should skip it in other classes like twrpTar.
Moved Get_Folder_Size to this new class.

Change-Id: If0a0220f900eb109581f2eeaf7b76e3f7d6886f1
2013-12-19 18:02:44 +00:00
Dees Troy
3be70a897e Update licenses to all match 2013-10-22 14:25:12 +00:00
Dees Troy
a829d5deb2 Remove trailing spaces on auto generated backup names
Trailing spaces sometimes cause folder creation depending on what
file system is in use (e.g. vfat).
2013-10-17 00:26:34 +00:00
Dees Troy
9d7fdf5274 Improvements to Update_Log_File
Change-Id: I5596759b0cb39e4448b6be382f9224feed70a5ea
2013-09-19 20:52:45 +00:00
Vojtech Bocek
a2e7016ee1 Never generate empty backup name
* 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>
2013-09-17 17:06:09 +02:00
Vojtech Bocek
05534209f1 Add TWFunc::Exec_Cmd() with no 'result' agrument
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
2013-09-12 15:36:40 +00:00
Dees Troy
b21cc64ca8 Pull ROM info from build.prop for backup names
Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
2013-09-12 09:11:13 -05:00
Vojtech Bocek
37aeb8d678 Really fix TWFunc::tw_chmod() for 3-character mode string
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I8f03d46235e1c71e8ee510309c9418cde802f50b
2013-08-29 21:35:02 -05:00
Dees_Troy
a7939bbdc8 Update SuperSU for 4.3 SELinux, 2.6.1.0
Change-Id: Ib7f882db8a8c61d1156c03468208205124132b6c
2013-08-30 01:53:54 +00:00
bigbiff bigbiff
616afed985 ignore lost+found in all the places 2013-08-28 15:06:18 +00:00
Vojtech Bocek
fafb0c541b Unify indentation and little clean-up in TWRP files
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-08-24 07:56:48 -05:00
Vojtech Bocek
00b260587c Fix TWFunc::tw_chmod() for 3-character mode string 2013-08-24 07:52:45 -05:00
Dees_Troy
29a0635b93 Revert "Rewrite TWFunc::Exec_Cmd() to use pipe() instead of popen()"
This reverts commit c5754cf935.
popen already uses fork and pipe and __popen works on more devices.
2013-08-24 07:42:48 -05:00
Vojtech Bocek
c5754cf935 Rewrite TWFunc::Exec_Cmd() to use pipe() instead of popen()
* popen causes crashes on some devices
2013-07-03 13:28:00 -05:00
Dees_Troy
83bd483f3d Support encrypted backup files
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
2013-06-22 16:16:55 -05:00
Dees_Troy
2673cec07a Move all AOSP code out of recovery binary
Improves license compatibility between GPL and Apache

Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
2013-04-04 18:57:34 +00:00
bigbiff bigbiff
cdcfee48b9 use md5.c for computation of md5sums
create a framework for computing digests and reading digests in TWRP
add space for backwards compatibility with bb md5sum
Change-Id: Ia18e3f430eed5eba22e5052d39b9b8d88ecd4536
2013-03-07 08:07:34 -05:00
jt1134
113ee73445 fixes for fakeflash zips
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
2013-02-27 18:50:44 +00:00
Dees_Troy
a4438784eb Fix compiling on CM7 2013-02-22 18:49:47 +00:00
Dees_Troy
6ef6635ad3 Check for root and root perms and offer to install/fix
Also fix sort order for file selector by date and file sizes

Change-Id: Idff9fe4232c19d4ed1082e78fabe6f921aa0a114
2013-02-21 18:23:43 +00:00
bigbiff bigbiff
8a68c31ffc This adds a 60 second screen timeout for TWRP. Might consider making this configurable in the future.
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
2013-02-13 13:16:03 -06:00
Dees_Troy
e34c133ec6 Add write buffer for tar writes
update fuse to 2.9.2

catch return from unlink so that we don't print error messages when things work
Change-Id: I1115039a0fa5d9d73f78ef1abd79755d7ffd9d96
2013-02-07 08:21:17 -05:00
Vojtech Bocek
2e97ec58b9 Use only std::string in TWFunc::Get_Folder_Size
* Fixes crash which could occur with too deep path because
  of too much memory allocated on stack
2013-02-02 13:22:42 +01:00
Dees_Troy
3f5c4e8dfe Fix fail over to vfat from exfat
Fix issues with MD5 checking using chdir and leaving the working
dir in a subfolder that prevented unmounting sometimes.

Change-Id: I01a563d722f474297ed3f7a30064c3a61748ade3
2013-02-01 16:56:34 +00:00
Dees_Troy
b05ddeedd3 exFAT improvements, fixes
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
2013-01-28 20:45:11 +00:00
Dees_Troy
3ee47bc2ab file manager updates for exFAT
Change-Id: I06fa6120a975cbc3d4eef9bc2ca034ec716740ee
2013-01-28 15:20:03 +00:00
bigbiff bigbiff
98f1f903cc Remove sockets and FIFOS when removing files 2013-01-19 18:46:13 -05:00
Dees_Troy
ce67546112 Fix wiping problems and save ecrypt key
Fix problems with the wiping of data/media devices
Save and restore the ecryptfs key for external sdcard on Samsung
encrypted devices.
2013-01-09 19:49:19 +00:00
bigbiff bigbiff
9c754053b0 Add libtar to TWRP instead of using busybox tar
Add proper mkdosfs tool
Add fuse to TWRP
Add experimental exfat-fuse to TWRP
Convert all system() functions to use new Exec_Cmd function
2013-01-09 09:09:08 -05:00
Dees_Troy
d9a9616195 Increase array size to fix crashes on some devices 2012-12-20 17:44:35 +00:00
Dees_Troy
01a9b7a7f8 Fix output of version number 2012-10-01 09:01:03 -04:00
Dees_Troy
f759675dc7 Fix compiler warnings 2012-09-28 13:21:36 -04:00
Dees_Troy
3477d7163e Save version number to storage 2012-09-27 15:44:01 -04:00
Dees_Troy
a58beade0a Port reboot functions to C++ 2012-09-27 09:50:56 -04:00
Dees_Troy
7c2dec8020 Add backup size checking
Converted bootloader.cpp to TWRP and removed AOSP fstab parsing
from startup
2012-09-26 09:50:10 -04:00
Dees_Troy
b46a684971 Unify portrait layouts again 2012-09-26 09:00:46 -04:00