Commit Graph

5775 Commits

Author SHA1 Message Date
nkk71 04ec095226 Fix mkfs.f2fs build error
* OmniROM 8.0 uses AOSP f2fs-tools which builds a static
  mkfs.f2fs directly to $(TARGET_RECOVERY_ROOT_OUT)/sbin

Change-Id: I364a13e33e71abceab2f9ba1bd3179c2d9672b27
2017-11-17 18:13:00 +01:00
nkk71 884bb2bc24 Fix 'No OS' on System_Image restore after wipe
* When you format the system partition, it will remain
  in a mounted state.
* Subsequently restoring a system_image (even though
  successfully) the Update_System_Details() function
  will not correctly update the system partition
  details.

* Reproducible by:
  1- Advanced wipe: System
  2- Restore: System_Image
  3- Reboot -> No OS prompt

* eg: [
       ~ # twrp get tw_min_system
           tw_min_system = 50
       ~ # twrp get tw_backup_system_size
           tw_backup_system_size = 8
       ~ # mount -o ro /system
       ~ # du -sh /system
           3.5G    /system
      ]

Change-Id: I99f75274816788dd38eccdd387f7ac691e1f3fab
2017-11-17 18:11:59 +01:00
Ethan Yonker 477da64554 Merge branch 'android-7.1' of github.com:omnirom/android_bootable_recovery 2017-09-25 21:11:49 -05:00
Ethan Yonker d9918b7c38 Fix a few build errors
Change-Id: I1311e4f9bb2409e856df3d333cc0d6c3f8f097f8
2017-09-15 08:17:42 -05:00
Ethan Yonker c3c0e648bb Add libraries needed in 8.0 for e2fsck and tune2fs
Change-Id: I99fad0cf2de7ff95814eff1a5f8dde59afb4b5c2
2017-09-11 21:39:57 -05:00
Ethan Yonker 75aa615767 Make legacy props an option disabled by default
Change-Id: Id0bb17ebd11e120b4676c41d6553e6a830ac7ee9
2017-09-08 12:17:53 -05:00
Ethan Yonker 8373cfe28c Update to AOSP 8.0 base
Change-Id: I29fe722b4eb9718765327902779046840a01433e
2017-09-08 07:14:59 -05:00
Ethan Yonker 95e8007578 DO NOT MERGE Android 8.0 stuff
Change-Id: I8c8a9734adbf36c33463123844fa6e078934ae34
2017-08-24 21:45:50 -05:00
kaneawk c75c8a2eb4 Remove duplicate entries & Improve Chinese translation
Change-Id: I3ed9b5731d63f69748fbbf99c626669db39a1eb4
2017-08-18 19:36:03 +08:00
big biff c0c5c3a1a4 Merge "Fix typos / inconsistencies in German language" into android-7.1 2017-08-15 02:49:40 +02:00
big biff 5302ec42b7 Merge "SHA2: Enable in landscape and watch xml" into android-7.1 2017-08-13 01:51:57 +02:00
nkk71 1a230e461c Show scrollbar on TWRP Settings
* The scrollbar is not shown when more options
  are actually available.

Change-Id: I78b223c5fe12f0cbd73357ca6615f83ff04201e1
2017-08-08 13:23:49 +03:00
bigbiff bigbiff 1c01fabf87 SHA2: Enable in landscape and watch xml
Change-Id: I8bdb4b8a24cbdd0f68d45676f2858eb63f74677b
2017-08-07 18:44:04 -04:00
nkk71 d59d02e1a1 twrpTar: Fix uninitialized current_archive_type
* current_archive_type is not properly initialized
  leading to a potential random close(fd) in closeTar()

Change-Id: I1598ba4d524b723b8175ee847e2b1c5aeedbd938
2017-07-21 20:37:36 +02:00
Ethan Yonker cd00a8b361 backup: fix return handling when no digest is being created
If the user selects to skip digest creation, Backup_Partition always returned
false. This patch fixes this problem and somewhat cleans up the error
handling.

Change-Id: I1db0e285cd5ed2bd93756cd27c6f56b8415ffa86
2017-07-06 10:23:36 -05:00
Ethan Yonker da056fdc5b libtar: Fix restore of e4crypt policies
Change-Id: I457356069330c38299fd326181c1c88b12a08dbd
2017-07-06 10:10:13 -05:00
Michael Bestas c86b6d4312 Complete support for project pathmap
* Use project pathmap when available for LOCAL_C_INCLUDES

