Commit Graph

9577 Commits

Author SHA1 Message Date
Ethan Yonker 00028b4adb Add find file class to search for files
Scan a folder for a file based on file name. First scan the files
in the current path, then search real directories and finally
search symlinks in that order. Goal is to locate important sysfs
files for things like brightness, battery capacity, lun files, etc

This implementation just scans for the brightness file for the LCD

Change-Id: I8ed3e74a2e2851d58b443718b6e92b50a5491f08
2014-04-15 15:26:44 +02:00
Dees Troy 1eba56f577 Fix touch on Sprint HTC One m8
Change-Id: Ia9fba3be16a33b3cb0c4a3458398a2e60ba7f001
2014-04-15 15:26:14 +02:00
Sasha Levitskiy 346e11816d am ecf1f6c9: am 558f2700: Merge "Change filesystem add entry API call."
* commit 'ecf1f6c9299c0cae2f2bf1647f5d7d3a2690f819':
  Change filesystem add entry API call.
2014-04-12 00:02:32 +00:00
Sasha Levitskiy ecf1f6c929 am 558f2700: Merge "Change filesystem add entry API call."
* commit '558f2700e18d50cf8e798254200ef37f7a09678d':
  Change filesystem add entry API call.
2014-04-12 00:00:02 +00:00
Sasha Levitskiy 558f2700e1 Merge "Change filesystem add entry API call." 2014-04-11 23:54:14 +00:00
Sasha Levitskiy 85ef47dd84 Change filesystem add entry API call.
Needs fs_mgr matching change from: Icf23e659265d71d5226d527c2b40cfbc132320ee

Change-Id: I9adb470b04e4301989d128c9c3097b21b4dea431
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2014-04-11 21:13:26 +00:00
Dees Troy b1c6e05217 Only split archives when split_archives is set
In some cases, statfs used on partitions like /system does not
report a size that would trigger a split archive, but using stat
on the individual files shows a larger size that statfs that
would trigger a split. This patch prevents us from trying to split
an archive unless we explicitly decided to split in advance.

Change-Id: I67f5cd343f12333e1189100cf0ec1c20c15b7cc2
2014-04-07 18:03:34 +00:00
Dees Troy 9d72327cfc Rearrange opening of output and input files for error handling
If the file could not be opened, the process would log an error
to the log file but the GUI would report success. Rearrange the
process so that the GUI shows an error.

Change-Id: I96af0b934c8f6f463d56656647b16accd1d40654
2014-04-07 17:16:10 +00:00
Doug Zongker 9551cf9121 make density-specific recovery assets
Provide different recovery UI resources for different display
densities.  Right now only the text images and the progress bars are
rescaled; the main icon will get scaled when it's updated for QP.

Lightly quantum-ify the rest of the recovery interface.  (Light
background, progress bars, etc.)

Change-Id: Ia639c4ce8534b01bc843524efbc4b040c1cf38b3
2014-04-04 13:48:33 -07:00
Ethan Yonker 7af51ce521 Tweak OEM mode
Change-Id: Ic440e33fa22aa7b082097366f10b333cc945362a
2014-04-04 13:33:30 -05:00
Ethan Yonker 5c9336924f Add option to build TWRP with toolbox instead of busybox
Makes a smaller TWRP
Uses mksh for shell

Change-Id: If78d7745dda8919fcb2e9c9b60c6696063c14114
2014-04-04 11:28:14 -05:00
Ethan Yonker 83e82578af Allow building of an OEM friendly TWRP
Disable theming
Disable creating the TWRP folder for the settings file
Change factory reset on data/media devices to a full wipe

Change-Id: I3104282b5dd3f55dfff7c8cf39c72750af08563d
2014-04-04 10:59:52 -05:00
bigbiff bigbiff 26774a02f9 Stop printing Unable to mount to console if storage is removable. We will still print to
recovery.log

