Commit Graph

9577 Commits

Author SHA1 Message Date
bigbiff 15434cdeec Merge "android-5.1: use char constructor for default on c++ streams" into android-9.0 2019-12-23 23:06:23 +00:00
Mauronofrio Matarrese 9632f301c1 Removing fake error: E: recv error on uevent
This shouldn't be an error, so i hide the line about the error.

Change-Id: I3ef667435dfa843440cc594409c8d20add676576
2019-12-23 09:28:10 +00:00
Ian Macdonald f9156eaaab Complete overhaul of Dutch translation:
* All missing strings added (ref: en.xml).
* Many strings clarified and ambiguity removed.
* Inconsistent use of language reconciled.
* XML validated by xmllint(1).
* String length validated on device (G975F).

Change-Id: I4a4c3dc5a1147a62b8c141286fc7ac432678a322
2019-12-23 00:50:53 +00:00
Alessandro Astone 5667feb0ac recovery: wipe bootloader message from index 0 when using custom offsets
* We may use a custom offset to:
   a) preserve data that oem wrote to the first bytes of misc
   b) skip recovery flags written by the bootloader (e.g. --wipe_data)

   For case a) one should set the offset 'x' to be at least greater than
   the size of bootloader_message struct (2048 bytes). If this is the case,
   then we zero out bytes x ~ x + 2047

   For case b) one should set the offset to be strictly smaller than
   the size of bootloader_message struct. If this is the case, then we
   zero out bytes 0 ~ 2047.
   This allows to clear any additional flag set by the bootloader,
   that would otherwise be forgotten in misc.
   This also guarantees that we do not involountarily wipe any data that
   the oem may have written starting at byte 2048 (coff coff LG)

Change-Id: I2d4e0702a2d8cbbef6274a87ce9499b0f69310dd
2019-12-22 21:20:48 +00:00
bigbiff d331705daa android-5.1: use char constructor for default on c++ streams
Change-Id: I4be681c2720f62182e57237b1cfefc384235f0e1
2019-12-22 16:05:12 -05:00
Alessandro Astone 7ec5fd9e6d recovery: Move bldrmsg offset symbols to bootloader_message.cpp
* bootloader_message.cpp is the only file using
  BOOTLOADER_MESSAGE_OFFSET_IN_MISC and WIPE_PACKAGE_OFFSET_IN_MISC,
  so we can move their definitions to the cpp.
  This prevents the need to set BOARD_RECOVERY_BLDRMSG_OFFSET
  in every module that includes the header.

* Global cflags are no longer supported Oreo and up,
  so set the BOARD_RECOVERY_BLDRMSG_OFFSET via make variable

* Simplify logic, always set BOARD_RECOVERY_BLDRMSG_OFFSET.

Change-Id: I2b902bcce7f5ca13472e0ac30ac01b4991294dbe
2019-12-22 20:21:16 +00:00
Ian Macdonald 2923defaea /sbin should come first in the linker search path.
/sbin must come before any other search path when TWRP is built for a
different version of Android than the one on which it will run.

Otherwise, as soon as any of the other paths becomes available via
direct action (i.e. the user mounts a file-system) or indirect action
(e.g. the user flashes a zip that mounts a file-system), incompatible
libraries will be prioritised and loaded instead of the correct ones
from /sbin in TWRP's ramdisk.

This will cause severe disruption of the TWRP environment. Toybox and
other dynamically linked binaries will immediately cease to work; and
since Toybox provides umount, it typically won't be possible to recover
from this state without a reboot.

For example, the following occurs when a Toybox applet is run on a
Samsung Galaxy S10 running Android 10, but using a version of TWRP built
for Android 9:

android:/ # getprop ro.boot.bootloader
CANNOT LINK EXECUTABLE "getprop": cannot locate symbol "_system_properties_init" referenced by "/system_root/system/lib64/libselinux.so"...
linker: CANNOT LINK EXECUTABLE "getprop": cannot locate symbol "_system_properties_init" referenced by "/system_root/system/lib64/libselinux.so"...

Change-Id: I31fe612ebb1c7d9ad71d67be2c615caa3fbb5d6f
2019-12-05 01:54:57 +01:00
big biff 72d75b0b40 Merge "ldconfig: add /sbin to search.paths" into android-9.0 2019-12-01 01:22:18 +01:00
mauronofrio 9bf73351e5 Encryption: try wrapped key also for device without metadata support
Change-Id: I8b58e45ec0d42470226083e8003dcd8152a91af1
2019-11-23 22:29:15 +01:00
Captain Throwback 8d70eb617e ldconfig: add /sbin to search.paths
- Move commands from prebuilt to root Android.mk
- Hotfix for linker errors after https://git.io/JerWD merge
  on some Samsung device(s)

