Commit Graph

475 Commits

Author SHA1 Message Date
bigbiff bigbiff
56cf564658 twrpDigest refactor
This patch is to refactor twrpDigest using polymorphism
and inheritance to use the same call patterns for creating and
reading a digest. Now a library.
Use SHA2 from libcrypto. SHA2 is default if device has libcrypto.

Change string MD5 everywhere to use digest or Digest instead. Updated
string tags to digest. Translation will be required.

Switch out digest code into a driver class from partitionmanager.

SHA2 is better for digest creation due to decreased collision space
compared to MD5 and SHA1.

See https://en.wikipedia.org/wiki/SHA-2

Change-Id: I74b5546789990b12aa4ce2e389d25f80a3fe213f
2017-06-17 07:05:45 -05:00
that
0d0d522b88 gui: fix line wrapping in terminal, issue #876
Apparently we are supposed to delay going to the next line until the next
character is printed.

Change-Id: I5cd0cc128cc00dcdd0dd2dd9508281f1249db257
2017-05-15 15:14:32 -05:00
Ethan Yonker
0afc1fdc48 Fix reboot when no OS is present
Change-Id: Idc3d3c79b8a7acf0f632ed39703766005d73de29
2017-05-12 16:21:54 +02:00
nkk71
201d4b21bc vold_decrypt: Add back missing xml and get rid of compiler warning
Change-Id: I883112e2618f560e96002e2076e2735cc20cfac3
2017-03-06 21:39:10 +01:00
Ethan Yonker
64c5c0a9ba Add TWRP app install to landscape and watch themes
Change-Id: Id48245218dc3ee3c6506521ce0134e6a579b6f4a
2017-03-06 12:42:54 -06:00
that
a9dd9f0374 gui: preserve order of gui_print vs gui_msg
- rename __gui_print to internal_gui_print (__* is reserved for compiler)
- translate outstanding messages in internal_gui_print
- add locking because background thread could print while we render
- minor cleanup

Change-Id: Ib687d2cfb4763ad08ad4d4b76daf5b129d61d2e2
2017-03-01 22:38:25 +01:00
big biff
ced41a4a55 Merge "Update Hungarian localization" into android-7.1 2017-03-01 01:09:44 +01:00
kaneawk
c42cb2e6ca languages: update chinese translation
Change-Id: I48ac4bfe55cfd4ee7805b86f5af31e915dfaaaa7
2017-03-01 02:38:13 +08:00
Wechy77
9bb12a6761 Update Hungarian localization
Change-Id: I13c1b6be4e1f7dcd026bfaa03d0c097200d498ba
2017-02-25 21:43:08 +01:00
SevenMaxs
c7a2f934b5 Update Russian localization
Added new strings (Scripts language_helper.py and compare_xml.py were used).

Change-Id: Id6f220d17e748cd10ff8ff8b21c2e40d84be5ec9
2017-02-21 11:12:50 +03:00
Matt Mower
0c00571d49 GUI: Fix typo in warning message
Change-Id: I991ad86a453273139bcafbb9f68898631dfb6b51
2017-02-16 17:07:43 +01:00
z31s1g
d1d3cb6ef0 DE language update
Change-Id: I20b8e99bf011e8f3894f20fef1a5d46cca4cd3b6
2017-02-12 16:51:50 +01:00
big biff
116f6700e3 Merge "languages: update italian translation" into android-7.1 2017-02-10 17:36:40 +01:00
Stefano Gottardo
650d29f8c4 languages: update italian translation
Change-Id: I03c194ccf270ef9dfb910626741d6be76945df05
2017-02-10 14:23:13 +01:00
SevenMaxs
5cec2d8b77 Update ru.xml for TWRP ver. 3.0.3.0
Added new strings and minor fix for Russian localization.

Change-Id: I696b9088813a543e5b05366552a6630828dd12df
2017-02-10 13:32:20 +01:00
Ethan Yonker
01f4e035aa Improve backup display names with emulated storage
-Change backup display name to say that we are excluding storage
-Add warning message during backup of any partition with data media
-Also eliminate unused variable from twrpTar class

Maybe this will make the people in issue 276 happy, but probably not because
they already lost their data, or because the warning text is yellow instead of
red.
https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276