Change-Id: Iddc7cc8509d966307c4a490c9d6c15d761dbb3b4
2017-06-24 14:32:07 +02:00
android-build-team Robot 43348a6282 release-request-f4ecf242-5d1c-45e0-8c7c-ede48d1a9e82-for-git_oc-release-4111650 snap-temp-L02200000075283731
Change-Id: Id1b274b254753d4ee0fc788092ef6a62f86efd92
2017-06-18 07:12:19 +00:00
nkk71 9efbe769c3 Fix incorrect 'unlink' return value check
Change-Id: I430f6bb21a5fd87e0422420463e8bb96c4a612e1
2017-06-17 14:21:47 +02:00
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
Jeff Vander Stoep e35926e1af Fix "No file_contexts" warning
Fixed by Loading the file_contexts specified in libselinux, whereas
previously recovery loaded /file_contexts which no longer exists.

Bug: 62587423
Test: build and flash recovery on Angler. Warning is gone.
Test: Wipe data and cache.
Test: sideload OTA
Change-Id: I11581c878b860ac5f412e6e8e7acde811f37870f
(cherry picked from commit 2330dd8733)
2017-06-15 21:24:29 +00:00
Dees Troy 92e2531dca Merge "Fix minui issues for some build trees" into android-7.1 2017-06-10 15:52:31 +02:00
big biff 52dc0ea4f9 Merge "ors: Update doc" into android-7.1 2017-06-08 02:08:45 +02:00
Pierre Roth e136fd495c Fix typos / inconsistencies in German language
Change-Id: Id3b4cca16ec18f63fb71f7e0ae09d2cc2d8516f8
2017-06-07 08:55:59 +02:00
Ethan Yonker 39662b2914 Fix minui issues for some build trees
In trees where TWRP is the primary recovery, minui.h was not setting rules
properly for healthd because healthd uses clang. Must use
CLANG_TARGET_GLOBAL_CFLAGS to set global flags.

Change-Id: I4cd9c88f8fcaec345fe012d09abcb9f24be06ef4
2017-06-06 11:32:50 -05:00
nailyk-fr 79605aece1 ors: Update doc
Change-Id: Ia026a8578262d4bb231e1727313ed1f5e323b880
2017-06-05 11:32:23 +02:00
nkk71 ffb02bdfc4 Improve decrypted partition logging
* Partition information should be updated after successful
  decryption (both userdata and adopted) and then logged

* Fix adopted storage nickname being ""

Change-Id: Idcdab84f339e932e62880089bad36e206920dd70
2017-06-04 23:15:05 +03:00
bigbiff bigbiff 4a2a1914a2 adbbackup: write smaller reads less than 512 bytes
This will allow the gzip compression header to be
written properly to the adb stream.

Thanks to nkk71 for finding the issue.
Change-Id: I3d88c5f575ca3fac904d8279f1f246994be2b02f
2017-06-04 04:30:09 +02:00
Ayke van Laethem 05c2de4c68 Fix various memory errors
There were a few memory errors while restoring a backup via adb (created
using `adb backup --twrp`).
On my device (S5 mini) it resulted in this error message:

  FORTIFY: strlen: prevented read past end of buffer

This commit fixes this issue and a few other potential issues.

Change-Id: I5022c94c961217238b3fefec0b2c4b8c6fa26ec7
2017-06-03 02:37:06 +02:00
nkk71 5073003302 cryptfs: Remove dm-crypt device on failed table load
* The dm-crypt device needs to be removed from
   the device-mapper driver list otherwise it will
   remain busy and cannot be used later on by
   other processes (eg vold_decrypt) or for further
   testing/debugging in recovery.

Change-Id: I35e43a79ecc3de234ddb9f87f7d75c6439ea7454
2017-05-23 14:59:57 +02:00
android-build-team Robot 445c948c0a release-request-c72e46fd-06a9-4104-bad3-f7ba8aeb3e1d-for-git_oc-release-4029917 snap-temp-L38800000066299680
Change-Id: I8fd5a0c76fe7275b05cc3fb7713a582920cfe76c
2017-05-21 07:14:42 +00:00
Tianjie Xu 539b08cfcf Fix the input parameter for "set_retry_bootloader_message"
We're not updating argc & argv during get_args(), so some boot
arguments missed when we set the boot message for retry.

Bug: 38383406
Test: boot command sets correctly during retry attempt.
Change-Id: Ie8583a22fad5e0084245e3431d4018518d508dfd
(cherry picked from commit 72449c9f99)
2017-05-17 11:52:17 -07:00
that 9c3b7e990e etc: remove "." from LD_LIBRARY_PATH
We shouldn't load libraries from some random working directory.
For example it breaks busybox when you're in /system/lib.

