Commit graph

34190 commits

Author SHA1 Message Date
Jiyong Park
0871e0029f Merge "fix: cannot determine the type of modules with class 'samples'"
am: b1331938a3

Change-Id: I2908df25418d37f4be1c653110233900a063af8c
2017-03-14 02:21:43 +00:00
Treehugger Robot
b1331938a3 Merge "fix: cannot determine the type of modules with class 'samples'" 2017-03-14 02:14:59 +00:00
Jiyong Park
d4ca89bfd6 fix: cannot determine the type of modules with class 'samples'
Test: make sdk should not break

Change-Id: I849befde3c6b91f0b417aa6b11a909c6c4aad627
2017-03-14 09:40:29 +09:00
Jiyong Park
a2b86b14a5 Merge "install *.so in different paths for their types"
am: 55b14bdaa4

Change-Id: I170c49e7107dc7f345e844e544e89d1590ad59d3
2017-03-14 00:22:47 +00:00
Treehugger Robot
55b14bdaa4 Merge "install *.so in different paths for their types" 2017-03-14 00:15:50 +00:00
Alex Klyubin
092c9025a9 Add /file_contexts.bin only to devices which need it
/file_contexts.bin is needed only by devices which do not have
PRODUCT_FULL_TREBLE set to true. Adding this file to devices which
have PRODUCT_FULL_TREBLE set to true causes confusion and wastes
about 800 kB of space.

/file_contexts.bin was being added unconditionally to all devices due
to the build system needing the combined file_contexts file for
host-side labelling of filesystems in images and for inclusion into
target files ZIP (again, to be used for host-side labelling later).

This change switches these targets to depend on the same file, but
from intermediates directory. As a result, everything continues to
work just fine, but without pulling in /file_contexts.bin. On devices
which need /file_contexts.bin, it is pulled in by
system/core/init/Android.mk.

Test: /file_contexts.bin still there on bullhead, but not there on
      sailfish with PRODUCT_FULL_TREBLE set to true.
Test: Clean build, device boots up with, no new denials.
      Reboot to recovery, recovery boots up fine too, no denials.
      This was tested on sailfish-eng and marlin-eng.
Bug: 36002414

Change-Id: I9bbbb08bbf7d874bba0bafcc19bcbf9eec564326
2017-03-13 13:28:34 -07:00
Dan Willemsen
83667a3821 Merge "Speed up *TS zip file creation"
am: 6d0f949296

Change-Id: I082a5072d27d4e93008de98fc864be1e20f03748
2017-03-13 19:55:17 +00:00
Dan Willemsen
6d0f949296 Merge "Speed up *TS zip file creation" 2017-03-13 19:50:44 +00:00
Tao Bao
81c01a9adc Merge "releasetools: Fix the diff_worker progress report."
am: e5b2ff2a97

Change-Id: Iafdf8970a25092a2bb13fe9f51c91f36fd66d859
2017-03-13 19:19:14 +00:00
Tao Bao
e5b2ff2a97 Merge "releasetools: Fix the diff_worker progress report." 2017-03-13 19:12:26 +00:00
Tianjie Xu
82e63d3037 Merge "Switch command to subprocess in build_image.py"
am: 36e612b753

Change-Id: Ia6597a647704cc357759283b5136fa384478545d
2017-03-13 18:25:11 +00:00
Alex Klyubin
05796fe8b3 Merge "Explicitly depend on sepolicy artifacts in recovery targets"
am: cc6e84223b

Change-Id: I129bfe67ed120254d5b6c8e8f00b0ddfed346156
2017-03-13 18:24:43 +00:00
Tianjie Xu
36e612b753 Merge "Switch command to subprocess in build_image.py" 2017-03-13 18:23:08 +00:00
Treehugger Robot
cc6e84223b Merge "Explicitly depend on sepolicy artifacts in recovery targets" 2017-03-13 18:17:56 +00:00
Alex Klyubin
2a7171a71a Explicitly depend on sepolicy artifacts in recovery targets
This makes recoveryimage/bootimage targets explicitly depend on SELinux
policy artifacts needed by recovery. Prior to this change, the
dependency was contrived: these targets would rely on copying these
files from "root" directory, and then overwriting sepolicy file with
sepolicy.recovery.

