Commit graph

47664 commits

Author SHA1 Message Date
Mark Salyzyn
8d1be80de2 bootstat: add recovery/fastboot boot reasons
Test: none
Change-Id: I3013c28d02c9744bdfa312c179143f7db9e51596
2019-05-21 10:54:07 -07:00
Mark Salyzyn
4e7acf7075 bootstat: label Mediatek boot reasons
Comment which strings come from Mediatek devices to aid maintenance.

Test: compile
Bug: 74595769
Bug: 63736262
Change-Id: Ic60970bcbbb389e4158ee691c4c81e6514d3b870
2019-05-21 10:53:56 -07:00
Florian Mayer
7dc7c3a9c6 Merge "Include string.h for strcmp." 2019-05-21 11:53:46 +00:00
Treehugger Robot
b26696e2dd Merge changes I8186718c,I8d6f33e9,I56fe5e11,Ie4004c98,I531d3d60, ...
* changes:
  Enable native_bridge_support for libvndksupport
  Enable native_bridge_support for libprocessgroup
  Enable native_bridge_support for libcutils
  Enable native_bridge_support for libsystem_headers
  Enable native_bridge_support for libbacktrace_headers
  Enable native_bridge_support for libutils
2019-05-21 09:01:00 +00:00
Peter Collingbourne
3e48b66578 Merge "Link the "runtime" namespace to more namespaces." 2019-05-21 02:29:46 +00:00
Treehugger Robot
b545055f6d Merge "Get max-download-size from device during fastbootd for flashall/update" 2019-05-20 22:50:10 +00:00
Treehugger Robot
cd9b18f215 Merge "Check DTB image size for boot image header version 2 and above" 2019-05-20 17:40:44 +00:00
Hridya Valsaraju
83d856e4c5 Get max-download-size from device during fastbootd for flashall/update
Currently, during a 'fastboot flashall/fastboot update', the 'getvar
max-download-size' command is issued once to the device when it is in
bootloader mode and the same value is used even after the device boots
into fastbootd. If the max-download-size returned by bootloader is
greater than the max-download-size in fastbootd, this could break flash
as large images are broken down into chunks before downloading by using
the max-download-size variable. This will cause fastbootd to return
an error since it checks whether the buffer being downloaded has a size
greater than the max-download-size limit.

Test: fastboot flashall
Bug: 536870912

Change-Id: Ife7c1ec0583d80d4a31ecf01f1fc14a8365afe0d
2019-05-20 09:37:22 -07:00
vichang
de725e6e75 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" 2019-05-20 09:49:21 +00:00
Jiyong Park
724cbb080d Merge "Fix nullpointer dereference in libnativeloader" 2019-05-18 02:20:57 +00:00
Hridya Valsaraju
96fd8874ef Check DTB image size for boot image header version 2 and above
DTB in boot image is mandatory for boot image header version 2
and above. mkbootimg.py must check the size of the DTB image passed
to it and throw an error if the image is empty.

Test: build with no DTB files in BOARD_PREBUILT_DTBIMAGE_DIR
Bug: 133006443
Change-Id: I478fcdb8e77957848a93027e695fcb238c544d62
2019-05-17 16:49:56 -07:00
Florian Mayer
5795d0b1a8 Include string.h for strcmp.
Change-Id: I57a6505446e63567b0be8496cf1f0d9326e930f7
2019-05-17 19:49:26 +01:00
Jiyong Park
d970ccb56e Fix nullpointer dereference in libnativeloader
The `char* path` argument of OpenNativeLibrary() can be nullptr. We are
constructing std::string from the path, which is a bug. Fixing it by
using char* without converting it to std::string.

Test: run-gtests.sh
JniCompilerTest.CompileAndRunIntMethodThroughStubNormalCompiler
is successful.

Change-Id: I91249da7c1a72a2dff9bc77e477b465e0c7ee056
2019-05-17 18:51:44 +09:00
Treehugger Robot
6efb8e7754 Merge "Trusty Keymaster@4.0" 2019-05-17 01:36:18 +00:00
Matthew Maurer
b321b410ff Trusty Keymaster@4.0
Adds support for proxying V4.0 commands to Trusty and makes 4.0 the
default when including trusty-base.mk.

Bug: 128851722
Test: Keymaster VTS 4.0 + Trusty
Change-Id: I2e2220963996fcb88d6953ee1a58af1b947b857d
2019-05-16 14:19:50 -07:00
Tom Cherry
8a3630e327 Merge "init: always initialize device-mapper" 2019-05-16 15:09:16 +00:00
Treehugger Robot
68b378f980 Merge "class_start_post_data also starts disabled services." 2019-05-16 15:08:30 +00:00
Treehugger Robot
205f1435e8 Merge changes Idb6ef31d,Ifb87ebae
* changes:
  Add README file for libnativeloader
  Fix style around header inclusion
