Commit Graph

52589 Commits

Author SHA1 Message Date
Josh Gao edf8040152 Merge "adb: use shell for remount to forward return codes." 2019-08-14 00:26:04 +00:00
Colin Cross 888c1b9de5 Fix more endian.h issues
__BIONIC__ is defined in sys/cdefs.h, __GLIBC__ is defined in
features.h (which is included from sys/cdefs.h).  If sys/cdefs.h
was not included before android-base/endian.h it was always falling
back to the Windows definitions.

mingw defines LITTLE_ENDIAN, BIG_ENDIAN and BYTE_ORDER in
sys/params.h, use those definitions to avoid conflicts.

glibc uses different names for letoh*, add compatibily #defines.

Test: m checkbuild
Change-Id: I0709a964cc8f20dd9fa4f03064cc67d97ae6c525
2019-08-13 15:27:00 -07:00
David Anderson 49ea4d955f Merge "libsnapshot: Track the source slot across reboots."
am: 6ecedd2040

Change-Id: I6d571b901c8234ab12f8fdfad7094f844bc430c7
2019-08-13 14:08:29 -07:00
David Anderson 15aa9540df liblp: CreateLogicalPartition with a given mapped name
Introduce a parameter struct to eliminate parameter explosion, and refactor
existing callers to use the new helper.

Test: manual test
Bug: 135752105
Change-Id: I0c5ebe4e084ad7503c2ac6c65886a71505d50d00
2019-08-13 13:41:36 -07:00
David Anderson 6ecedd2040 Merge "libsnapshot: Track the source slot across reboots." 2019-08-13 20:39:23 +00:00
Songchun Fan a791d59547 Merge "[adb] Add a getter for native Win32 file handle"
am: 93619e373a

Change-Id: I4e9d8ca2964bfbc9e290ff13f46e03e93f4e4447
2019-08-13 13:22:54 -07:00
Songchun Fan 93619e373a Merge "[adb] Add a getter for native Win32 file handle" 2019-08-13 19:51:01 +00:00
Tom Cherry 000e1fc422 Merge "Actually add README contents for ueventd"
am: 53620ca1b1

Change-Id: Ie3a2f1cda99b483e67932b261ec6bc21db6176dd
2019-08-13 07:57:24 -07:00
Tom Cherry 53620ca1b1 Merge "Actually add README contents for ueventd" 2019-08-13 14:48:04 +00:00
Mark Salyzyn 8d5b2b683d Merge "init: first stage init tie stdout and stderr to /dev/kmsg"
am: b85c72caed

Change-Id: Ie9956a1033adb4a4ba97652ae252ee5df47d7749
2019-08-13 05:55:42 -07:00
Treehugger Robot b85c72caed Merge "init: first stage init tie stdout and stderr to /dev/kmsg" 2019-08-13 12:48:40 +00:00
Zimuzo Ezeozue 1562c6cd8c Merge "Allow switching between sdcardfs and FUSE mounts"
am: 6c62ae7adb

Change-Id: I707ad8146f4318fd3adf0e641aaac68e76d790b4
2019-08-13 02:35:36 -07:00
Zimuzo Ezeozue 6c62ae7adb Merge "Allow switching between sdcardfs and FUSE mounts" 2019-08-13 09:23:58 +00:00
Josh Gao 8c2198c809 adb: use shell for remount to forward return codes.
Bug: http://b/25842395
Test: manual
Change-Id: I719c86bdf573db14ca2a0bdf608065ad63f573c1
2019-08-12 18:31:45 -07:00
Mark Salyzyn 0126a5ca59 Merge "fs_mgr: adb-remount-test: non-verity recovery"
am: cbd1af9db0

Change-Id: Ie42901cc81f0bccbfb18fb2457396f8cb8ee97b8
2019-08-12 17:57:49 -07:00
Treehugger Robot cbd1af9db0 Merge "fs_mgr: adb-remount-test: non-verity recovery" 2019-08-13 00:40:17 +00:00
Elliott Hughes 1fabf616c6 Merge "libpackageparser: C rules for bools."
am: 92a3594b12

Change-Id: Ief02e2d31e56a6057e6db59ab75cd84d927c37dd
2019-08-12 17:11:41 -07:00
Christopher Ferris 927b30bb1d Merge "Fix incorrect closing of fds."
am: b5d064f5c6

Change-Id: I53f4702cf869ded214bb5e96846c6391a3482d88
2019-08-12 17:10:59 -07:00
David Anderson 3c0fea923b libsnapshot: Track the source slot across reboots.
The purpose of this is twofold. First, we need a way to detect whether
the device has booted into the new slot after an update. Second, we need
a quick-and-dirty test for first-stage init so it can avoid searching
for snapshots if it doesn't need to.

