Also add some more relevant information at the beginning of each report,
to make triaging of the reports easier.
To test this I declared ExactCalculator as
LOCAL_PRODUCT_SERVICES_MODULE, and this is the resulting log:
"""
Package name: com.android.calculator2
Module name in Android tree: ExactCalculator
Local path in Android tree: packages/apps/ExactCalculator
Install path on aosp_marlin-eng: out/target/product/marlin/system/product-services/app/ExactCalculator/ExactCalculator.apk
appcompat.sh output:
NOTE: appcompat.sh is still under development. It can report
API uses that do not execute at runtime, and reflection uses
that do not exist. It can also miss on reflection uses.
1: Reflection light greylist Landroid/os/Bundle;->getIBinder use(s):
Landroid/support/v4/app/BundleCompat$BundleCompatBaseImpl;->getBinder(Landroid/os/Bundle;Ljava/lang/String;)Landroid/os/IBinder;
2: Reflection light greylist Landroid/view/View;->mAccessibilityDelegate use(s):
Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->hasAccessibilityDelegate(Landroid/view/View;)Z
3: Reflection light greylist Landroid/view/View;->mMinHeight use(s):
Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->getMinimumHeight(Landroid/view/View;)I
4: Reflection light greylist Landroid/view/View;->mMinWidth use(s):
Landroid/support/v4/view/ViewCompat$ViewCompatBaseImpl;->getMinimumWidth(Landroid/view/View;)I
4 hidden API(s) used: 0 linked against, 4 through reflection
0 in blacklist
0 in dark greylist
4 in light greylist
To run an analysis that can give more reflection accesses,
but could include false positives, pass the --imprecise flag.
"""
Test: m (also on internal)
Bug: 110073830
Change-Id: I5114f51d1ab163e954fcffb159ef335abc289cf6
The aapt2 rules need to generate an output path for each resource
file. Use $(call clean-path) on the input path so the output path
doesn't contain "..".
Bug: 112037828
Test: m checkbuild
Change-Id: Ib4e255e7a7f1d069cd3871a12ac232f231f19646
If the last token in the argument for collapse-pairs is
key=, then the following lines were written:
key
=
This patch fixes it so that key= is written instead.
Test: specify ro.boot.logical_partitions= at the end of
ADDITIONAL_PRODUCT_PROPERTIES and `cat $OUT/product/build.prop`
shows:
ro.boot.logical_partitions=
Change-Id: I33a0efb59871f0e36a93c8fae0d75f2735994301
* changes:
Pass --library to manifest_fixer.py for android libraries
Fix dependencies for obfuscated instrumentation tests
Move manifest fixing to a separate rule
Manifest fixing is getting complicated, move it to a separate rule
so that it doesn't have to be a function in definitions.mk.
Bug: 111347801
Test: m checkbuild
Change-Id: Ibc60ad79c9c4f4a63a0e1c8f7779534954fb6585
Uses the new class2greylist tool to extract API descriptors from .class
files.
Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.
Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
The output of the appcompat tool is store on $(PRODUCT_OUT)/appcompat.
Bug: 110073830
Bug: 78924201
Test: m
Change-Id: Ia77cc53fc241a048958cf243ba298298f800f933
Kati produces errors when a variable containing '=' is used as a
dependency:
https://github.com/google/kati/issues/138
So provide a better error message instead.
Test: Add a module with an '=', see new error
Change-Id: I09d570a8d19abb067621af9983a9d568b643dfb0
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.
This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.
Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
Recent CL added a flag to an unzip command which does not restore
the timestamps of extracted files. This is necessary because the
extracted files are the output of the rule and thus the timestamp
must be newer than the timestamp of the inputs.
Unfortunately, the sdk_mac build has an old version of UnZip (5.52
vs 6.0) which does not support the flag. Replace it with find|touch.
Test: m
Change-Id: Ib1f218af4547a1d604b46e68b6ef50d45cb91ee9
Java modules built with make and Soong currently invoke `hiddenapi`
with their own rules. Refactor the definitions so that Soong uses
make's definition. This will be useful for a subsequent CL which
needs to invoke `hiddenapi` on all boot dex files simultaneously.
Bug: 79409988
Test: m
Change-Id: I85105e650605d37c3ee8200d7f0d40c297756fcb
The `hiddenapi` build tool now expects the first argument to be
a command name. Change its build rule accordingly.
Bug: 79409988
Test: make
Change-Id: I7e34331c487f490d1de6a10c4139768e9774f03e
Bug: http://b/62424007
This breaks 64-bit Windows executables. Probably due to the Clang
migration, the entry-point need not be set even for 32-bit executables.
Test: 32-bit and 64-bit aapt2_tests.exe and ziparchive-tests.exe can
start. (There are some failed tests, though).
Change-Id: I1dea9137c79c5f26b493640cfae0856c1a7ea301
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer. Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.
This will also prevent relocation packing on prebuilt shared
libraries.
Also enables relocation packing on Darwin since lld will work on
Darwin.
Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
This reverts commit 054f210fd5.
Reason for revert: Revert it again since BUG of 109736180 already be fixed.
Local verified for different build targets of
walleye_coverage-userdebug, marlin_coverage-userdebug
and make sure they can build pass.
BUG: 109736180
Test: lunch walleye_coverage-userdebug; make adbd_test
BUG: 73082610
Test: cd packages/apps/DocumentsUI/tests/; mma
Modify AndroidTest.xml to a not well-formed xml; mma
Then, it should build fail.
atest -v DocumentsUITests
Change-Id: Iadfcb28a4e3f685a66697de21f57ca5bdb8b7c9e
Relanding with change to not run on the darwin build since host init
verifier is not possible there.
Bug: 36970783
Bug: 110477913
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
PRODUCT_COPY_FILES, or TARGET_PREBUILT
Change-Id: Iae93705a9320159ed97328e615eaa3bc150e6442
A java module exports SDK library names that it is using directly or
indirectly via its dependencies. Manifest fixer uses the SDK lib names
to automatically add <uses-library> tags for the apk.
The SDK library names are exported via exported-sdk-libs file in make.
From Soong, they are exported via LOCAL_EXPORT_SDK_LIBRARIES flag.
Bug: 77575606
Test: m -j
Change-Id: I4e7a9bdc5bf845af85168abf55f8063900bacc72
Sdk addon has been allowed for libraries built with Android.mk. But some
of the libraries included in the Sdk addon should be built with
java_sdk_library. module-stubs-files function is modified for supporting
java_sdk_library modules.
Bug:77577799
Test: make -j
Change-Id: If289e5aa5b5016901ff9b69da8fc7f7d8138a456
Since this is a directory separator, it causes a good deal of
strangeness in the build whenever we include a module name in a path.
It becomes particularly problematic if used together with ".."
Test: build_test on downstream branches
Change-Id: I344eca0db3346cd6ffabff767c34159c85ebc051
Bug: 36970783
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
PRODUCT_COPY_FILES, or TARGET_PREBUILT
Change-Id: Ia98793776b365733ca8f0174dc228326a6edf041
* PRIVATE_OBJCOPY is still set to objcopy and used
when llvm-objcopy cannot replace objcopy.
Bug: 80093681
Test: build/boot with USE_CLANG_LLD=true
Change-Id: I4bd8a53f74864b49e007f0c5f1b0f4b16e121135
This reverts commit 479da2f3bb.
Reason for revert: <revert for b/109736180 #8>
Bug: 109736180
Test: lunch walleye_coverage-userdebug; make adbd_test
Change-Id: I090893e20a2dab0651551361ebf65c26b95a25f2
If the default manifest that doesn't set minSdkVersion is passed to
manifest merger along with a library manifest that does, it will fail
with:
.../DefaultManifest.xml Error:
uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library ...
Translate LOCAL_MIN_SDK_VERSION or LOCAL_SDK_VERSION to minSdkVersion
in DefaultManifest.xml.
Bug: 79481102
Test: m checkbuild
Change-Id: I4d792d48612e6a1111e05a9e4a71bb4d87eae1ad
Building with FORCE_AAPT2=true will turn on AAPT2 for all modules
unless they set LOCAL_USE_AAPT2 := false. The build system will
attempt to rewrite common AAPT patterns into AAPT2 patterns,
including removing --extra-packages for support library packages,
removing LOCAL_RESOURCE_DIR point to support library resources,
adding a default empty manifest file if it doesn't exist, and
converting LOCAL_STATIC_JAVA_AAR_LIBRARIES to
LOCAL_STATIC_ANDROID_LIBRARIES.
Bug: 79481102
Test: m checkbuild
Change-Id: I8d9d55fe4d5d5c965c64b0407efe74e0afc35c3a
make <test> should fail if the test has a poorly configured
atest configuration
BUG: 73082610
Test: cd packages/apps/Bluetooth/tests/unit; mma
Modify AndroidTest.xml to a not well-formed xml; mma
Then, it should build fail.
atest -v BluetoothInstrumentationTests
Change-Id: I774b4eb81a1b9e9ae31de949aea995d2f258e9a1
If a static android library lib1 has LOCAL_STATIC_ANDROID_LIBRARIES
lib2, then the R.class files for packages in lib2 will be merged
into the jar for lib1. If an app has lib1 in its
LOCAL_STATIC_ANDROID_LIBRARIES it will get the R.class files from
lib2 through lib1, instead of regenerating the R.java files with
numbering that matches the resource table of the app.
This was worked around for support libraries by keeping a
fix_dependencies.mk that added transitive static support libraries
to the direct static dependencies of apps. Instead, propagate
the packages that aapt2 generated R.java files for up as
--extra-packages arguments to the next aapt2 invocation, which
will force aapt2 to regenerate the R.java files for those packages.
Bug: 78300023
Test: m checkbuild
Change-Id: I7375e13241b4c4f2933032409fb7935abe133bfc
A test can be disabled in two ways:
1. Add the test name to ALL_DISABLED_PRESUBMIT_TESTS variable.
Integration tests (tests inside TradeFed) can only be disabled in
this way.
2. In module config, set LOCAL_PRESUBMIT_DISABLED to true. This works
for tests with build target.
This change allows tests to be skipped in presubmit check to be saved in
a list that's included in test-mappings.zip build artifact.
Bug: 74971025
Test: m dist -j test-mapping
Change-Id: I6e3016b017ce1ade024dc4ded72a10c778b88e7f
Instead of passing the entire contents of
$(COMPATIBILITY.$(suite).FILES) to eval, which may keep that string
around, delay the evaluation of that, and the new files until inside the
eval.
This saves ~2.8GB: 7.4GB -> 4.6GB of ckati max resident memory for a
relatively small internal build. It also saves ~10% of the makefile
loading time (81 -> 73 seconds).
Test: build-aosp_arm.ninja is identical
Change-Id: If45a4796f1bbf6d67dff388ea877a6115a4e06f4