Change-Id: Ia1f8f4fda9e6182c0cd8c5ac727c2b1eb09c84a2
2017-05-16 22:56:51 +02:00
Michael Bestas 5f05255911 mtdutils: Fix mounting partitions by-name
Change-Id: I8314bb94bf5bcd9576995cd2ecdc5133c5f5ea11
2017-05-15 22:17:39 +02: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 805a5dfe89 3.1.1
Change-Id: I6ab4169836e460d1652d29c24ad1c5a55191efe7
2017-05-12 09:37:41 -05:00
Ethan Yonker 0afc1fdc48 Fix reboot when no OS is present
Change-Id: Idc3d3c79b8a7acf0f632ed39703766005d73de29
2017-05-12 16:21:54 +02:00
Ethan Yonker 84d61ce31c Update TWRP to AOSP 7.1.2
Change-Id: I19c1546efb4182aac62c690e3cc05b04e3a9a32e
2017-05-10 16:11:35 -05:00
Ethan Yonker 6355b56c93 Adopted Storage: backup keys but do not wipe them
Change-Id: I545a32848ee686ecfacd13604ae3f18f5d206dfc
2017-05-01 09:42:17 -05:00
gitbuildkicker 48d8056115 merge in oc-release history after reset to oc-dev 2017-04-30 00:07:33 -07:00
Dmitri Plotnikov ed9db0fd73 Adding support for quiescent reboot to recovery
Bug: 37401320
Test: build and push OTA and hit adb reboot recovery,quiescent. The screen should remain off throughout the upgrade process.

(cherry picked from commit 8706a98aa6)

Change-Id: I79789a151f6faafda8ecc6198c2182cc2a91da70
2017-04-27 16:31:11 -07:00
gitbuildkicker c4ce43eb7f merge in oc-release history after reset to oc-dev 2017-04-25 00:07:02 -07:00
Tao Bao b4c0de6c7b Add more tests for verify_package_compatibility().
This now covers the actual calls to libvintf, and asserts we're getting
identical results through verify_package_compatibility() and by calling
libvintf directly.

We were missing the coverage and introduced the double free bug (fixed
by commit f978278995).

Bug: 37413730
Test: recovery_component_test passes.
Test: recovery_component_test fails w/o commit
      f978278995.
Change-Id: If5195ea1c583fd7c440a1de289da82145e80e23c
(cherry picked from commit f2784b6a43)
2017-04-24 11:10:42 -07:00
bigbiff bigbiff b5ecaad27a ADB Backup: fix adb restore issues
Set Backup_FileName on adb backup to fix restore.
Set read_from_adb after EOF to return properly
from newer adb client prompt.
Create setter and getter for Backup_FileName
for openrecoveryscript.cpp which is not a
friend class.
Fix condition for twrpTar::Get_Size() and adb backup.
Change-Id: I7eb8168fa3416366b996e220cecbc0e1bcec5e8e
2017-04-23 14:37:22 -04:00
gitbuildkicker 2cfbad37d9 merge in oc-release history after reset to oc-dev 2017-04-20 00:07:10 -07:00
Tao Bao da320ac6ab Call libvintf to verify package compatibility.
The libvintf API has landed. Hook up to do the actual verification.

Bug: 36597505
Test: recovery_component_test
Test: m recoveryimage; adb sideload on angler and sailfish, with
      packages that contain dummy compatibility entries.
Test: m recoveryimage; adb sideload on angler and sailfish, with
      packages that don't contain any compatibility entries.
Change-Id: Idbd6f5aaef605ca51b20e667505d686de5ac781f
2017-04-19 13:04:57 -07:00
Tianjie Xu 464c6ba9f8 Merge "Add 'system' to update_verifier's gid" into oc-dev 2017-04-19 18:17:23 +00:00
gitbuildkicker 0643c7afbe merge in oc-release history after reset to oc-dev 2017-04-19 00:07:06 -07:00
Tianjie Xu 128e771503 Add 'system' to update_verifier's gid
This addresses the denial to /dev/cpuset/tasks:
update_verifier: type=1400 audit(0.0:377): avc: denied { dac_override }
for capability=1 scontext=u:r:update_verifier:s0
tcontext=u:r:update_verifier:s0 tclass=capability permissive=1

update_verifier: type=1400 audit(0.0:378): avc: granted { write } for
name="tasks" dev="cgroup" ino=5 scontext=u:r:update_verifier:s0
tcontext=u:object_r:cgroup:s0 tclass=file

Bug: 37358323
Test: denial message gone after adding system group
Change-Id: I66b4925295a13fbc1c6f26a1bb9bd2f9cebcec3d
(cherry-picked from 0ad2de5eab)
2017-04-19 06:44:43 +00:00
Tao Bao a6084f8c9b Merge "Add tests for update_binary_command()." into oc-dev 2017-04-19 04:20:46 +00:00