Commit graph

3082 commits

Author SHA1 Message Date
Tao Bao
17f8f36875 am 8eb7f45a: am 4ac8e059: Merge "Read fstab from the source build."
* commit '8eb7f45a45132cfb39258b383f8ed06c7c4212ce':
  Read fstab from the source build.
2015-07-29 21:53:48 +00:00
Tao Bao
dd24da9ec9 Read fstab from the source build.
When creating incremental OTAs, we should always use the fstab from the
source build instead of the target.

Bug: 21948974
Change-Id: Iff44130f88a679b253ea1adcfac4ed8566ce9cc7
2015-07-29 14:11:55 -07:00
Tao Bao
7eddd6285f resolved conflicts for merge of 910d3822 to mnc-dr-dev-plus-aosp
Change-Id: I2c899be9d6a82664e4d14c903311daeed5e546fd
2015-07-28 16:58:03 -07:00
Tao Bao
f2cffbddb9 Support systems that use a full copy of recovery image.
If BOARD_USES_FULL_RECOVERY_IMAGE == true, a full copy of recovery
image will be carried as /system/etc/recovery.img instead of a patch
at /system/recovery_from_boot.p.

Bug: 22641135
Change-Id: Ie271d3e2d55d7b003f667ac5b44203d69b23c63b
(cherry picked from commit 8beab69bd5)
2015-07-28 12:20:36 -07:00
Tao Bao
5442819cb1 am a04e6b89: am dd68e68f: Merge "Override properties that point to out/ directory."
* commit 'a04e6b89ec262f4dd38c9d80ee05ce313bab9347':
  Override properties that point to out/ directory.
2015-07-21 18:28:15 +00:00
Tao Bao
84e7568b1f Override properties that point to out/ directory.
A few properties are stored as links to the files in the out/
directory, which are no longer available when (re)packing from
target_files zip. Redirect those properties to the actual files in
the unzipped directory when repacking.

Change-Id: I18e930cbea224ab9c6db8d4e721b1c266a671db6
2015-07-19 08:48:09 -07:00
Tao Bao
6cc282c10a am 0d4a9405: am ecb7b37b: Merge "Assert the stash size when generating OTAs."
* commit '0d4a9405938210618bb305e33285f555daf2fb5d':
  Assert the stash size when generating OTAs.
2015-07-14 20:53:40 +00:00
Tao Bao
8dcf738234 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: I5c2e353ea4716328d6cdc6a7f758520de8d88b8e
(cherry picked from commit 23ac404212)
2015-07-14 13:36:50 -07:00
Tao Bao
906550f285 am bf8e85ab: am 2e4dd9ab: Merge "Fix the permission in common.ZipWriteStr()."
* commit 'bf8e85abb59daf676bc213623a906b8d00a65790':
  Fix the permission in common.ZipWriteStr().
2015-07-11 02:04:05 +00:00
Tao Bao
2a410587e8 Fix the permission in common.ZipWriteStr().
common.ZipWriteStr() should set a default file permission to 0o100644
instead of 0o644.

Change-Id: I8c89d8442b095b56ad3a0d47afdfa73ce55ad0c8
2015-07-10 17:45:09 -07:00
Tao Bao
6a7d8fced3 am 03125de6: am c8812493: Merge "Pack file_contexts into target_files zip."
* commit '03125de6b57fc358e14cbcd1798cdf9d3289b72f':
  Pack file_contexts into target_files zip.
2015-07-10 21:56:22 +00:00
Tao Bao
2c15d9eefe Pack file_contexts into target_files zip.
file_contexts (specified by SELINUX_FC) is needed both when building
and (re)packaging. We used to use the copy in out/ when building, and
looked for the copy in BOOT/RAMDISK/ when packaging from target_files
zip. With system_root_image enabled, the file_contexts needed for
building and packaging might be different from the one on device. So
we explicitly pack the file as META/file_contexts in target_files zip.

Also refactor out the overriding of selinux_fc property into
common.LoadInfoDict().

