1. 04 Aug, 2015 1 commit
    • Tao Bao's avatar
      udpater: Call fsync() after rename(). · be19dce8
      Tao Bao authored
      We need to ensure the renamed filename reaches the underlying storage.
      
      Bug: 22840552
      Change-Id: I824b6e9d8a9c5966035be7b42a73678d07376342
      (cherry picked from commit dc392262)
      be19dce8
  2. 01 Jul, 2015 1 commit
    • Tao Bao's avatar
      Revert "Zero blocks before BLKDISCARD" · 7125f959
      Tao Bao authored
      This reverts commit b65f0272.
      
      It slows down the update too much on some devices (e.g. increased
      from 8 mins to 40 mins to take a full OTA update).
      
      Bug: 22129621
      Change-Id: I4e8d4f6734967caf4f0d19c734027f7b6c107370
      7125f959
  3. 26 Jun, 2015 1 commit
    • Tao Bao's avatar
      More accurate checking for overlapped ranges. · c3dddce2
      Tao Bao authored
      A RangeSet has half-closed half-open bounds. For example, "3,5" contains
      blocks 3 and 4. So "3,5" and "5,7" are actually not overlapped.
      
      Bug: 22098085
      Change-Id: I362d259f8b5d62478858ad0422b635bc5068698d
      (cherry picked from commit c0f56ad7)
      c3dddce2
  4. 10 Jun, 2015 3 commits
  5. 09 Jun, 2015 1 commit
    • Sami Tolvanen's avatar
      Zero blocks before BLKDISCARD · 604c583c
      Sami Tolvanen authored
      Due to observed BLKDISCARD flakiness, overwrite blocks that we want
      to discard with zeros first to avoid later issues with dm-verity if
      BLKDISCARD is not successful.
      
      Bug: 20614277
      Bug: 20881595
      Change-Id: I0280fe115b020dcab35f49041fb55b7f8e793da3
      (cherry picked from commit 96392b97)
      604c583c
  6. 29 May, 2015 2 commits
  7. 16 May, 2015 1 commit
  8. 30 Apr, 2015 1 commit
  9. 17 Apr, 2015 1 commit
    • Sami Tolvanen's avatar
      Don't remove existing explicitly stashed blocks · 43b748f2
      Sami Tolvanen authored
      When automatically stashing overlapping blocks, should the stash
      file already exist due to an explicit stash command, it's not safe
      to remove the stash file after the command has completed.
      
      Note that it is safe to assume that the stash file will remain in
      place during the execution of the next command, so we don't have
      take other measures to preserve overlapping blocks.
      
      The stash file itself will be removed by a free command when it's
      no longer needed.
      
      Bug: 20297065
      Change-Id: I8ff1a798b94086adff183c5aac03260eb947ae2c
      43b748f2
  10. 23 Mar, 2015 1 commit
  11. 11 Mar, 2015 1 commit
  12. 27 Feb, 2015 2 commits
    • Narayan Kamath's avatar
      Remove more dead code from minzip. · e57c62a0
      Narayan Kamath authored
      I've added explanatory comments to mzExtractRecursive because
      that function will live on as a utility even after we move the
      zip format related logic to libziparchive.
      
      bug: 19472796
      
      Change-Id: Id69db859b9b90c13429134d40ba72c1d7c17aa8e
      e57c62a0
    • Narayan Kamath's avatar
      Remove more dead code from minzip. · 9c0f5d6b
      Narayan Kamath authored
      I've added explanatory comments to mzExtractRecursive because
      that function will live on as a utility even after we move the
      zip format related logic to libziparchive.
      
      bug: 19472796
      
      (cherry-picked from commit c9ccdfd7a42de08c47ab771b94dc5b9d1f957b95)
      
      Change-Id: I8b7fb6fa3eafb2e7ac080ef7a7eceb691b252d8a
      9c0f5d6b
  13. 23 Feb, 2015 1 commit
    • Narayan Kamath's avatar
      Fix a printf format warning. · d84b0559
      Narayan Kamath authored
      warning: format '%lu' expects argument of type 'long unsigned int', but
         argument 3 has type 'unsigned int' [-Wformat] sizeof(RangeSet) + num * sizeof(int));
      
      Change-Id: I4a3c6fc8d40c08ea84f8f5ee13f39350e4264027
      d84b0559
  14. 18 Feb, 2015 1 commit
  15. 05 Feb, 2015 1 commit
    • Elliott Hughes's avatar
      There's no GPL code in 'updater'. · 8a9014d5
      Elliott Hughes authored
      This notice was added for libsyspatch and libxdelta3, but that code
      has been removed since.
      
      Change-Id: I4008878ded56ca1d5094a8208728f8c02fe1fe03
      8a9014d5
  16. 30 Jan, 2015 2 commits
    • Sami Tolvanen's avatar
      Support resuming block based OTAs · 90221205
      Sami Tolvanen authored
      Add support for transfer list version 3, which allows us to
      verify the status of each command and resume an interrupted
      block based OTA update. Notes on the changes:
      
       - Move the previous BlockImageUpdateFn to a shorter and
         reusable PerformBlockImageUpdate, which can be used also
         in BlockImageVerifyFn for verification.
      
       - Split individual transfer list commands into separate
         functions with unified parameters for clarity, and use
         a hash table to locate them during execution.
      
       - Move common block reading and writing to ReadBlocks and
         WriteBlocks to reduce code duplication, and rename the
         readblock and writeblock to less confusing read_all and
         write_all.
      
      The coding style of the new functions follows the existing
      style in the updater/edify code.
      
      Needs matching changes from
        Ia5c56379f570047f10f0aa7373a1025439495c98
      
      Bug: 18262110
      Change-Id: I1e752464134aeb2d396946348e6041acabe13942
      90221205
    • Elliott Hughes's avatar
      Add missing includes. · cd3c55ab
      Elliott Hughes authored
      Change-Id: I06ea08400efa511e627be37a4fd70fbdfadea2e6
      cd3c55ab
  17. 01 Dec, 2014 1 commit
    • Bruce Beare's avatar
      Fix recovery image build for 32p · 4c3c7a96
      Bruce Beare authored
      When building for 32p, we need to be explicit that we wish to build
      the 32bit version of the binaries that will be placed in the recovery
      image. The recovery image doesn't actually care... but if we are not
      explicit in this, the makefiles will ask for the 64bit binaries but the
      Android.mk for the binaries will supply the 32bit images (causing the
      build to fail).
      
      Change-Id: Iea2d5f412740c082795da4358765751138a4b167
      4c3c7a96
  18. 22 Nov, 2014 1 commit
    • Michael Runge's avatar
      Add support for tune2fs file operations · acf47db2
      Michael Runge authored
      This allows tune2fs to be executed from within OTA scripts,
      allowing for file system modifications without formatting the
      partition
      
      Bug: 18430740
      Change-Id: I0c2e05b5ef4a81ecea043e9b7b99b545d18fe5e6
      acf47db2
  19. 21 Nov, 2014 1 commit
    • Michael Runge's avatar
      Add support for tune2fs file operations · b278c252
      Michael Runge authored
      This allows tune2fs to be executed from within OTA scripts,
      allowing for file system modifications without formatting the
      partition
      
      Bug: 18430740
      Change-Id: I0c2e05b5ef4a81ecea043e9b7b99b545d18fe5e6
      b278c252
  20. 24 Oct, 2014 2 commits
    • Michael Runge's avatar
      Log mount/unmount errors to UI · 5ddf4293
      Michael Runge authored
      Bug: 18092022
      Change-Id: I6c42038ebeb1cfc1e7ca0d3e12310fdce1b990b0
      5ddf4293
    • Nick Kralevich's avatar
      unconditionally apply SELinux labels to symlinks · 68802416
      Nick Kralevich authored
      At the end of the OTA script, we walk through /system, updating
      all the permissions on the filesystem, including the UID, GID,
      standard UNIX permissions, capabilities, and SELinux labels.
      
      In the case of a symbolic link, however, we want to skip most of
      those operations. The UID, GID, UNIX permissions, and capabilities
      don't meaningfully apply to symbolic links.
      
      However, that's not true with SELinux labels. The SELinux label on
      a symbolic link is important. We need to make sure the label on the
      symbolic link is always updated, even if none of the other attributes
      are updated.
      
      This change unconditionally updates the SELinux label on the symbolic
      link itself. lsetfilecon() is used, so that the link itself is updated,
      not what it's pointing to.
      
      In addition, drop the ENOTSUP special case. SELinux has been a
      requirement since Android 4.4. Running without filesystem extended
      attributes is no longer supported, and we shouldn't even try to handle
      non-SELinux updates anymore. (Note: this could be problematic if
      these scripts are ever used to produce OTA images for 4.2 devices)
      
      Bug: 18079773
      Change-Id: I87f99a1c88fe02bb2914f1884cac23ce1b385f91
      68802416
  21. 23 Oct, 2014 3 commits
  22. 25 Sep, 2014 1 commit
    • Doug Zongker's avatar
      support for version 2 of block image diffs · d83e4f15
      Doug Zongker authored
      In version 2 of block image diffs, we support a new command to load
      data from the image and store it in the "stash table" and then
      subsequently use entries in the stash table to fill in missing bits of
      source data we're not allowed to read when doing move/bsdiff/imgdiff
      commands.
      
      This leads to smaller update packages because we can break cycles in
      the ordering of how pieces are updated by storing data away and using
      it later, rather than not using the data as input to the patch system
      at all.  This comes at the cost of the RAM or scratch disk needed to
      store the data.
      
      The implementation is backwards compatible; it can still handle the
      existing version 1 of the transfer file format.
      
      Change-Id: I4559bfd76d5403859637aeac832f3a5e9e13b63a
      d83e4f15
  23. 08 Sep, 2014 1 commit
    • Doug Zongker's avatar
      support for version 2 of block image diffs · 52ae67d6
      Doug Zongker authored
      In version 2 of block image diffs, we support a new command to load
      data from the image and store it in the "stash table" and then
      subsequently use entries in the stash table to fill in missing bits of
      source data we're not allowed to read when doing move/bsdiff/imgdiff
      commands.
      
      This leads to smaller update packages because we can break cycles in
      the ordering of how pieces are updated by storing data away and using
      it later, rather than not using the data as input to the patch system
      at all.  This comes at the cost of the RAM or scratch disk needed to
      store the data.
      
      The implementation is backwards compatible; it can still handle the
      existing version 1 of the transfer file format.
      
      Change-Id: I7fafe741d86b92d82d46feb2939ecf5a3890dc64
      52ae67d6
  24. 04 Sep, 2014 2 commits
  25. 26 Aug, 2014 1 commit
  26. 25 Aug, 2014 1 commit
  27. 21 Aug, 2014 1 commit
    • Doug Zongker's avatar
      fix two bugs in block image updater · 1d5d6098
      Doug Zongker authored
      The computation of file offsets was overflowing for partitions larger
      than 2 GB.  The parsing of the transfer file could fail at the end if
      the data happened to not be properly null-terminated.
      
      Bug: 16984795
      Change-Id: I3ce6eb3e54ab7b55aa9bbed252da5a7eacd3317a
      1d5d6098
  28. 19 Aug, 2014 2 commits
  29. 06 Aug, 2014 1 commit
    • Doug Zongker's avatar
      remove spurious parens from error message · 2b5f0e0f
      Doug Zongker authored
      These error messages include empty parens after each string
      substition.  Ill-advised cut and paste, probably.
      
      Bug: 16467401
      Change-Id: Ib623172d6228354afdcc2e33442cc53a07f0ecbc
      2b5f0e0f
  30. 22 Jul, 2014 1 commit
    • Michael Runge's avatar
      Auto create parent directories for rename support · d29f641b
      Michael Runge authored
      Sometimes renames will move a file into a directory
      that does not yet exist.  This will create the
      parent directories, using the same symlink logic,
      to ensure that there is a valid destination.
      
      Bug: 16458395
      Change-Id: Iaa005a12ce800c39f4db20f7c25a2a68cb40a52d
      d29f641b