Change-Id: I98303fe7f6b7a25fea029637c90145258d41ee46
2017-02-07 21:30:01 -06:00
Dees Troy
b5e7ca96ef Merge "Fix crash during check for TWRP app" into android-7.1 2017-02-08 04:23:49 +01:00
big biff
e1a11463bd Merge "Adjust & Improve Chinese translations for zh_CN/TW again" into android-7.1 2017-02-07 13:50:06 +01:00
Ethan Yonker
5128d299a5 Fix crash during check for TWRP app
Make sure that opendir succeeds before continuing.

Change-Id: I3c96002ab830f4df2041044d411a7bac42a5b8f4
2017-02-05 23:27:54 -05:00
Matt Mower
0c88b84681 Fill uid/gid for screenshots at compile time
It's not necessary to rely on the success of a call to getpwnam() for
the uid/gid of a file stored to sdcard (or external storage). Use the
definitions in system/core/include/private/android_filesystem_config.h

Change-Id: I979cfa0c74ecc927b88b0967cc56a66da237cc60
2017-02-03 05:32:00 +01:00
Matt Mower
d4a1118152 GUI: Improve automatic determination of TW_THEME
* If TW_THEME is not defined, then check both DEVICE_RESOLUTION and
  TARGET_SCREEN_WIDTH x TARGET_SCREEN_HEIGHT for width/height. Use
  the determined width and height to automatically select landscape,
  portrait, or watch, as well as associated mdpi/hdpi.

* Improve the display of the error message so it fits in a standard 80
  character width terminal without line wraps.

* Write relevant errors for missing themes that clarify what went
  wrong.

Change-Id: I94b02349ce38bf6a9cecde403d78ff2490821d8a
2017-02-02 12:07:26 -06:00
nkk71
6e4114f8b7 gui: Fix Android.mk for TW_CUSTOM_THEME
Change-Id: I7814e3960914ebefdc03cf9cf6f44e193efea932
2017-02-02 16:16:52 +01:00
Matt Mower
0c347d597a Support power key on slideout
Change-Id: Ic1cba57b6d0fbefee2391d06d140da9e4e3dbb32
2017-01-21 15:31:24 +01:00
Matt Mower
3267662c54 Whitespace cleanup in Themes
Commit 'Copy Kernel Logs' did not adhere to tab spacing.

Change-Id: Ie036aa6b973e01f992199787c64b54a6ccb73a7e
2017-01-21 15:31:01 +01:00
Matt Mower
37a7ab6943 Add another license header
* Missed this one in the first sweep

Change-Id: I5f2753f93ce3e9888c553de4c2e510137e818a29
2017-01-20 01:27:40 +01:00
Ethan Yonker
5e1a7f932c Fix detection of TWRP app in /data
Change-Id: Icab9db0ceb63edba021cc190eea2ebbc87cf3442
2017-01-18 16:44:54 -06:00
Dees Troy
88040ccb0e Merge "gui: bump theme version to 2" into android-7.1 2017-01-18 22:52:38 +01:00
that
74bff7f73f gui: bump theme version to 2
Commit 9472ba1d introduced new behavior for KEY_POWER which
needs a corresponding change in the theme to call the
setbacklight action whenever the power button is pressed.

Change-Id: Iacd46436b04aba1ecb1adbb684c56c3ef994bfe0
2017-01-18 22:32:36 +01:00
Matt Mower
c39b1b4e51 gui: Initialize button render position
Change-Id: I716ae0664ea454706cb940d1bfd38259da53d176
2017-01-18 21:10:04 +01:00
Matt Mower
91584b2603 HardwareKeyboard: Update event logging
Use LOGERR(), consistent with rest of TWRP.

Change-Id: I75a44d807a17aea6027830d58c37ac130fee12a7
2017-01-18 21:09:42 +01:00
Matt Mower
b68bff01d3 GUI: Mark local flip() function as static
Change-Id: Ib92e294872c1408cc749fdb0db3bbf56579eb070
2017-01-18 13:04:35 -06:00
Matt Mower
840576155a Move sh selection out of GUI makefile
* The TWRP_SH_TARGET variable is only used if TW_USE_TOOLBOX == false,
  so it doesn't really need to be defined.
* Move the busybox sh symlink creation nearer to the toolbox/busybox
  build rules and take advantage of LOCAL_POST_INSTALL_CMD which has
  been around since Android 4.3.

Change-Id: I7850f9c3e113d43ad519dd5c9a7d25e36ec1c426
2017-01-18 13:04:35 -06:00
Matt Mower
c55b9a7893 Move pigz symlinks out of GUI makefile
* Unify the building of pigz and its symlinks under the same module.
  LOCAL_POST_INSTALL_CMD has been around since Android 4.3, use it.

