Commit Graph

83 Commits

Author SHA1 Message Date
Dees Troy
e65e35cc37 Merge "Fix display of .android_secure size in Backup" into android-4.4 2014-04-02 16:05:02 +02:00
Ethan Yonker
74a149bfcb Merge changes Ia75c34ab,I5743d9b9 into android-4.4
* changes:
  Support Qualcomm overlay graphics in recovery
  Improve USB Storage handling
2014-04-02 16:04:02 +02:00
Matt Mower
ed426904e6 Fix display of .android_secure size in Backup
Setup_Settings_Storage_Partition() needs to be called before
Update_System_Details() in order for the /and-sec mount point to be
setup and size read correctly.

Change-Id: Id5394c90b6d095027c1b852764676dc6080a871d
2014-04-02 00:28:30 -05:00
Ethan Yonker
47360be11c Improve USB Storage handling
Change-Id: I5743d9b967a8227c4bb87da01a9c67c574bf9876
2014-04-01 10:43:59 -05:00
bigbiff bigbiff
0733881369 if md5 check is not selected for subpartitions, don't check it.
Change-Id: I7248c75f17c6f82e098831c297c0662ef6ea289f
2014-03-30 14:56:41 -04:00
Dees Troy
02a6453b75 Re-arrange handling of settings storage partition
Sometimes we received an error about being unable to locate
storage partition because the DataManager would attempt to access
the PartitionManager before we finished adding the storage
partitions to the vector.

Change-Id: I0ce1778938d308b1eb17de46a192ecd52489cad3
2014-03-19 15:24:01 +00:00
Ethan Yonker
c05c598b73 Improve handling of settings storage and android secure
Change-Id: I8af92543c2f0c201e7220267c417d74e4561038d
2014-03-13 09:19:56 -05:00
Dees Troy
4159aedfaa Restore capabilities to run-as binary
Change-Id: I9e2b8e9b69c94b94c57143c04b950530490ec33e
2014-02-28 17:59:04 +00:00
Ethan Yonker
71413f4ee9 Check crypto footer before offering to decrypt
Verify that we have a valid footer with proper magic before
setting things up for decryption to help prevent user confusion
when dealing with data partitions that fail to mount. Also check
to make sure that the block device for /data is present.

Change-Id: Ie87818fe4505a8bf71df7d3934c114e7328ef3ca
2014-02-26 13:37:35 -06:00
bigbiff bigbiff
f08ada8483 Allow recovery to be restored if backup=1 flag is present in recovery.fstab
Change-Id: I426c8da8ae586004011ec4a103e1d7a1f23b3599
2014-02-12 17:30:51 +01:00
Ethan Yonker
d4d107388c Improve android secure handling
Change-Id: I9e1c7f4a8353b7be51e1a54bf5d506c9dce70da2
2014-02-03 15:27:52 -06:00
Dees Troy
6f6441da58 Fix include of cutils
Change-Id: I9868298908ce501d3043326862057e8a637544af
2014-01-23 02:07:03 +00:00
Dees Troy
a6a26429f6 Merge changes I4c369222,I8a8ad4b3 into android-4.4
* changes:
  Enable UMS mounting of storage drives
  Set listener properties for UMS mount/unmount
2014-01-21 15:58:42 +01:00
Dees Troy
98fb46c6e2 Fix handling of storage after decryption
Change-Id: I0c2614f841a225699be9d4a52c60e9456241659b
2014-01-21 15:39:45 +01:00
Matt Mower
d9cb90660a Set listener properties for UMS mount/unmount
Some kernels require the usb functions be defined before UMS mounting
of storage partitions will work. This sets the sys.storage.ums_enabled
property upon mount/unmount which can be listened for in init.rc.

Example routines to include in init.rc:

on property:sys.storage.ums_enabled=1
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/functions adb,mass_storage
    write /sys/class/android_usb/android0/enable 1

on property:sys.storage.ums_enabled=0
    write /sys/class/android_usb/android0/enable 0
    write /sys/class/android_usb/android0/functions adb
    write /sys/class/android_usb/android0/enable ${service.adb.root}

Change-Id: I8a8ad4b392abbaa173d402714bcb4049ba84ccca
2014-01-20 20:13:48 -05: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
Hashcode
62bd9e04c7 add support for fsflags= option in twrp.fstab file
example userdata line (as needed by MotoX):
/data         f2fs      /dev/block/platform/msm_sdcc.1/by-name/userdata       flags=fsflags="inline_xattr"

Code for parsing flags/options originally based on AOSP fs_mgr sources.

Change-Id: I5fb2b5d5cdd08137e6bf71f0085a3f8aebd889a8
2013-12-19 17:04:02 +00:00
Dees Troy
3be70a897e Update licenses to all match 2013-10-22 14:25:12 +00:00
bigbiff bigbiff
c49d706903 fix getting and setting contexts in selinux
recreate lost+found with selinux contexts