Change-Id: If628ab486689878885b696c2f5a107987092aeba
2019-11-14 11:14:06 -05:00
big biff 8c0bcc8ba0 Merge "Add ld.config.txt for Android 8.x+ trees" into android-9.0 2019-11-08 00:47:20 +01:00
SyberHexen a895118a1f cache: Fix typo in twrp-functions.cpp for A/B devices
* without this A/B devices are writing 8MB+ uncompressed logs under persist/cache/recovery which increase in size over time. This can eventually leave persist partition OOM causing other cascading issues like crashing the modem during boot and bootloops.

Change-Id: I0f3aab0eb96804d1be8de965eb2c2e9bb83d5b56
Co-authored-by: Erfan Abdi <erfangplus@gmail.com>
Signed-off-by: Andrew Hexen <SyberHexen@gmail.com>
2019-10-29 18:28:48 -07:00
Captain Throwback 170964d5bb Add ld.config.txt for Android 8.x+ trees
- Fixes the ld.config.txt errors in recovery log which may prevent
  decryption and shell commands from working properly

Change-Id: I0e057525cdda39e8ac10115d37e2cb882b9c4844
2019-10-21 19:46:30 -04:00
big biff e078e9cf7b Merge "Update Portuguese (Portugal) translation" into android-9.0 2019-10-19 00:21:45 +02:00
VDavid003 2034a41934 Fix typo in comment
Change-Id: I9b24d324fd61f2f0d2e85a9d123778557e14d63c
Signed-off-by: VDavid003 <virag.david003@gmail.com>
2019-10-18 22:43:20 +02:00
Vasco Machado bdb20a9d2d Update Portuguese (Portugal) translation
Change-Id: I2adff8a76f210048edc29264652d072139d594f9
2019-10-17 16:45:59 +01:00
big biff c1d7c35049 Merge "Persistent logs: Compress target log on storage." into android-9.0 2019-10-06 19:32:37 +02:00
bigbiff bigbiff e3ad5346da Persistent logs: Compress target log on storage.
This update will use pigz to compress the log that TWRP stores
on persistent storage in order to help with storing logs on the
persist partition.

Change-Id: I16971b8b138b74a164b1b0835847177cfc6104e2
2019-09-18 19:17:20 -04:00
bigbiff bigbiff 0be03b3217 Encryption: try wrapped key if the first time decryption fails
Change-Id: I108b7aeea41c6b85c851f40c1c4a7e25012e2463
2019-09-01 13:38:44 -04:00
Peter Cai 05cd3f8616 ext4crypt: change to upgrade key if export fails
Add support to upgrade key when export fails with KEY_REQUIRES_UPGRADE.

Ported from
https://source.codeaurora.org/quic/la/platform/system/vold/commit/?h=LA.UM.7.9.r1-06100-sm6150.0&id=85c46eaacc60290db5e71380d89eb4d99ed67995

Change-Id: Ic64be8ade00c0b0d014370ecc9341b1ecc9b0d7a
2019-09-01 19:34:09 +02:00
Peter Cai 90edd2e867 ext4crypt: support wrappedkey for FBE
Qualcomm devices use a special `wrappedkey` mode for FBE. This is ported
from CAF
https://source.codeaurora.org/quic/la/platform/system/vold/commit/?h=LA.UM.7.8.r4-01000-SDM710.0&id=9229262d893a8592f7bc1b4e8a8dab7aad8df68c,
originally by folks at Mokee for vold
https://mokeedev.review/c/MoKee/android_system_vold/+/34102.

This patch ports the above changes to `ext4crypt`, which we can use in
recovery. Note that since we do not have `fs_mgr` in the recovery, we
cannot read the `wrappedkey` flag from fstab. Instead, similar to
`fbe.contents`, we use a special property `fbe.data.wrappedkey` to
indicate support for wrappedkey mode. Devices that need to use this
should set this property to `true` to activate corresponding code.

Change-Id: I79c2855d577156670b45c10c7c7b1fcd9fece8d9
2019-09-01 19:33:30 +02:00
big biff 69ab4a6000 Merge "fix build error in 9.0 with TW_NO_EXFAT_FUSE:=true" into android-9.0 2019-08-04 00:49:41 +02:00
android-build-team Robot 79fa6bdf6b Snap for 5736389 from ac6652d37d to qt-qpr1-release
Change-Id: I8bdc2d4dde31abe7a2df2061def377bf28ac2ea1
2019-07-18 03:09:56 +00:00
Tao Bao ac6652d37d [automerger skipped] minadbd sends heartbeat to rescue service for getprop command.
am: dd0158ac60 -s ours
am skip reason: change_id Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531 with SHA1 0bbb2ed53e is in history

