Commit graph

47740 commits

Author SHA1 Message Date
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
Mark Salyzyn
8338b01bae fs_mgr: overlayfs readme caveats
Itemized list of additional overlayfs caveats

Test: none
Bug: 109821005
Change-Id: I3550ddf6544749cdc68c803f0577002346890518
2019-05-14 10:29:25 -07:00
Mark Salyzyn
796162d7c5 Merge "fs_mgr: overlayfs: ReadFstabFromFile touches errno"
am: b4631fc775

Change-Id: I92bba8c1dfcd85ef9e3f7670614d4605be0c2ec5
2019-05-13 14:39:52 -07:00
Treehugger Robot
b4631fc775 Merge "fs_mgr: overlayfs: ReadFstabFromFile touches errno" 2019-05-13 21:10:49 +00:00
Josh Gao
f848fac660 Merge "adbd: don't abort on EOF on functionfs control fd."
am: 41531df7b0

Change-Id: Id07644b95f53dc14136ed078ecc3cbbf2bfc1ead
2019-05-13 11:52:45 -07:00
Josh Gao
41531df7b0 Merge "adbd: don't abort on EOF on functionfs control fd." 2019-05-13 18:40:34 +00:00
Alessio Balsini
e60c4ad8b1 Merge "Looper: missing cinttypes when debugging poll/callbacks"
am: b80d383bbf

Change-Id: I51b46cfc9a6eac33ac1ad59448a72e9c08dc2952
2019-05-13 10:08:24 -07:00
Mark Salyzyn
98a0128e44 fs_mgr: overlayfs: ReadFstabFromFile touches errno
Regression from commit 77c28476f1
("Remove the mount points defined in skip_mount.cfg from
ReadDefaultFstab()") resulted in ReadFstabFromFile to report
errno ENOENT even upon success, preventing clear error propagation
for real failures (ReadFstabFromFile would _always_ report ENOENT).

The bad error propagation resulted in an adb remount failure.

Added immunization against future adjustments that may also
result in a similar regression in adb remount behaviors.

Test: adb-remount-test.sh
Bug: 132594161
Bug: 128961335
Change-Id: Icf5d48bbfc6d938d4b9657ca8004a6a6ddaab5a6
2019-05-13 10:02:51 -07:00
Treehugger Robot
b80d383bbf Merge "Looper: missing cinttypes when debugging poll/callbacks" 2019-05-13 16:56:18 +00:00
Martijn Coenen
2a7d4d61e3 Merge "Fix bug that would prevent us from reserving right amount of space."
am: e27cd0c54e

Change-Id: Ida61d84cdec30ec46e2b931c200a5b8746fc9c00
2019-05-13 09:19:46 -07:00
Treehugger Robot
e27cd0c54e Merge "Fix bug that would prevent us from reserving right amount of space." 2019-05-13 15:29:26 +00:00
Martijn Coenen
20c4cfaa81 Fix bug that would prevent us from reserving right amount of space.
Bug: 132403230
Test: inspect dmesg output:
[   10.762678] init: [libfs_mgr]Setting reserved block count on
/dev/block/dm-2 to 32768
[   10.782652] tune2fs: Setting reserved blocks gid to 1065\x0a
[   10.782655] tune2fs: Setting reserved blocks count to 32768\x0a

Change-Id: Id366d478bdd8a748bb1ba97d08a3b52e3cdd1efb
Merged-In: Id366d478bdd8a748bb1ba97d08a3b52e3cdd1efb
2019-05-13 08:50:50 +02:00
Alessio Balsini
1406207e67 Looper: missing cinttypes when debugging poll/callbacks
When enabling DEBUG_POLL_AND_WAKE or DEBUG_CALLBACKS, compiler complains
for the undefined PRI* fprintf format constants.
Fix by including the missing cinttypes.

Test: m
Bug: none
Change-Id: I0a7b5b45bd274eefa9644cba491a8dc28f1992ff
2019-05-11 20:53:47 +01:00
Elliott Hughes
9dedcc81ad Merge "Clean up copy & paste from frameworks/base/cmds."
am: d203a508ff

Change-Id: I80b97bf9fb01cf0e20614fb558cc1d20f8aec49d
2019-05-10 15:41:58 -07:00
Josh Gao
eca3e92f04 Merge "fastboot: demote OS X USB error."
am: 9426110d37

Change-Id: Ia11a1d53ca7e2ef462ec9704b6dfe3639d6b8366
2019-05-10 15:41:04 -07:00
Tao Bao
15fe3b48a5 fs_mgr: Fix EnsurePathMounted with a given mount_point.
The expected behavior is to ensure the path mounted at the given mount
point, instead of the one in fstab.

Test: Boot into taimen recovery. Choose "Mount /system" from menu. Check
      that system image is mounted at /mnt/system.
Change-Id: I07128e34bc47561afee8164611709a2b5393f9b7
2019-05-10 15:10:26 -07:00
Elliott Hughes
13a45c01f2 libziparchive: remove now-unused StartIteration overload.
Bug: http://b/129068177
Test: treehugger
Change-Id: If494c3031aee2bd3e72eda57de4c334f11f5a5df
2019-05-10 15:00:37 -07:00
Treehugger Robot
d203a508ff Merge "Clean up copy & paste from frameworks/base/cmds." 2019-05-10 22:00:23 +00:00
Treehugger Robot
9426110d37 Merge "fastboot: demote OS X USB error." 2019-05-10 21:23:42 +00:00
David Anderson
d08cf577a9 Merge "fs_mgr: Don't try to suffix "vroot" with "-verity"."
am: 55f8b894a3

Change-Id: I29fac2f7785850749f67762b03c9488750f64238
2019-05-10 13:16:24 -07:00
David Anderson
55f8b894a3 Merge "fs_mgr: Don't try to suffix "vroot" with "-verity"." 2019-05-10 19:54:58 +00:00
Josh Gao
2916e148d9 adbd: don't abort on EOF on functionfs control fd.
Also, improve the logging in the cases where we do abort.

Bug: http://b/131867920
Test: treehugger
Change-Id: If8ec9f4614ce146e6dbd21cc77587ea81658199b
2019-05-10 11:37:34 -07:00
Josh Gao
16f992e228 fastboot: demote OS X USB error.
We can't create interface iterators for all devices (e.g. the keyboard,
touchbar, etc.), so we get multiple instances of this log spam on every
command.

Demote it to a warning that only shows up on debug builds.

Test: none
Change-Id: I20581b9134c05360d5723b09ffe8de8c4cfd6a3f
2019-05-10 11:29:13 -07:00
Al Sutton
2cf161bcc7 Merge "Add deprecation warning to adb backup/restore"
am: 09070afd38

Change-Id: I8025d39a8305677c1e086dc885bc02efca6ac29b
2019-05-10 02:33:23 -07:00
Al Sutton
09070afd38 Merge "Add deprecation warning to adb backup/restore" 2019-05-10 08:40:50 +00:00
Elliott Hughes
e98971c06e Clean up copy & paste from frameworks/base/cmds.
Test: treehugger
Change-Id: I337e6f7e48d4debfce010ad4b6f9fcb860c13fb7
2019-05-09 22:05:13 -07:00