Commit Graph

7608 Commits

Author SHA1 Message Date
lambdadroid ead0f49cbb toolbox: Avoid linking toolbox tools to dd
Having the twrp_dd module definition right within the build rules
for the toolbox symlinks causes the toolbox tools (getprop, ...)
to be linked to dd instead of toolbox.

This happens because the symlinks are created using variables
from the "toolbox_recovery" module (e.g. LOCAL_MODULE_STEM).
Those are changed by the twrp_dd module definition.

Move the twrp_dd module definition to the end of the make file
(after the build rules for the symlinks) to fix this.

Fixes https://github.com/omnirom/android_bootable_recovery/issues/257

Change-Id: I44973920898fe8a21bc32d621500fe38f9d1ebdd
2019-05-12 11:54:38 +02:00
big biff c2a5f7ef66 Merge "language: update Chinese translations" into android-9.0 2019-05-11 01:45:24 +02:00
betaxab c23f00b90d language: update Chinese translations
Change-Id: Id34055262b7c711a2ee71d97d27503a887d35b76
Signed-off-by: betaxab <betaxab@gmail.com>
2019-05-11 03:45:59 +08:00
big biff 117c64785b Merge "NTFS-3G: use newer libfuse-light in pie." into android-9.0 2019-05-09 01:48:45 +02:00
bigbiff bigbiff 52f868b5d9 NTFS-3G: use newer libfuse-light in pie.
Change-Id: I66dc38a19524f1eaac8cc5afc1110c5d11fc74eb
2019-05-05 16:13:08 -04:00
bigbiff bigbiff 3f20a85c03 English language: Remove duplicate value.
Change-Id: I849acef3e19519bfe6b8dc5fdd9a50eda3f03e2a
2019-05-05 13:53:25 -04:00
bigbiff bigbiff 6af36a4f37 bsd dd: include prebuilt bsd dd in twrp for Nougat and greater
- Cleaned up toolbox/Android.mk so that BSD dd builds
  with correct Android versions

Change-Id: Idb15811480ec03b05336d54b866233b5ac99dfaf
2019-05-04 19:55:16 -04:00
big biff 5f177ae4c7 Merge "awk: add awk for trees including one-true-awk" into android-9.0 2019-05-03 02:16:29 +02:00
big biff a525f3bc79 Merge "mkshrc: remove post-install cmd and use LOCAL_MODULE_STEM" into android-9.0 2019-05-03 02:09:53 +02:00
big biff 252651b483 Merge "Clean up logd init file" into android-9.0 2019-05-03 02:07:41 +02:00
big biff 84d2300cce Merge "Use BSD grep for builds with toybox" into android-9.0 2019-05-03 01:34:27 +02:00
Captain Throwback 695baa60cb toybox: fix build in 6.0 tree
When building with TW_USE_TOOLBOX, build currently fails.
This patch fixes those build errors.

Change-Id: I041523d93a3fa9624fee80679e521750b4f9edfa
2019-05-01 18:50:36 +01:00
Captain Throwback 93804dd50e awk: add awk for trees including one-true-awk
Change-Id: I5458a3ecc69b60cc249f598b0250428fc414f34b
2019-04-30 16:38:49 -04:00
Captain Throwback bb016729b1 mkshrc: remove post-install cmd and use LOCAL_MODULE_STEM
Change-Id: I2e0c7fda8cb39dd2a607f7ab2fdfe744e75fb3cd
2019-04-29 17:46:41 -04:00
Captain Throwback 986130473e Clean up logd init file
- Remove unnecessary services

Change-Id: I4c9227cd49eeef1176d321ae61ca3ca8c3f54596
2019-04-29 17:45:31 -04:00
Captain Throwback 3c565b568d Use BSD grep for builds with toybox
- Include symlinks for egrep and fgrep

Change-Id: I78e27f95efa143fa63def02c9e72af567833aefe
2019-04-29 17:44:24 -04:00
codeworkx 22e3aa9ed6 ext4crypt: add missing cflag
Avoid calling e4crypt_prepare_user_storage with wrong input parameters.