Change-Id: I19e3df2e977e09e222733f13324051334982b05d
2014-04-02 20:22:31 -04:00
Dees Troy b0425385b1 Fix overlay graphics detection
Change-Id: Ic1ef3f6a4e9c74efb07d8a0103543d124567f0d4
2014-04-03 00:10:03 +00:00
Ethan Yonker 924a80b7b3 Fix backup and restore of encrypted backups
After removing the DataManager code to support twrpTar separate
binary we were failing to pass / set the password for the various
separate threads used for openaes.

Change-Id: Ifff634777fe122e0195d84f67932177ca8879c2f
2014-04-02 10:54:18 -05:00
Dees Troy a54f876261 Merge "Refresh page after updating partition sizes" into android-4.4 2014-04-02 16:06:06 +02:00
Dees Troy 7ad80ecd0c Merge "Convert 1600x2560 ui.xml to unix line endings" into android-4.4 2014-04-02 16:05:21 +02:00
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 cd8169c164 Refresh page after updating partition sizes
Some (all?) devices do not update the partition size displayed on the
backup screen when selecting "Refresh Sizes". Refresh the page after
recalculating sizes.

Change-Id: Id34da6c738f86501f73cbd7874f6921d1cda32c4
2014-04-02 04:33:20 -05:00
Matt Mower 05aa1352b8 Convert 1600x2560 ui.xml to unix line endings
Change-Id: I98dd6b25cbb1616f6032e9dcb4174461add53498
2014-04-02 04:33:20 -05: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
Doug Zongker 8d9d3d5cbe add reboot-to-bootloader and power down options to recovery menu
Useful when debugging or developing for recovery.

Change-Id: Ic3ab42d5e848ad3488f1c575339b55e45c8a024b
2014-04-01 13:20:23 -07:00
Dees Troy 3a746d607e Merge "Remove deprecated tar exclude functionality" into android-4.4 2014-04-01 20:55:40 +02:00
Dees Troy 5a05f47b20 Merge "if md5 check is not selected for subpartitions, don't check it." into android-4.4 2014-04-01 20:47:07 +02:00
Dees Troy 1ce5e3369b Merge "Fix /data backup size if contains media subdirs" into android-4.4 2014-04-01 20:46:15 +02:00
Dees Troy 3d37eaed9d Merge "Allow disabling legacy properties" into android-4.4 2014-04-01 20:37:14 +02:00
Dees Troy 90a203fa93 Merge "Cleanup DU Get_Folder_Size function" into android-4.4 2014-04-01 20:36:37 +02:00
Dees Troy 2ea342a55a Merge "correctly mount tmpfs as /tmp in recovery" into android-4.4 2014-04-01 20:30:49 +02:00
Dees Troy a7a366e4d4 Merge "Add basic error checking to legacy property init" into android-4.4 2014-04-01 20:30:03 +02:00
Doug Zongker 02abde5085 remove DefaultDevice's UI subclass
RecoveryUI (which is the superclass of ScreenRecoveryUI), provides a
basic CheckKey method that is useful for devices that have KEY_POWER,
KEY_VOLUMEUP, and KEY_VOLUMEDOWN.  Stop overriding it with a less
featureful method; with this no recovery UI customization is needed
for most handheld devices (phones, tablets, etc.).

Change-Id: I7d57cfaaef79afea8af4fc3dbc570afc61aeb5bc
2014-04-01 09:47:36 -07:00
Ethan Yonker 4ee5ad751f Support Qualcomm overlay graphics in recovery
Change-Id: Ia75c34ab1a45b7c8802c902906198517aa3437d5
2014-04-01 11:13:58 -05:00
Ethan Yonker 47360be11c Improve USB Storage handling
Change-Id: I5743d9b967a8227c4bb87da01a9c67c574bf9876
2014-04-01 10:43:59 -05:00
Matt Mower bb81e5d02d Remove deprecated tar exclude functionality
twrpDU::check_skip_dirs() handles skipped folders now. Everywhere
twrpTar::setexcl() is being used to exclude files eventually calls
createTarFork(), which in turn calls Generate_TarList(), which checks
check_skip_dirs().