We can solve both of these problems by storing the source slot in
/metadata/ota/snapshot-boot. The existence of the file implies a more
complex check is needed, and the file stores the source slot.

Test: libsnapshot_test gtest
Bug: 139204329
Bug: 139089801
Change-Id: I919dd1c27a65734c61f3a9bdffefb32bdebd723b
2019-08-12 17:10:21 -07:00
Treehugger Robot 92a3594b12 Merge "libpackageparser: C rules for bools." 2019-08-12 23:45:36 +00:00
Christopher Ferris b5d064f5c6 Merge "Fix incorrect closing of fds." 2019-08-12 23:44:24 +00:00
Elliott Hughes 8959efff68 Merge "Use as much of the macOS endian support as we can."
am: e5abcddf4e

Change-Id: I4f0d5f330a9e9fc447a3696c6dfc254ce8b38e3d
2019-08-12 16:21:56 -07:00
Tom Cherry a548cdd72e Merge "init: Allow matching empty property values"
am: 79896d8880

Change-Id: I16828742f36141e7553ea33e68c4427bcb005410
2019-08-12 16:12:25 -07:00
Josh Gao 09ee10f185 Merge "adb: windows: fix writev on sockets."
am: 3d0ecde28f

Change-Id: I5b8a01a6f2dd0fd1b34e18971cfc1ed9e08d5a8f
2019-08-12 16:11:54 -07:00
Elliott Hughes e5abcddf4e Merge "Use as much of the macOS endian support as we can." 2019-08-12 23:00:47 +00:00
Tom Cherry 79896d8880 Merge "init: Allow matching empty property values" 2019-08-12 22:35:31 +00:00
Treehugger Robot 3d0ecde28f Merge "adb: windows: fix writev on sockets." 2019-08-12 22:33:44 +00:00
Anatol Pomozov f31a8d1ef1 Merge "Add header that declares memcpy()"
am: 0fe1b4bd8c

Change-Id: I497714e9d8aeffd4637969e90219e7fd666f602d
2019-08-12 13:40:34 -07:00
Zim c9f8e5dfed Allow switching between sdcardfs and FUSE mounts
This change is part of enabling upcoming platform changes that are
described in the bug linked below.

Bug: 135341433
Test: builds, boots successfully and external storage remains
an sdcardfs mount by default and works correctly
Test: cat /proc/1/mountinfo is unchanged

Change-Id: Idf851b3a42910e0ce8fdd75daea1cce91dd1aa98
2019-08-12 21:37:12 +01:00
Tom Cherry aefb141c67 Actually add README contents for ueventd
A long time coming

Test: n/a
Change-Id: I6050e74d7497d5a7760f615fe2ad7d5c78a66ab9
2019-08-12 13:13:57 -07:00
Anatol Pomozov 0fe1b4bd8c Merge "Add header that declares memcpy()" 2019-08-12 20:09:34 +00:00
Elliott Hughes 38b6297bac libpackageparser: C rules for bools.
I don't see any reason to carry around code to be more fussy than we
need to be.

Test: treehugger
Change-Id: I548f76fc4e06fadefb9173827872fd7f39f300fd
2019-08-12 12:43:34 -07:00
Elliott Hughes 6a25d17aa1 Merge "Rewrite libpackagelistparser."
am: 8c711a5384

Change-Id: Ib373e7fc92d8d3e9b4979da54f56c64238501717
2019-08-12 12:41:44 -07:00
Elliott Hughes 8c711a5384 Merge "Rewrite libpackagelistparser." 2019-08-12 19:26:12 +00:00
Elliott Hughes f86ea02de6 Use as much of the macOS endian support as we can.
Turns out that although there's no <endian.h> or <sys/endian.h>, there
are <machine/endian.h> and <sys/_endian.h>, and they're included by
other system headers such as <dirent.h>.

Reuse the contents of <sys/_endian.h> here for better interop.

Bug: http://b/139203733
Test: treehugger
Change-Id: Ic0e9bfa1a5b56d05e9e542839d237b6ceae4aa8c
2019-08-12 12:11:42 -07:00
Elliott Hughes 13e64377b3 Merge "Reland "libcutils: remove unused "jstring.h"."
am: a22599df58

Change-Id: I7ea8fa894ed60fc64534a6de312258b75b3bff8e
2019-08-12 11:40:28 -07:00
Anatol Pomazau 6b2ea1ca70 Add header that declares memcpy()
It helps to fix a compilation issue with host libc:

core/fs_mgr/liblp/reader.cpp:252:9: error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
        memcpy(&partition, cursor, sizeof(partition));
        ^~~~~~
        wmemcpy

