1. 27 Nov, 2017 1 commit
    • Ethan Yonker's avatar
      Support v2 fstab format · 6e8c27a5
      Ethan Yonker authored
      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
  2. 25 Aug, 2017 1 commit
  3. 23 Feb, 2017 1 commit
  4. 18 Jan, 2017 1 commit
  5. 26 Aug, 2016 1 commit
  6. 29 Jan, 2016 1 commit
  7. 25 Jan, 2016 1 commit
    • Ethan Yonker's avatar
      Adopted Storage support · 66a1949d
      Ethan Yonker authored
       -Detects, decrypts, and mounts an adopted SD card if a
        secondary block device is defined (usually mmcblk1)
       -Handles unified storage
       -Displays the adopted storage in MTP along with internal
       -Factory Reset - wiped just like a data media device, we
        retain the keys folder and the storage.xml during a
        factory reset
       -Backup / Restore
       -Disable mass storage when adopted storage is present
       -Read storage nickname from storage.xml and apply it to
        display names in the GUI
       -Read storage.xml and determine what storage location is in
        use for /sdcard and remap accordingly
      libgpt_twrp is source code mostly kanged from an efimanager
      project. It is GPL v2 or higher, so we will opt for GPL v3.
      Change-Id: Ieda0030bec5155ba8d2b9167dc0016cebbf39d55
  8. 23 Dec, 2015 1 commit
  9. 22 Dec, 2015 1 commit
    • Matt Mower's avatar
      mtp: Address clang compilation errors · 72cf09d6
      Matt Mower authored
      * Move default value of debug_enabled to declaration
      * Set more-correct fake values for MtpProperty sets
      Change-Id: Ife3c15ac6c908848c16a609e8e505336e53c19d8
  10. 09 Nov, 2015 1 commit
  11. 09 Feb, 2015 1 commit
  12. 02 Feb, 2015 1 commit
    • Ethan Yonker's avatar
      MTP: make MTP work even if unplugged and replugged · 1b03920c
      Ethan Yonker authored
      Set up a loop to keep trying to open / read the MTP device so that
      MTP will work even if the device is unplugged during boot or
      unplugged and replugged in.
      Change-Id: I0d3a3b7c91ce84a8cbed16caa4b15efee35b3641
  13. 27 Jan, 2015 1 commit
  14. 29 Dec, 2014 4 commits
  15. 22 Dec, 2014 1 commit
  16. 19 Dec, 2014 1 commit
    • Ethan Yonker's avatar
      MTP add/remove storage instead of disabling MTP · 726a0206
      Ethan Yonker authored
      Implement a pipe between TWRP and MTP to allow TWRP to tell MTP
      to remove storage partitions as they become unavailable (e.g.
      during a wipe, unmount, etc) instead of disabling MTP completely.
      This includes some fixes and improvements in destructors to
      properly remove / delete various items. This also means that we
      will not be toggling adb off and on quite as often.
      I do not like that we had to add another thread, but we were
      unable to use select() on the mtp_usb character device because
      this device does not support polling. Select always returned
      indicating that the mtp file descriptor was ready to be read and
      the resulting read would block. The read block prevented us from
      being able to include reading of the pipe between TWRP and MTP in
      the main MTP thread.
      We might want to add a return pipe letting TWRP know if the
      removal of the storage device was successful, but I am not sure
      how we want to implement this. It would invovle timeouts in both
      TWRP and MTP to ensure that we returned a failure indicator in a
      timely manner to TWRP and prevent deleting the storage device in
      the case of a failure. Right now we make no attempt to ensure that
      an MTP operation is underway like a large file transfer, but we
      were not doing anything like this in the past. In some respects we
      have limited control over what happens. If the user installs a
      zip that unmounts a storage partition, we will not know about the
      change in storage status anyway. Regular Android does not have
      these troubles because partitions rarely get unmounted like in
      recovery. At some point, we have to hold the user accountable for
      performing actions that may remove a storage partition while they
      are using MTP anyway.
      Ideally we do not want to toggle the USB IDs and thus toggle adb
      off and on during early boot, but I am not sure what the best way
      to handle that at this time.
      Change-Id: I9343e5396bf6023d3b994de1bf01ed91d129bc14
  17. 12 Dec, 2014 1 commit
    • Ethan Yonker's avatar
      Attempt to set the proper uid/gid/contexts on new files and dirs · 4b94cfd3
      Ethan Yonker authored
      Files and folders that we create during backups, copy log, or MTP
      operations often do not have the proper uid/gid/contexts assigned.
      We will attempt to read the proper contexts from the settings
      storage path and assign those same contexts to any files or dirs
      that we create.
      Change-Id: I769f9479854122b49b499de2175e6e2d026f8afd
  18. 04 Dec, 2014 1 commit
  19. 25 Nov, 2014 1 commit
    • Ethan Yonker's avatar
      TWRP MTP: make sure inotify_fd is set · cdc3ef5f
      Ethan Yonker authored
      Originally the inotify_init() call was part of a separate thread
      which would occasionally allow the readDirs function to run and
      start trying to add watches before inotify_fd was init'ed properly
      and result in the add watch failing. This patch set relocates the
      inotify_init call to happen outside and before starting the
      separate thread to ensure that inotify_fd is set properly.
      Change-Id: I8748c23473b60b57887df9d692834f3d2b249802
  20. 06 Nov, 2014 1 commit
  21. 14 Oct, 2014 1 commit
  22. 08 Oct, 2014 1 commit
    • that's avatar
      mtp: cleanup, fixes and performance improvements · 9e0593ea
      that authored
      - use std::map instead of linked list
      - read directories on demand
      - fix writing zip files to storage root
      - fix creating directories
      - lots of minor fixes
      - simplify generation of storage IDs and make them spec compliant
      Change-Id: I2137c27549ddbdc58466f2e3aeda464fac70a3c5
  23. 07 Oct, 2014 1 commit
  24. 13 Sep, 2014 1 commit
  25. 11 Sep, 2014 2 commits
  26. 09 Sep, 2014 1 commit
    • bigbiff bigbiff's avatar
      MTP: fix some code paths · 1812c89f
      bigbiff bigbiff authored
      Still doesn't fix the bug of copying zip files to the root of
      storage in Windows.
      Change-Id: Iddec66a49c17cf48cbd1c67ad6679349ece8e05c
  27. 06 Sep, 2014 1 commit
  28. 05 Sep, 2014 1 commit
  29. 04 Sep, 2014 4 commits
  30. 03 Sep, 2014 4 commits