Commit graph

3229 commits

Author SHA1 Message Date
Tao Bao
276a4f4512 am 2f44006a: am 8f4b307e: Merge "releasetools: Fix the bug when deleting files."
* commit '2f44006a4bbfe6eb7af4d69a24bd068a0875a304':
  releasetools: Fix the bug when deleting files.
2015-09-04 18:02:30 +00:00
Tao Bao
2f44006a4b am 8f4b307e: Merge "releasetools: Fix the bug when deleting files."
* commit '8f4b307e56ea73153f249b44dc2b15de77e058f7':
  releasetools: Fix the bug when deleting files.
2015-09-04 17:56:22 +00:00
Tao Bao
8f4b307e56 Merge "releasetools: Fix the bug when deleting files." 2015-09-04 17:05:55 +00:00
Tao Bao
a77d41e2f7 releasetools: Fix the bug when deleting files.
For file-based OTAs, we used to remove unneeded files in ascending
order, which failed to delete non-empty directories. Reverse the order
to fix the issue.

For example, now we have the following in our generated script:
  delete("/system/app/Calculator/arm/Calculator.odex",
         "/system/app/Calculator/arm/",
         "/system/app/Calculator/Calculator.apk",
         "/system/app/Calculator/");

Bug: 22960996
Change-Id: I0d36d29b7862fb53bf55bf5685a990180f9c0b3b
2015-09-03 21:21:55 -07:00
Dan Willemsen
1205f2d953 am f18345af: am 4379e2b8: Merge "Add LOCAL_MODULE_HOST_OS"
* commit 'f18345af74ad00d057adad89b1d154471ebf118f':
  Add LOCAL_MODULE_HOST_OS
2015-09-04 01:39:49 +00:00
Dan Willemsen
f18345af74 am 4379e2b8: Merge "Add LOCAL_MODULE_HOST_OS"
* commit '4379e2b8bbaf2a02777f189c758e251015eb7f76':
  Add LOCAL_MODULE_HOST_OS
2015-09-04 01:31:22 +00:00
Dan Willemsen
859ac34064 Add LOCAL_MODULE_HOST_OS
Instead of wrapping a host module definition in 'ifeq($(HOST_OS),...)'
in the Android.mk files, define which hosts are supported using
LOCAL_MODULE_HOST_OS.

A blank LOCAL_MODULE_HOST_OS means that linux and darwin are supported.
A non-empty LOCAL_MODULE_HOST_OS lists the supported HOST_OSs.

Change-Id: I1e342d1908cfa00aef2c39c145b4f5f81c373bc6
2015-09-03 16:40:51 -07:00
Tao Bao
11a93a4831 am 3fb3ece6: am c6c9c61d: Merge "releasetools: Fix the bug in symlink deletion."
* commit '3fb3ece67e643e7437f222068e61ee254ee90b26':
  releasetools: Fix the bug in symlink deletion.
2015-09-03 02:15:37 +00:00
Tao Bao
3fb3ece67e am c6c9c61d: Merge "releasetools: Fix the bug in symlink deletion."
* commit 'c6c9c61d05ffcc41239baaa1f3011b17e8518b65':
  releasetools: Fix the bug in symlink deletion.
2015-09-03 01:40:41 +00:00
Tao Bao
84006eacd0 releasetools: Fix the bug in symlink deletion.
For file-based OTAs, symlinks in the source build but not in the target
build will be deleted. However, if a symlink is replaced by a regular
file in the target build, the file will be accidentally deleted when
applying (resuming) the same package again.

Verify the checksum of a symlink that will be unpacked or renamed to.
Delete the file only if it doesn't have the target checksum.

Bug: 23646151
Change-Id: Ie322abb6022b6fa812c6b36a3127872d9614fc3b
2015-09-02 17:51:16 -07:00
smain@google.com
022b2bbb14 am 59bc4701: am deb3c8c4: am 77c1ff7b: am 4ffdc8fa: Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
* commit '59bc470107ad2e1aac75155f3acc07755232534c':
  Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
2015-08-31 22:07:09 +00:00
smain@google.com
deb3c8c453 am 77c1ff7b: am 4ffdc8fa: Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
* commit '77c1ff7bf983ef4622ecb227d4e5b0c75728c28f':
  Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
2015-08-31 21:46:46 +00:00
Tao Bao
418632f517 resolved conflicts for merge of 50827e0d to mnc-dr-dev-plus-aosp
Change-Id: I88f94e520f59a381f441de9d4bad158b6c7045c4
2015-08-31 14:38:31 -07:00
smain@google.com
77c1ff7bf9 am 4ffdc8fa: Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
* commit '4ffdc8faf2c795027f38b6ef4685dd6d1179878e':
  Fix bug that caused table of Studio links to result in "stand-alone" tools instructions. bug: 23570662