2019-05-16 14:36:45 +00:00
dimitry
15f8ce36e2 Enable native_bridge_support for libvndksupport
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libvndksupport
a dependency of libutils greylisted library (available for apps
targeting Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I8186718c5efee25261a9946ffb52df5f675bec26
2019-05-16 14:20:31 +02:00
dimitry
49c1f6efea Enable native_bridge_support for libprocessgroup
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libprocessgroup modules
needed by libutils greylisted library (available for apps targeting
Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I8d6f33e95e9f7424f5fa12f6fbabafa1d6c37413
2019-05-16 14:19:09 +02:00
dimitry
051d5cba80 Enable native_bridge_support for libcutils
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libcutils which is a
greylisted library (available for apps targeting Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I56fe5e11a884d22714cfc4afb78bec0a352d6370
2019-05-16 14:17:00 +02:00
dimitry
11ea33776f Enable native_bridge_support for libsystem_headers
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libsystem_headers
a dependency of libutils greylisted library (available for apps
targeting Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: Ie4004c981075b22d08e4cca8cb35a7df5e157d46
2019-05-16 14:13:38 +02:00
dimitry
49ab87bba4 Enable native_bridge_support for libbacktrace_headers
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libbacktrace_headers
a dependency of libutils greylisted library (available for apps
targeting Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I531d3d60937c5f7a95daead29dfc5913bd663321
2019-05-16 14:07:43 +02:00
dimitry
454ba7ec88 Enable native_bridge_support for libutils
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libutils which is a
greylisted library (available for apps targeting Android version < N).

Bug: http://b/77159578
Test: make
Change-Id: I58667558d2a673fc0d882cf623b7a1b6f6f305ec
2019-05-16 13:48:17 +02:00
Treehugger Robot
24529f4409 Merge "Hide non-bridged/bridged namespaces behind NativeLoaderNamespace class" 2019-05-16 11:25:33 +00:00
Martijn Coenen
acc45aa0a1 class_start_post_data also starts disabled services.
This keyword was introduced to support restarting services on devices
using APEX and FDE. The current implementation is not a restart, but
rather a 'reset' followed by a 'start', because the real /data must be
mounted in-between those two actions. But we effectively want this to be
a restart, which means that we also want to start 'disabled' services
that were running at the time we called 'class_reset_post_data'.

To implement this, keep track of whether a service was running when its
class was reset at post-data, and start all those services.

Bug: 132592548
Test: manual testing on FDE Taimen
Change-Id: I1e81e2c8e0ab2782150073d74e50e4cd734af7b9
Merged-In: I1e81e2c8e0ab2782150073d74e50e4cd734af7b9
2019-05-16 09:30:35 +02:00
Evgenii Stepanov
6e06bcce9c Merge "Initialize all fields of struct iocb." 2019-05-16 06:36:11 +00:00
Evgenii Stepanov
fe7eca7b8f Initialize all fields of struct iocb.
Kernel does not accept non-zero value of iocb->aio_reserved2.

Bug: 132803232
Test: initialize malloc() memory to non-zero pattern and see what breaks

Change-Id: I65a7e89e3a2c1ba79df1dc2d011d6c76c41afb81
2019-05-15 18:46:18 -07:00
Jiyong Park
fe4fb2b76c Add README file for libnativeloader
Bug: 130388701
Test: N/A
Change-Id: Idb6ef31d72041759d42b9e8fb504af2103c149e3
2019-05-16 08:55:11 +09:00
Jiyong Park
16a9896ff7 Fix style around header inclusion
This change is to be in sync with other libraries in system/core.

External headers are included via #include <...> rather
than #include "...", which is for headers from the current library.

Bug: 130388701
Test: build & pass presubmit tests

Change-Id: Ifb87ebaea1b0ff95e2e79352e6a42e3bfd949c52
2019-05-16 08:55:11 +09:00
Jiyong Park
8537781cc7 Hide non-bridged/bridged namespaces behind NativeLoaderNamespace class
NativeLoaderNamespace fully abstracts the non-bridged (so called
android-) and bridged namespaces.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I3d5ca7515711e7638f4a5ab4d3a150185c3d17ac
2019-05-16 08:55:04 +09:00
Tom Cherry
eef2a703ad init: always initialize device-mapper
Device-mapper is required already, so drop the conditionals for trying to
load it.  GetRootEntry() was depending on its existance, so this adds the
required dependency.

Bug: 131747478
Test: boot without any verity/avb/dm-linear devices.
Change-Id: Ifc89d3b338e2c2b8faaf1c24e2792c1eeb5bbbde
2019-05-15 16:35:43 -07:00
TreeHugger Robot
9c7a39ed2d Merge "DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master" into stage-aosp-master 2019-05-15 23:02:14 +00:00
Tao Bao
8205d702d5 Merge "fs_mgr: Fix EnsurePathMounted with a given mount_point."
am: 3c94eaad5f

Change-Id: I311f5bea3c515d6db5c1fa37b436b17290573f70
2019-05-15 09:33:42 -07:00
Tao Bao
3c94eaad5f Merge "fs_mgr: Fix EnsurePathMounted with a given mount_point." 2019-05-15 16:10:18 +00:00
Dimitry Ivanov
8388f66436 Merge "Link libselinux/utils/base statically"
am: b743279de2

Change-Id: I26092a7bb6c5ce1ee28ca81f1dac8b1ce289e856
2019-05-15 04:11:48 -07:00
Dimitry Ivanov
8e05017c73 Merge "Enable native_bridge_support for libsync"
am: 057fd6fd6b

Change-Id: I7408462a3f935cc05f164432b02c51ea80e853ae
2019-05-15 04:11:06 -07:00
Dimitry Ivanov
b743279de2 Merge "Link libselinux/utils/base statically" 2019-05-15 10:49:12 +00:00
Dimitry Ivanov
057fd6fd6b Merge "Enable native_bridge_support for libsync" 2019-05-15 10:48:59 +00:00
dimitry
bf613b4ce4 Link libselinux/utils/base statically
CTS tests are not supposed to link against platform-private
libraries. As it is this test put an implicit requirement on
having libselinux.so in system image. Which is not intended.

Link statically against listed libraries to avoid such unintended
dependencies.

Test: make
Change-Id: I47a5b032000ee2c1ff764d6cc57683343851a07f
2019-05-15 12:40:33 +02:00
dimitry
0726be3d62 Enable native_bridge_support for libsync
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libsync because it is a
public library.

Bug: http://b/77159578
Test: make
Change-Id: I993384469fa2b011a15a2ecb1fd2162184c74a47
2019-05-15 12:40:33 +02:00
Hridya Valsaraju
62fc6c9eb8 Merge "Allow CreateResizeDeleteLP test case to run on non-A/B devices"
am: 3afe5f22b3

Change-Id: Ief9cd9a63b946964b95bd4177fb4981edaef0e57
2019-05-14 21:19:04 -07:00
Treehugger Robot
3afe5f22b3 Merge "Allow CreateResizeDeleteLP test case to run on non-A/B devices" 2019-05-15 03:53:37 +00:00
Hridya Valsaraju
f81bd17179 Allow CreateResizeDeleteLP test case to run on non-A/B devices
Test: fuzzy_fastboot --gtest_filter=*Logical*
Bug: 117220134

Change-Id: Ic7c2b246b7c5646d3589f8f57eceb9ba5feeef2b
2019-05-14 16:37:10 -07:00
Mark Salyzyn
3497216d8e Merge "fs_mgr: overlayfs readme caveats"
am: fe04d7ce7e

Change-Id: I0b46890422a3a23985b9a868c17f706b75dd2cfb
2019-05-14 13:38:38 -07:00
David Anderson
7f25c5644e Merge "libdm: Add dm-crypt and dm-default-key support to libdm."
am: 57467074a2

Change-Id: Iec833a4a496792de369308d4c3988fdd3144fcef
2019-05-14 13:28:23 -07:00
Mark Salyzyn
fe04d7ce7e Merge "fs_mgr: overlayfs readme caveats" 2019-05-14 20:28:17 +00:00
David Anderson
57467074a2 Merge "libdm: Add dm-crypt and dm-default-key support to libdm." 2019-05-14 20:00:39 +00:00
Victor Chang
0c7edece94 Allow linking to libicuuc.so and libicui18n.so from executable in /data
Executable in /data/ runs in default linker namespace, not
classloader namespace.
In Q, we moved libicuuc.so and libicui18n into the runtime
namespace, and allow linking from runtime namespace and classloader
namespace.

This change further allows linking from default namespace, and tries
to fix the regression temporarily.

Bug: 130788466
Test: The app issue is fixed after this CL
Change-Id: Ifae52b554124514e433cfe78875643a7450fbabd
2019-05-14 20:22:34 +01:00
Xin Li
26ba26bf71 DO NOT MERGE - Skip pi-platform-release (PPRL.190505.001) in stage-aosp-master
Bug: 132622481
Change-Id: I14ace58ee5b4efd490f9213f7a2087d4d56334db
2019-05-14 12:10:14 -07:00