Change-Id: I5c8945370cb642e46f08c65090c0290c15fe0b57
libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 632 (recovery), pid 564 (recovery)
2019-04-23 12:07:43 +02:00
big biff 7af226083a Merge "languages: encode for utf-8 in the appropriate places." into android-9.0 2019-04-17 02:20:04 +02:00
f2065 e605f1c087 Updated Russian localization, bugs fixed (letter Ё, cities in time zones are correct, correct checksum, and other minor fixes).
Change-Id: Id1fd250c69cdc91e8b3e76d056fb1a5935457cdd
2019-04-16 11:50:39 +01:00
bigbiff bigbiff ceb032052f languages: encode for utf-8 in the appropriate places.
Change-Id: I74308aae75098aa1a47b7f11b7c3214fe4e6d58e
2019-04-14 20:35:43 -04:00
Ethan Yonker 1da568fab4 Do not check digest on mapped installs
Change-Id: I2d57eba354e4ec88f418208183f53c12e8548fcb
2019-04-09 15:35:21 -05:00
Mauronofrio Matarrese 1ecb6df370 Change slot name position
This is need to avoid overlapping between the third row of buttons and 
the current active slot, actually if you enable edl button, the active 
slot will overlap the button.

Change-Id: I6cfc945c2d0be0530dad7b4ce0f0e2ca29c297c4
2019-04-05 16:19:25 +02:00
Mauronofrio Matarrese 82a2f45eb7 Fix "Install Recovery Ramdisk" of a file which contains a space in the name
Change-Id: Ib2b1deee7427d9ac565676068b11982171f7a98d
2019-04-04 22:40:19 +01:00
Ethan Yonker f0a7e59668 Fix recovery-twrp in some old CM trees
Change-Id: Ie401ab8ec39b721c3747475bcc8269f78963d31c
2019-04-04 10:06:41 -05:00
Ethan Yonker b1a7ae9cd9 Three Dot Three Dot Zero
Change-Id: If58ac0918b78c90071ffe2efa1c8509316a2afb1
2019-04-03 21:34:20 -05:00
Ethan Yonker 193befec8c Extract arch-specific updater binary if present
Check for and extract arch specific updater binary based on
ro.product.cpu.abilist and use ro.product.cpu.abi as a fall back.
If no arch specific updater binary is present then use the regular
update-binary file. Note that a file named update-binary must be
present in the zip still even if it is a 0 byte file.

Change-Id: Iabb2156e68d40c5b99d55ea8e4a9a553eb26600a
2019-04-04 04:28:12 +02:00
Ethan Yonker b150276a43 Prevent having to double-tap some check boxes
Check boxes that do not have a default value set usually required
you to tap them twice to toggle them on the very first time. This
patch checks the return value from GetValue and sets a default of
0 if the variable does not already exist in the Data Manager.

Change-Id: I1ff26e756764ed2a00b10102f13a5bce0119771a
2019-04-04 04:26:53 +02:00
Ethan Yonker 53796e7333 Use magiskboot to repack the boot partition
Set TW_INCLUDE_REPACKTOOLS := true

Must also have:
AB_OTA_UPDATER := true

Use magiskboot and provide GUI options to allow users to repack
their existing boot image to install TWRP (or kernels) so we can
stop having to provide installation zips for AB devices. There is
also an option to try to fix a recovery bootloop if the kernel
has been patched to always boot the ramdisk for root, etc.

You will need to pull the below repo into external/magisk-prebuilt
https://github.com/TeamWin/external_magisk-prebuilt

Change-Id: I74196cc6f095a7576d61886dc96cbc18deba9b04
2019-04-03 16:44:00 -05:00
Dees Troy 9a4d7403d9 Fix build in 5.1 tree
Change-Id: I15f888d58c01de00920dc5c56148d363f4dd79b8
2019-04-03 05:23:34 +02:00
bigbiff bigbiff e4bdb15a5f AB Cache dir: If device doesn't have /data/cache for FBE, we should
try /persist if in the fstab.