2015-08-31 21:36:29 +00:00
Tao Bao
29c245e803 am e337093e: Merge changes from topic \'stash-size\' into mnc-dr-dev
* commit 'e337093e6c5d502f0f4094639b41c001b3048d0f':
  Split large files for BBOTA v3.
  Revise stash for BBOTAs when needed.
  Assert the stash size when generating OTAs.
2015-08-31 21:10:06 +00:00
smain@google.com
4ffdc8faf2 Fix bug that caused table of Studio links to result in "stand-alone" tools instructions.
bug: 23570662

Change-Id: I7482eddbeffa581307bf7f76b9653de41966b6f9
2015-08-28 17:27:47 -07:00
Tao Bao
8c85549a3c am c9ff5102: am 35da9685: Merge "Use the basename of file_contexts from the info dict."
* commit 'c9ff5102ad9258f9189afd3bd15eb58cab186215':
  Use the basename of file_contexts from the info dict.
2015-08-28 18:56:36 +00:00
Tao Bao
c9ff5102ad am 35da9685: Merge "Use the basename of file_contexts from the info dict."
* commit '35da9685f0d3bb367b50aaa4c476b12907099f77':
  Use the basename of file_contexts from the info dict.
2015-08-28 18:46:31 +00:00
Tao Bao
79735a6a82 Use the basename of file_contexts from the info dict.
Changes in [1] break the backward compatibility of the OTA scripts. Fix
the issue by extracting the file basename from the info dict in
META/misc_info.txt.

[1] commit d3a803e668

Bug: 23620049
Change-Id: I40a5625bbe0beb295f34b2328906a4a4283fe59b
2015-08-28 11:17:38 -07:00
Dan Willemsen
00cf9d5008 am 399c59f3: am d5deac8d: Merge "Add _(darwin|linux|windows)"
* commit '399c59f3aa3b7f025a8ec5b0b60af402f9954142':
  Add _(darwin|linux|windows)
2015-08-28 03:55:05 +00:00
Dan Willemsen
399c59f3aa am d5deac8d: Merge "Add _(darwin|linux|windows)"
* commit 'd5deac8db951ec0a1c9edd806ea1758b836f8c46':
  Add _(darwin|linux|windows)
2015-08-28 03:49:01 +00:00
Dan Willemsen
7a5498568f Add _(darwin|linux|windows)
So that we can support building both linux and windows binaries at the
same time on a linux host. This replaces the ifeq($(HOST_OS),...) checks
in Android.mk files.

Bug: 23566667

Change-Id: I693e11984e36d55bb6f09fa0d49bc485463e16fb
2015-08-28 03:36:22 +00:00
Tao Bao
5bf558767d am 4988f18b: am 6458fd96: Merge "rangelib.py: Fix the bug in monotonic check."
* commit '4988f18b1f0884eb1365820cb365fc6a6d082d1d':
  rangelib.py: Fix the bug in monotonic check.
2015-08-27 23:37:41 +00:00
Tao Bao
4988f18b1f am 6458fd96: Merge "rangelib.py: Fix the bug in monotonic check."
* commit '6458fd96d5d0cd3b54a02a5f9c276f49e566cb53':
  rangelib.py: Fix the bug in monotonic check.
2015-08-27 20:44:35 +00:00
Tao Bao
044bd31e50 am 575643a8: am 14342066: Merge "Add unit tests for rangelib.py."
* commit '575643a85d41a428aeda6676146d86b0356e0785':
  Add unit tests for rangelib.py.
2015-08-27 12:40:31 +00:00
Tao Bao
575643a85d am 14342066: Merge "Add unit tests for rangelib.py."
* commit '14342066dbaec25593c12fdba5396d4ca9cad841':
  Add unit tests for rangelib.py.
2015-08-27 05:23:08 +00:00
Tao Bao
e8f756137c rangelib.py: Fix the bug in monotonic check.
RangeSet("2-10").monotonic gives a wrong result of "False". Fix the bug
and add more tests into test_rangelib.py.

Change-Id: I04780571b45ecafd34040f405756b9745a9e21a5
2015-08-26 21:16:43 -07:00
Tao Bao
873a15e267 Add unit tests for rangelib.py.
Separate the test cases in rangelib.py comments into a python unittest
file.

To invoke:
  $ python -m unittest test_rangelib

