Commit Graph

3637 Commits

Author SHA1 Message Date
Matt Mower 8df3191bee Allow custom bootloader msg offset in block misc
Globally define BOARD_RECOVERY_BLDRMSG_OFFSET with a decimal integer
to offset the read/write location in misc where the bootloader message
should appear. Example:

  BOARD_GLOBAL_CFLAGS := -DBOARD_RECOVERY_BLDRMSG_OFFSET=2048

Edify commands get_stage and set_stage need to be aware of the
custom bootloader msg offset because they write the stage directly
to the BCB.

Change-Id: Ifdb5ffe3e893a651be59ae63e3a0ebadd828c9f2
2017-02-02 17:03:12 +01:00
nkk71 6e4114f8b7 gui: Fix Android.mk for TW_CUSTOM_THEME
Change-Id: I7814e3960914ebefdc03cf9cf6f44e193efea932
2017-02-02 16:16:52 +01:00
maxwen e7c8856555 recovery: adjust mkfs.f2fs location
middle finger ahead

Change-Id: I14a036a5a79121056e6185f367fc6d61bcec46d2
2017-01-24 16:18:58 +01:00
that 6b9ad62b6c orscmd: add minimal getcap and setcap tools
These are mostly intended for debugging and for emergency repairs.
Optimized for minimal code size and dependencies, not for usability.

Change-Id: I671850a03151dd716c715f953f0b2bc8dbacffe7
2017-01-21 15:48:00 +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
Ethan Yonker 16159166af Disable relocations on orscmd to fix compile error in Omni 7.1
ERROR: Missing or empty .rel.dyn or .rela.dyn section
ERROR: Failed to load as ELF

This change fixes the compile error by disabling relocations. Thanks to
mdmower for pointing out the best fix.

Change-Id: I60e637158c324295c42c480139d6d38157ba0d31
2017-01-21 15:24:43 +01:00
Ethan Yonker b386f71078 ifdef overlay graphics
Change-Id: If3173ddbfaccb95cc48636240ee3a918dac1e23f
2017-01-21 08:23:09 -06:00
James Christopher Adduono c51bd35040 Try mounting different filesystems during decryption
Based on Dees_Troy's approach.

Change-Id: Id9aafb6d0c64ab43e2711720a26e30ac86b90235
2017-01-21 00:31:36 -05: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 3626bdc800 bldrmsg: Only emmc /misc is supported
Change-Id: Ic0716557a87ec0638e2dbed1c3f743231e8b2f8e
2017-01-18 21:10:34 +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 908a27728c fb2png: Update/Cleanup headers
* Include relevant headers for all used functions
* Add prototype for fb_dump() to fb.h since used in c-files
* Alphabetize includes

Change-Id: Ifdbaceadb12576b607b654835ae93bc88e2c3268
2017-01-18 13:04:35 -06:00
Matt Mower 18bdccb790 init: Remove duplicate trigger of load_system_props_action
Change-Id: I29ba5c4d78be24de3dabc0083fe291fb2b65fa54
2017-01-18 13:04:35 -06:00
Matt Mower 06543e35e0 Add missing file descriptor closes
Change-Id: I7154a022833a5e092facd7c5df776719b9fcc929
2017-01-18 13:04:35 -06:00
Matt Mower 173cdb9ad8 Restore TW_BACKUP_AVG_IMG_RATE handling
Preserving the average BPS across partitions appears to have been
wiped out by the adb backup patch set. Restore it.

Change-Id: Id05c12ff61260b642ee7acd979132a2cba026d87
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
James Christopher Adduono 9eb2769841 flashutils: additional emmc check
Some devices are missing /proc/emmc!

Change-Id: I38ae9e01b8bb0764250998a1a6fef7c754b8e9ce
2017-01-18 20:01:29 +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 a0cd91d317 Restore file system type logline on restore
Change-Id: I2b961a75f500c657ff7a82698957060f85e95ab8
2017-01-18 17:50:55 +01:00
Matt Mower 028995512b Do not disable performance mode too early for backup
Include SetPerformanceMode(false) just before every "return", and not
sooner.

Change-Id: Iefd5546865347dbd08cc9baeb98d58d26b7f4a3b
2017-01-18 17:50:35 +01: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
Ethan Yonker 7118774ec9 libtar: backup and restore posix capabilities
This patch also allows libtar to combine data from multiple extended
tar headers into a single header.