Change-Id: I70dd19538b7f9b8cf61c46f6c8167057eec3342b
2019-04-03 02:08:39 +02:00
big biff 794e364e08 Merge "ADB Backup: Ignore creating backup folder for phones not decrypted. This allows you to continue without error. Also we should not set restore path for images in adb backup. Change-Id: Ia75a70377b8e1364fefc82ad41ccf74fa3b7a3c3" into android-9.0 2019-04-03 01:22:19 +02:00
bigbiff bigbiff 4b4148e415 ADB Backup: Stop resetting digest check on restore.
Change-Id: Ieb431705e69dcdfd74efb0a971cd7d2908a42098
2019-04-03 01:06:43 +02:00
Ethan Yonker c53d520d2b Fix zip digest check
Change-Id: I5c05c485574131d3fbc8cb5af5b1281d12b822ce
2019-04-02 15:56:25 -05:00
bigbiff bigbiff cdd97c7fab ADB Backup: Ignore creating backup folder for phones
not decrypted. This allows you to continue without error.
Also we should not set restore path for images in adb
backup.
Change-Id: Ia75a70377b8e1364fefc82ad41ccf74fa3b7a3c3
2019-04-01 22:56:55 -05:00
bigbiff bigbiff 718ab39bc5 Zip install: this will allow TWRP to check md5 and sha256 checksums
for zip installs.

Change-Id: I1fb6af777e08aea29bedaf2e6a9b385ae3b03fac
2019-04-02 05:42:47 +02:00
Makornthawat Emery abc299c09f Correct return case for context check in /cache/recovery
Change-Id: If9eca1b7f6b781542194a6b39c19ee03a521f94b
2019-03-30 01:05:46 +00:00
dianlujitao 95244dd6c0 Transfer /dev/mtp_usb fd ownership when instancing MtpDevHandle
/dev/mtp_usb was opened before instancing MtpDevHandle, the existing fd
should be passed in otherwise MtpDevHandle::start would be blocked as it
attempted to open the device twice.

Change-Id: I6afc5b6926930dad77aceac2f6a00e1c6759a883
2019-03-28 15:04:42 +08:00
andi34 0ef6492518 updater: Allow devices to suppress BLKDISCARD
* On some devices TRIM is disabled for security reasons. Don't fail
  flashing the ROM because discard isn't possible in this case.

Change-Id: I044619c3e0b01a496d967ef136501d0190240ad4
2019-03-23 14:39:53 +02:00
Michael Bestas 9bb7c225a4 Don't copy local mke2fs.conf for O-MR1
* It is now copied from system/extras/ext4_utils

Change-Id: Ibddcad4928c17bc174390d75708a5382a9262441
2019-03-23 14:39:53 +02:00
Michael Bestas de18923571 Remove duplicate ext4 flags from Android.mk
* They are right above

Change-Id: Ifff889e6ff748ed6bfa4a076b1afcc2c6a7eed3b
2019-03-23 14:39:53 +02:00
Michael Bestas 0cc2376153 Set a dummy CM_PLATFORM_SDK_VERSION if it doesn't exist
* Avoids printing 2 build warnings on every single rebuild
  of anything when building TWRP inline

Change-Id: I5dd3623707c03af0dfe7366f1a77e83762e720b2
2019-03-23 14:39:53 +02:00
Michael Bestas 0bb5df9a34 Remove leftover mounts.h~HEAD
* Wrongly added during 8.0 merge

Change-Id: Icc0415f978af352458ce7d605b0c8c4cd84c184e
2019-03-23 14:39:53 +02:00
Simon Shi e682598480 prebuilt: Support ubsan libraries of all architectures
According to the file under './prebuilts/clang/host/linux-x86/clang-4691093/lib64/clang/6.0.2/lib/linux/*.so', these files are supported under different target architectures. This commit would add support to every architecture.

Change-Id: I1f88bc06c3f30e6d2f2083ba9b6350b2376d83f2
2019-03-22 16:33:47 -05:00
Simon Shi 8ae2b0d5dd twinstall: Force variable type
Force the usage of variable type since it is different on the 32-bit
devices. Use this commit to avoid the problem.