Test: Clean build, flash, device boots up just fine. No new denials.
      Reboot into recovery, recovery boot up just fine, no denials.
      This was tested on bullhead (non A/B device) and sailfish (A/B
      device).
Bug: 33642277
Change-Id: Id2369253d0c7e02e079ae01ac7140b41880fd5ad
2017-03-13 08:43:02 -07:00
Jiyong Park
842a985f90 install *.so in different paths for their types
Shared libraries are now installed to different directories depending on
their types.

* NDK libraries: /system/lib/ndk (with symlink from /system/lib)
* VNDK libraries: /system/lib/vndk
* VNDK-ext libraries: /system/lib/vndk-ext
* Framework-only libraries: /system/lib
* Vendor-only libraries: /vendor/lib
* Same-process HALs: /vendor/lib/sameprocess

However, if LOCAL_MODULE_PATH is explicitly set, then it is respected,
with a warning message. Module owners are highly encouraged to
investigate the warnings and use alternatives to LOCAL_MODULE_PATH;
combination of LOCAL_[PROPRIETARY|OEM|ODM]_MODULE, LOCAL_MODULE_CLASS
and LOCAL_RELATIVE_PATH will cover most of the cases.

Furthermore, for each shared libraries whose path is changed, a symolic
link from the original path to the new path is *temporarily* generated.
e.g. /system/lib/libbase.so -> vndk/libbase.so. This is
to prevent sudden breakage of the code expecting the lib from the old
path. This symbolic links will eventually be removed before O launch
(b/34917183).

Finally, BOARD_SAME_PROCESS_HAL_DEPS is added. It contains the list of
shared libraries implementing the same-process HALs and its internal sub
libraries. This is designed to be defined in BoardConfig.mk

Bug: 33681361
Test: build & run. Libraries must be in the correct directories.
Symlinks from the old path to the new path must exist.

Change-Id: I46130aac09ae65400fd4d0abbc2e12dddd154fb1
2017-03-13 08:27:09 +09:00
Tao Bao
33635b1f32 releasetools: Fix the diff_worker progress report.
Test: Observe the progress update during an incremental generation.
Change-Id: Ib0629a0fd9f925076fd20a040345c4f169133c30
2017-03-12 13:02:51 -07:00
Jeff Vander Stoep
10539b3253 Merge "Include file_contexts conditionally elsewhere"
am: e65af5ce72

Change-Id: Ib781e0237f2bd68431d50890b9d9beaeff86bf74
2017-03-10 23:59:39 +00:00
Treehugger Robot
e65af5ce72 Merge "Include file_contexts conditionally elsewhere" 2017-03-10 23:54:18 +00:00
Tianjie Xu
e3ad41bb2f Switch command to subprocess in build_image.py
Bug: 36012162
Test: image builds successfully for bullhead and sailfish

Change-Id: Iaa83034b39d392ff8a2154c7b32b21bf33ef552f
2017-03-10 15:16:24 -08:00
Dan Willemsen
c4cf49569f Speed up *TS zip file creation
This also makes the resulting zip files more repeatable -- the file list
is sorted and the entries have static timestamps.

On my machine, this saves ~30 seconds for android-cts.zip, it now takes
less than a second.

Test: m -j cts; compare output from without this change
Change-Id: Ia71e35878ff98ba9775115860530e87eee47739f
2017-03-10 13:39:26 -08:00
Tao Bao
a592924505 Merge "releasetools: Drop the support for BBOTA v1 and v2."
am: c3e3406125

Change-Id: Id4903588e514c5182f2db1126c5778f69e86a370
2017-03-10 19:32:18 +00:00
Tao Bao
c3e3406125 Merge "releasetools: Drop the support for BBOTA v1 and v2." 2017-03-10 19:25:06 +00:00
Jiyong Park
4ed780c454 configstore: add default implementation of configstore@1.0 HAL
This change adds default implementation of configstore@1.0 HAL to all
embedded devices.

Bug: 34314793
Test: build. make sure /system/bin/hw has file
android.hardware.configstore@1.0-service

cherry-picked
1d6ab958c configstore: add default implementation of configstore@1.0 HAL

Merged-in: I65f416560de9d65c57e6cfcb9a6fe26b0140d4a6
Change-Id: Ib68fa325a0f0ce60db0701e16a5a9056411fb398
2017-03-10 10:13:17 +09:00
Tao Bao
b538502353 Merge "releasetools: Fix the missing 'post-build' in full OTAs."
am: 1e8364a8be

