To consolidate the number of places that we're using 'find' in the tree,
add some more helpers:
all-named-dirs-under
all-subdir-named-dirs
all-named-files-under
all-subdir-named-files
This change also makes many of the current helpers use these helpers
instead of using their own implementation.
The 'dirs' helpers are using '-type d' so that they only output
directories. It's probably safe to use '-type f' for the files helpers,
but that increased the kati load time by ~20%.
Bug: 24204119
Change-Id: I3312e2fe8c146f10955e1d986ad15d9c8be494e1
There are multiple versions of this in the tree. Let's standardize on
one that will work for everyone, and will sort the results.
Bug: 24204119
Change-Id: I09fcd80e1e8e35e64d8a8a62bbc096f87b02603f
- MNC currently has security patches from the August OEM bulletin with patch date of Sep 1 plus only critical fixes from September OEM bulletin
- To be cherry-picked if picking up remaining fixes from September OEM bulletin to MNC
Change-Id: I2d1ba9c5a893727962f3f1837df1dd9df49e44f5
This reverts commit d07bfc5196.
Real fixes [1][2][3] are ready to merge. Time to revert the workaround.
[1] commit d47d8e1488
[2] commit 1fc67631ee
[3] commit 937847ae49
Bug: 22430577
Change-Id: Icd6623e8717c93ad1f12cd1ba43db5e006e928ad
MNC will include the security patches from the August OEM bulletin
which will have a patch date of September 1.
Bug: 23288951
Change-Id: Ia0f313bf35fa7af1efed1787006bfbb614bc8c29
Add a target to zip up all the otatools and releasetools, for easy
copying to the OTA builder machine.
Change-Id: I55a6d93c1de75ac936d941c0e3ae72897407f563
(cherry picked from commit f22b0f43ef)
Currently, the keyblock was being generated using
data_key.vbprivk. However, we need to use kernel_subkey.vbprivk for
kernel keyblock generation. This did not create any issues until now
because dev-mode just throws a message saying that keyblock is
invalid. But, normal-mode does not boot if keyblock is
invalid. Add extra parameter for passing in kernel subkey to
vboot_signer script.
TEST="make bootimage-nodeps" generates correctly signed
boot.img. Verified that the image boots fine in normal mode.
Change-Id: I0fc2183b466e34ddf1d98c9532072548504fcec4
Signed-off-by: Furquan Shaikh <furquan@google.com>
Bug: 22796994
Bug: 22693954
This change fixes the RS_PREBUILT_LIBPATH when used with 64-bit target
devices. It also fixes an issue where the target RenderScript API is
below 21 for 64-bit compilation. In those cases, we should always
upconvert it to 21 (since that is the first available 64-bit release).
Change-Id: I27e9d0bd5c01bac0b3b28e9002333264a55d628f
- Don't overwrite [TARGET|HOST]_[CC|CXX] with the [CC|CXX]_WRAPPER prefix,
so that we can disable the wrapper per module.
- Disable ccache on a module when FDO is enabled.
Bug: 22612634
Change-Id: Ibc04a4742d589955066c7eceb43a0da9a2b893bc
This can be used to compile independent libraries without the need for
libgcc.a.
Change-Id: I924200995569d9a978ddbaa6ec321d80734f1374
(cherry picked from commit 75011b2003)
Don't uncompress/page-align the jni libraries in apps_only build,
because the apk may be run on older platforms that don't support loading
jni directly from apk.
When prebuilt apks are installed to platform build, the build system
will automatically uncompress/page-align the prebuit apks in M and
downstream, so no need to uncompress/page-align in the apps_only build
either.
Bug: 22491084
Change-Id: I67e977b2592800ae467450592069843b4e5fc466
angler and bullhead have smaller cache partiton (~100MB) and hit issue
with incremental OTA (such as MDA09B to MDA12) that requires more stash
space with BBOTA v3. Temporarily use v2 as a workaround, until we come
up with a real fix. Note that BBOTA v2 still uses some stash space, but
should be much smaller than v3.
Bug: 22430577
Change-Id: Ic4c05f3609732e7d5140703062da9fe11df5c6d3
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>
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
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
Without this change, if an app with "LOCAL_SDK_VERSION := current" links
against a static library that uses removed APIs, the app will fail
ProGuard processing because the removed APIs can't be found in the
current SDK. This works around the issue.
Bug: 18510449
Bug: 20667396
Change-Id: Ia6e2a81cf5ecba972d155e56238ea946f8539411
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.
Bug: 21522719
Bug: 22023465
Change-Id: I49f16adbf2dedc5279fbb8622bf99ef71dcc494f
The two flags have been merged and renamed in ART.
(cherry picked from commit d8fae9a6a6)
Bug: 21924613
Change-Id: Iffc1dcc6764367239d6f45a3598cdb2c5d5d5013
Prevents aapt from generating java symbols for strings that don't have
a default localization.
Bug: 21537397
Change-Id: I2f17397e33d823045f7dcff02e3d0817f3f81849
These directories are excluded in addition to OUT_DIR.
This can be useful if your build system has other output directories
beyond what OUT_DIR is set to.
Change-Id: I6d98a85bcc8c89279e939406a7fec32547e8922f
The catch all "org" package was catching several thousand
org.apache.harmony.tests.* tests that are already covered by
other packages. Replace the catch-all org.* with specific prefixes.
Needs additional support in CollectAllTests to handle multiple
prefixes. This is implemented in the companion change.
bug: 20862863
Change-Id: I44348052d20312d478bdbf6df0e561db63e18cd8
- In uncompress-shared-libs we may strip .so files not for the current
TARGET_ARCH. So we need to strip first and then sign the apk.
- For PRESIGNED apks, make sure we don't strip the .so files even if
they are "fat".
Bug: 21571418
Bug: 8076853
Change-Id: Ifd1193dda0c2cd52ac148064ce5a32bcdd03f75c
- We don't need LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES now, for we always
page-align jni shared libraries and store them umcompressed.
- For prebuilt apks, we don't extract jni any more; Instead we always run
uncompress-shared-libs on them.
- For apks built from source, we still install the jni separately, because
that way multiple apks can share the same jni and it saves space.
With this change, for most prebuilt apks, we don't need to specify
LOCAL_PREBUILT_JNI_LIBS ("@lib/<abi>/foo.so") any more, for the build
system automatically replaces the embedded jni with uncompressed files;
But if a prebuilt is a fat apk (i.e. containing jni not needed by the
current product architecture), you still need LOCAL_PREBUILT_JNI_LIBS to
specify what jni to keep. Otherwise all embedded jni will be replaced with
uncompressed files, that wastes space.
Bug: 8076853
Change-Id: Ic3666dc72bf17cd293787414dd185470b365f967
This reverts commit 32e1689684.
Now that prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9 is also updated
Change-Id: Id95c1c4cc651c434461655e62b8f23afd56b53e4
Normally the binaries use the exsiting $ORIGIN/../lib[64] with binaries
in the bin subdirectory;
For historical reason the binaries in the SDK package don't have a bin
subdirectory. This workaround enables them to work in the exsiting SDK
directory structure.
Bug: 21301578
Change-Id: Ibebfbfb8b30e81e7bbaf13a21bb205f3f0282d24
Set the initial (version 1!) value for the preview SDK version
readable by apps. If we're on a release version, force it to be 0.
Change-Id: Ib3e6cad1f59cea8e4a781827d4a35dd3620b90f1
Print modules and their transitive dependencies with license files.
To invoke, run
"make deps-license PROJ_PATH=<proj-path-patterns> DEP_PATH=<dep-path-patterns>".
PROJ_PATH restricts the paths of the source modules;
DEP_PATH restricts the paths of the dependency modules.
Both can be makefile patterns supported by makefile function $(filter).
Example:
$ make deps-license packages/app/% external/%
prints all modules in packages/app/ with their dpendencies in external/.
The printout lines look like "<module_name> :: <module_paths> :: <license_files>".
Bug: 20823995
Change-Id: I06b66e85ff56c8628bffa3d948085ed45870100f
(cherry-pick from 39b9b690a8)
- When raising the ProGuard sdk version for platform build, use
TARGET_DEFAULT_JAVA_LIBRARIES instead of just framework.
- Also added SUPPORT_LIBRARY_ROOT to reference support library resource
dir.
Bug: 20658265
Change-Id: Ib008d8e70508723db91431a062cac691367f2f6c
Commit 28acbeab18f6083299c07f9ebe769d22e49f8107 removed the dependency of
sepolicy-analyze on libc++, eliminating the only consumer of the library for the
cts host-side tests. Remove the library since it is no longer needed but leave
the ability to add other shared libs in the future.
(cherry-pick of commit: 214a171424)
Bug: 19566396
Change-Id: I36f45c3e92c2d6370e98baa4c527835af66691fa
ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.
In multilib setup, ASan-RT name depends on the target arch:
/system/lib/libclang_rt.asan-arm-android.so
/system/lib64/libclang_rt.asan-arm64-android.so
We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.
Change-Id: I937d202077b6e433ba476c075d31be818b662d53
Always link libm with asan. Hasn't been a problem before because ASAN
was only ever used when libc++ was as well, which already links libm.
Pass --no-as-needed for host modules.
These aren't needed for the target builds because the target uses the
shared RTL.
Change-Id: I3b95c8682c0f63bac6b726f8cd15c638aaa98311
The only remaining users of stlport are vendor blobs. Prevent any new
users from using it.
Bug: http://b/15193147
Change-Id: I577a16c8c52e2c7d939c3b5026e18ad90e4b9f26
(cherry picked from commit 3a360a7353)
- Detect java-source-list before transforming to java-source-list-uniq.
This fixes non-fatal errors in build log like:
/bin/bash:
out/target/common/obj/APPS/android.core.tests.libcore.package.tzdata_intermediates/classes/java-source-list:
No such file or directory
- Cleaned the outdated incrementaljavac. Nobody is using this feature
and now we switched to jack.
Change-Id: If1adb9b5820d9b295a11984c0f170f9a7ff4de7b
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize
when compiled with clang/llvm.
BUG: 19872411
Change-Id: I6de57583be04da607f569df65e93531787dbb789
(cherry picked from AOSP commit 90036610dd)
When an app's LOCAL_SDK_VERSION is lower than the support library's
LOCAL_SDK_VERSION, we artifically raises the "SDK version" "linked"
by ProGuard, to
- suppress ProGuard warnings of referencing symbols unknown to the
lower SDK version.
- prevent ProGuard stripping subclass in the support library that
extends class added in the higher SDK version.
This allows us to remove the dangerous ProGuard flag
"-dontwarn android.support.**".
Notes:
- We don't raise the app's LOCAL_SDK_VERSION, so that the app's own
code is still unable to use the higher SDK version.
- For platform build, we can't just raise to the "current" SDK,
because would break apps that use APIs removed from the current SDK.
We raise it to framework.jar instead, which contains the most complete
symbol set.
Bug: 20658265
Change-Id: I90099073457a65cb8031fbaec6b396d68ce614a7
(cherry picked from commit 8e8d1e7aba)
We need PT_LOAD segments to match for the gdb sake.
If we pack module after stripping symbolic version
PT_LOAD differ from actual ones; this confuses gdb.
Bug: http://b/20687795
Change-Id: If7b1ffcda918d0cc47051a30ca1202007ed62403
Enable the following compiler hardening flags:
* -Wl,-z,relro
* -Wl,-z,now
* -fstack-protector
relro / bind_now make the relro region read-only after linking,
preventing certain attacks against ELF data structures.
stack-protector adds stack canaries, which can detect exploits
which overwrite parts of the stack.
Explicitly not added in this change is FORTIFY_SOURCE=2. Adding that
option turns on glibc's warn_unused_result attributes. This generates
a huge number of new compile time warnings, and for the multiple
makefiles which have -Werror in them, turns those warnings into errors.
I'm not able to fix all the errors right away.
Bug: 20558757
Change-Id: I86791177c6695f5325233d9dd9a5dd3ccc2b1a2f
Do not pack relocations for prebuilds unless
LOCAL_PACK_MODULE_RELOCATIONS is true
Bug: http://b/20537715
Bug: http://b/18051137
Change-Id: Iddef3b09741da6ae10d73c98103b868cc7695d38