bugs:
bootable/recovery/twinstall.cpp:201:67: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'long long' [-Werror,-Wformat]
LOGINFO("has_legacy_properties: mmap (size=%zu) failed: %s!\n", finfo.st_size, strerror(errno));
                                           ~~~                  ^~~~~~~~~~~~~
                                           %lld

Change-Id: Ie0c51a90490e0c069fff33884a9431a97361f5c6
2019-03-22 16:32:39 -05:00
lambdadroid a0a163586c dosfstools: Fix compile error in Pie tree on 32 bit systems
Fixes the following compile error:
bootable/recovery/dosfstools/src/check.c:591:4: error: format specifies type 'unsigned long' but the argument has type 'unsigned long long'
[-Werror,-Wformat]
                 (uint64_t)clusters * fs->cluster_size,
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This was fixed upstream in
"Fix format string in check_file() (%lu -> %llu)" (dosfstools/dosfstools@d7665f2)
This commit applies the change on top of TWRP's dosfstools copy.

Change-Id: I23374594662fd95e795f793112e78c54d8d50b30
2019-03-22 22:09:13 +01:00
Ethan Yonker 7e94158684 Support both old and new mkfs.f2fs
Easiest way I could find to determine if we have the old or the
new mkfs.f2fs version is to pipe the usage output to grep and
grep the output for "reserved" and redirect the output to a file.
If the file has any data in it, then we must have the old
mkfs.f2fs that uses -r.

Change-Id: I7f1ed88b577a3f9827a98f0868d8f82e4e4886ac
2019-03-22 08:18:24 -05:00
dianlujitao 4879b37b5d Fix the long broken format function
* For EXT2/3:
   * Align mke2fs options with Android 9.0 fs_mgr_format.cpp.
 * For EXT4:
   * Note that make_ext4fs is still in use on Android 8.1 to workaround
     a FDE encryption bug even though mke2fs has become the default
     choice. The bug is fixed in Android 9.0+.
 * For F2FS:
   * Drop the broken "-r" option, it's never ported to O, explicitly
     pass number of sectors instead.
   * Keep all options aligned with Pie fs_mgr.
   * Check existence before start wiping, as Wipe_EXT4 does.
 * For all:
   * Calculate block size at runtime, and reserve the space specified
     via negative "length" option from fstab. Note that positive length
     will be ignored.
   * If the partition has crypto footer, and "length" is not specified
     in fstab, automatically reverse CRYPT_FOOTER_OFFSET (16384).
   * Remove the default crypto key location: footer, this is a bad
     assumption since most partitions don't use encryption! We need to
     know the real situation to decide whether to reserve crypto footer
     on format.
   * If the current action is "wipe" or "change filesystem", wipe crypto
     footer or block device after mkfs if the partition is
     unencrypted or undecrypted (e.g., wrong password).
   * If the current action is "format data", unconditionally wipe crypto
     footer or block device.

Change-Id: I7304a8ee703131ea4a08ab7c60334af28cac28b3
2019-03-21 16:15:52 -05:00
Ethan Yonker 64e0a6525f Use listbox for device-specific advanced menu items
This patch allows items to have more than one action surrounded
by the <actions> tags like other GUI elements. The patch also
adds new twrp command line options that let you reload the theme
and switch to a specific page from the command line:

adb shell twrp reloadtheme
adb shell twrp changepage=advanced

Change-Id: I838ea380a508be07b9fa617034d1954e116febd6
2019-03-20 15:42:49 -05:00
Dees Troy 908442dfb5 Merge "Update FDE decrypt to pie from CAF" into android-9.0 2019-03-20 21:40:44 +01:00
Ethan Yonker 98661c1a29 Update FDE decrypt to pie from CAF
cryptfs.cpp based on CAF tag LA.UM.7.3.r1-05900-sdm845.0
Used CAF because AOSP no longer contains code for qcom's hardware
crypto.

Change-Id: I921cbe9bed70989f91449e23b5ac3ec1037b7b97
2019-03-20 15:33:48 -05:00