1. 08 Aug, 2017 1 commit
    • nkk71's avatar
      Show scrollbar on TWRP Settings · 1a230e46
      nkk71 authored
      * The scrollbar is not shown when more options
        are actually available.
      
      Change-Id: I78b223c5fe12f0cbd73357ca6615f83ff04201e1
      1a230e46
  2. 21 Jul, 2017 1 commit
  3. 06 Jul, 2017 2 commits
  4. 24 Jun, 2017 1 commit
  5. 17 Jun, 2017 2 commits
    • nkk71's avatar
      Fix incorrect 'unlink' return value check · 9efbe769
      nkk71 authored
      Change-Id: I430f6bb21a5fd87e0422420463e8bb96c4a612e1
      9efbe769
    • bigbiff bigbiff's avatar
      twrpDigest refactor · 56cf5646
      bigbiff bigbiff authored
      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
      56cf5646
  6. 10 Jun, 2017 1 commit
  7. 08 Jun, 2017 1 commit
  8. 06 Jun, 2017 1 commit
    • Ethan Yonker's avatar
      Fix minui issues for some build trees · 39662b29
      Ethan Yonker authored
      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
      39662b29
  9. 05 Jun, 2017 1 commit
    • nailyk-fr's avatar
      ors: Update doc · 79605aec
      nailyk-fr authored
      Change-Id: Ia026a8578262d4bb231e1727313ed1f5e323b880
      79605aec
  10. 04 Jun, 2017 2 commits
    • nkk71's avatar
      Improve decrypted partition logging · ffb02bdf
      nkk71 authored
      * Partition information should be updated after successful
        decryption (both userdata and adopted) and then logged
      
      * Fix adopted storage nickname being ""
      
      Change-Id: Idcdab84f339e932e62880089bad36e206920dd70
      ffb02bdf
    • bigbiff bigbiff's avatar
      adbbackup: write smaller reads less than 512 bytes · 4a2a1914
      bigbiff bigbiff authored
      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
      4a2a1914
  11. 03 Jun, 2017 1 commit
    • Ayke van Laethem's avatar
      Fix various memory errors · 05c2de4c
      Ayke van Laethem authored
      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
      05c2de4c
  12. 23 May, 2017 1 commit
    • nkk71's avatar
      cryptfs: Remove dm-crypt device on failed table load · 50730033
      nkk71 authored
       * 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
      50730033
  13. 16 May, 2017 1 commit
    • that's avatar
      etc: remove "." from LD_LIBRARY_PATH · 9c3b7e99
      that authored
      We shouldn't load libraries from some random working directory.
      For example it breaks busybox when you're in /system/lib.
      
      Change-Id: Ia1f8f4fda9e6182c0cd8c5ac727c2b1eb09c84a2
      9c3b7e99
  14. 15 May, 2017 2 commits
  15. 12 May, 2017 2 commits
  16. 10 May, 2017 1 commit
  17. 01 May, 2017 1 commit
  18. 23 Apr, 2017 1 commit
    • bigbiff bigbiff's avatar
      ADB Backup: fix adb restore issues · b5ecaad2
      bigbiff bigbiff authored
      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
      b5ecaad2
  19. 08 Mar, 2017 1 commit
    • Ethan Yonker's avatar
      3.1.0 · 76958ae9
      Ethan Yonker authored
      Change-Id: Iab21513c7d703304a4591fdf5af1317e2336a8a7
      76958ae9
  20. 07 Mar, 2017 2 commits
  21. 06 Mar, 2017 4 commits
    • nkk71's avatar
      vold_decrypt: Add back missing xml and get rid of compiler warning · 201d4b21
      nkk71 authored
      Change-Id: I883112e2618f560e96002e2076e2735cc20cfac3
      201d4b21
    • Ethan Yonker's avatar
      Add TWRP app install to landscape and watch themes · 64c5c0a9
      Ethan Yonker authored
      Change-Id: Id48245218dc3ee3c6506521ce0134e6a579b6f4a
      64c5c0a9
    • nkk71's avatar
      crypto: Use system's vold for decryption · 71c6c50d
      nkk71 authored
        If TWRP crypto fails to decrypt partition, mount the system
        partition and use system's own vold to attempt decryption.
        This provides a fallback for proprietary OEM encryption as well as
        encryption methods which TWRP hasn't been updated for.
      
        Requirements in device tree:
        * fstab.{ro.hardware} in device/recovery/root
          The fstab does not need to be complete, but it does need the
          data partition and the encryption entries.
      
        * 'TW_CRYPTO_USE_SYSTEM_VOLD := true' in BoardConfig
        or
        * 'TW_CRYPTO_USE_SYSTEM_VOLD := <list of services>'
      
        Notes:
        * Setting the flag to 'true' will just use system's vdc+vold
          or
        * Setting the flag with additional services, will also start them
          prior to attempting vdc+vold decryption, eg: for qualcomm based
          devices you usually need 'TW_CRYPTO_USE_SYSTEM_VOLD := qseecomd'
      
        * For each service listed an additional import will be automatically
          added to the vold_decrypt.rc file in the form of
          init.recovery.vold_decrypt.{service}.rc
          You will need to add any not already existing .rc files in
          your device/recovery/root folder.
      
        * The service names specified in the vold_decrypt.{service}.rc files
          have to be named 'sys_{service}'
          eg: 'service sys_qseecomd /system/bin/qseecomd'
      
        * Any service already existing in TWRP as {service} or sbin{service} will
          be stopped and restarted as needed.
      
        * You can override the default init.recovery.vold_decrypt.rc file(s)
          by placing same named ones in your device/recovery/root folder.
          If you do, you'll need to manually add the needed imports.
      
        * If /vendor and /firmware folders are temporarily moved and symlinked
          to the folders and files in the system partition, the properties
          'vold_decrypt.symlinked_vendor' and 'vold_decrypt.symlinked_firmware'
          will be set to 1.
          This allows for additional control in the .rc files for any extra
          actions (symlinks, cp files, etc) that may be needed for decryption
          by using: on property:vold_decrypt.symlinked_vendor=1 and/or
          on property:vold_decrypt.symlinked_firmware=1 triggers.
      
        Debug mode: 'TW_CRYPTO_SYSTEM_VOLD_DEBUG := true' in BoardConfig
        * Specifying this flag, will enable strace on init and vdc, which will
          create separate log files in /tmp for every process created, allowing
          for detailed analysis of which services and files are being accessed.
        * Note that enabling strace will expose the password in the logs!!
        * You need to manually add strace to your build.
      
      Thanks to @Captain_Throwback for co-authoring and testing.
      
      Tested successfully on HTC devices:
      M8 (KK through MM), M9 (MM and N), A9 (N), 10 (N), Bolt (N),
      Desire 626s (MM), U Ultra (N)
      
      HTC One X9 (MTK device)
      
      And by Nikolay Jeliazkov on: Xiaomi Mi Max
      
      Change-Id: I4d22ab55baf6a2a50adde2e4c1c510c142714227
      71c6c50d
    • TheStrix's avatar
      Fix missing libf2fs.so needed by mkfs.f2fs · 09e8693b
      TheStrix authored
       * Relink libf2fs.so in all cases except PLATFORM_SDK_VERSION=23
         with no CM_PLATFORM_SDK_VERSION set as 4 or above.
      
      Change-Id: I58bcc7daeb2d67d41b8912cea73690d94f26dd56
      09e8693b
  22. 01 Mar, 2017 5 commits
    • Matt Mower's avatar
      ADBBU: Cleanup string usage/namespace · cc19c6f9
      Matt Mower authored
      * string.h header defined twice
      * Specify namespace for stringstream
      
      Change-Id: I7002671c7c0108007adffac9d4d5016b1482f5e6
      cc19c6f9
    • Ethan Yonker's avatar
      Timeout for decrypt · ddb63e27
      Ethan Yonker authored
      Sometimes, usually because of proprietary binaries related to keymaster,
      decrypt will hang waiting for the keymaster to initialize forever. This patch
      enables a timeout so that we don't get stuck trying to decrypt forever.
      A timeout is especially important when dealing with the default password
      because the user has no option to cancel when TWRP tries to decrypt.
      
      NOTE: This patch only adds a timeout for FDE. FBE will require some special
      handling because we need access to some static data and that data is not
      available across a fork.
      
      Special thanks to nkk71 for cleaning up some issues in my patch set.
      
      Change-Id: Iccf2fe769ac27a7dcd6bfebfe7d2e9eddd034308
      ddb63e27
    • that's avatar
      gui: preserve order of gui_print vs gui_msg · a9dd9f03
      that authored
      - rename __gui_print to internal_gui_print (__* is reserved for compiler)
      - translate outstanding messages in internal_gui_print
      - add locking because background thread could print while we render
      - minor cleanup
      
      Change-Id: Ib687d2cfb4763ad08ad4d4b76daf5b129d61d2e2
      a9dd9f03
    • big biff's avatar
    • big biff's avatar
      ced41a4a
  23. 28 Feb, 2017 1 commit
  24. 25 Feb, 2017 1 commit
  25. 24 Feb, 2017 2 commits
    • Matt Mower's avatar
      Tweak MTP startup routine · 653a1709
      Matt Mower authored
      * As a precaution, (non-permanently) disable MTP if TWRP crashes.
      * Remove a duplicate logging of 'Starting MTP'.
      * Combine and improve readability of conditions before MTP starts.
      * Remove unnecessary Disable_MTP() call if conditions unsatisfied.
      
      Change-Id: I61ac772fc123da5b84c3061fbcf2116531bc4e2f
      653a1709
    • Matt Mower's avatar
      Fix handling of USB config during MTP switching · e07f0109
      Matt Mower authored
      The property set of sys.usb.config was not part of the original 'Only
      change USB mode to mtp when ready for MTP' commit. Further, it adds an
      additional USB off/on toggle to the MTP startup routine, potentially
      confusing the host computer. The default init.recovery.usb.rc already
      sets the usb functions to 'adb' during 'on fs'.
      
      It is possible that devices could run into issues with MTP startup due
      to sys.usb.config not yet being set. This is actually due to a poor
      design decision in Enable_MTP(), where sys.usb.config would not be
      configured for mtp if sys.usb.config had never been set. It is not
      necessary to check for a previous value, just set it.
      
      Fix the USB PID for adb-only mode in Disable_MTP().
      
      Change-Id: I21b5e64c9bdcd3104372a8b4eb8ea50cf4561892
      e07f0109
  26. 23 Feb, 2017 1 commit