Commit graph

47740 commits

Author SHA1 Message Date
Elliott Hughes
a5ff19e7e9 libziparchive: remove now-unused FindEntry overload.
Bug: http://b/129068177
Test: treehugger
Change-Id: I53da90bb61b0299aca545f9a1420f64e3f909657
2019-05-07 09:27:59 -07:00
Lorenzo Colitti
c3d70146b4 Merge "Enable clang-tidy for libsysutils."
am: 799ddc9c19

Change-Id: I786432de83a3ab8713ec6b8e6c7466fdd8d237ac
2019-05-07 08:42:35 -07:00
Treehugger Robot
799ddc9c19 Merge "Enable clang-tidy for libsysutils." 2019-05-07 15:31:22 +00:00
Iris Chang
705fd7f52c Support booting a chained boot-debug.img
boot-debug.img is introduced to allow 'adb root' if the device is
unlocked, and it cannot be release signed. If /boot partition is chained
in AVB signing and boot-debug.img is used, avb_slot_verify() in
userspace will return AVB_SLOT_VERIFY_RESULT_ERROR_PUBLIC_KEY_REJECTED
and fs_mgr will refuse to boot. This CL treats the public key rejection
as non-fatal for chained vbmeta to continue booting, if the device is
unlocked.

Bug: 129508966
Test: can root with user load which /boot chained in AVB signing
Change-Id: Idfa8caffbb96f33702b1749afd2e2a59616ddba7
2019-05-07 09:26:49 +00:00
Rick Yiu
c78c3be5cf Merge "Apply initial settings for blkio cgroup"
am: 9243da9008

Change-Id: I2aaa9a9f3267e6e57c44967144de2a4a8d76126c
2019-05-07 01:27:59 -07:00
Treehugger Robot
9243da9008 Merge "Apply initial settings for blkio cgroup" 2019-05-07 08:15:35 +00:00
Martijn Coenen
741fef7395 Merge "Support for stopping/starting post-data-mount class subsets."
am: fc78be2935

Change-Id: I3dad9a80217cc2d33576be4d681168566d991c77
2019-05-06 23:57:02 -07:00
Martijn Coenen
fc78be2935 Merge "Support for stopping/starting post-data-mount class subsets." 2019-05-07 06:41:01 +00:00
Min Yun
a8eb00720c Add default executable permission in odm/bin
In odm's binary files can't have executable permission.
Add default executable permission in odm/bin and vendor/odm/bin.
Previously partitions that except system, only appeared in
system partition if product haven't separated partition.
After support ODM, vendor/odm should considered.