Change-Id: I68f9c5b815b09f846aeba67bce0290f6829c80cf
2019-08-12 18:34:49 +00:00
Elliott Hughes a22599df58 Merge "Reland "libcutils: remove unused "jstring.h"." 2019-08-12 18:21:27 +00:00
Mark Salyzyn ae8b8a4e00 fs_mgr: adb-remount-test: non-verity recovery
For devices that do not have verity, or start the test with
verity disabled, but are using overlayfs, use a 'secret' surgical
technique to revert the device back to original state.

adb enable-verity will carry risk in that if the device did not
arrive with verity enabled, we can not guarantee it will boot
if we turn on verity.

Test: atest adb-remount-sh
Bug: 138649540
Change-Id: If6d55c57fb9daca9305c42a4df2c18c7f8c5eefa
2019-08-12 10:14:18 -07:00
Elliott Hughes f2b99fc36f Merge "logcat: switch to <regex>."
am: 5af75ed172

Change-Id: Ib3b25ea5e502249beddd55fe5fb911e900e3d125
2019-08-12 09:41:57 -07:00
Tom Cherry 6fd8d3bb1b init: Allow matching empty property values
When we have a property match along with an event trigger, we
currently don't allow matching empty property values, in other words,
properties that are unset.  For example, the below trigger would never
be run:

on zygote-start && property:persist.sys.fuse=""

That doesn't make sense though, it should be possible to match an
empty property value, so this change allows that trigger to match when
persist.sys.fuse is either empty or not set.

This continues to not match a '*' to an empty property, so

on zygote-start && property:persist.sys.fuse=*

will not run if persist.sys.fuse is empty or unset.

Test: the above triggers run appropriately
Change-Id: Ia57de7b96ad352590d0c82ff4ae95060b7361976
2019-08-12 09:31:42 -07:00
Elliott Hughes 5af75ed172 Merge "logcat: switch to <regex>." 2019-08-12 16:22:10 +00:00
Elliott Hughes 79198d9ade Reland "libcutils: remove unused "jstring.h".
This reverts commit 09ba34925f.

Bug: http://b/139257138
Test: treehugger
Change-Id: Id9b612c5a79b89ed17d2205219af19788ae96c9e
2019-08-12 15:09:20 +00:00
Jiyong Park b37c4818da Don't create anonymous namespace
Don't create anonymous namespace separately, use the first namespace
that is created for app classloader as the anonymous namespace.

Note that the anonymous namespace is set via the new
ANDROID_NAMESPACE_TYPE_ALSO_USED_AS_ANONYMOUS. I didn't creat a new
function like android_set_anonymous_namespace as it requires uprev of
the libnativebridge interface and makes it harder to delete the old
android_init_anonymous_namespace as we have to keep it until all
proprietary bridged loaders are updated.

Bug: 130388701
Test: CtsBionicTestCases
Test: run games on http://www.monogame.net/showcase/?Android
Change-Id: I0fdd614365eaa56c4ab47538bf3772d94bd9ae55
2019-08-12 16:56:18 +09:00
Mason Wang 1967bf3f07 Merge "Revert "libcutils: remove unused "jstring.h".""
am: 4b8e6b673f

Change-Id: I2ec20c825970beefae2c9b2693506c2d7d3165d5
2019-08-11 22:40:42 -07:00
Mason Wang 4b8e6b673f Merge "Revert "libcutils: remove unused "jstring.h"."" 2019-08-12 05:21:17 +00:00
Kiyoung Kim d3a3097927 Remove unused link from postinstall section
Linker ignores link configuration if either namespace is not valid.
However there was a link configuration from postinstall section which
target link namespace does not exist. Also, there was no binary within
postinstall from hwasan build (checked with bonito), so there may be no
usage for this section now. Removing this line for better human
readability, and behavior of the linker would be same as before.

Test: m -j && tested from cuttlefish
Change-Id: I0c7b2949d055ba767e1429238e8764ee7798fe44
2019-08-12 03:56:42 +00:00
Mason Wang 09ba34925f Revert "libcutils: remove unused "jstring.h"."
This reverts commit aa96e8898c.

Reason for revert: It caused BB, and b/139257138 is for your reference

Change-Id: I93f1d0ba0fa43325e2815e9b2de84bb7cb41c457
2019-08-12 02:16:58 +00:00
Elliott Hughes 94879d3b9f Merge "libcutils: remove unused "jstring.h"."
am: e2adc14803

Change-Id: I2d779ea267d1177ace3d18290f61b9006d86ce25
2019-08-11 08:51:52 -07:00
Treehugger Robot e2adc14803 Merge "libcutils: remove unused "jstring.h"." 2019-08-11 15:39:27 +00:00