Change-Id: I6a1f74216b6f5a5283fc17839b9b6f19571f3be5
2017-01-18 13:04:35 -06:00
Matt Mower
e04eee73e9 Add missing license headers
Change-Id: I7f807a2f140068181524d8e868d029b4d94c70e8
2017-01-18 20:02:43 +01:00
Matt Mower
9472ba1d39 gui: Actions: Toggle backlight on power key
Create GUIAction to handle KEY_POWER with a screen backlight toggle.

Change-Id: Iad0a7923b4a776e0336722db74d6fc46cd0107a2
2017-01-18 19:55:33 +01:00
Matt Mower
874136434a SELinux can be assumed for Android 4.4+
Change-Id: I7410a0c8e439eec90a955ee9201efd9a92bb9635
2017-01-18 12:40:26 -06:00
Matt Mower
23d8aaef29 Unused variable cleanup
Change-Id: I2397d0bd221dcf5c9d0f971ba157519bcf014a70
2017-01-18 17:50:05 +01:00
Matt Mower
029a82db6c Very minor code cleanup
Change-Id: Ie0b97da2cce7bb93307ed49b1138bc2f36df34d0
2017-01-18 17:49:23 +01:00
Matt Mower
a8a89d1961 Whitespace cleanup
Change-Id: I93c65973679894bb8587da4b38b410d38036b8bd
2017-01-18 17:41:17 +01:00
that
55f2bdac06 gui: remove old unmaintained 2.x theme
Change-Id: I1181307989c7478ac6b84bf77732ee5dcff52ed1
2017-01-18 17:23:17 +01:00
niks255
d73903c8eb gui: Detect device resolution with TARGET_SCREEN_HEIGHT/WIDTH
* Ease the compilation with Lineage/CM configurations
    when TW_THEME or DEVICE_RESOLUTION are not defined

Change-Id: I35a8ce651ba5333c8426baa3d70fcbc42a2e5e59
2017-01-18 16:49:11 +01:00
James Christopher Adduono
dcd1e440e0 Support theme width and height offsets
Current use condition is LG V20, where the secondary screen is
actually just a corner chunk of the main screen.
In this case, we need to shift the UI down some pixels in order
to see it all, but just using Y offsets resulted in losing
the rest of the GUI below.

Example in BoardConfig.mk:
  # Shift TWRP off the secondary screen
  TW_Y_OFFSET := 160
  TW_H_OFFSET := -160

Change-Id: I5a06638ba0d05e5b9fd8a6245c630d6ea3394f78
2017-01-11 18:04:29 +01:00
Ethan Yonker
4767caf1f4 Fix compile error on 4.4 tree
Change-Id: Id85fdf0f4dee02f8ee3ae50ec42423c6a154a3eb
2017-01-11 10:45:04 -06:00
kaneawk
a4d4f31691 Adjust & Improve Chinese translations for zh_CN/TW again
Change-Id: I08690d5a6f4551cb8c8a0d063a09230fd4773487
2016-12-28 14:35:30 +08:00
Ethan Yonker
abd08746c7 Update Ukraine language translation (via jemmini)
Change-Id: Ice2bb6c66d47ca2da968f223dd47207159cc0b66
2016-12-16 10:09:11 -06:00
Ethan Yonker
b4bff5e9d1 Add TWRP app install via TWRP recovery
Note: I will have to add a build flag for excluding the app later for
watches and maybe Android TV. I will also have to add support in the
tablet and watch layouts later. I will merge this for the initial roll out
to select devices and finish up later.

Change-Id: Ia4ce5522fae542afa1539b10c0691315392a19ab
2016-12-16 17:02:16 +01:00
Miroslav Brzychcy
9b1b818eb8 TWRP Language Update
Update slovak language on behalf of translator.

Change-Id: I90f289dd082aef1780d63b4880092f57c48ad9ac
2016-12-14 19:41:18 -05:00
Ethan Yonker
bd7492de28 Support File Based Encryption
Change-Id: Ib688ddd0c32d3999590cacd86b6d9b18eac336e9
2016-12-13 21:16:42 +01:00
Ethan Yonker
1b190166eb Add boot slot support
Change-Id: I7eaf80e327985f53791f90fbdebad022a9650d31
2016-12-13 14:04:48 -06:00
Ethan Yonker
941a899695 Support new AB OTA zips
Change-Id: I1ff883375a0a769bf27a834c9bf04c6cdbb42117
2016-12-05 14:54:32 -06:00