Change-Id: I82d13e89a3622ea665b60062b1904ddbedfa41b3
2017-01-18 17:11:33 +01:00
nailyk a083dc68c6 ADBbackups: Fix wrong owner on binary backups.
- Set the correct owner on binary backup files to flash storage.

Solve https://github.com/TeamWin/Team-Win-Recovery-Project/issues/749

Change-Id: I5526494c77232f524cf02a482de070b44248c4a0
2017-01-18 17:02:56 +01:00
James Christopher Adduono 1efebdc0bd Include symlink size (path length) in Get_Folder_Size()
All we have to do is check for the case of a symlink as well.
st.st_size contains the length of the path the symlink points to.

Change-Id: I9a7b06ba11b5866e04599b8904fd42acf241abe2
2017-01-18 16:51:06 +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
bigbiff bigbiff 584b977489 TWRP device version string
For building through jenkins. Export a variable to the shell
so that we don't monkey patch variables.h and keep the git tag
clean in the version string.
Jenkins will export the variable TW_DEVICE_VERSION=n where n > 0.
The makefile will use this variable to show the device string
in twrp startup. For mass production builds, omit the
environment variable to default to 0.

Change-Id: I0d6eb764255d7069c0fb4a378522a009cfe4054f
2017-01-18 09:44:17 -06:00
Hashcode 5733215112 build: AOSP/CM14 fixes (API 24/25, mainly BusyBox-less environment)
These changes are needed by any ROM where devices are configured to
use TOOLBOX/TOYBOX instead of BUSYBOX (i.e., TW_USE_TOOLBOX := true).

Change-Id: I68b88cc9fb857f32864556c4b6c9c8e6ee744051
2017-01-12 12:50:18 -05:00
sndnvaps 7dde36df11 updater: link libcrypto_utils_static if it exist
Change-Id: I9bf238a3e29d88850a6cc69f07954949722c35d7
Signed-off-by: sndnvaps <sndnvaps@gmail.com>
2017-01-12 11:39:42 -06:00
D. Andrei Măceș 1c28904749 libtar: Use relative path for crypto/ext4crypt include
Don't assume path to be bootable/recovery (i.e., support CM's
RECOVERY_VARIANT).

Change-Id: Ib53cc919c5a9beb3beee71d7227a7c957a24b601
2017-01-12 18:35:29 +01:00
nailyk-fr 1021edf17e bootloader_message: Allow TWRP to ignore wipe-data command into misc
* Rebase of https://gerrit.omnirom.org/#/c/20750/ patch-set 3
 * Original commit message:

fix: recently a change in AOSP causes a bootloop to TWRP
(and therefore all ROM's based on it)
Reason: AOSP enables use of /misc partition and normally the fstab in
TWRP will not have /misc added. The problem is now when Android writes
a wipe command to /misc it will force TWRP to boot but TWRP will do
nothing - leaving the cmd in /misc. This results in a bootloop to TWRP.
Solution: I added a new var TW_IGNORE_MISC_WIPE_DATA which can be
set to "true" in Boardconfig.mk of a device requiring this which then
ignores /misc commands like it would be when /misc would be just not in
fstab BUT with this change TWRP clears the bit in /misc so a normal boot
can happen.
Besides that if the device do not have an own recovery key combo and
/misc is enabled we want to open TWRP after walking through the factory
reset screen - without actually doing a factory reset.
kudos to nailyk (and DevUt) for the help with the C++ code!

Change-Id: If6fed5872015f1a66304e3edbdb787c507236f69
2017-01-11 18:09:59 +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
D. Andrei Măceș b29a5e27c3 build: Consolidate the crypto_utils presence tests
No point checking filesystem repeatedly/check may change in future

Change-Id: I0413b07b850f785eb5150c6ed18836cc56e94d6f
2017-01-11 10:56:21 -06:00
Ethan Yonker 4767caf1f4 Fix compile error on 4.4 tree
Change-Id: Id85fdf0f4dee02f8ee3ae50ec42423c6a154a3eb
2017-01-11 10:45:04 -06:00
Ethan Yonker f2e3f0c51c Change version to 3.0.3 to support the app release
Change-Id: I2e1afc76edd77208e9e94162a7045453109c74d2
2016-12-16 10:10:31 -06: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 ff2b7881c9 Change handling of /cache due to AB devices not having cache
Change-Id: Ia9b97ed19eb3d400d9d399255108cac79361bca4
2016-12-13 21:26:57 +01:00