Change-Id: Ibbc4eb2eb89863ccb2a15f5a3b5092fb10fcbcc0
2014-03-31 16:10:28 -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
Matt Mower f77994d270 Fix /data backup size if contains media subdirs
/data/*/media directories are mistakenly being excluded from the size
calculation. Change to absolute dir exclude so that only /data/media is
excluded.

Change-Id: I6e97604d44e6ea2bdf7dfd8c68a2f90ba6d44415
2014-03-30 14:27:28 -04:00
Doug Zongker 55d654207a correctly mount tmpfs as /tmp in recovery
The syntax of init's mount command changed in April 2008 but
recovery's init.rc was never updated, so recovery's /tmp has been on
the root fs all this time.  Fix.

Also add /system/bin to the PATH in recovery, which is handy for
debugging.

Change-Id: I9e60d18803906bc75c263f12c8863cfd6a14147b
2014-03-27 16:19:41 -05:00
Matt Mower 2f1b2ab223 Cleanup DU Get_Folder_Size function
Change-Id: I3c686c7c3a171f130d299fae586dc811cad0d3a9
2014-03-27 16:19:09 -05:00
Matt Mower 6883d73d0d Allow disabling legacy properties
Introduce TW_NO_LEGACY_PROPS flag for users that build TWRP in
non-kitkat trees and don't need the legacy prop environment.

Change-Id: Iacb2d9af7d7069acb3d0a96bb34f32ded6317a20
2014-03-27 16:14:59 -05:00
Matt Mower cdd3b339fc Add basic error checking to legacy property init
Let init and rename funcitons return success or failure values.

Change-Id: Ieed86cac8a0dcfd770a89dacc57fd306e7a6ad8d
2014-03-27 16:12:40 -05:00
bigbiff bigbiff 1131cffb36 add 1600x2560 to TWRP. Thanks to nrage123 and Gunthermic for creating
the theme.

Change-Id: If633af291689b2ac686c41331bb9adac34c425ad
2014-03-23 20:03:54 -04:00
Paul Lawrence 276f37e4d4 Merge "Fix build break caused by vold change" 2014-03-21 20:11:09 +00:00
Doug Zongker 3e1cadc8f5 am 03008bc1: am aa4545b5: Merge "restore minui support for paletted images with < 8 bits"
* commit '03008bc1e89a780e382abe0567e709daecce92ff':
  restore minui support for paletted images with < 8 bits
2014-03-20 21:05:12 +00:00
Doug Zongker 03008bc1e8 am aa4545b5: Merge "restore minui support for paletted images with < 8 bits"
* commit 'aa4545b5aedae165c8d2db0009dcdfa18e4f7923':
  restore minui support for paletted images with < 8 bits
2014-03-20 16:31:33 +00:00
Doug Zongker 25c2b2f670 am aa4545b5: Merge "restore minui support for paletted images with < 8 bits"
* commit 'aa4545b5aedae165c8d2db0009dcdfa18e4f7923':
  restore minui support for paletted images with < 8 bits
2014-03-20 16:31:14 +00:00
Doug Zongker aa4545b5ae Merge "restore minui support for paletted images with < 8 bits" 2014-03-20 15:28:32 +00:00
Doug Zongker 577a130435 restore minui support for paletted images with < 8 bits
The PNG image loaders should support images that use palettes
requiring fewer than 8 bits.

Change-Id: Ibcb0ff6f04aea8de54b03c0efa7a79e9b3635146
2014-03-20 08:27:01 -07:00
Mark Salyzyn 2605dec597 recovery: 64 bit build issues
Change-Id: Ie88c49dea13cce5f4eb428e97f5a0956f2656a30
2014-03-19 15:30:25 -07: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
Doug Zongker b07b3d15b9 am 03002477: am bacf9b45: add --shutdown_after option to recovery
* commit '0300247758cf1965867128c79d94e0b2c38a69aa':
  add --shutdown_after option to recovery
2014-03-18 20:53:01 +00:00