Change-Id: I663f53f36a7cbc29a6135b548af3371b54dfe688
2017-03-10 00:39:07 +00:00
Treehugger Robot
1e8364a8be Merge "releasetools: Fix the missing 'post-build' in full OTAs." 2017-03-10 00:30:55 +00:00
Tao Bao
39f3eaf221 releasetools: Fix the missing 'post-build' in full OTAs.
The line was unintentionally removed in commit 7f804ba.

Test: ota_from_target_files.py generates a full OTA. Check the package
      metadata.

Change-Id: Icae88e2a9bb2bfc450a3d0d7ab524d6a6eac9df5
2017-03-09 15:01:11 -08:00
Tao Bao
debedc3343 Merge "releasetools: Remove dead functions in EdifyGenerator."
am: c87b38f547

Change-Id: Ia1eae3a4e401048c8cbfbf9bc85597dfc450fc4c
2017-03-09 20:31:19 +00:00
Tao Bao
8fad03e771 releasetools: Drop the support for BBOTA v1 and v2.
BBOTA v1 and v2 (introduced in L and L MR1 respectively) don't support
resumable OTA. We shouldn't generate packages using v1/v2 at the risk of
bricking devices.

BBOTA v3 (since M) and v4 (since N) both support resumable OTAs. BBOTA
v4 additionally supports using FEC to possibly recover a corrupted
image.

Bug: 33694730
Test: Generate full and incremental OTAs w/ and w/o the CL. They should
      give identical packages (in v4).
Change-Id: Ib89d9cd63ba08e8e9aa4131bed18876b89d244c0
2017-03-09 12:25:46 -08:00
Tao Bao
c87b38f547 Merge "releasetools: Remove dead functions in EdifyGenerator." 2017-03-09 20:24:19 +00:00
Jeff Vander Stoep
f57a154f2e Include file_contexts conditionally elsewhere
Test: Marlin and Bullhead build and boot with no new denials.
Test: Marlin and Bullhead recovery boots with no new denials.
Test: Bullhead boots with file_contexts.bin in /
Test: Marlin boot with /system/etc/selinux/plat_file_contexts and
      /vendor/etc/selinux/nonplat_file_contexts.
Bug: 36002414

Change-Id: I25af653e060c0c72ea6ad08db8869132885adff8
2017-03-08 21:12:47 -08:00
Tao Bao
f388104eaa releasetools: Remove dead functions in EdifyGenerator.
Remove the following functions that are needed for file-based OTAs only:
 - SetPermissions()
 - SetPermissionsRecursive()
 - MakeSymlinks()
 - DeleteFiles()
 - DeleteFilesIfNotMatching()
 - RenameFiles()
 - SkipNextActionIfTargetExists()

Bug: 35853185
Test: Verified there's no reference to these functions.
Change-Id: Iff24a9d705476211effaef28eed2a147fa5fcbce
2017-03-08 16:37:07 -08:00
Steven Moreland
05a7a4da70 Merge "hardware/interfaces: Android.mk always -Werror"
am: df58de6303

Change-Id: I5bc41aee011d13f7579563fa0e8e6aa6988ddc04
2017-03-08 23:20:58 +00:00
Treehugger Robot
df58de6303 Merge "hardware/interfaces: Android.mk always -Werror" 2017-03-08 23:16:35 +00:00
Tao Bao
aac8098d61 Merge "releasetools: Drop the support for file-based OTA generation."
am: 9bca43858f

Change-Id: Ifffa94ab131ea25194517bad1c75a7ba504b1c7c
2017-03-08 21:07:19 +00:00
Tao Bao
9bca43858f Merge "releasetools: Drop the support for file-based OTA generation." 2017-03-08 21:00:03 +00:00
Dan Willemsen
6ffe13f8e7 Merge changes Ia5ce6870,I155654cd
am: c619f99e2f

Change-Id: I5006c4e87607a55f914b90f7218802bc29fc76c5
2017-03-08 20:51:19 +00:00
Dan Willemsen
c619f99e2f Merge changes Ia5ce6870,I155654cd
* changes:
  Zip after add_img_to_target_files
  Allow add_img_to_target_files to work on a directory