Change-Id: I02a82fc0d026e06eadbadd6af0af85228ce2e044
2019-07-16 18:46:29 -07:00
Tao Bao dd0158ac60 minadbd sends heartbeat to rescue service for getprop command.
We start minadbd and rescue services in two processes. In particular,
minadbd handles the requests from host, then communicates with rescue
service to do install/wipe works. When resuce service doesn't see any
request in a pre-defined timeout (currently 300s), rescue service will
exit to avoid endless waiting.

This CL changes minadbd to additionally send a no-op command to rescue
service as a heartbeat signal, so that host side can finish
time-consuming operations (e.g. downloading over network) while keeping
rescue service alive.

Bug: 136457446
Test: Enter resuce mode on blueline. Send `adb rescue getprop
      ro.build.fingerprint` and check that rescue service doesn't exit.
Test: Stop sending the getprop command. Check that rescue service exits
      after 300s.
Change-Id: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
Merged-In: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
(cherry picked from commit 2223e6a9f8)
(cherry picked from commit 0bbb2ed53e)
2019-07-16 15:28:03 +00:00
android-build-team Robot 34a7048388 Snap for 5726885 from 0bbb2ed53e to qt-qpr1-release
Change-Id: Ia1d41a9046568a28daa92201ab351393d79e7cbb
2019-07-13 23:10:51 +00:00
Tao Bao 0bbb2ed53e minadbd sends heartbeat to rescue service for getprop command.
We start minadbd and rescue services in two processes. In particular,
minadbd handles the requests from host, then communicates with rescue
service to do install/wipe works. When resuce service doesn't see any
request in a pre-defined timeout (currently 300s), rescue service will
exit to avoid endless waiting.

This CL changes minadbd to additionally send a no-op command to rescue
service as a heartbeat signal, so that host side can finish
time-consuming operations (e.g. downloading over network) while keeping
rescue service alive.

Bug: 136457446
Test: Enter resuce mode on blueline. Send `adb rescue getprop
      ro.build.fingerprint` and check that rescue service doesn't exit.
Test: Stop sending the getprop command. Check that rescue service exits
      after 300s.
Change-Id: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
Merged-In: Ib9d5ed710cfa94ecfe6cf393a71a0b67b2539531
(cherry picked from commit 2223e6a9f8)
2019-07-10 22:32:51 -07:00
Andreas Schneider b0a0dbbab0 prebuilt: Add android.hardware.confirmationui@1.0 for /sbin/keystore
Change-Id: I62e68c137e9790392dd2fc44c2add990c2f408d6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-07-04 00:39:02 +02:00
big biff 0bd7c59026 Merge "ext4crypt: support synthetic keys v3 on May update" into android-9.0 2019-06-25 02:01:42 +02:00
Ian Macdonald a3b25a3ebe Backup_Tar(): Properly localise string instead of using English.
Change-Id: Id13885a30e3a412e5b7b42de0e63cd7fc885dfc1
2019-06-24 00:28:38 +02:00
android-build-team Robot 5a624c34bc Snap for 5674428 from 2b40105c43 to qt-qpr1-release
Change-Id: I5a500d2edf16ca3024d8f929069228644fac08f3
2019-06-20 03:11:43 +00:00
Zhijun He 2b40105c43 Revert "libprocessgroup users use libcutils"
am: cdbd84de26

Change-Id: I83e2eb9e4961141389d7c8d90fd70363985b9855
2019-06-18 22:50:40 -07:00
Zhijun He cdbd84de26 Revert "libprocessgroup users use libcutils"
This reverts commit 46ec20b692.

Reason for revert: breaks all camera use cases

Bug: 135568875
Change-Id: I86747c0df5489f80d1966dd07669637597fb2b00
2019-06-19 04:44:04 +00:00
android-build-team Robot 00fb807722 Snap for 5671249 from f1532a9655 to qt-qpr1-release
Change-Id: I9820970150af84fd563798dfb2b85b6ece61974d
2019-06-19 03:08:05 +00:00
Steven Moreland f1532a9655 libprocessgroup users use libcutils
am: 46ec20b692

Change-Id: I39a19e98437e210aa14bee4f03c1c69e8f2faa34
2019-06-18 16:48:47 -07:00
Steven Moreland 46ec20b692 libprocessgroup users use libcutils
libprocessgroup symbols are being moved into libcutils in order to
optimize linking/memory usage. libprocessgroup will no longer be
required in the future (however removing references to it will come
separately).

Since libcutils is used statically here, the dependencies of
libprocessgroup need to be explicitly listed.