Change-Id: I59e4ce0aaccc83bcbb42fee15775683dcd559d99
2015-08-26 16:13:18 -07:00
Tao Bao
937847ae49 Split large files for BBOTA v3.
For BBOTA v3, we need to stash source blocks to support resumable
feature. However, with the growth of file size and the shrink of the
cache size, source blocks that represent a file are too large to be
stashed as a whole. CL in [1] solves the issue by replacing the diff
command with a "new" command. However, it may increase the generated
package size substantially (e.g. from ~100MB to ~400MB).

With this CL, if a file spans too many blocks, we split it into smaller
pieces by generating multiple commands. For the same case above, it
reduces the package size to ~150MB.

One potential downside is that after splitting, files like .jar,
.apk and .zip can no longer use imgdiff. We may lose the potential
benefit of using imgdiff for patch size reduction.

[1] commit 82c47981bd

Bug: 22430577
Change-Id: Iee1ad6543f3d40368e079e418cc31728e1ab3f48
(cherry picked from commit 9a5caf2c30)
2015-08-26 15:00:38 -07:00
Tao Bao
1fc67631ee Revise stash for BBOTAs when needed.
When generating incremental BBOTAs (v2 and above), we need to ensure
that the needed runtime stash is below the given threshold. If it's
running out of space on /cache, we replace the command that uses a
stash with a "new" command instead.

This may increase the OTA package size, since it is carrying more full
blocks instead of patches. It gets even worse for large files that span
a number of blocks, because currently we will store all the blocks for
the file as "new" blocks if stashing cannot be satisfied. We may further
optimize by splitting them into smaller chunks so that most of them can
still be stashed.

Bug: 22430577
Change-Id: Ieae5243d461e3f899f613f76a380f6f7c3edb356
(cherry picked from commit 82c47981bd)
2015-08-26 15:00:38 -07:00
Tao Bao
d47d8e1488 Assert the stash size when generating OTAs.
With block-based OTA v2 and v3, it requires stash space on the /cache
partition to back up blocks during an update. We need to ensure that
it doesn't exceed the partition size. Since there might be other files
on /cache as well, we use cache_size * threshold as the maximum allowed
size. The threshold defaults to 0.8, which can be overridden by command
line option '--stash_threshold'.

Change-Id: Ieee5d373c9bfb2ea401d85ca8a3adb491579de76
(cherry picked from commit 23ac404212)
2015-08-26 15:00:38 -07:00
Tao Bao
78284e6c79 am 68319cdf: am 95708eea: Merge "Split large files for BBOTA v3."
* commit '68319cdf4762c7c48cff68ede2b7f4bc267db735':
  Split large files for BBOTA v3.
2015-08-26 19:59:04 +00:00
Tao Bao
8b528fc3ef am 68319cdf: am 95708eea: Merge "Split large files for BBOTA v3."
* commit '68319cdf4762c7c48cff68ede2b7f4bc267db735':
  Split large files for BBOTA v3.
2015-08-26 19:55:20 +00:00
Tao Bao
9a5caf2c30 Split large files for BBOTA v3.
For BBOTA v3, we need to stash source blocks to support resumable
feature. However, with the growth of file size and the shrink of the
cache size, source blocks that represent a file are too large to be
stashed as a whole. CL in [1] solves the issue by replacing the diff
command with a "new" command. However, it may increase the generated
package size substantially (e.g. from ~100MB to ~400MB).

With this CL, if a file spans too many blocks, we split it into smaller
pieces by generating multiple commands. For the same case above, it
reduces the package size to ~150MB.

One potential downside is that after splitting, files like .jar,
.apk and .zip can no longer use imgdiff. We may lose the potential
benefit of using imgdiff for patch size reduction.

[1] commit 82c47981bd

Bug: 22430577
Change-Id: I5684fab0ac41c8d94fe18f52a34cef77e06f741c
2015-08-26 10:50:11 -07:00
smain@google.com
c7f0a0685f am 425e1d5c: am e24174d2: am 15bb28fc: am ed7e864a: fix a few bugs in the studio download button behavior: - make button text always white (avoid blue on blue during hover) - revise logic to add the platform name to download button to avoid weird duplicity bug on sm
* commit '425e1d5c57f808ae6308d49125d68b5b43e78d7c':
  fix a few bugs in the studio download button behavior:  - make button text always white (avoid blue on blue during hover)  - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens  - remove the animation script when clicking download before agree because it reloaded the page (unkown cause) depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/
2015-08-24 17:00:55 +00:00
smain@google.com
e24174d2a2 am 15bb28fc: am ed7e864a: fix a few bugs in the studio download button behavior: - make button text always white (avoid blue on blue during hover) - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens - remove the
* commit '15bb28fc73fa30e9c7b8ee0d924c8906724809e0':
  fix a few bugs in the studio download button behavior:  - make button text always white (avoid blue on blue during hover)  - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens  - remove the animation script when clicking download before agree because it reloaded the page (unkown cause) depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/
