Commit graph

32706 commits

Author SHA1 Message Date
Tao Bao
83a6b953c9 Merge "releasetools: Remove a dead line." 2017-03-16 22:24:25 +00:00
Tao Bao
2f80e83e98 releasetools: Remove a dead line.
system_root_image has been dead since commit
2ce63edab7.

Test: pylint --rcfile=pylintrc add_img_to_target_files.py
Change-Id: Id791747b7313923b82279a21d264a998455a92d4
2017-03-16 11:59:24 -07:00
Tianjie Xu
53ba93d615 Merge "Provide more info for bsdiff/imgdiff exceptions." 2017-03-16 18:43:28 +00:00
Treehugger Robot
3fd80635af Merge "Add TARGET_OUT_VENDOR_RENDERSCRIPT_BITCODE definition." 2017-03-16 06:45:48 +00:00
Treehugger Robot
d5c3d1366f Merge "Silence module path warnings for a while" 2017-03-16 05:49:25 +00:00
Jiyong Park
79f5918199 Silence module path warnings for a while
Warning messages like, "libart_fake: framework library must be installed
to system/lib64 but requested to be installed at system/fake-libs64.
Please fix.", are temporarily muted since some of those warnings might
be false alarms.

Let's just silence the warning for everybody and investigate the cases
internally by turning on the build flag SHOW_MODULE_PATH_WARNINGS.

Test: the warning messages should not be shown unless built with
SHOW_MODULE_PATH_WARNINGS=true.

Change-Id: I5eb3ab3385c92a5192723ff1008277c321162191
2017-03-16 12:57:21 +09:00
Treehugger Robot
f32107fbb2 Merge "Remove unused /selinux_version" 2017-03-15 19:59:03 +00:00
Treehugger Robot
da00e137ec Merge "Compute PLATFORM_VERSION and PLATFORM_VERSION_CODENAME" 2017-03-15 17:04:58 +00:00
Alex Klyubin
4fe461d2a0 Remove unused /selinux_version
This file is no longer needed because it was needed for supporting
reloadable/dynamic SELinux policy which is no longer supported.

Test: Clean build, flash, device boots without additional denials.
      Reboot to recovery works, no additional denials.
Bug: 33642277
Change-Id: Ie65e74b8c8437694bc1ea019ab844f60f9e89ade
2017-03-15 09:47:36 -07:00
Colin Cross
e0e20079c2 Merge "package-modules: use && instead of ; between copy commands" 2017-03-15 02:09:20 +00:00
Tianjie Xu
b59c17fc8f Provide more info for bsdiff/imgdiff exceptions.
When bsdiff/imgdiff fails, dump the output along with the src/tgt
filenames and block ranges. Also, exit the script gracefully instead
of raising an exception about iterating over 'NoneType'.

Bug: 31381530
Test: Package generates successfully for angler, and error outputs
      correctly with error injection.

Change-Id: I06a2dfe545fbdff7043de05fee34b378453a9291
2017-03-14 18:51:21 -07:00
Colin Cross
b3bfc7172b Compute PLATFORM_VERSION and PLATFORM_VERSION_CODENAME
Compute PLATFORM_VERSION and PLATFORM_VERSION_CODENAME from
TARGET_PLATFORM_VERSION.  Add explicit values for O, even though
they are the same as the fall backs, as placeholders for future
values.

Bug: 35445510
Test: manual
Merged-In: I30a7142f732c85b637d2ce072373bc867cedcd42
Change-Id: I30a7142f732c85b637d2ce072373bc867cedcd42
2017-03-15 01:10:28 +00:00
Colin Cross
f075bcbc98 package-modules: use && instead of ; between copy commands
Using ; to join commands in a rule causes failures to be ignored by
make.  Use && instead, and add true at the end as the second operand
to the last && operator.

Also inline copy-test-in-batch, batching is no longer necessary as
kati will fall back to a shell script if the recipe is too long to
fit in a command line.

Test: builds
Change-Id: I4a2528bf2a15106cfabaae0336662c4a0464271d
2017-03-14 16:58:34 -07:00
Treehugger Robot
77dab1ed35 Merge "Add /file_contexts.bin only to devices which need it" 2017-03-14 14:41:31 +00:00
Jaesoo Lee
2b61f19254 Merge "configstore: add default implementation of configstore@1.0 HAL" 2017-03-14 06:44:13 +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
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
6d0f949296 Merge "Speed up *TS zip file creation" 2017-03-13 19:50:44 +00:00
Tao Bao
e5b2ff2a97 Merge "releasetools: Fix the diff_worker progress report." 2017-03-13 19:12:26 +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
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
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
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
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
Treehugger Robot
df58de6303 Merge "hardware/interfaces: Android.mk always -Werror" 2017-03-08 23:16:35 +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
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
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
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
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
Tao Bao
7dc54e9761 Merge "releasetools: Remove the obsolete path in GetImage()." 2017-03-07 06:20:04 +00:00