Commits on Jun 6, 2015
  1. Fix system read only behavior during boot

    Dees-Troy authored and mdmower committed Jun 4, 2015
    Change-Id: I90dbdd06465e2ddaaade86b930beff91991432eb
  2. Cleanup device_id retrieval

    mdmower committed Feb 23, 2015
      - provide the header that defines property functions/constants
      - actually look for hardware_id before attempting to append it
    * Perform string length checks rigorously.
    * Only perform newline removal if string is used before sanitization.
    * Copy changes to htcdumlock, but rely on cmdline only.
    Change-Id: I720d3bc8416758f5f83782e8bc298b32eda1a573
Commits on Jun 4, 2015
  1. avoid possible dead loop for invalid utf8

    xuefer authored and Dees-Troy committed Apr 16, 2015
    Change-Id: Ida48b7ff119030312836aa109072ac4de7c5b9d6
Commits on Jun 1, 2015
  1. gui: set tw_file to the currently flashed file name without path

    that1 committed Jun 1, 2015
    To allow themes to show more of the file name on narrow displays.
    Change-Id: I4962eed5e4a01f73a3cde126f2ba56428209fccc
  2. Fix double free crash during encrypted backups

    Dees-Troy committed Jun 1, 2015
    Calling flush_libtar_buffer would inadvertantly set buffer_status
    when no buffer is currently allocated. Later when we called
    free_libtar_buffer, this would attempt to free the write_buffer
    and cause a crash. This patch checks the value of buffer_status in
    flush_libtar_buffer to prevent us from freeing the buffer when it
    is not necessary.
    Change-Id: Ic5b462fe5881be6e9c6fcc355b369bc90477f737
  3. gui: move retainaspect handling to the resource ctors

    that1 authored and Dees-Troy committed May 6, 2015
    LoadResources should only decide on the resource type,
    everything else is handled by the resources themselves.
    Change-Id: I30f68293960c23560979f650efc4393992cf5824
  4. Don't try to read temparature file if TW_NO_CPU_TEMP is set to true.

    Agontuk authored and Dees-Troy committed Apr 22, 2015
    Otherwise, recovery log gets filled up with
    "I:Cannot find file /sys/class/thermal/thermal_zone0/temp"
    This also fixes build warnings due to duplicate definition of TW_NO_CPU_TEMP.
    Change-Id: Ib7fdcd103d6684249c38c8b14ec85f2faba158f6
Commits on May 30, 2015
  1. Fix unable to uncheck the mount read only check box

    Dees-Troy committed May 30, 2015
    Change-Id: I1bbc25df6f35f79549f1eb06feb4db9ec0475aa5
Commits on May 29, 2015
  1. remove useless memset and \n

    xuefer authored and Dees-Troy committed Apr 15, 2015
    fgets reads up to one byte less than size then with \0 at the end
    adding \n after \0 is useless too
    Change-Id: I7758d7a8f885bdde2b491a9cb75800f831d77c1f
  2. minuitwrp: remove unused variable

    ramsudharsan authored and Dees-Troy committed Apr 10, 2015
    Change-Id: I0beb3b349efd4f08491c92bb51c12caf3653cb73
    Signed-off-by: ramsudharsan <>
Commits on May 28, 2015
  1. Add resize2fs and ability to run resize2fs via GUI

    Dees-Troy committed May 28, 2015
    Note: Only works on ext2/3/4 partitions. Only tested on ext4.
    We can use this in some cases to resize the data partition if an
    incorrect fstab caused recovery to not reserve the 16KB for a
    crypto footer.
    Sometimes the BoardConfig for a custom ROM does not have the
    correct size for the system partition and if the ROM flashes a
    raw system image, that image will not take up the full block
    device. Running resize2fs can fix the size and may allow more
    room in the system partition for customizations like busybox or
    a larger gapps package.
    Sometimes flashing a factory image may flash userdata with an
    image with a file system that does not take up the full size of
    the block device (e.g. factory images for the Nexus 6 will flash
    userdata with a ~24GB userdata image, wasting ~30GB of space).
    Using resize2fs we can easily fix this issue without having to do
    a full format data.
    Change-Id: I631f5c6f567bbc6a9241e5dd95f1e435820a1b13
