Commit graph

47601 commits

Author SHA1 Message Date
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
Tao Bao
3c94eaad5f Merge "fs_mgr: Fix EnsurePathMounted with a given mount_point." 2019-05-15 16:10:18 +00: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
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
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
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
Treehugger Robot
b4631fc775 Merge "fs_mgr: overlayfs: ReadFstabFromFile touches errno" 2019-05-13 21:10:49 +00:00
Josh Gao
41531df7b0 Merge "adbd: don't abort on EOF on functionfs control fd." 2019-05-13 18:40:34 +00: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
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
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
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
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
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
Treehugger Robot
f0d59e24c3 Merge "NFC: Fix potentially uninitialized 'port' variable." 2019-05-10 01:34:56 +00:00
David Anderson
9655c7bf9e fs_mgr: Don't try to suffix "vroot" with "-verity".
The vroot device is specified on the kernel command-line, rather than
being created by fs_mgr.

Bug: 132275224
Test: taimen boots
Change-Id: I368450a333f383d434591555a6ea562e1bd0bc1e
2019-05-09 17:57:15 -07:00
Josh Gao
fe1d1e815f Merge "Revert "Revert "Add a way to turn off unique_fd's operator int.""" 2019-05-09 23:09:38 +00:00
Treehugger Robot
fc9ad309ca Merge "crash_dump: populate uid field." 2019-05-09 22:54:25 +00:00
David Anderson
e17405fd9c libdm: Add dm-crypt and dm-default-key support to libdm.
Also, add an Emplace() method to DmTable to make target construction
easier. For example,

    table.AddTarget(std::make_unique<DmTargetLinear>(...));

Becomes:

    table.Emplace<DmTargetLinear>(...);

Bug: 132206403
Test: libdm_test gtest
Change-Id: Iac62c74546ebaa660cb32d6894a019bdac24a305
2019-05-09 15:14:13 -07:00
Xin Li
dbb6eb6195 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:44 +00:00
Elliott Hughes
05b9448ff7 Merge "libziparchive: start moving to a non-ZipString StartIteration API." 2019-05-09 21:32:52 +00:00
Stephen Hines
391c40b9ec NFC: Fix potentially uninitialized 'port' variable.
Bug: http://b/131390872
Test: Builds with -Wconditional-uninitialized.
Change-Id: Ie699ec39307fb3b66ade8248cdbe3d6de42533a7
2019-05-09 12:55:41 -07:00
Josh Gao
5df504c5f8 crash_dump: populate uid field.
Bug: http://b/132359035
Test: manual
Change-Id: I99d8446024fc2d9395132dea45f03317976a9b62
2019-05-09 12:49:57 -07:00
Treehugger Robot
d662792de5 Merge "Refactor public_libraries.cpp more" 2019-05-09 18:05:16 +00:00
Xin Li
3a95be9a7f DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: Icec65ff6f3ddb05b10ae62d7588422c0f8950190
2019-05-09 09:27:06 -07:00
Al Sutton
31d335f39f Add deprecation warning to adb backup/restore
Test: Manual execution and verification of the message
Fixes: 131891013
Change-Id: Idc38fcdace2d79668a4daac0b99fb87d04fb4cb8
2019-05-09 16:14:05 +00:00
Jiyong Park
4b5a37c8bd Refactor public_libraries.cpp more
- *_public_libraries() are now thread-safe
- removed some of the duplicated code

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I34b5149f75e28bb892cffe8fd9070be886d2f9bd
2019-05-10 00:12:03 +09:00
Treehugger Robot
43f49694a5 Merge "fs_mgr_remount: fix a typo" 2019-05-09 09:14:35 +00:00
Treehugger Robot
7608ed6047 Merge "Static link libjsoncpp in libprocessgroup" 2019-05-09 08:59:05 +00:00
Bowgo Tsai
2badf73b99 fs_mgr_remount: fix a typo
Replacing "ro.boot.vbmeta.devices_state" with
"ro.boot.vbmeta.device_state" to check if the device is locked.

Bug: 132224452
Test: tree hugger
Change-Id: If4f312730cc82ad5a5d5104a7aca8b9691cf6600
2019-05-09 13:19:29 +08:00
Vic Yang
d167cb2958 Static link libjsoncpp in libprocessgroup
The majority of libjsoncpp use is due to libprocessgroup.  Static
linking reduces relocations required at runtime as well as compacts the
pages dirtied by relocations.  On a 32-bit system, where this matters
the most, this reduces 8KB of dirty pages per libprocessgroup load.
Overall, the dirty page reduction on 32-bit cuttlefish is ~500KB.

Bug: 132275636
Test: Boot on cuttlefish.  Calculate total amount of dirty memory used
      for libprocessgroup and libjsoncpp.
Change-Id: I1135bb45a3764f96a4a3a47c98fbcdee3913c988
(cherry picked from commit b562e68503)
2019-05-08 20:29:44 -07:00
Treehugger Robot
72fe284022 Merge "init: move "started at" environment var names to headers" 2019-05-09 00:10:40 +00:00
Mark Salyzyn
44505ecdd9 init: move "started at" environment var names to headers
Move "FIRST_STAGE_STARTED_AT" to env_first_stage_started_at variable
in first_stage_init.h.  Move "SELINUX_STARTED_AT" to
env_selinux_started_at variable in selinux.h.

Test: build
Bug: 124491153
Bug: 129780532
Change-Id: I512d1835dcee5a3d034ac453b27b0709eed23cff
2019-05-08 13:50:21 -07:00
Mark Salyzyn
d8cddff7b8 Merge "init: ro.boottime.init.first_stage"
am: a6e6c7d966

Change-Id: Ib622f2277a1f38df31e3a3cd1ae08d699abf3475
2019-05-08 11:53:10 -07:00
Treehugger Robot
a6e6c7d966 Merge "init: ro.boottime.init.first_stage" 2019-05-08 18:33:29 +00:00
Elliott Hughes
a22ac0f07e libziparchive: start moving to a non-ZipString StartIteration API.
Same issue as with FindEntry: using ZipString in the API forces all
callers to make sure they don't hit the ZipString length limits. Switch
to std::string_view and uniformly use the empty string as a way to
signal no prefix/suffix rather than nullptr.

Also use default arguments to make the common case of no prefix and no
suffix more convenient.

Also just use std::string to increase the lifetime of the provided
prefix/suffix rather than manual memory management.

Bug: http://b/129068177
Test: treehugger
Change-Id: I6675e39ce62fadd766386d77d27423013c17d6f7
2019-05-08 11:00:32 -07:00
Elliott Hughes
7ed43aafb1 Merge "libziparchive: remove now-unused FindEntry overload."
am: 1d5745fb40

Change-Id: Iddcecbcdb424990dbac84da6e7e33d9c804ec2c9
2019-05-08 10:24:25 -07:00
Elliott Hughes
1d5745fb40 Merge "libziparchive: remove now-unused FindEntry overload." 2019-05-08 17:05:46 +00:00