Change-Id: I19e8696d47319dfb641520956c8a27c2a796a0c3
2013-10-17 16:49:49 +00: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
Hashcode
dabfd49bd4 implement "usermrf" fstab flag to force rm -rf * deletion on specific partitions
Change-Id: I58f4a8cedf31e6b6efd88f96a43ed525603ae311
2013-08-30 10:28:15 -07: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
Dees_Troy
066eb30abf Fix AOSP decrypt when TouchWiz code is present 2013-08-23 17:22:37 +00:00
Dees_Troy
2727b99f55 Fix problem with not waiting for pigz to exit
In some cases compressed backups would not wait for pigz to finish
leading to backup files that were 0 bytes or MD5 mismatches.
2013-08-14 20:09:34 +00:00
Dees_Troy
d93bda5916 2.6.0.0
Also copy recovery.fstab to cache and create a storage.fstab in
cache for app/apk use.
2013-07-03 19:55:35 +00:00
Dees_Troy
59df9264e3 Fix backup of datadata
Change-Id: Ib0098542599283787592ba08caa070dc818d6111
2013-07-01 20:48:43 +00:00
Dees_Troy
74fb2e94d5 Fix some issues with wipe partition list
Change-Id: Ie7d5878faf86b8fa824b72211be7fd3596b471d7
2013-07-01 20:20:58 +00: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
9e0b71c6ad Improve backup list results 2013-04-08 13:35:37 +00:00
Dees_Troy
91862e618e Fix handling of subpartitions 2013-04-04 23:48:21 +00: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
Dees_Troy
a13d74fc95 Add partition list GUI element
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
2013-03-30 08:56:39 -05:00
bigbiff bigbiff
65a4c73b1e trying to fix md5
Change-Id: I4ec037f76aa965bc818afe924942adbe9a080b36
2013-03-17 14:40:20 -04: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
ChampionSwimmer
cf33e4dbcd support devices without bootpartition
if device has no /boot partition, then add the following flag in BoardConfig.mk

TW_HAS_NO_BOOT_PARTITION

Signed-off-by: ChampionSwimmer <android@championswimmer.tk>

Change-Id: I92b36b2e6ca690e2422b36004ae9bb315d24a7c2
2013-02-19 18:20:45 +00:00
bigbiff bigbiff
2c57d789df convert file_bps to be unsigned long long
Change-Id: Ib5d9ca8f9a2a4e27d9798665b312376a7d9c571c
2013-02-19 18:08:03 +00: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
6a042c8443 Disable USB Mass Storage if the USB lun file does not exist.
Change-Id: I185edb4538fa84c17fc2b9a803557bb7a622f880
2013-01-24 19:45:54 +00:00
Dees_Troy
d4b22b0f4f Move backup folder creation to after free space calc
Also fix free space calculation
2013-01-18 17:20:18 +00:00
Dees_Troy
dc8bc1b28a ORS engine fixes
Fix backup to not error when a non-existant partition is given.
Fix restore to run when no partition parameters are given.
Ensure that ORS runs after decryption and that zips install.
Fix a problem with the fake internal sdcard not mounting to
/sdcard on data media devices.
2013-01-17 15:53:49 +00:00
Dees_Troy
16c2b31827 Add flag for retaining layout version
Needed on Sony mint (Xperia T) as the /data/media folder is a
separate partition and normal data media wiping is not appropriate
for this device but the layout version file needs to be retained
for Android 4.2 multi-user.
2013-01-15 16:52:41 +00:00
Dees_Troy
999b39d041 Check to ensure that external is encrypted 2013-01-14 15:36:13 +00:00
Dees_Troy
c8bafa1cc1 More Samsung sdcard crypto fixes 2013-01-10 15:43:00 +00:00
Dees_Troy
20c02c0953 Fix ifdefs for Samsung encryption 2013-01-10 14:15:01 +00:00
Dees_Troy
85f44ed751 Improve remounting sdcard with ecryptfs 2013-01-09 18:44:25 +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
a3955269
6ff55cefd0 Add Samsung TouchWiz decryption
Change-Id: I418680e59372160dabfe3e2d5f0208229aa151ae
2013-01-08 20:09:56 +00:00
Gary Peck
82599a87ee Improve handling of undecrypted encrypted /data
- Until the encrypted partition is decrypted, treat it as a disk image
  instead of a filesystem so that it is properly backed up using dd.
- Make Partition::Wipe() use the filesystem from fstab for disk images
  so that wiping an undecrypted /data makes it a plain unencrypted
  partition again.

Change-Id: I78db977d6348cfa66b0cfbc492fb5776f84db48d
2012-12-21 06:59:41 -08:00
Dees_Troy
68cab49d96 Add ignore blkid flag for Transformers
Change-Id: I8f2b5b68a8c3ede74858d53002efab997174ee65
2012-12-12 19:29:35 +00:00