Commits on May 27, 2015
  1. Mount system as read-only by default

    Dees-Troy committed May 18, 2015
    Mounting system as rw can prevent future OTA updates. The purpose
    of this patch set is to prevent TWRP from mounting sytem as rw on
    the first boot. Device maintainers should update their twrp.fstab
    files on these devices to include an additional line:
    /system_image emmc /dev/block/../system
    This line will allow TWRP to create a raw system image backup to
    ensure that the user can return to an original state for future
    OTA updates.
    Change-Id: I8929d85bc3a5b96cc564bc7f734b58d5612ec833
Commits on May 19, 2015
  1. Only include uncrypt if not in system/core

    mdmower authored and Dees-Troy committed May 14, 2015
    Some android trees have uncrypt in system/core (cm-11.0). This breaks
    building recovery since two modules of the same name conflict. Only
    include the local copy of uncrypt if it doesn't already exist in
    Change-Id: Ie2d7cdedf0d4c9ad148c43b317d1f22d1e50e1f7
  2. recovery: Add lz4 libs if available

    tdmcyngn authored and Dees-Troy committed Apr 17, 2015
     * Required by transparent compresssion in make_ext4fs.
    Change-Id: I566c9e1281cc0dd725e96db32da0a1c3c000030e
  3. partitionmanager: remove broken and unused progress calculation code

    that1 authored and Dees-Troy committed May 9, 2015
    img_bps and file_bps were uninitialized (the values are only calculated
    at the end of the backup), and occasionally could be 0.
    Don't divide by zero, it's bad for the program's health.
    Change-Id: I3f6f5a144c24f32508ca25de49491261c7f6e674
  4. partition: support texfat module

    that1 authored and Dees-Troy committed Mar 31, 2015
    Change-Id: I21d0498fc16fdb29d09d6e6fe715e57d1f35e72b
  5. Backup: fix 'out of memory' issue when backing up large partition as …

    codelover authored and Dees-Troy committed Mar 28, 2015
    Restore: improve image restoration speed
    * Workaround for devices that need to backup partition as image, eg: dm-verity
    * Increased block size used for partition restore, now using 8M instead of 4K
    Change-Id: Ie7e7ff3283d71a7e459d76f72caea9f57e71c628
Commits on May 18, 2015
  1. bootloader: align with AOSP code

    that1 authored and Dees-Troy committed Apr 13, 2015
    - Define a minimal Volume structure so that AOSP code for handling /misc
      works in TWRP without major changes.
    - Remove set/get_bootloader_message_*_name
    Change-Id: Ifcee59568141a184adebb94b8ef8beca072a7942
  2. GUI: Prevent duplicate page overlays

    mdmower authored and Dees-Troy committed Apr 9, 2015
    If a page is requested for overlay, ensure it doesn't already exist in
    the stack of existing overlays. If it does, erase the existing page
    and push_back the new one.
    Change-Id: I9feeea06cf7aad2e08a8c3bc567aaa761db2c3bc
  3. TZ: Update default time zone string

    mdmower authored and Dees-Troy committed Apr 8, 2015
    The strings were updated in but the
    default values where accidentally forgotten.
    Change-Id: I423f315cd9509fc61f14bfe4c13a28fbc2722315
Commits on May 15, 2015
  1. Support Qualcomm hardware decrypt

    Dees-Troy committed Jan 16, 2015
    Change-Id: I121ef0f5da209be48f6d87559d539c7fc6d85336
Commits on Apr 23, 2015
  1. Add option to use new heap_id_mask instead of old heap_mask

    Kra1o5 committed Apr 23, 2015
    Use TW_NEW_ION_HEAP := true to use it
    Change-Id: I2ad105fa6d122b460ed4b5dc78563077b7904567