2017-03-08 20:45:56 +00:00
Tao Bao
cf82616047 Merge "releasetools: Reduce memory footprint for BBOTA generation."
am: 3b1f260205

Change-Id: I2b141db33f2a350d5280fb534999052c1ef439b2
2017-03-08 17:48:36 +00:00
Tao Bao
3b1f260205 Merge "releasetools: Reduce memory footprint for BBOTA generation." 2017-03-08 17:43:34 +00:00
Steven Moreland
324c436084 hardware/interfaces: Android.mk always -Werror
Bug: 35840847
Test: pass
Change-Id: I6ebf3f5d279ff405446592cdabaeca9d1fdf6cf9
2017-03-08 16:29:50 +00:00
Sen Jiang
75a7a591ba Merge "Put system_version in target_files.zip"
am: 3838ae7e9b

Change-Id: I357ce185442ec04c028858f187e42187c062a287
2017-03-08 03:25:41 +00:00
Treehugger Robot
3838ae7e9b Merge "Put system_version in target_files.zip" 2017-03-08 03:21:43 +00:00
Sen Jiang
9b8e4ca518 Put system_version in target_files.zip
Bug: 35364984
Test: m dist
Change-Id: I309acb41eb85de239c4c1718e14d9442ca1b0408
(cherry picked from commit cea4d52d2fee19281e660943129e1ad3bdc51fef)
2017-03-07 17:40:27 -08:00
Dan Willemsen
2a5a34f6bd Zip after add_img_to_target_files
For aosp_marlin (on AOSP), this speeds up target files creation from
~57 seconds to ~15 seconds.

For marlin-userdebug (on internal master), this speeds up target files
creation from ~300 seconds to ~95 seconds.

This does make some minor changes to the resulting target_files zip:

* All of the META files are actually at the beginning of the zip now,
  previously the ones created by add_img_to_target_files would be at
  the end.
* The images are slightly larger. Go's zip implementation in soong_zip
  isn't quite as good as the `zip` tool.
* vendor_filesystem_config.txt isn't present if we're not building a
  vendor image.

Test: aosp_marlin target_files zip changes look reasonable
Test: marlin target_files zip changes look reasonable
Test: bullhead target_files zip changes look reasonable
Change-Id: Ia5ce6870b85559d65107c3b94332391b4b43a0ea
2017-03-07 15:28:42 -08:00
Dan Willemsen
2ee00d5f66 Allow add_img_to_target_files to work on a directory
In addition to the current behavior of add_img_to_target_files working
on an existing zip file, allow passing in a directory where the target
files have already been extracted. When in this mode, it writes the
images out to that directory instead of the zip file.

This allows us to call add_img_to_target_files on the temp directory
used during the build to create the target files package, saving the
time and space of unzipping what we just zipped. This also allows us to
use the parallel soong_zip, which compresses the images much faster.

Test: aosp_marlin target_files zip is the same before/after this change
Test: marlin target_files zip is the same before/after this change
Test: bullhead target_files zip is the same before/after this change
Change-Id: I155654cdc7ad7754ba4ef76ec69c31f504a58198
2017-03-07 14:37:52 -08:00
Steven Moreland
0e1913f4ff Merge "Add vnod."
am: 2b33e46593

Change-Id: I006ef6b77e33f5b6e075fa392326e3e0eebb4610
2017-03-07 21:59:18 +00:00
Treehugger Robot
2b33e46593 Merge "Add vnod." 2017-03-07 21:54:07 +00:00
Steven Moreland
a2e734d786 Add vnod.
Short name for vendorimage-nodeps like snod.

Bug: 33356516
Test: works
Change-Id: Iad62aa5a021d603fa9cebe90f4e28cf09d5d49ae
2017-03-07 12:17:51 -08:00
Tao Bao
457cbf6a8a releasetools: Drop the support for file-based OTA generation.
We have stopped shipping devices with file-based OTAs, and are not
actively maintaining the support. Devices using file-based OTAs
should be moved to block-based, if not A/B OTAs.

We will also need to clean up EdifyGenerator class, which will be
handled in follow-up CLs.

Bug: 35853185
Test: Generate full and incremental OTAs w/ and w/o the CL, and they
      give identical packages.
Test: Not specifying --block also generates block-base OTAs.
Change-Id: I3b0fc8ce5600e109f3251fe41f655534aaa298c7
2017-03-07 00:17:58 -08:00