Commit graph

43189 commits

Author SHA1 Message Date
Elliott Hughes
9c8bd669e8 Yet another Mac fix.
system/core/libziparchive/zip_archive.cc:847:36: error: use of undeclared identifier 'lseek64'; did you mean 'lseek'?
  const off64_t current_offset = lseek64(fd, 0, SEEK_CUR);

Bug: N/A
Test: builds
Change-Id: If762011722d53376bb6dab35c6ee8031762e5a95
2018-10-26 16:14:21 -07:00
Tom Cherry
c7452ea8c4 Merge "init: allow vendor init to action on any vendor or odm property" 2018-10-26 19:15:58 +00:00
David Anderson
3eb5ba753c Merge "fastboot: Resize logical partitions when using the flash command." 2018-10-26 18:26:42 +00:00
Tom Cherry
fa79ae87f1 init: allow vendor init to action on any vendor or odm property
Partial revert of "init: if vendor_init can read a property, let it be
a trigger too" (b35f827c97).

We made a mistake when we allowed vendor init to action on any vendor
or odm property, since when a new SELinux label is created for a
vendor property, vendor_init does not automatically get read
permissions for it.

Recently, we tried to use read permissions instead of the built-in
list in init, but that broke due to the above mistaken.  Since we have
already launched with these permissions as is, we must restore them.

Bug: 118457755
Test: no denials for vendor init actionable properties on crosshatch
Change-Id: I7a9a560c9a54a177c6b83d28309e2f288f05d400
2018-10-26 08:50:45 -07:00
Treehugger Robot
52db49b68f Merge "libbase: a slightly cleaner solution to libbase's off64_t problem." 2018-10-26 15:38:14 +00:00
Treehugger Robot
a0dcfc2a0f Merge "libcutils: lose socket_peer_is_trusted to ART, the only user." 2018-10-26 15:37:55 +00:00
Elliott Hughes
46e0cc27ca libbase: a slightly cleaner solution to libbase's off64_t problem.
Given that I can't actually go back in time and just make bionic's
`off_t` be 64-bit.

Bug: N/A
Test: builds
Change-Id: Ic93336b07bffc0977bd0e9caad6a22ce29ca06ed
2018-10-25 16:29:02 -07:00
Treehugger Robot
dd85c74655 Merge "fastboot: Check that reboot to userspace succeeded." 2018-10-25 23:06:51 +00:00
Treehugger Robot
602f9a29b0 Merge "libbase: quick fix for Mac build." 2018-10-25 22:37:30 +00:00
Howard Ro
91061cc823 Merge "Make native metrics logger write to statsd socket" 2018-10-25 20:31:22 +00:00
Elliott Hughes
396bf2109a libcutils: lose socket_peer_is_trusted to ART, the only user.
Bug: N/A
Test: builds
Change-Id: I599270729c2037b2c06d7906a5e5f7362fbbaf08
2018-10-25 13:24:08 -07:00
David Anderson
629e51c109 fastboot: Resize logical partitions when using the flash command.
If an image size changes slightly in between "flashall" and some change
in the build, it's inconvenient to have to reflash the whole device again.
This patch resizes partitions when using a normal flash command, to
improve the developer workflow.

Bug: N/A
Test: fastboot flash system
Change-Id: I349364a4742a0c15748f545fcfda946107720d45
2018-10-25 20:10:20 +00:00
David Anderson
0444a8cbd9 fastboot: Check that reboot to userspace succeeded.
After rebooting to userspace fastboot, the first command issued is
"update-super". If we wound up in the bootloader by accident (as
happened to a few users with a busted vbmeta_system), the resulting
error message will be very misleading ("update-super" will be an
unrecognized command).

Instead, this patch explicitly errors if we did not successfully boot
into fastbootd.

Bug: N/A
Test: fastboot flashall
Change-Id: I7d5bd64db540978bd0bae884f40ce8c3df48f856
2018-10-25 12:31:49 -07:00
Treehugger Robot
89eb017780 Merge "liblp: Add an abstraction layer for opening partitions." 2018-10-25 18:55:47 +00:00
David Anderson
13e160e09f Merge "liblp: Store device information in a new block device table." 2018-10-25 18:54:55 +00:00
Elliott Hughes
985438653d libbase: quick fix for Mac build.
I'll come back for the better fix later...