Change-Id: I94f9ea6671b3792c12c1c21573840743d63da39a
(cherry picked from commit aa7318c384)
2015-07-10 14:21:16 -07:00
Tao Bao
ca87c735a3 am 46b1b205: am da724f7a: Merge "Zero out blocks that may be touched by dm-verity."
* commit '46b1b2057d5700a03b3fa6e332a737a0ef2425ba':
  Zero out blocks that may be touched by dm-verity.
2015-07-10 21:16:20 +00:00
Tao Bao
e9b619108d Zero out blocks that may be touched by dm-verity.
dm-verity may touch some blocks that are not in the care_map due to
block device read-ahead. It will fail if such blocks contain
non-zeroes. As a workaround, we mark them as extended blocks and
zero out explicitly to avoid dm-verity failures.

Bug: 20881595
Change-Id: Id097138bfd065c84eac088b3ad49758010b2927b
(cherry picked from commit 2fd2c9bfd6)
2015-07-10 13:50:24 -07:00
Thierry Strudel
4ec1abca84 am a69dcefd: am 74a81e66: fix device specific fs_config on build server
* commit 'a69dcefda3ec493216f401117417d86f8ef757ac':
  fix device specific fs_config on build server
2015-07-10 19:26:24 +00:00
Thierry Strudel
a69dcefda3 am 74a81e66: fix device specific fs_config on build server
* commit '74a81e6633276d92337749a5ee9d921207814dd4':
  fix device specific fs_config on build server
2015-07-10 18:57:38 +00:00
Thierry Strudel
74a81e6633 fix device specific fs_config on build server
fs_config function from libcutils, in order to properly set the xattr FS
used to define device specific uid, gid, permissions and capabilities,
now needs TARGET_OUT make variable to be passed explicitly to all tools
using it:
  fs_config
  fs_get_stats used by mktarball.sh
  make_ext4fs used by mkuserimg.sh
  mksquashfs used by mksquashfsimage.sh

Bug: 21989305
Bug: 22048934
Change-Id: I6caf9cf870882fce2ead93027767092c29b75ded
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2015-07-10 10:55:54 -07:00
Tao Bao
b8fbf8a2a1 am 74008203: am e246964b: Merge "Scan all init.*.rc files for flash_recovery service."
* commit '7400820330b39bc5d044c6f9c46d06a7650c83f1':
  Scan all init.*.rc files for flash_recovery service.
2015-07-08 17:52:33 +00:00
Tao Bao
38a534b693 resolved conflicts for merge of 610754e5 to cw-e-dev
Change-Id: Ia0d0d82c7fec86e1585a9e2c90ac877c363ed491
2015-07-08 10:43:31 -07:00
Tao Bao
e246964b8f Merge "Scan all init.*.rc files for flash_recovery service." 2015-07-08 17:22:36 +00:00
Tao Bao
9f0c8dfaf1 Scan all init.*.rc files for flash_recovery service.
Clockwork builds may rename init.rc to init.core.rc. Change the OTA
script to scan all init.*.rc files to determine the proper location for
install-recovery.sh.

Bug: 22128990
Change-Id: Icad3497d1663e074b938919b40fc239c84fbeb2b
(cherry picked from commit 610754e5ad)
2015-07-08 10:20:39 -07:00
Dirk Dougherty
bb7d32ad48 am 26b3ec5a: am 0da02191: am aee6585c: Update js/css versions and add pt-br.
* commit '26b3ec5a689f187b3174d1f774d40d879730b729':
  Update js/css versions and add pt-br.
2015-07-08 12:55:32 +00:00
Dirk Dougherty
927d13d738 am bb18cb1a: am 4187cee6: am 0b9e204d: Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
* commit 'bb18cb1a0ca335d9bb52bb7b589945a1027cc6cf':
  Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
2015-07-08 12:55:13 +00:00
Dirk Dougherty
26b3ec5a68 am 0da02191: am aee6585c: Update js/css versions and add pt-br.
* commit '0da02191ccc2030a3b4ac81500fdcabb72570049':
  Update js/css versions and add pt-br.
