The presence of /file_contexts is still important to TWRP:
- files written while in adb shell only pick up contexts if
/file_contexts is present
- fixContexts looks for /file_contexts
- if !USE_EXT4 (is this possible), then make_ext4fs looks for
/file_contexts when wiping
In the event than file_contexts.bin also becomes more important in the
future, leave it in place and create a symlink to it.
Change-Id: Ic87852248d42d5ea6bf936df160efa41294b6520
It was pointed out to me by gmrt that O_APPEND is incorrect, as lseek
before writing would be undone (perhaps we avoided this issue due to
an inability to write beyond the end of a partition) and O_RDWR is not
necessary to lseek. When AOSP switched from fopen to open, they also
removed the full partition wipe (fopen in wb mode) before each write,
so this is no longer an issue. Completely restore the original AOSP
file access mode flags.
Change-Id: I42b4efc5f499360ce5b761d3a2a5d4dac4cdfb65
-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
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
* 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
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
These are mostly intended for debugging and for emergency repairs.
Optimized for minimal code size and dependencies, not for usability.
Change-Id: I671850a03151dd716c715f953f0b2bc8dbacffe7
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
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
* 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
Preserving the average BPS across partitions appears to have been
wiped out by the adb backup patch set. Restore it.
Change-Id: Id05c12ff61260b642ee7acd979132a2cba026d87
* 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
* 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
This patch also allows libtar to combine data from multiple extended
tar headers into a single header.
Change-Id: I82d13e89a3622ea665b60062b1904ddbedfa41b3
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