summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add lollipop decrypt supportEthan Yonker2014-11-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Kang in cryptfs.c and cryptfs.h from vold. Use TW_INCLUDE_L_CRYPTO := true to enable. Ramdisk must contain the normal fstab file in the root in the usual format of: fstab.{ro.hardware} For examble for Nexus 5: fstab.hammerhead Or on many Qualcomm devices: fstab.qcom Tested against Android 5.0 lollipop on Nexus 7 2012 grouper. Not sure if or how this will work when we are dealing with a device with a hardware keystore. Long term we need to add a GUI element to allow entering a pattern. For now you can decrypt a pattern unlock by converting the dots to numbers in the following format: 123 456 789 So an upper-case L would translate to 14789 as a password entered on the keyboard. Change-Id: I02c29e1f1c2eb29bf002c9fe0fc118357300b5b3
* Fix USB Mass Storage on some devicesEthan Yonker2014-11-041-1/+3
| | | | | | | | On some devices we need to set the sys.storage.ums_enabled property before we write to the lun file. Also sleep for a bit after setting the propery before writing to the lun file. Change-Id: I77ac853fde14ffc3adf20571c132f91ed85196df
* add "done" after "Updating partition details..."that2014-11-041-0/+1
| | | | | | | | | | | This addresses a usability problem. Some users are confused when they switch to the console and see this message, thinking they have to wait. Examples: http://forum.xda-developers.com/showthread.php?t=2498492 http://androidforums.com/verizon-galaxy-s3-all-things-root/718376-twrp-recovery-update-question.html Change-Id: Ib44773998c2ef1b8b821f3b8876218e11a7de357
* partitionmanager: remove unused By_Block and By_Name methodsthat2014-11-041-253/+0
| | | | Change-Id: Ia6eefd23f6671428221e35642f01534bc9fff6ad
* performance profile supportTom Hite2014-10-081-5/+21
| | | | | | | | | | | 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
* mtp: cleanup, fixes and performance improvementsthat2014-10-081-7/+6
| | | | | | | | | | | - use std::map instead of linked list - read directories on demand - fix writing zip files to storage root - fix creating directories - lots of minor fixes - simplify generation of storage IDs and make them spec compliant Change-Id: I2137c27549ddbdc58466f2e3aeda464fac70a3c5
* Attempt to automatically identify data/media devicesEthan Yonker2014-09-201-10/+21
| | | | Change-Id: Ia3007fbced9ce3bc94efdb3dacc582a5e68a49a4
* Additional checks to prevent partitioning internal storageEthan Yonker2014-09-151-1/+1
| | | | Change-Id: I9fcd7e0169fbdd52405c0c86aafbef091f69411e
* Fix handling of MTP fork/child processEthan Yonker2014-09-111-1/+6
| | | | Change-Id: Iacd8a38d21e9c8b0dfafefbeb646f46cd3ba02a1
* MTP: Use fork instead of pthreadEthan Yonker2014-09-051-7/+12
| | | | Change-Id: I95cf6f4def0c86f40c775738f0712323f0a0f146
* Allow toggle of MTP debugEthan Yonker2014-09-031-1/+4
| | | | | | | | | | Via command line in TWRP: twrp set tw_mtp_debug 1 This will enable debugging for MTP. You will need to disable and re-enable MTP in order to see the debug logging. Change-Id: Ia7bb0c584e10a4322b65ecf80a67ed7ee836b38e
* add mtp responder to TWRP.bigbiff bigbiff2014-09-031-11/+104
| | | | | | Big thanks to Dees_Troy for helping with the implementation. Change-Id: I6c9c522b9c9de5dc139e2ecb0141008182ba07f0
* Track backup and restore progressEthan Yonker2014-07-091-9/+26
| | | | | | | | 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
* Color in the consoleEthan Yonker2014-07-091-2/+2
| | | | | | | | Allow each gui_print command to specify a color Change LOGERR to use the error color Theme should specify colors for error, warning, and highlight Change-Id: Ie8ece34111f604e25fcb79e5b731cd4e61038ff9
* Whitespace and minor code cleanupMatt Mower2014-06-041-16/+16
| | | | | | 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/+135
| | | | Change-Id: I9043e98e1e1ed4722f05c13a60b43d2d0bf739f6
* Fix crash while loading config due to incorrect tw_storage_pathVojtech Bocek2014-05-311-0/+16
| | | | | Change-Id: Ia5957efe616defa4272501cd8f31d26d394077bb Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix multiple lun file USB mountingMatt Mower2014-05-311-2/+2
| | | | | | | Both the incorrect mount point and the incorrect lun file were being passed as the second storage volume. Change-Id: If9c7d92d1992ec022a2c89a82b2ea05c9150d635
* Only setup settings,andsec partitions if availableMatt Mower2014-04-161-4/+7
| | | | Change-Id: Iafedcec9e6ba368e29e32ab7a92d774cdd3f64e1
* Support alternative .android_secure locationMatt Mower2014-04-161-3/+20
| | | | | | | | | | | | | | | | Some devices (jewel, m8) have .android_secure at a non-standard location. Allow a different partition to be specified as the home of .android_secure using the fstab flag 'andsec'. Using the /data/media variant of jewel as an example, recovery.fstab or twrp.fstab could be edited like follows: /external_sd vfat /dev/block/mmcblk1p1 flags=display="MicroSD";andsec Note, this is NOT a method to move .android_secure in your ROM. Your ROM must already write to this alternative location. Change-Id: I3a6e4e63aaddb35870b79e80938b0f9c2c902443
* Merge "Fix display of .android_secure size in Backup" into android-4.4Dees Troy2014-04-021-1/+1
|\
| * Fix display of .android_secure size in BackupMatt Mower2014-04-021-1/+1
| | | | | | | | | | | | | | | | 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
* | Merge changes Ia75c34ab,I5743d9b9 into android-4.4Ethan Yonker2014-04-021-30/+61
|\ \ | |/ |/| | | | | | | * changes: Support Qualcomm overlay graphics in recovery Improve USB Storage handling
| * Improve USB Storage handlingEthan Yonker2014-04-011-30/+61
| | | | | | | | Change-Id: I5743d9b967a8227c4bb87da01a9c67c574bf9876
* | if md5 check is not selected for subpartitions, don't check it.bigbiff bigbiff2014-03-301-1/+1
|/ | | | Change-Id: I7248c75f17c6f82e098831c297c0662ef6ea289f
* Re-arrange handling of settings storage partitionDees Troy2014-03-191-7/+7
| | | | | | | | | 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
* Improve handling of settings storage and android secureEthan Yonker2014-03-131-13/+12
| | | | Change-Id: I8af92543c2f0c201e7220267c417d74e4561038d
* Restore capabilities to run-as binaryDees Troy2014-02-281-1/+1
| | | | Change-Id: I9e2b8e9b69c94b94c57143c04b950530490ec33e
* Check crypto footer before offering to decryptEthan Yonker2014-02-261-3/+3
| | | | | | | | | 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
* Allow recovery to be restored if backup=1 flag is present in recovery.fstabbigbiff bigbiff2014-02-121-1/+1
| | | | Change-Id: I426c8da8ae586004011ec4a103e1d7a1f23b3599
* Improve android secure handlingEthan Yonker2014-02-031-0/+3
| | | | Change-Id: I9e1c7f4a8353b7be51e1a54bf5d506c9dce70da2
* Fix include of cutilsDees Troy2014-01-231-1/+4
| | | | Change-Id: I9868298908ce501d3043326862057e8a637544af
* Merge changes I4c369222,I8a8ad4b3 into android-4.4Dees Troy2014-01-211-0/+2
|\ | | | | | | | | | | * changes: Enable UMS mounting of storage drives Set listener properties for UMS mount/unmount
| * Set listener properties for UMS mount/unmountMatt Mower2014-01-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix handling of storage after decryptionDees Troy2014-01-211-2/+1
|/ | | | Change-Id: I0c2614f841a225699be9d4a52c60e9456241659b
* 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-1/+5
| | | | | | Moved Get_Folder_Size to this new class. Change-Id: If0a0220f900eb109581f2eeaf7b76e3f7d6886f1
* add support for fsflags= option in twrp.fstab fileHashcode2013-12-191-0/+2
| | | | | | | | | 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
* Update licenses to all matchDees Troy2013-10-221-21/+17
|
* fix getting and setting contexts in selinuxbigbiff bigbiff2013-10-171-1/+0
| | | | | | recreate lost+found with selinux contexts Change-Id: I19e8696d47319dfb641520956c8a27c2a796a0c3
* Add TWFunc::Exec_Cmd() with no 'result' agrumentVojtech Bocek2013-09-121-7/+7
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
* Pull ROM info from build.prop for backup namesDees Troy2013-09-121-4/+5
| | | | Change-Id: I7847fca22b5d4f0a35da41625b15bd677a1e9768
* implement "usermrf" fstab flag to force rm -rf * deletion on specific partitionsHashcode2013-08-301-0/+2
| | | | Change-Id: I58f4a8cedf31e6b6efd88f96a43ed525603ae311
* Unify indentation and little clean-up in TWRP filesVojtech Bocek2013-08-241-8/+8
| | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix AOSP decrypt when TouchWiz code is presentDees_Troy2013-08-231-0/+1
|
* Fix problem with not waiting for pigz to exitDees_Troy2013-08-141-0/+2
| | | | | In some cases compressed backups would not wait for pigz to finish leading to backup files that were 0 bytes or MD5 mismatches.
* 2.6.0.0Dees_Troy2013-07-031-1/+23
| | | | | Also copy recovery.fstab to cache and create a storage.fstab in cache for app/apk use.
* Fix backup of datadataDees_Troy2013-07-011-3/+4
| | | | Change-Id: Ib0098542599283787592ba08caa070dc818d6111
* Fix some issues with wipe partition listDees_Troy2013-07-011-0/+11
| | | | Change-Id: Ie7d5878faf86b8fa824b72211be7fd3596b471d7
* Support encrypted backup filesDees_Troy2013-06-221-12/+30
| | | | | | | | | | | | | | | 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
* Improve backup list resultsDees_Troy2013-04-081-3/+13
|
* Fix handling of subpartitionsDees_Troy2013-04-051-8/+8
|
* Move all AOSP code out of recovery binaryDees_Troy2013-04-041-163/+140
| | | | | | Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
* Add partition list GUI elementDees_Troy2013-03-301-390/+249
| | | | | | | | | | | | 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
* trying to fix md5bigbiff bigbiff2013-03-171-5/+1
| | | | Change-Id: I4ec037f76aa965bc818afe924942adbe9a080b36
* use md5.c for computation of md5sumsbigbiff bigbiff2013-03-071-13/+24
| | | | | | create a framework for computing digests and reading digests in TWRP add space for backwards compatibility with bb md5sum Change-Id: Ia18e3f430eed5eba22e5052d39b9b8d88ecd4536
* support devices without bootpartitionChampionSwimmer2013-02-191-0/+4
| | | | | | | | | | 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
* convert file_bps to be unsigned long longbigbiff bigbiff2013-02-191-5/+8
| | | | Change-Id: Ib5d9ca8f9a2a4e27d9798665b312376a7d9c571c
* Fix fail over to vfat from exfatDees_Troy2013-02-011-5/+5
| | | | | | | Fix issues with MD5 checking using chdir and leaving the working dir in a subfolder that prevented unmounting sometimes. Change-Id: I01a563d722f474297ed3f7a30064c3a61748ade3
* Disable USB Mass Storage if the USB lun file does not exist.Dees_Troy2013-01-241-4/+0
| | | | Change-Id: I185edb4538fa84c17fc2b9a803557bb7a622f880
* Move backup folder creation to after free space calcDees_Troy2013-01-181-8/+8
| | | | Also fix free space calculation
* ORS engine fixesDees_Troy2013-01-171-28/+29
| | | | | | | | 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.
* Add flag for retaining layout versionDees_Troy2013-01-151-0/+2
| | | | | | | 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.
* Check to ensure that external is encryptedDees_Troy2013-01-141-0/+7
|
* More Samsung sdcard crypto fixesDees_Troy2013-01-101-1/+1
|
* Fix ifdefs for Samsung encryptionDees_Troy2013-01-101-0/+4
|
* Improve remounting sdcard with ecryptfsDees_Troy2013-01-091-5/+12
|
* Add libtar to TWRP instead of using busybox tarbigbiff bigbiff2013-01-091-31/+42
| | | | | | | Add proper mkdosfs tool Add fuse to TWRP Add experimental exfat-fuse to TWRP Convert all system() functions to use new Exec_Cmd function
* Add Samsung TouchWiz decryptiona39552692013-01-081-1/+52
| | | | Change-Id: I418680e59372160dabfe3e2d5f0208229aa151ae
* Improve handling of undecrypted encrypted /dataGary Peck2012-12-211-0/+3
| | | | | | | | | | - 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
* Add ignore blkid flag for TransformersDees_Troy2012-12-121-0/+2
| | | | Change-Id: I8f2b5b68a8c3ede74858d53002efab997174ee65
* print partition details independent of whether its mountableGary Peck2012-11-221-61/+61
| | | | Change-Id: Ibbc3bf3d3264fb9852f8312ece0567950aace496
* Fixes for multi-user in 4.2Dees_Troy2012-11-151-0/+9
| | | | | | Also fixed inability to delete backups with a space in the name. Change-Id: I2f6639d33caa3c4542960f76adbd59b25ab64f5d
* Unmount main partitions after fixing permissionsDees_Troy2012-10-201-0/+1
|
* Update and improve USB storage codeDees_Troy2012-10-151-82/+39
|
* Handle single lun file for USB storageDees_Troy2012-10-141-34/+60
|
* Fix problem with sizes of images after reset defaultDees_Troy2012-10-131-0/+37
|
* Unmount main partitions after USB storage disableDees_Troy2012-10-121-0/+1
|
* Unmount system after boot, backup, and restoreDees_Troy2012-10-121-0/+19
|
* redo fix permissions in c++ for faster changesbigbiff bigbiff2012-10-101-1/+18
|
* Update sdcard partitioning to C++Dees_Troy2012-09-271-0/+144
|
* Port backup name checking to Partition ManagerDees_Troy2012-09-271-1/+53
|
* Handle mountable boot partitionsDees_Troy2012-09-271-1/+9
|
* Add option to wipe android secureDees_Troy2012-09-261-0/+20
|
* Fix permissions updatesDees_Troy2012-09-261-13/+0
| | | | | Also redirect stderr output on terminal commands for display in GUI console
* Fix problems with MTD devicesDees_Troy2012-09-261-2/+5
| | | | Also improve handling of MTD names
* Unify portrait layouts againDees_Troy2012-09-261-0/+3
|
* Fix skip MD5 setting during backupDees_Troy2012-09-241-4/+6
|
* Add progress bar support to backup and restoreDees_Troy2012-09-211-25/+89
|
* Fix special partition handlingDees_Troy2012-09-211-17/+38
|
* Add android_secure supportDees_Troy2012-09-211-20/+35
|
* Various fixesDees_Troy2012-09-201-3/+1
| | | | | | Modify AOSP mount and wipe functions to use Partition Manager. Update wipe code to reset the log file index when wiping cache. Add ADB sideload to 540x960 theme.
* Fix fstab and unmount problemsDees_Troy2012-09-201-1/+5
| | | | | | Fix a problem parsing some recovery.fstab files. Fixed a problem with MD5 checking that prevented unmounting after md5 checking.
* Add and improve OpenRecoveryScript supportDees_Troy2012-09-201-0/+9
| | | | | Improve zip finding in ORS engine Add support for restoring with just a backup name
* Cleanup extra-functionsDees_Troy2012-09-181-20/+287
|
* Improve backup and restoreDees_Troy2012-09-181-177/+160
| | | | Add in archive splitting support
* Update backup and restore code, adb sideloadDees_Troy2012-09-171-22/+449
| | | | | | | 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-30/+126
| | | | | | | | 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-2/+2
| | | | | | | 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-4/+4
|
* More Partition Manager functionalityDees_Troy2012-09-101-13/+277
|
* Improve storage size code, mount, unmountDees_Troy2012-09-101-50/+192
| | | | Add flag parsing from recovery.fstab
* Add processing of fstab, mounting, and decryptDees_Troy2012-09-071-16/+190
|
* TWRP-ify AOSP codeDees_Troy2012-09-051-0/+147
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