1. 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
  2. 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
  3. 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
  4. 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
  5. 23 Oct, 2014 3 commits
  6. 26 Aug, 2014 1 commit
  7. 25 Aug, 2014 1 commit
  8. 19 Aug, 2014 2 commits
  9. 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
  10. 22 Jul, 2014 2 commits
    • 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
    • Michael Runge's avatar
      Auto create parent directories for rename support · a91ecc59
      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.
      
      Change-Id: Iaa005a12ce800c39f4db20f7c25a2a68cb40a52d
      a91ecc59
  11. 17 Jun, 2014 1 commit
    • JP Abgrall's avatar
      Support F2FS for the data partition · 37aedb3f
      JP Abgrall authored
      
      This adds F2FS support
      - for wiping a device
      - for the install "format" command.
      
      Note: crypto data in "footer" with a default/negative length
      is not supported, unlike with "ext4".
      
      Change-Id: I8d141a0d4d14df9fe84d3b131484e9696fcd8870
      Signed-off-by: default avatarJP Abgrall <jpa@google.com>
      37aedb3f
  12. 09 Jun, 2014 1 commit
    • Doug Zongker's avatar
      advance progress bar during block OTA installations · 43772d26
      Doug Zongker authored
      While executing syspatch and package_extract_file() calls with don't
      care maps (both of which are used to rewrite the system image in
      incremental and full block OTAs, respectively), pass a progress
      callback in and use it to update the visible progress bar.
      
      Change-Id: I1d3742d167c1bb2130571eb5103b7795c65ff371
      43772d26
  13. 23 May, 2014 1 commit
    • Doug Zongker's avatar
      disable async reboot during package installation · c704e06c
      Doug Zongker authored
      The default recovery UI will reboot the device when the power key is
      pressed 7 times in a row, regardless of what recovery is doing.
      Disable this feature during package installation, to minimize the
      chance of corrupting the device due to a mid-install reboot.  (Debug
      packages can explicitly request that the feature be reenabled.)
      
      Change-Id: I20f3ec240ecd344615d452005ff26d8dd7775acf
      c704e06c
  14. 02 May, 2014 1 commit
    • Michael Runge's avatar
      Allow lines without = signs. · aa1a31e8
      Michael Runge authored
      The new build.prop for Sprout includes lines of the format:
      import xxx.prop
      
      These can be safely ignored when reading the property file.
      
      Change-Id: Ia84a138e71461ffe8e591e88143b9787873def29
      aa1a31e8
  15. 14 Mar, 2014 1 commit
  16. 25 Feb, 2014 1 commit
    • Doug Zongker's avatar
      support don't-care maps when writing the system image · c9d6e4ff
      Doug Zongker authored
      Make package_extract_file() take an optional third argument which is
      the pathname (in the package zip) of a map of don't-care regions to
      skip over when writing the file.
      
      Modify syspatch() to take source and target don't-care maps and use
      them when patching the system partition.
      
      Add the wipe_block_device() function to do a discard of all data on
      the partition.
      
      Change-Id: I8c856054edfb6aab2f3e5177f16d9d78add20be4
      c9d6e4ff
  17. 13 Feb, 2014 3 commits
    • Doug Zongker's avatar
      clean up some warnings when building recovery · 0d32f259
      Doug Zongker authored
      Change-Id: I1541534ee6978ddf8d548433986679ce9507d508
      0d32f259
    • Doug Zongker's avatar
      remove 'retouch' ASLR support · a1bc148c
      Doug Zongker authored
      Older versions of android supported an ASLR system where binaries were
      randomly twiddled at OTA install time.  Remove support for this; we
      now use the ASLR support in the linux kernel.
      
      Change-Id: I8348eb0d6424692668dc1a00e2416fbef6c158a2
      a1bc148c
    • Doug Zongker's avatar
      add syspatch support to updater · 52b4036e
      Doug Zongker authored
      Add the syspatch() function, which can apply xdelta3+xz patches using
      the libsyspatch library.
      
      Change-Id: Idc1921e449020923bcaf425a1983bec0833e47ed
      52b4036e
  18. 14 Dec, 2013 1 commit
  19. 26 Nov, 2013 1 commit
    • Doug Zongker's avatar
      add the functions for multi-stage packages to updater · c87bab10
      Doug Zongker authored
      In order to support multi-stage recovery packages, we add the
      set_stage() and get_stage() functions, which store a short string
      somewhere it can be accessed across invocations of recovery.  We also
      add reboot_now() which updater can invoke to immediately reboot the
      device, without doing normal recovery cleanup.  (It can also choose
      whether to boot off the boot or recovery partition.)
      
      If the stage string is of the form "#/#", recovery's UI will be
      augmented with a simple indicator of what stage you're in, so it
      doesn't look like a reboot loop.
      
      Change-Id: I62f7ff0bc802b549c9bcf3cc154a6bad99f94603
      c87bab10
  20. 07 Nov, 2013 1 commit
  21. 25 Sep, 2013 1 commit
  22. 17 Sep, 2013 1 commit
    • Nick Kralevich's avatar
      updater: Delete dead code · 46ab1b61
      Nick Kralevich authored
      set_perm and set_perm_recursive are no longer used. Delete.
      
      (cherry picked from commit 08ef9a95)
      
      Change-Id: I1bcc90ae19af9df4f0705496c5876987159f75ac
      46ab1b61
  23. 11 Sep, 2013 2 commits
  24. 10 Sep, 2013 2 commits
    • Nick Kralevich's avatar
      Don't apply permission changes to symlink. · e461251e
      Nick Kralevich authored
      Bug: 10183961
      Bug: 10186213
      Bug: 8985290
      Change-Id: I57cb14af59682c5f25f1e091564548bdbf20f74e
      e461251e
    • Nick Kralevich's avatar
      updater: introduce and set_metadata and set_metadata_recursive · 5dbdef0e
      Nick Kralevich authored
      Introduce two new updater functions:
      
      * set_metadata
      * set_metadata_recursive
      
      Long term, these functions are intended to be more flexible replacements
      for the following methods:
      
      * set_perm
      * set_perm_recursive
      
      Usage:
      
        set_metadata("filename", "key1", "value1", "key2", "value2", ...)
        set_metadata_recursive("dirname", "key1", "value1", "key2", "value2", ...)
      
      Description:
      
      set_metadata() and set_metadata_recursive() set the attributes on a file/directory
      according to the key/value pairs provided. Today, the following keys are
      supported:
      
      * uid
      * gid
      * mode (set_perm_extd only)
      * fmode (set_perm_extd_recursive only)
      * dmode (set_perm_extd_recursive only)
      * selabel
      * capabilities
      
      Unknown keys are logged as warnings, but are not fatal errors.
      
      Examples:
      
      * set_metadata("/system/bin/netcfg", "selabel", "u:object_r:system_file:s0");
      
      This sets the SELinux label of /system/bin/netcfg to u:object_r:system_file:s0.
      No other changes occur.
      
      * set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0);
      
      This sets /system/bin/netcfg to uid=0, gid=3003, mode=02750,
      selinux label=u:object_r:system_file:s0, and clears the capabilities
      associated with the file.
      
      * set_metadata_recursive("/system", "uid", 0, "gid", 0, "fmode", 0644, "dmode", 0755, "selabel", "u:object_r:system_file:s0", "capabilities", 0x0);
      
      All files and directories under /system are set to uid=0, gid=0,
      and selinux label=u:object_r:system_file:s0. Directories are set to
      mode=0755.  Files are set to mode=0644 and all capabilities are cleared.
      
      Bug: 10183961
      Bug: 10186213
      Bug: 8985290
      Change-Id: Ifdcf186a7ed45265511dc493c4036e1ac5e3d0af
      5dbdef0e
  25. 09 Sep, 2013 1 commit
  26. 18 Jul, 2013 1 commit
    • Nick Kralevich's avatar
      Update OTA installer to understand SELinux filesystem labels · 627eb30f
      Nick Kralevich authored
      Modify the OTA installer to understand SELinux filesystem labels.
      
      We do this by introducing new set_perm2 / set_perm2_recursive
      calls, which understand SELinux filesystem labels. These filesystem
      labels are applied at the same time that we apply the
      UID / GID / permission changes.
      
      For compatibility, we preserve the behavior of the existing
      set_perm / set_perm_recursive calls.
      
      If the destination kernel doesn't support security labels, don't
      fail. SELinux isn't enabled on all kernels.
      
      Bug: 8985290
      Change-Id: I99800499f01784199e4918a82e3e2db1089cf25b
      627eb30f
  27. 09 Jul, 2013 1 commit
    • Doug Zongker's avatar
      recovery: move log output to stdout · fafc85b4
      Doug Zongker authored
      Recovery currently has a random mix of messages printed to stdout and
      messages printed to stderr, which can make logs hard to read.  Move
      everything to stdout.
      
      Change-Id: Ie33bd4a9e1272e731302569cdec918e0534c48a6
      fafc85b4
  28. 10 Apr, 2013 1 commit
  29. 16 Oct, 2012 1 commit
  30. 20 Aug, 2012 1 commit
    • Doug Zongker's avatar
      add bonus data feature to imgdiff/imgpatch/applypatch · a3ccba6d
      Doug Zongker authored
      The bonus data option lets you give an additional blob of uncompressed
      data to be used when constructing a patch for chunk #1 of an image.
      The same blob must be available at patch time, and can be passed to
      the command-line applypatch tool (this feature is not accessible from
      edify scripts).
      
      This will be used to reduce the size of recovery-from-boot patches by
      storing parts of the recovery ramdisk (the UI images) on the system
      partition.
      
      Change-Id: Iac1959cdf7f5e4582f8d434e83456e483b64c02c
      a3ccba6d