Commit Graph

38 Commits

Author SHA1 Message Date
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
Dees_Troy
2a92358be3 Fix fstab and unmount problems
Fix a problem parsing some recovery.fstab files.
Fixed a problem with MD5 checking that prevented unmounting
after md5 checking.
2012-09-20 12:14:56 -04:00
Dees_Troy
8170a92145 Cleanup extra-functions 2012-09-18 15:44:39 -04:00
Dees_Troy
43d8b00770 Update backup and restore code, adb sideload
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.
2012-09-17 16:06:12 -04:00
Dees_Troy
38bd760b58 Add wipe functions, compiles in CM7, text shows in UI, zips install
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
2012-09-14 13:36:32 -04:00