Bug: N/A
Test: builds
Change-Id: I967c2436cf5816cf9a0edcd3f04f307969e48bcb
2018-10-25 10:23:55 -07:00
Elliott Hughes
2a8460721c Merge "libbase: add O_CLOEXEC to <android-base/file.h>." 2018-10-25 15:21:06 +00:00
Mark Salyzyn
cf81db320e Merge "fs_mgr: fs_mgr_overlayfs_teardown access to dynamic partition data" 2018-10-25 15:08:28 +00:00
Treehugger Robot
120383140e Merge "libbase: remove ARRAYSIZE_UNSAFE." 2018-10-25 03:13:30 +00:00
Treehugger Robot
9b6da16849 Merge "adb: Use a default _SC_GETPW_R_SIZE_MAX size" 2018-10-25 00:24:56 +00:00
Howard Ro
d173009c74 Make native metrics logger write to statsd socket
Previous submission of this change, aosp/790068, caused a failure in
sdk_mac for CLOCK_REALTIME and <endian.h> not being available.

Bug: 110537511
Test: compiles without failures and verified the correct metric
Change-Id: Iba1dc920ad82e88a4bcdd2feaee9a06202a440c2
2018-10-24 15:19:14 -07:00
Bill Yi
d4e20cd0f9 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I413bb086f5ff064430c061bdd5d0fe3d02925304
2018-10-24 14:48:45 -07:00
Elliott Hughes
514edae27c libbase: remove ARRAYSIZE_UNSAFE.
Also fix the indentation of a neighboring comment.

Bug: N/A
Test: builds
Change-Id: Iebe5f518b2ac14718f3cae91007e62b61bed9dc0
2018-10-24 14:34:52 -07:00
David Anderson
7a6c511a6d liblp: Add an abstraction layer for opening partitions.
This change introduces an IPartitionOpener abstraction. Methods that
interact with live metadata, such as ReadMetadata, UpdatePartitionTable,
and FlashPartitionTable, now require an IPartitionOpener object. Its
purpose is dependency injection: it will make these methods much easier
to test when the super partition spans multiple block devices.

All non-test consumers should be using PartitionOpener, and as such,
some helper methods have been added that automatically create one.

Bug: 116802789
Test: liblp_test gtest
      device with super partition boots
Change-Id: I76725a5830ef643c5007c152c00ccaad8085151f
2018-10-24 14:18:38 -07:00
David Anderson
9a5324178e liblp: Store device information in a new block device table.
This patch removes the alignment, block device size, and starting sector
fields from LpGeometry into a new LpMetadataBlockDevice struct. The
metadata now contains a table of these structs, and the table will have
exactly one entry representing the super partition.

This refactoring will make it easier to have logical partitions span
multiple physical partitions. When that happens, the table will be
allowed to have more than one entry, and the first entry of the table
will be considered the "root" of the super partition.

Bug: 116802789
Test: liblp_test gtest
      device with logical partitions flashes and boots
Change-Id: I97f23beac0363182cb6ae78ba2595860950afcf0
2018-10-24 14:18:35 -07:00
Elliott Hughes
32df7ee5c8 libbase: add O_CLOEXEC to <android-base/file.h>.
We already expose O_BINARY, and O_CLOEXEC seems equally legitimate.

Bug: N/A
Test: builds
Change-Id: I7f07e1bb2a5d6b5c5f293783c39ceab148fabefb
2018-10-24 14:06:45 -07:00
Suren Baghdasaryan
a1c684be4f Merge "lmkd: Add command to get number of kills" 2018-10-24 20:58:28 +00:00
Treehugger Robot
19fb58ce57 Merge "adb: correct tcpip help message" 2018-10-24 20:19:09 +00:00
Elliott Hughes
48a0e186a7 Merge "Add a simple MappedFile to libbase and switch fastboot and libziparchive over." 2018-10-24 20:16:59 +00:00
Robert Yang
88c997d4eb adb: Use a default _SC_GETPW_R_SIZE_MAX size
sysconf(_SC_GETPW_R_SIZE_MAX) may return −1 if there is no hard limit
on the the buffer size. Some libc implementations such as musl don't
define this limit and will return -1.

Use a default buffer size to handle this case.

Change-Id: I997b13a2c2dca00574e049a259135e61c8ed8e03
Signed-off-by: Robert Yang <decatf@gmail.com>
2018-10-24 15:23:55 -04:00
Treehugger Robot
0064e9ca1a Merge "Add adbd_test to presubmit test mapping" 2018-10-24 18:33:16 +00:00
bohu
ea0c3cbc18 adb: correct tcpip help message
'adb tcpip <mode>' is meant to affect adbd, not
the host adb server.