2015-07-08 11:44:24 +00:00
Dirk Dougherty
0da02191cc am aee6585c: Update js/css versions and add pt-br.
* commit 'aee6585c3237b11f33b83e9dd96d93449e3e2259':
  Update js/css versions and add pt-br.
2015-07-08 11:29:45 +00:00
Dirk Dougherty
bb18cb1a0c am 4187cee6: am 0b9e204d: Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
* commit '4187cee61b234a135ae2a62c876681a92e911893':
  Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
2015-07-08 11:21:57 +00:00
Dirk Dougherty
aee6585c32 Update js/css versions and add pt-br.
Change-Id: I0c5f8c8a3c77283e7f53d1c241d09aa39bca4292
2015-07-08 04:12:19 -07:00
Dirk Dougherty
4187cee61b am 0b9e204d: Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
* commit '0b9e204df09d9630db24f61bb427110501df6743':
  Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
2015-07-08 11:06:54 +00:00
Tao Bao
610754e5ad Scan all init.*.rc files for flash_recovery service.
Clockwork builds may rename init.rc to init.core.rc. Change the OTA
script to scan all init.*.rc files to determine the proper location for
install-recovery.sh.

Bug: 22128990
Change-Id: If96bd0b81090683ad0bbfddb735d390204849d9f
2015-07-07 20:52:01 -07:00
Tao Bao
dc48635b16 am 1747e35a: am a0021026: Merge "fix up ota_from_target_files symlink detection."
* commit '1747e35a090cff66b117128c7bffd2e8b5050f37':
  fix up ota_from_target_files symlink detection.
2015-07-07 17:17:57 +00:00
Ying Wang
2ffb3147bc fix up ota_from_target_files symlink detection.
Change-Id: I10b668096d4e61e75473dd805f96387049f29b79
2015-07-06 14:02:01 -07:00
Tao Bao
9b1a9ec53f am 11d4406e: am 48a27bcb: Merge "Fix OTA scripts to generate incremental BBOTA with OEM property."
* commit '11d4406eb9796819baeafda3142b16f9cc63d532':
  Fix OTA scripts to generate incremental BBOTA with OEM property.
2015-07-06 16:49:06 +00:00
Tao Bao
3806c231a9 Fix OTA scripts to generate incremental BBOTA with OEM property.
Bug: 21803136
Change-Id: I3a45e8aea0b4f4f4f2acb4c9c8a7fad7a014680c
2015-07-05 21:08:33 -07:00
Dirk Dougherty
0b9e204df0 Support matching unicode characters in suggestions by changing match(regex) to indexOf(string).
Change-Id: I460a5cb43e4be6ff552a7b2d41b6d3957f2d02a2
2015-07-02 14:21:55 -07:00
Chris Elliott
1e253e76b9 Merge "DO NOT MERGE Fix the syntax error in the edify script generator" into cw-d-mr1-dev 2015-07-02 20:18:35 +00:00
Tao Bao
4dacce92ce DO NOT MERGE Fix the syntax error in the edify script generator
file_getprop() always expects two arguments.

Bug: 19881931
Change-Id: Icf5577ad34188991c03f68c1217642d3adc4201c
2015-07-02 13:17:21 -07:00
Tao Bao
41bcf3e425 Fix build.
Change-Id: Id3eb4821a3c3061063a00294bfa268693c773eb8
2015-07-01 19:38:34 -07:00
Tao Bao
8bd720257e resolved conflicts for merge of 8787cd6d to mnc-dev
Change-Id: I19497d05a021c21c905b2bddd5b36d370dc2208f
2015-07-01 18:06:33 -07:00
Tao Bao
608d9d2452 am 1aa1af0e: sparse_img.py: Don\'t write empty map groups.
* commit '1aa1af0e997699bc025e4f0a754692068328d7e6':
  sparse_img.py: Don't write empty map groups.
2015-07-02 00:47:51 +00:00
Simon Wilson
e416a41f3a am 16401ad4: Revert "sparse_img.py: Don\'t write empty map groups."
* commit '16401ad4256178fbe7a2cd8588e6dbf9a6c63180':
  Revert "sparse_img.py: Don't write empty map groups."
