Commit Graph

6509 Commits

Author SHA1 Message Date
Pierre Roth 4e3a69530b Typo / Uppercase-Lowercase in German translation compared to all other translations
Change-Id: Ib8c67017dbf3a217332109b954d6123cb1a94f84
2017-12-21 07:08:43 +01:00
Ethan Yonker ecbd3e8ba9 Merge up to android-8.1.0_r1 and fix conflicts
Change-Id: I2dc060134d15ec9f015a606cb24ef8276f6af1fc
2017-12-15 12:48:49 -06:00
Ethan Yonker ea4efc6d20 Fix build error in AOSP 8.1.0 r1 tree
Change-Id: If6f230105f5661a4544116d44c8fd48d4dc96f99
2017-12-12 16:24:28 -06:00
Ethan Yonker aac05c2f07 Fix android.hidle.base@1.0 rule for various 8.0 trees
Change-Id: I57a1a807841b20860c9a1c9523be385b12b6b933
2017-12-12 07:04:05 -06:00
bigbiff bigbiff 2af13795b9 TWRP Bugfix release
This release fixes restore by forcing regular TWRP Backup by default.
Thanks to jlask for fixing this issue.

Change-Id: I0b2d507d7a2a3e6bfdd00174af89efbe511e90e0
2017-12-08 17:50:41 -05:00
jason972000 adae336c1c Default to device backup/restore vs. adb backup/restore
Change-Id: I81bfea1e9978dd003e96a48f399d259a878ddc44
2017-12-08 09:12:11 -06:00
big biff e17b78ad60 Merge "Fix stuck on 'black' screen entering recovery" into android-8.0 2017-12-06 00:34:29 +01:00
DevUt 04156c3f5a Fix the inconsistencies in the spelling of SD card
Change-Id: I30d7a3d38654292d38e3f69a196bc03928b7d22e
2017-12-05 16:35:14 +01:00
nkk71 a2341b0caa Fix stuck on 'black' screen entering recovery
* In omni-8.0 'android.hidl.base@1.0.so', although properly built
  does not get copied to the /sbin/ directory for TWRP, resulting
  in TWRP constantly *trying* to restart with the missing lib:
    CANNOT LINK EXECUTABLE "/sbin/recovery":
    library "android.hidl.base@1.0.so" not found
  Leading to a stuck on "black" screen (or some splash screen, but
  never even reaching TWRP splash screen).

Change-Id: I10a3c3d72c0f141687dbbf552e59fb31c015b278
2017-12-04 01:52:08 +02:00
Ethan Yonker 606cc915f1 Fix compile error with IGNORE_MISC_WIPE_DATA in some trees
Change-Id: I4a57e4e90158d50a9e9c9aef8ed1da9ee9179554
2017-11-30 10:24:33 -06:00
Ethan Yonker 7c997913e2 Fix more compile errors in bootloader_message_twrp
Change-Id: I3b1b540f404efcd153d0b75d29e5b6ee8b0caa85
2017-11-30 07:24:06 -06:00
Ethan Yonker 31344a3b2f Better compatibility across 8.0.0 trees
Change-Id: Ic8200da4e99826736e002a1ab5f9e5f967e84193
2017-11-29 13:23:50 -06:00
Andreas Schneider 06c621908a minui: Fix building graphics_overlay.cpp
Change-Id: I65aad9253ebad598acd9468694d0e1bf6c4abc6a
2017-11-29 20:01:26 +01:00
Andreas Schneider 9c820955c8 minui: Move graphics_overlay.h down that we have all structs defined
Change-Id: Id971c900aec5931a11065e7e466db33acb0390eb
2017-11-29 18:04:00 +01:00
Andreas Schneider 6de59412eb minui: Add missing <linux/ion.h> for 'struct ion_handle_data'
Change-Id: I87133cc8409ab988bbffa40d790e138c25b01309
2017-11-29 18:03:28 +01:00
Andreas Schneider 58d68e5a0a minui: Only include graphics_adf.h if we do not build with MSM_BSP
Change-Id: Id32a394d23ea5df986615855119912f765ebee99
2017-11-29 18:02:58 +01:00
Andreas Schneider 75847daf15 minui: Do not overwrite previously set CFLAGS
Change-Id: Ifa5bcffa12c045cb629974684882f1e0f56dcce6
2017-11-29 18:01:16 +01:00
Ethan Yonker 41a5f72b02 3.2.0
Change-Id: I526aaf59a903baccea77e2f731c3166c3d3c05eb
2017-11-28 22:39:21 -06:00
Ethan Yonker 917331b968 Fix build error in old 5.0 tree
Change-Id: I3faa0b6cc964a148dcc1bae7fdeba877fd795cf7
2017-11-28 22:28:27 -06:00
bigbiff bigbiff 5b7cb88818 ADB Backup: fix compilation error for remove
Change-Id: Ia1b6e7a216bf3fd60bbfac9cbc11038636e3560f
2017-11-28 19:26:27 -05:00
nkk71 7d1222a5fe vold_decrypt: FDE Keymaster 3.0 support
* HTC U11 Oreo is using keymaster3 FDE encryption which requires
  the new services:
    1- /system/bin/hwservicemanager
    2- /vendor/bin/hw/android.hardware.keymaster@3.0-service
    3- /vendor/bin/qseecomd (instead of /system/bin/qseecomd)
  So in addition to /vendor/lib and /vendor/lib64 also
  symlink /system/vendor/bin to /vendor/bin.