Bug : 124465978
Test : Check each file's permission.
system/vendor/bin/* -> 0755
system/product/bin/* -> 0755
system/product_services/bin/* -> 0644
system/oem/bin/* -> 0644

vendor/odm/bin/* -> 0755
vendor/product/bin/* -> 0644
vendor/product_services/bin/* -> 0644

Change-Id: I5cee48474fceaf73853b2013d58017bd64953d86
2019-05-07 14:04:23 +09:00
David Anderson
cefa083e36 Merge "Add a liblp test that we can parse the device's super partition."
am: eaf203d301

Change-Id: I1b1260a9d2821d257494f0c3a98c80ceeed61587
2019-05-06 21:13:40 -07:00
David Anderson
eaf203d301 Merge "Add a liblp test that we can parse the device's super partition." 2019-05-07 04:00:57 +00:00
David Anderson
1227ad90d5 Merge "Add dm-snapshot targets to libdm and dmctl."
am: 41d6792dec

Change-Id: I52a36217479f6fe86349e264484a133dffb4741c
2019-05-06 18:28:27 -07:00
David Anderson
41d6792dec Merge "Add dm-snapshot targets to libdm and dmctl." 2019-05-07 00:43:19 +00:00
Elliott Hughes
d43d5baed5 Merge "libziparchive: report errors on over-long names."
am: d62b9ca271

Change-Id: I7e492b3fa8b74ff9c41363d4b1ffc9b401eff660
2019-05-06 17:21:12 -07:00
Tom Cherry
fe1c82fd61 Merge "Vboot1.0: remove code to read verity state in userspace"
am: 1cd30df584

Change-Id: I79a0b838b2aabcbf6083de7c75de5d219f14517f
2019-05-06 17:20:23 -07:00
David Anderson
f5de989a55 Add a liblp test that we can parse the device's super partition.
Bug: 132112489
Test: liblp_test gtest
Change-Id: I1c0950dc30f42cd232e0616191d1365cdfc6512d
2019-05-06 17:06:33 -07:00
Elliott Hughes
d62b9ca271 Merge "libziparchive: report errors on over-long names." 2019-05-06 23:45:16 +00:00
Tom Cherry
1cd30df584 Merge "Vboot1.0: remove code to read verity state in userspace" 2019-05-06 23:41:47 +00:00
Josh Gao
27241a7a96 Revert "Revert "Add a way to turn off unique_fd's operator int.""
The original commit broke aosp-master-with-phones, because of
vendor libraries the depended on the int versions of libbase functions.

This patch reverts the revert, and also adds ABI-compatibility shims for
the replaced functions.

This reverts commit 2c58e1924a.

Bug: http://b/131312539
Test: treehugger
Test: forrest run of aosp-master-with-phones
Change-Id: I75cc84ec8d963e20862f7662e8e2f409471f41cc
2019-05-06 16:18:02 -07:00
Jeffrey Vander Stoep
a2a0781df1 Merge "Load selinux compat file if it exists"
am: 0cd8102bbd

Change-Id: I6408482f38eb0afc3b05e11334451c9bcb7f1cce
2019-05-06 15:50:08 -07:00
Jeffrey Vander Stoep
0cd8102bbd Merge "Load selinux compat file if it exists" 2019-05-06 22:26:19 +00:00
David Anderson
29e6bf282f Add dm-snapshot targets to libdm and dmctl.
This adds DmTargetSnapshotOrigin and DmTargetSnapshot. The latter target
can handle both "snapshot" and "snapshot-merge" targets. The syntax for
dmctl is as follows:

    dmctl create <name> snapshot <start> <num_sectors> <base_device> \
          <cow_device> <P|N> <chunk_size>
    dmctl create <name> snapshot-merge <start> <num_sectors> <base_device> \
          <cow_device> <chunk_size>
    dmctl create <name> snapshot-origin <start> <num_sectors> <device>

Bug: N/A
Test: libdm_test gtests
Change-Id: I8eef987cb92121e81bedd37b9a66fad04c7a23a3
2019-05-06 13:59:44 -07:00
Mark Salyzyn
3809014902 Merge "adb: enable/disable verity expected overlayfs errors."
am: be9c2c0310

Change-Id: If390a592e5d314b31173c5af2b1103ca4d80f1bc
2019-05-06 08:22:38 -07:00
Treehugger Robot
be9c2c0310 Merge "adb: enable/disable verity expected overlayfs errors." 2019-05-06 14:36:51 +00:00
dimitry
a808b1150a Enable native_bridge_support
Enable native bridge support for libbase, liblog,
libziparchive and libpropertyinfoparser.

This makes it possible to use them in binaries for translated
architectures.

Bug: http://b/77159578
Test: make
Change-Id: If67ce92288b17a052ea1e79a268e284f7d941439
2019-05-06 14:05:05 +02:00
Elliott Hughes
b17bf521d5 libziparchive: report errors on over-long names.
Switch FindEntry and the ZipString constructor to std::string_view. This
lets us accept an over-long name so that we can reject it as too long.

Also fastboot changes to track the API change.

Bug: http://b/129068177
Test: treehugger
Change-Id: I7df7acd1fe2c46380b789c25f8909e0553e2d55e
2019-05-04 08:41:12 -07:00
Elliott Hughes
9f6f62a485 Merge "libbase: add ConsumePrefix/ConsumeSuffix."
am: 7046bcb461

Change-Id: I7b6bf1110ba8ab6af131558135241ffb78669604
2019-05-03 17:44:00 -07:00
Elliott Hughes
7046bcb461 Merge "libbase: add ConsumePrefix/ConsumeSuffix." 2019-05-04 00:03:14 +00:00
Josh Gao
c97b258c42 Merge "adbd: move posix_fadvise after open."
am: 19322dddc6

Change-Id: Iaba484973996886381e11b99f40ed2128a036725
2019-05-03 16:40:15 -07:00
Christopher Ferris
73d0dc7e69 Merge "Ignore memory from elf on /memfd:"
am: b92cd9c8a6

Change-Id: I12f19ef08b2eb1361bb3f3ff85dc2f6cde9c620d
2019-05-03 16:24:10 -07:00
Treehugger Robot
19322dddc6 Merge "adbd: move posix_fadvise after open." 2019-05-03 23:23:59 +00:00
Christopher Ferris
b92cd9c8a6 Merge "Ignore memory from elf on /memfd:" 2019-05-03 22:24:42 +00:00
Mark Salyzyn
5828b77a3d adb: enable/disable verity expected overlayfs errors.
Expect EBUSY for overlayfs teardown, and ENOENT for setup.

Test: adb-remount-test.sh
Bug: 131614849
Change-Id: I0fb351d6d5fe758021c9e9043f57863c7a194c12
2019-05-03 14:44:49 -07:00
Jiyong Park
62e1073f51 Merge "move classes out of native_loader.cpp"
am: 3c0d7e8d28

Change-Id: Ia0c5295e72ad7cc35b241a0a9aa13930e3e0eb38
2019-05-03 13:41:06 -07:00
Elliott Hughes
b4dc7be6c5 libbase: add ConsumePrefix/ConsumeSuffix.
adb was already using ConsumePrefix, and now we have another would-be
user in cutils. (There appears to be one place in adb that should use
ConsumeSuffix, so I'm assuming we'll want that sooner or later.)

I've kept these inline because adb and google3's versions both were, and
I'm easily led.

Test: treehugger
Change-Id: I29d99032f6f6ccbfaefece59725db8afb02a4c87
2019-05-03 12:49:31 -07:00
Treehugger Robot
3c0d7e8d28 Merge "move classes out of native_loader.cpp" 2019-05-03 19:29:09 +00:00
Christopher Ferris
98aaf4cf08 Ignore memory from elf on /memfd:
In ART, some of the maps are /memfd:/jit-cache and it triggers the warning
about unreadable elf files. Do not set the elf from memory not file
flag in this case.

Bug: 131909548

Test: New unit tests pass.
Test: No warnings dumping stacks with this change done.
Change-Id: Ifba5e65da609525ded75430da173c614f6e4801e
2019-05-03 11:13:17 -07:00
Jiyong Park
6291da2936 move classes out of native_loader.cpp
native_loader.cpp is too crowded. Move the classes
NativeLoaderNamespaces and LibraryNamespaces out of native_loader.cpp to
their own source files.

This change does not alter any functionality.

Bug: 130388701
Test: m, presubmit tests
Change-Id: Ibc61ec0dc6727af7cac865b1971ebf1befac6855
2019-05-04 01:10:42 +09:00
Rick Yiu
a8aaf198d5 Apply initial settings for blkio cgroup
Bug: 111422845
Test: values are applied
Change-Id: Id28d9619fc2fd2287fe656b8032025184ae7f631
2019-05-03 11:58:13 +08:00
Dan Albert
19e4c9e245 Merge "Workaround bad markdown parser."
am: 84235b7137

Change-Id: I949f804ca6947d4283529b71a5981febee3d6385
2019-05-02 17:46:43 -07:00
Stephen Hines
9efd5366ca Merge "Fix an unintialized return value."
am: f35183daa6

Change-Id: I8673b76740757fa5c95bd5ba87e85b4276be432e
2019-05-02 17:42:04 -07:00
David Anderson
b7fdfb1b67 Merge "fs_mgr: overlay: resize other OTA partitions to zero to make space"
am: 9187a72175

Change-Id: I2d823462a022018d7c471e0c19172a49dc910cb6
2019-05-02 17:41:20 -07:00
Treehugger Robot
84235b7137 Merge "Workaround bad markdown parser." 2019-05-03 00:40:29 +00:00
Stephen Hines
f35183daa6 Merge "Fix an unintialized return value." 2019-05-03 00:18:58 +00:00
David Anderson
9187a72175 Merge "fs_mgr: overlay: resize other OTA partitions to zero to make space" 2019-05-02 23:56:12 +00:00
Josh Gao
dcfc785d20 Merge "adbd: avoid starting multiple worker threads."
am: 5ddd49eeae

Change-Id: I156d55438484681782bef2490c637026b5ab47a9
2019-05-02 14:28:22 -07:00
Jeff Vander Stoep
0ac51cfc01 Load selinux compat file if it exists
This addresses Treble backwards compat issues introduced in
aosp/793958 and aosp/783669.

Bug: 122874820
Test: build/flash blueline with pi-dev vendor and generic_ab system
    images.
Test: adb pull /sys/fs/selinux/policy;
    sesearch policy --allowx -s vendordomain -t dev_type

Change-Id: I9123aa02cf4bf07d72d1ea086dde0d1cf1b30db4
2019-05-02 14:25:06 -07:00
Treehugger Robot
5ddd49eeae Merge "adbd: avoid starting multiple worker threads." 2019-05-02 21:09:04 +00:00
Mark Salyzyn
c3fc2aa964 fs_mgr: overlay: resize other OTA partitions to zero to make space
If we do not have at least the minimum space to create a scratch
partition, let's resize the other partitions to zero to make the
space and try again.

Specify additional shared library dependencies for remount command.
margin_size could never be calculated because "scratch" partition
does not exist, so use super partition instead as argument to
GetBlockDeviceInfo.

Add a "Now reboot your device for settings to take effect" message
if the -R argument was not supplied.  Adjust some of the messages
to be clearer.

Manual test: On a full DAP device, resize or flash both a and b side
for system, vendor and product with fastboot to duplicate failure
conditions of limited space and check remount command resizes other
side partitions to mitigate.

Test: manual and adb_remount_test.sh
Bug: 131390072
Change-Id: I34c4a973f88a5e1e06b64af9589a84721dd1bbbd
2019-05-02 13:46:22 -07:00
Stephen Hines
45b11d9035 Fix an unintialized return value.
Bug: http://b/131390872
Test: Built aosp_blueline successfully.
Change-Id: Iea5255be280dfc089a95fc25a0f988e913c18679
2019-05-02 12:54:09 -07:00