BUG: 111434128
Change-Id: I78c958bfbede60b20fb7e0f2444e5b21ecb90f7a
2018-10-24 10:38:33 -07:00
Suren Baghdasaryan
d4a29903c0 lmkd: Add command to get number of kills
Intrduce LMK_GETKILLCNT command for ActivityManager to get the number of
kills from lmkd.

Bug: 117126077
Test: used lmkd_unit_test to verify correct reporting
Change-Id: I09c720a7176b4df95efc544177cd2694f8d791be
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-10-24 17:18:32 +00:00
Anton Hansson
ac305c82d6 Merge "Create /data/preloads on post-fs-data" 2018-10-24 17:09:11 +00:00
Martin Stjernholm
0b4d4826a6 Merge "Remove unnecessary dynamic dependency on libbase." 2018-10-24 16:49:13 +00:00
Tom Cherry
76b4299943 Merge "init: if vendor_init can read a property, let it be a trigger too" 2018-10-24 15:52:06 +00:00
Martin Stjernholm
53aec482aa Remove unnecessary dynamic dependency on libbase.
This code only uses android-base/macros.h.

Bug: 118374951
Test: mmma system/core/libnativebridge && for f in out/host/linux-x86/nativetest{,64}/*/*; do $f; done
Change-Id: Ifa5a5a3c9370bd128ddd301ea352746699715929
2018-10-24 16:11:45 +01:00
Anton Hansson
c38a63646b Create /data/preloads on post-fs-data
This directory is used for preloads that are typically placed in
the system_other image and copied to /data on first boot if the
cppreopts script is installed.

Bug: 80508492
Test: make
Change-Id: I4121b07ee2fc96d533075d1907557de7e4be4ee0
2018-10-24 15:29:16 +01:00
Treehugger Robot
551efd11f7 Merge "Fix off by one error." 2018-10-24 00:52:15 +00:00
Christopher Ferris
afd6e7712f Merge "Always init gnu_debugdata interface if it exists." 2018-10-24 00:38:51 +00:00
Julien Desprez
2045bbbfb6 Add adbd_test to presubmit test mapping
Onboard device side gtest of adbd to test mapping to be
run in presubmit.

Test: atest adbd_test
Bug: 112104122
Change-Id: Iefb6be0fb0ecea5a95aadce923c223e40f92bdab
2018-10-23 14:03:15 -07:00
Elliott Hughes
e8f4b14301 Add a simple MappedFile to libbase and switch fastboot and libziparchive over.
This allows us to remove libziparchive's dependency on libutils.

Bug: http://b/79112958
Test: ran libbase and libziparchive tests, ran fastboot manually
Change-Id: I95c651976dad222863e5b8c37d4514b778f5dce7
2018-10-23 13:20:49 -07:00
Christopher Ferris
e8c4ecf49e Always init gnu_debugdata interface if it exists.
Every real call always sets the value to true to init the gnu_debugdata
interface, so remove this parameter.

Test: Builds, unit tests pass.
Change-Id: I07fb3adbbd5b65b51c0dc7608561e820a5095051
2018-10-23 12:13:54 -07:00
Josh Gao
b59a38d343 Merge "Add feature flag for b/110953234 fix." 2018-10-23 18:30:11 +00:00
Treehugger Robot
74cdc8a542 Merge "Accept apex packages as argument." 2018-10-23 18:29:53 +00:00
Josh Gao
fb08510784 Add feature flag for b/110953234 fix.
Bug: http://b/110953234
Bug: http://b/117946501
Test: adb features
Test: test_device.py
Change-Id: I340a30544a6d0ab1b2545e5371c8f98d04158c56
2018-10-23 18:28:46 +00:00
Treehugger Robot
6153677ff5 Merge "llkd: Skip apexd for process checks" 2018-10-23 17:13:28 +00:00
Florian Mayer
9c36a99ebc Fix off by one error.
Change-Id: I18a2d177f3212626b7091150f42dfe151e47570e
2018-10-23 18:10:41 +01:00
Tao Bao
bebeb7e951 Merge "healthd: GRSurface now is a class." 2018-10-23 17:06:35 +00:00
Dario Freni
29814deaa7 Accept apex packages as argument.
Bug: 112669193
Test: Successfully reaches PackageManager. Doesn't break existing flows.
Change-Id: If4a173e290ebf0b70beb97111a6d75400da7ec8d
2018-10-23 11:07:16 +01:00