* vold_decrypt services now have separate prefixes:
    1- 'sys_' referring to /system/bin
    2- 'ven_' referring to /vendor/bin

* The additional (hwservicemanager, keymaster-3-0) and modified
  (qseecomd) .rc files have been updated in the vold_decrypt
  directory.
  Comments were added directly in the .rc files, please check
  them.

* /etc/recovery.fstab needs to be temporarily moved since
  vold will use it if it finds the '/sbin/recovery' file
  (refer to fs_mgr for the fstab load code https://goo.gl/8KaZyf).
  Since fs_mgr cannot parse TWRP style fstab, we 'hide' it
  and attempt to create a symlink to /fstab.{ro.hardware}.

Also remove shell dependencies, code cleanup, new error codes:
* Critical sections of vold_decrypt should not rely on the external
  shell (and the available binaries) provided by TWFunc::Exec_Cmd.
  Doing so may lead to failures resulting from different shell
  provided binaries not working properly, especially since busybox
  can be inconsistent across different trees.

  In particular the following functions have been changed:
  * run_vdc() no longer uses daisy chained commands, instead
    it now forks and executes vdc directly including a 30 second
    built in timeout.
  * Symlink_Firmware_Files() no longer relies on the shell 'find'
    command to retrieve the list of firmware/vendor files and instead
    uses a built in function, Find_Firmware_Files(), which traverses
    the system partition to retrieve the list of files.

* The code has also been cleaned up a little for better consistency,
  and vold_decrypt will now return various error codes for the
  different failures, as defined in vold_decrypt.h, which allows the
  gui_msg to be moved back to partitionmanager.cpp.

Notes regarding pre Android 8.0 builds:
* Service names in .rc files cannot exceed 16 characters (including
  the prepended 'sys_' or 'ven_') in Android 7.1 and below, so a
  service name such as 'sys_hwservicemanager' is out of the question
  for 7.1 and below.
* hwservicemanager will check ACLs on 'hwservicemanager' and 'ITokenManager'
  if they are even allowed to run, otherwise the interfaces will fail.
  The policies have only been introduced in 8.0, and although it is possible
  to manually add them to the 7.1 policies it's not recommended.
* Therefore the best course of action is to build in 8.0.

* SIDE NOTE: On the HTC U11 we are actually using omni-7.1 with some changes
  in the device tree to support both Nougat and Oreo decryption, please
  refer to:
    1- https://gerrit.twrp.me/c/2756/ for the necessary sepolicy and
       BoardConfig changes.
    2- The Android.mk file for vold_decrypt was modified to truncate
       greater than 16 character service names (as mentioned therein)

Other changes:
* TW_CRYPTO_SYSTEM_VOLD_DISABLE_TIMEOUT is now deprecated due to built-
  in fork and timeout.
* Output_dmesg_to_recovery_log() is also deprecated so upon a failed
  decryption the recovery.log will no longer append it, instead you can
  just use 'adb shell dmesg' to check it. Nonetheless if a true debug
  build is needed use the original TW_CRYPTO_SYSTEM_VOLD_DEBUG flag as
  outlined in the original commit message (see below).

Usage info:
This is an update to the initial vold_decrypt, for more info refer to
https://github.com/omnirom/android_bootable_recovery/commit/71c6c50d0da1f32dd18a749797e88de2358c5ba1

Change-Id: Id7129d125ae7f5dcba0779489825add718022ba3
2017-11-28 23:05:54 +01:00
Ethan Yonker fefe5915b0 FBE for Pixel 2
Includes various minor fixes for building in Android 8 trees with r23+ tag

Update FBE extended header in libtar to version 2 and include the entire
ext4_encryption_policy structure now after translating the policy.

See this post for more details:
https://plus.google.com/u/1/+DeesTroy/posts/i33ygUi7tiu

Change-Id: I2af981e51f459b17fcd895fb8c2d3f6c8200e24b
2017-11-28 16:03:41 -06:00
Dees Troy dc864ec8ac Merge "Support v2 fstab format" into android-8.0 2017-11-28 15:04:30 +01:00
Ethan Yonker dcd9f3f384 Fix issues building with LineageOS cryptfs_hw
Change-Id: Ie22691433aefa3b8819ec14e0349ee12bd88a1c2
2017-11-28 14:53:49 +01:00
Ethan Yonker 6e8c27a52b Support v2 fstab format
Auto detect and support both the v1 and v2 fstab formats
Support putting TWRP style flags in a separate /etc/twrp.flags file

twrp.flags format is the same as twrp.fstab (v1 with TWRP flags)

Support using a wildcard in a block device and find all partitions:
/usb-otg vfat /dev/block/sda*

Support using sysfs entries (voldmanaged) and read uevents and scan for
wildcard partitions from uevent data. (twvold?)

May not be complete for some of the newer flags found in fstabs in newer
build trees and there is a slim chance of a crash if the user removes a
removable device while TWRP is performing actions. May need to add some
kind of mutex to prevent the 2 threads from causing this crash. We need
to start somewhere though and this change is pretty innocuous when not
using a v2 fstab.

Change-Id: I617d97c7db332cbe671a9d2b8ad98b3d9c4f03cc
2017-11-28 00:20:51 +01:00
bigbiff bigbiff adcb4d8cb7 ADB Backup: Fix gzip backup and restore
Change-Id: I92821c7053089d130a5ab73fa36aec486da77bf1
2017-11-27 16:43:20 +01:00
bigbiff bigbiff 19fb79c722 ADB Backup: add ability for TWRP GUI to restore
Restore adb backup files that TWRP made to your PC.
Put files in your backup directory to see them.

e.g. /sdcard/TWRP/BACKUPS/<sn>

Change-Id: I2c57970d77b64c39a302159041456e761c185259
2017-11-27 09:32:30 -06:00
leskal 372019c8cd Improve greek translation
Change-Id: I1642a2c89e50438fdd7308dba318d52440b0809f
2017-11-20 18:37:52 +01:00
Michael Bestas 4a18558c69 Improve automatic detection of QCOM RTC fix
* Enable it on all platforms after msm8960

Change-Id: I2584048a9b9fa77c6c7d3408d280811143b01e8d
2017-11-19 00:12:50 +01:00
Ethan Yonker 32e803a474 Fix compile error in bootloader_message_twrp on 6.0 tree
Change-Id: Ifcfff60fab1cd73b524cd521a7094c344f8e9e1d
2017-11-18 08:10:51 -06:00
nkk71 b4c3591306 Auto detect possible use of legacy props
* Revert: Make legacy props an option disabled by default
  (reverted from commit 75aa615767)

* Instead check for ANDROID_PROPERTY_WORKSPACE in the updater-
  binary to determine whether legacy property service can be
  used

Change-Id: If68d5cca9a2b56edcb1c73db0474668cf46d8c91
2017-11-17 23:49:11 +01:00
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
android-build-team Robot 435a2031d6 Merge cherrypicks of [3156476, 3155698, 3156194, 3156639, 3156018, 3156477, 3156098, 3156099, 3156100, 3156101, 3156102, 3158393, 3155699, 3155700, 3156195, 3156196, 3156019, 3156020, 3158394] into oc-mr1-release
Change-Id: I2a293bf3975f633db807bb800e1707f73e8d74b9
2017-11-02 04:50:39 +00:00
Tao Bao ba30867b01 update_verifier: Fix the wrong computation with group_range_count.
'group_range_count' doesn't properly consider the pair-wise range
structure. It may split the ranges into wrong pairs if it evaluates to
an odd number.

For example, for an input range string of "6,0,2,10,12,20,22" with 4
threads, group_range_count becomes 1. It would then try to verify (0,2),
(2,10), (10,12) and (12,20). Note that (2,10) and (12,20) are not valid
ranges to be verified, and with (20,22) uncovered.

Bug: 68343761
Test: Trigger update_verifier verification. Check the number of verified
      blocks against the one in care_map.txt.
Change-Id: I7c5769325d9866be06c45e7dbcc0c8ea266de714
(cherry picked from commit 62caeb5f48c9d7b1a8ed97c4a021195b8499b804)
(cherry picked from commit 559a6d1d2a)
2017-11-02 04:42:49 +00:00
Ethan Yonker 477da64554 Merge branch 'android-7.1' of github.com:omnirom/android_bootable_recovery 2017-09-25 21:11:49 -05:00
android-build-team Robot 43da853122 release-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-4343541 snap-temp-L73700000103533431
Change-Id: I53b93674a347f24620ce431ac12ac09230486e32
2017-09-17 07:33:08 +00:00
Bill Yi c9b0416842 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: Ia05d14ff5b7f6b283f46566c88a4edc4a89d5576
2017-09-16 05:39:19 -07: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
android-build-team Robot 739b576006 release-request-946c768b-83eb-4b7b-83e7-5737856fa8ec-for-git_oc-mr1-release-4326576 snap-temp-L80300000101054689
Change-Id: Ie2b658ebaabe2fdfb39b9443cd1d1b544a573faa
2017-09-10 07:28:56 +00:00
Tao Bao 17fa5c7cab ui: Manage menu_ with std::vector.
Prior to this CL, menu_ is allocated with a fixed length of text_rows_.
However, because we support scrollable menu in wear_ui, there might be
more menu entries than text_rows_, which would lead to out-of-bounds
array access. This CL addresses the issue by switching to std::vector.

Bug: 65416558
Test: Run 'View recovery logs' on angler.
Test: Set large margin height that leaves text_rows less than 21. Then
      run 'View recovery logs' with 21 menu entries.
Change-Id: I5d4e3a0a097039e1104eda7d494c6269053dc894
(cherry picked from commit e15d7a5104)
2017-09-08 15:28:04 -07: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
android-build-team Robot 3a3ccf8b0f release-request-81b48854-d0e0-49af-bcf2-857273cbb8dc-for-git_oc-mr1-release-4306444 snap-temp-L17300000097872583
Change-Id: I34720566a178fe123dbbd024b25396ddc80bec8c
2017-08-30 07:25:18 +00:00
Bill Yi c16d222593 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Exempt-From-Owner-Approval: translation import

Bug: 64712476
Change-Id: Ife1e0455a5433bc0cb0e15b0aabf2beef1ba8827
2017-08-29 13:28:09 -07:00
Ethan Yonker 95e8007578 DO NOT MERGE Android 8.0 stuff
Change-Id: I8c8a9734adbf36c33463123844fa6e078934ae34
2017-08-24 21:45:50 -05:00
android-build-team Robot f425b88b16 release-request-cff6d9b6-a564-4d17-99cb-c2d0bb282758-for-git_oc-mr1-release-4293817 snap-temp-L12800000095933585
Change-Id: I2c1af830f9b14fc851f8a170e6bd290d0067142a
2017-08-23 07:28:18 +00:00
Tao Bao 2e1b3a418e Merge changes from topic "bug-64307776" into oc-mr1-dev
* changes:
  wear_ui: Expose menu_unusable_rows via Makefile var.
  Allow customizing WearRecoveryUI via Makefile variables.
2017-08-22 17:36:06 +00:00
kaneawk c75c8a2eb4 Remove duplicate entries & Improve Chinese translation
Change-Id: I3ed9b5731d63f69748fbbf99c626669db39a1eb4
2017-08-18 19:36:03 +08:00