Commits on Apr 3, 2015
  1. twrpTar: fix segfault after encrypted backups

    that1 committed Apr 3, 2015
    also use unsigned int for core_count instead of unsigned long long.
    I'll change it back when 4-billion-core devices are common.
    - cast return value via intptr_t (may be important for 64 bit platforms)
    - output errors from TWFunc::Wait_For_Child to console
    Change-Id: I04158daa0b64e44d68e179d626a83d81cf5d49f7
Commits on Mar 26, 2015
  1. bootloader: fix crash with empty lines in /cache/recovery/command

    that1 committed Mar 26, 2015
    original fix from commit 93ffa75
    copied to our code.
    Also fixed a whitespace issue in the same code block.
    Change-Id: I6396803659c6880cde4f2b2ef08efab5721c215d
Commits on Mar 25, 2015

    Dees-Troy committed Mar 25, 2015
    Change-Id: Ibab69893bee968cfac8e25a4f166acf7cc8b4fc9
  2. Fix reboot for some devices

    Dees-Troy committed Mar 25, 2015
    Change-Id: I06caac2e80bd7eb311778796f974846e9ce844fa
  3. gui: add DST rules to time zones for USA and Europe

    that1 authored and Dees-Troy committed Mar 24, 2015
    This should fix daylight saving time display for most users.
    For fully correct time zones we need the tzdata database.
    Change-Id: I7b7693ab0abaf20be217bd06d525f03fb89b7217
Commits on Mar 20, 2015
  1. Fix TWFunc::Wait_For_Child reporting success when child segfaults

    Tasssadar authored and Dees-Troy committed Mar 20, 2015
    Change-Id: Ic17624b32ca4aea43c72aea0c3d6dec0441ddee4
    Signed-off-by: Vojtech Bocek <>
  2. libtar: fix handling of files bigger than 2 GiB

    Tasssadar committed Mar 20, 2015
    Change-Id: I96dc1b52b2e4edf366e70a927b263a9aab3e85b7
    Signed-off-by: Vojtech Bocek <>
Commits on Mar 19, 2015
  1. updater: only include tune2fs support when libtune2fs is available

    Dees-Troy committed Mar 19, 2015
    Change-Id: Iebf965bb7f5352115be4039aa6ca5be5a6a6d219
  2. Allow multiple overlays

    Dees-Troy committed Mar 16, 2015
    This effectively allows us to support popup dialogs and the like.
    Change-Id: Iafb3fa60ed635287cb59dce118f74dc8f2a4e60a
  3. Ingore touch events for 0,0

    Dees-Troy committed Mar 18, 2015
    Change-Id: I63eb29d7a39956d92cb5da81c5cb4405930d43ae
  4. Fix non-working "Do Not Install" button on "installsu" page.

    codelover authored and Dees-Troy committed Mar 14, 2015
    * Applicable to non-rooted devices running portrait mode only.
    * Touching the button has no effect, supposed to reboot/poweroff.
    Change-Id: If67649c4c83ddf549c833f94c66829e0877969c5
  5. Fix TWRP not mounting /data/media type storage if built with toolbox …

    codelover authored and Dees-Troy committed Mar 14, 2015
    * ONLY Applicable when building with 'TW_USE_TOOLBOX := true'
    * toolbox's 'mount' expects the first argument to be a block device, but /data/media is a dir.
    * Technically we don't 'mount' a dir to another, we 'bind' it instead.
    * So we define the mount option explicitly with '-o bind'. (supported by busybox 'mount' too)
    Change-Id: If97c9096167fb723150b949f4336005b3313a174
  6. toolbox: Include setenforce into tools.h

    HandyMenny authored and Dees-Troy committed Mar 17, 2015
    setenforce was filtered out of toolbox tools too early. Only filter it
    out just before symlinking (and only if busybox provides it).
    Change-Id: Id8c77d12b440416bfc21bf52705f2387ffd897cf