2015-08-24 16:48:53 +00:00
smain@google.com
15bb28fc73 am ed7e864a: fix a few bugs in the studio download button behavior: - make button text always white (avoid blue on blue during hover) - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens - remove the animation scr
* commit 'ed7e864a735f004f1dbb4a2db5261855b5693913':
  fix a few bugs in the studio download button behavior:  - make button text always white (avoid blue on blue during hover)  - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens  - remove the animation script when clicking download before agree because it reloaded the page (unkown cause) depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/
2015-08-24 16:41:18 +00:00
smain@google.com
6e0cca0876 am ed7e864a: fix a few bugs in the studio download button behavior: - make button text always white (avoid blue on blue during hover) - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens - remove the animation scr
* commit 'ed7e864a735f004f1dbb4a2db5261855b5693913':
  fix a few bugs in the studio download button behavior:  - make button text always white (avoid blue on blue during hover)  - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens  - remove the animation script when clicking download before agree because it reloaded the page (unkown cause) depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/
2015-08-24 16:41:10 +00:00
Tao Bao
b4ef770e8d am ecb3bbf4: am 7c4c6f58: sparse_img.py: Divide NONZERO blocks into groups.
* commit 'ecb3bbf4bf0f583fdb6c861a8eeafb21c913bae4':
  sparse_img.py: Divide NONZERO blocks into groups.
2015-08-20 18:37:59 +00:00
smain@google.com
ed7e864a73 fix a few bugs in the studio download button behavior:
- make button text always white (avoid blue on blue during hover)
 - revise logic to add the platform name to download button to avoid weird duplicity bug on small screens
 - remove the animation script when clicking download before agree because it reloaded the page (unkown cause)
depends on: https://googleplex-android-review.git.corp.google.com/#/c/752757/

Change-Id: I1b2b4ff9c0b0cbbd34f1c77a2b736fe3425a16e4
2015-08-20 00:52:27 +00:00
Tao Bao
7c4c6f589e sparse_img.py: Divide NONZERO blocks into groups.
For squashfs, we currently don't have a system.map. So the whole system
image will be treated as a single file. But for some unknown bug, the
updater will be killed due to OOM when writing back the patched image to
flash (observed on lenok-userdebug MEA49). Prior to getting a real fix,
we evenly divide the non-zero blocks into smaller groups (currently 1024
blocks or 4MB per group).

Bug: 23227672
Change-Id: Ifeddd8d802f01f8cd2a743a1d1217a284fb6e182
2015-08-19 17:10:23 -07:00
Tao Bao
5e88f021cf am 5d690a37: am ab9a3588: Merge "Revise stash for BBOTAs when needed."
* commit '5d690a37d4b3b33dee1cfc2a64b66ed4e9c03460':
  Revise stash for BBOTAs when needed.
2015-08-18 17:25:34 +00:00
Tao Bao
20c68b7494 am 5d690a37: am ab9a3588: Merge "Revise stash for BBOTAs when needed."
* commit '5d690a37d4b3b33dee1cfc2a64b66ed4e9c03460':
  Revise stash for BBOTAs when needed.
2015-08-18 17:25:09 +00:00
Tao Bao
ab9a358801 Merge "Revise stash for BBOTAs when needed." 2015-08-18 16:59:05 +00:00
Dan Willemsen
6d65635ef7 am 48d95e75: am 05d97fe7: Merge "Remove legacy windows platform build support"
* commit '48d95e752536dc7a81c141e435e8a90b7929cf02':
  Remove legacy windows platform build support
2015-08-18 04:43:06 +00:00
Dan Willemsen
1b14846717 am 48d95e75: am 05d97fe7: Merge "Remove legacy windows platform build support"
* commit '48d95e752536dc7a81c141e435e8a90b7929cf02':
  Remove legacy windows platform build support
2015-08-18 04:43:04 +00:00
Dan Willemsen
05d97fe723 Merge "Remove legacy windows platform build support" 2015-08-18 04:31:07 +00:00
Dan Willemsen
9cf990beec resolved conflicts for merge of 05fae7e0 to mnc-dev-plus-aosp
Change-Id: I9f0f1169839afabc7ec7e439b668798e2cd111a3
2015-08-17 20:50:48 -07:00
Dan Willemsen
014719fcfc resolved conflicts for merge of 05fae7e0 to mnc-dr-dev-plus-aosp
Change-Id: I32919ab1e3cd5f84d09180125a7294bcfa35549e
2015-08-17 20:44:29 -07:00
Dan Willemsen
e65107508a Merge "Use repeatable timestamps" 2015-08-18 03:30:11 +00:00