2015-07-02 00:47:50 +00:00
Tao Bao
8787cd6d4e resolved conflicts for merge of 7f9470cd to lmp-mr1-ub-dev
Change-Id: Icfc94fcc4178f5fbfad62df9914c84d59d140bb7
2015-07-01 17:44:53 -07:00
Tao Bao
1aa1af0e99 sparse_img.py: Don't write empty map groups.
In certain cases, we may have no mapping of ZERO or NONZERO blocks in
the image (such as squashfs at the moment). Don't write those groups if
they are empty.

Change-Id: I4a1f0105ada2e1573c3d6162457b83725e0d8971
2015-07-01 11:24:30 -07:00
Simon Wilson
16401ad425 Revert "sparse_img.py: Don't write empty map groups."
This reverts commit 7f9470cda3.

Change-Id: I97e2859903fbc4f1e6f0824269ae88b23f63e032
2015-07-01 18:10:28 +00:00
Tao Bao
7f9470cda3 sparse_img.py: Don't write empty map groups.
In certain cases, we may have no mapping of ZERO or NONZERO blocks in
the image (such as squashfs at the moment). Don't write those groups if
they are empty.

Change-Id: I82aa05fbbd79130b08868585edd5298e531c4f5a
2015-07-01 10:10:31 -07:00
Tao Bao
4e66343b2b Retry adjusting the size computation for reserved blocks.
Due to the change in https://lwn.net/Articles/546473/, kernel reserves a
few extra blocks (lesser of 2% and 4096 blocks) on ext4 FS which leads to
OTA update failures. Adjust the size computation if the device has
BOARD_HAS_EXT4_RESERVED_BLOCKS := true.

It amends the last attemp in [1]. Now it computes the used blocks from the
make_ext4fs output, instead of altering its argument.

[1]: commit efbb5d2e69.

Bug: 21522719
Bug: 22023465
Bug: 22174684
Change-Id: Iaae6507f6de68a5892f2e3035d330039287b4492
(cherry picked from commit c7a6f1e4f8)
2015-06-30 12:17:28 -07:00
Tao Bao
ed95997724 resolved conflicts for merge of c7a6f1e4 to mnc-dev-plus-aosp
Change-Id: I3201c1d7f9e8b451614259c2fec70c07ae9c8332
2015-06-30 09:33:12 -07:00
Tao Bao
c7a6f1e4f8 Retry adjusting the size computation for reserved blocks.
Due to the change in https://lwn.net/Articles/546473/, kernel reserves a
few extra blocks (lesser of 2% and 4096 blocks) on ext4 FS which leads to
OTA update failures. Adjust the size computation if the device has
BOARD_HAS_EXT4_RESERVED_BLOCKS := true.

It amends the last attemp in [1]. Now it computes the used blocks from the
make_ext4fs output, instead of altering its argument.

[1]: commit efbb5d2e69.

Bug: 21522719
Bug: 22023465
Bug: 22174684
Change-Id: I9783a51abe6581ff5c75db81e78ac606d0f32c4c
2015-06-29 20:45:53 -07:00
Tao Bao
bdf7d94aac am 2384d01c: Revert "Adjust the size computation for reserved blocks"
* commit '2384d01c1c4c5b259840ec526ec8f5ec18cd8087':
  Revert "Adjust the size computation for reserved blocks"
2015-06-29 20:56:34 +00:00
Tao Bao
2384d01c1c Revert "Adjust the size computation for reserved blocks"
We should not change the parameter to mkfs_ext4. Bug filed at
b/22174684. Will come up with a new CL.

This reverts commit efbb5d2e69.

Change-Id: I15f7a9a07a65a936ba186d2ce672ec4832ed3e17
2015-06-29 12:55:38 -07:00
Tao Bao
929fbe7d37 am 0f0af20d: am 5df6b5c3: Merge "sparse_img.py: Don\'t write empty map groups."
* commit '0f0af20d6d4fa7d75f7dd8569f713e68eb0cad46':
  sparse_img.py: Don't write empty map groups.
2015-06-27 16:58:36 +00:00