Bug: 135145426
Test: boot
Change-Id: I91c082f0fa2f5f5c52751065cd5f50f5cb965b23
2019-06-18 16:25:23 +00:00
android-build-team Robot 59eac55800 Merge "Snap for 5652667 from e3cc180d31 to qt-qpr1-release" into qt-qpr1-release 2019-06-12 04:17:02 +00:00
android-build-team Robot a8fbd52046 Merge "Snap for 5652667 from e3cc180d31 to qt-qpr1-release" into qt-qpr1-release 2019-06-12 03:54:01 +00:00
android-build-team Robot 09c313ae7a Merge "Snap for 5652667 from e3cc180d31 to qt-qpr1-release" into qt-qpr1-release 2019-06-12 03:52:23 +00:00
android-build-team Robot 8127089808 Snap for 5652667 from e3cc180d31 to qt-qpr1-release
Change-Id: I87b9aef60fb242db67a05d8070ae7898706b0233
2019-06-12 03:30:41 +00:00
android-build-team Robot bdfbab7c3d Snap for 5652667 from e3cc180d31 to qt-qpr1-release
Change-Id: Ie46693d0aaf8ec8732578c6ed7ee005a9e287443
2019-06-12 03:30:21 +00:00
android-build-team Robot 5f755efef5 Snap for 5652667 from e3cc180d31 to qt-qpr1-release
Change-Id: Ib9d586f649fd141c08b4b1cb1c6f54da4bcb6953
2019-06-12 03:12:12 +00:00
android-build-team Robot d001cb5c2b Snap for 5652667 from e3cc180d31 to qt-qpr1-release
Change-Id: I564fb600ee57b347cb2b6a9c7f88b8d5cbf04728
2019-06-12 03:01:57 +00:00
Tao Bao e3cc180d31 minadbd: adb rescue getprop returns newline-terminated result.
This change addresses the comment in [1], which makes the results of
`adb shell getprop foo` and `adb rescue getprop foo` more consistent.
That is, both will return newline-terminated results now.

[1] https://r.android.com/c/platform/bootable/recovery/+/976340/3/minadbd/minadbd_services.cpp#188

Fixes: 134027350
Test: Run the following commands on taimen (under rescue mode):
    `adb rescue getprop ro.build.fingerprint`
    `adb rescue getprop ro.nonexistent`
    `adb rescue getprop`
Change-Id: I5af47f8ea4d569b8507e259daef87749c0945f47
Merged-In: I5af47f8ea4d569b8507e259daef87749c0945f47
(cherry picked from commit 57a27890ce)
2019-06-11 12:55:34 -07:00
Tao Bao 5359d777e6 minadbd: Support adb rescue getprop.
It dumps all the allowed properties, similar to `adb shell getprop`.

Bug: 134027350
Test: Run the command under rescue mode.
Change-Id: Ic0864ca0fb51505ec1e4f38af2464591aa576201
Merged-In: Ic0864ca0fb51505ec1e4f38af2464591aa576201
(cherry picked from commit d8db81a014)
2019-06-05 23:28:25 -07:00
Tao Bao 7a31ab675e minadbd: More allowed properties.
Most of these properties are already part of the fingerprint. This CL
allows querying them directly, instead of encouraging users to decode
from fingerprints.

Bug: 134027350
Test: Boot into rescue mode on taimen. Run `adb rescue getprop` with new
      props.
Change-Id: Id4667fcaf0e908c391085b22e22c957acd01d9c4
Merged-In: Id4667fcaf0e908c391085b22e22c957acd01d9c4
(cherry picked from commit 3b9ef341be)
2019-06-05 23:28:10 -07:00
bigbiff bigbiff 3c897aec16 fb2png: Fix compilation in android-9.0 repos.
Remove unused reference.
Change temp variables to size_t.
Update function calls for unused arguments.
Update static functions to ignore being defined
for each file that includes it.
Change-Id: If11d4e26daee54197f369974a09ec71f27abb59b
2019-06-05 20:00:54 -04:00
android-build-team Robot 52ce9fdf21 Snap for 5606001 from af0a76d1c5 to qt-qpr1-release
Change-Id: Ic78a1225c03b30ae6e2e539e14219b65deabcccd
2019-05-25 23:17:26 +00:00
Ethan Yonker ae7ff3b2fa Fix symlink creation
Change-Id: I0d0bcdde2957974eb357a6f3d820bd5ab0fa47ee
2019-05-24 16:31:09 -05:00
Ethan Yonker abf1fb0086 Switch between dependencies and modules
Use LOCAL_REQUIRED_MODULES for Pie and up and
LOCAL_ADDITIONAL_DEPENDENCIES for Oreo and down.

Change-Id: I5365e782f98f3bbf4bf246be22c8f573824b65ee
2019-05-24 22:39:12 +02:00