Commit Graph

44471 Commits

Author SHA1 Message Date
Josh Gao 3ea374f54c Merge "Fix darwin build break." 2019-02-19 21:18:46 +00:00
Josh Gao b57dc7a670 Fix darwin build break.
The <malloc.h> include was vestigial from a previous revision.

Test: mma on linux
Change-Id: Iaf8351bec23c2792cefca0e5c9bd42664488f5c4
2019-02-19 13:17:23 -08:00
Josh Gao a80b64f2a0 adbd: log when exiting due to root/unroot/tcpip/usb.
Test: treehugger
Change-Id: Ibfbe4d512c6e126f2e6d311867316f033a4c9ab7
2019-02-19 13:12:59 -08:00
Tom Cherry be0489281f init: Ignore "ro." restrictions when reading prop files
"ro." properties do not make sense for prop files, especially with the
way that the system/product and vendor/odm partitions are meant to
override each other.  To fix this, we ignore the fact that "ro."
properties are "write once" when first loading in property files.

We then adjust the order of property file loading, such that we read
partitions from least to most specific, reading in order: system,
vendor, odm, product, product_services.

Bug: 122864654
Test: ro. properties can override when reading build props with
      appropriate permissions
Test: ro. properties do not override when lacking permissions to
      be set by a given partition
Change-Id: Ib9a5f77e95d9df647cdde7a5c937bb3425c066fa
2019-02-19 13:02:58 -08:00
Josh Gao 8954d0bc98 Merge changes from topic "base_cmsg"
* changes:
  adb: switch to base::{Send,Receive}FileDescriptors.
  debuggerd: switch to base::{Send,Receive}FileDescriptors.
  base: add helpers for sending/receiving file descriptors.
2019-02-19 20:53:01 +00:00
Gavin Corkery e8510cec19 Merge "Rename data/staging to data/pkg_staging." 2019-02-19 19:44:13 +00:00
Juju Sung 1d982ded6f lmkd: Remove redundant free swap and free memory check
lmkd can't kill processes because it has compare the size between free swap and free memory. Free swap is often larger than the free memory when system is under low memory with less swap-backed or swappable pages and finally leads to I/O thrashing.

Test: TreeHugger
Bug: 124727769
Change-Id: Ia2848859aa97a24bd13c704acee4b86cd2d3f647
2019-02-19 17:04:07 +00:00
Gavin Corkery 124a4bc791 Rename data/staging to data/pkg_staging.
Test: Build and flash, atest apex_e2e_tests
Fixes: 122999313
Change-Id: I878ee41f804956ee7533d64e844ce98e5a8afacc
Merged-In: I878ee41f804956ee7533d64e844ce98e5a8afacc
2019-02-19 15:46:22 +00:00
vichang ce912aadda Merge changes from topic "dup_icu4c"
* changes:
  Linker namespace changes for moving ICU4C to APEX
  Remove the public libs in runtime namespace
2019-02-19 10:14:31 +00:00
Bowgo Tsai 9bbaa7bbee Adding GSI fstab entries when needed
In ReadFstabFromFile(), currently it always adds 'system_gsi' and
'userdata_gsi' fstab entries when running in Live GSI. As the API
might be used to load a fstab file without "/system" and/or "/data",
it's better to replace "/system" with 'system_gsi' and "/data" with
'userdata_gsi', instead of adding 'system_gsi' and 'userdata_gsi'
unconditionally.

Bug: 124640105
Test: boot a Live GSI, then `atest libfs_avb_device_test`

Change-Id: I52928f95b9ebd12ce09ffd538caf96a2de430dbc
2019-02-18 13:27:53 +00:00
Josh Gao f80c326d2e Merge "adbd: fallback to legacy USB implementation if needed." 2019-02-17 04:14:22 +00:00
Tom Cherry acfb705603 Merge "Export init.environ.rc in early-init instead of init" 2019-02-16 17:53:53 +00:00
Paul Trautrim 024e442812 Merge "Add presubmit test for vendor overlay" 2019-02-16 16:53:37 +00:00
Treehugger Robot 00c767d177 Merge "Replace bionic-unit-tests with CtsBionicTestCases" 2019-02-16 03:12:22 +00:00
Treehugger Robot 3777d9cc10 Merge "base: add ScopedLockAssertion." 2019-02-16 02:34:32 +00:00
Elliott Hughes fd877db2bc Merge "adf: rename." 2019-02-16 00:15:17 +00:00
Elliott Hughes c911d5af6f Merge "liblog: make liblog_headers truly stand-alone." 2019-02-16 00:12:51 +00:00
Tom Cherry d540e527e1 Export init.environ.rc in early-init instead of init
Now that we always have system mounted early, we're starting to load
various daemons during the `init` trigger and these daemons need the
environment set up from init.environ.rc, so we move it to early-init.

This shouldn't need to go any further earlier in the future, since
nothing besides ueventd should ever start in early-init.

Test: systems boot, early daemons get right environment
Change-Id: I02f425a1500377c5de3427afa7872073e77a066f
2019-02-15 15:55:18 -08:00
Paul Trautrim c10d3fdb2c Add presubmit test for vendor overlay
Add a test that creates files in the appropriate vendor_overlay directory and
verifies that they are correctly overlaid (or not) onto /vendor after rebooting.

Test: locally running atest
Change-Id: I65860dbeb837f86ac030fa51b3af93844e82de96
2019-02-16 08:24:35 +09:00
Treehugger Robot 81767b1d3d Merge "procinfo: Read inode number from /proc/<pid>/maps" 2019-02-15 23:03:00 +00:00
Mark Salyzyn e7d638a02b Merge "fs_mgr: harden adb-remount-test.sh" 2019-02-15 22:51:01 +00:00
Mark Salyzyn bbe33f7826 fs_mgr: harden adb-remount-test.sh
Harden adb-remount-test.sh script.  Add --no-color and --color
options.  Allows --serial to be passed in.  Add a recovery handler
that restores the device to verity enabled if possible.  List the
partitions sizes as they may be relevant to triaging errors.  Allow
for devices that have a mixed set of remounts, some direct, some
with overlayfs.  Allow two scripts to run at the same time on a host
machine targetting different devices.  Detect if wrong adb is used
for adb reboot-fastboot.

Add a build target for adb-remount-test.sh so that the script
is landed into the host tools bin for easy pickup.

Test: adb-remount-test.sh
Bug: 123079041
Change-Id: I6369a245a656419067ec4350a4dbdf78c9b0533e
2019-02-15 14:28:19 -08:00
Andreas Gampe cd67fa9c1a Merge "Ziparchive: Give tests a test config" 2019-02-15 20:15:37 +00:00
Pirama Arumuga Nainar e479b47e0e Merge "Mark gglMulx and gglMulAddx as always_inline" 2019-02-15 20:03:25 +00:00
Andreas Gampe 881e2e198b Ziparchive: Give tests a test config
To work around problems with the autogenerated one.

Bug: 117891984
Bug: 124515549
Test: atest ziparchive-tests
Change-Id: Ia4b352b7404255a4fe9e644a56ae9c5d41c79886
2019-02-15 11:53:49 -08:00
Josh Gao 12f328489b adbd: switch the default USB implementation.
Switch to the nonblocking FFS implementation that fixes several race
conditions on connect/disconnect.

Test: treehugger
Change-Id: I91fdb9b27152078cb38e610861a05f1fa95aa3a2
2019-02-15 11:43:49 -08:00
Josh Gao c0b831bb81 adbd: fallback to legacy USB implementation if needed.
Detect kernels that don't support AIO on functionfs endpoints and fall
back to the old legacy implementation.

Test: treehugger
Change-Id: Ice28dcd40c9730ac2dd5e468d065b41c0e076146
2019-02-15 11:43:49 -08:00
Jinguang Dong f42e08d878 load selinux property_contexts in /odm and /product
Commit I27dd391fc06a3c78e88a65c7931c84de1699f157  make property_service no longer
load selinux property_contexts by function selinux_android_prop_context_handle,
So we should config /odm and /product property_contexts loading path in
property_service.cpp but not in libselinux.

Test: property_service can load property_contexts in /odm and /product
Change-Id: Ifa94b87180c4867ecbe8dea347ad02bb37958043
2019-02-15 17:56:45 +08:00
Jiyong Park d8b07f8c05 Replace bionic-unit-tests with CtsBionicTestCases
Bug: 124437796
Test: monitor treehugger
Change-Id: I8bf8d1bb1af3f4ccfca434846adcc1f4eda3fb69
2019-02-15 15:20:59 +09:00
Elliott Hughes 277439fd8a adf: rename.
Since this was deprecated in Linux 4.9, mark it as such (and not
coincidentally move it out of the way of auto-complete for adb).

Test: treehugger
Change-Id: I65542343ec49246bba7f44a815c3e478e9d5c5c3
2019-02-14 16:30:24 -08:00
Maciej Żenczykowski af0c58f12d Merge "Refactor OWNERS files for Android Core Networking" 2019-02-15 00:14:43 +00:00
Yifan Hong 98a61dd583 Move rootdir/*.json to libprocessgroup
They are installed to /system/etc, not /. Hence, move
out of rootdir/ and move into the code that parse these
files (i.e. libprocessgroup).

Also, Android.mk->bp.

Test: builds

Change-Id: I1763c26f81ae51ee159552e39d252fd643c35b94
2019-02-14 16:06:49 -08:00
David Anderson 372278c86d init: Set a property indicating that we're booting into a GSI.
Bug: 123777418
Test: gsid.image_running is set after booting into GSI
Change-Id: I8ec79fa58b41b04676de0c8909fcd520c28c05ab
2019-02-14 13:23:28 -08:00
David Anderson cb13a7766e Merge "Enable metadata encryption for userdata_gsi." 2019-02-14 20:27:05 +00:00
Pirama Arumuga Nainar 5d88cef82b Mark gglMulx and gglMulAddx as always_inline
Bug: http://b/116873221
Bug: http://b/124451159

This is to get them building with O0 (needed for coverage builds).  At
O0, without the always_inline, the compiler is not able to reconcile the
constraints in the inline assembly.

In file included from system/core/libpixelflinger/trap.cpp:27:
In file included from system/core/libpixelflinger/trap.h:22:
In file included from
system/core/libpixelflinger/include/private/pixelflinger/ggl_context.h:27:
system/core/libpixelflinger/include/private/pixelflinger/ggl_fixed.h:113:9:
error: invalid operand for inline asm constraint 'I'
  asm("smull  %[lo], %[hi], %[x], %[y]            \n"
      ^
system/core/libpixelflinger/include/private/pixelflinger/ggl_fixed.h:136:9:
error: invalid operand for inline asm constraint 'I'
  asm("smull  %[lo], %[hi], %[x], %[y]            \n"
      ^
2 errors generated.

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=system/core/libpixelflinger
Test: m
Change-Id: Ia4516b19b957687b5fa25d2d100679abcec29366
2019-02-14 11:59:48 -08:00
Mark Salyzyn fa130f3ad4 Merge "fs_mgr: overlayfs: export fs_mgr_overlayfs_candidate_list" 2019-02-14 19:20:45 +00:00
Suren Baghdasaryan da20bc763e Merge "Fix cgroup support for recovery mode" 2019-02-14 18:08:40 +00:00
Vic Yang 4f5625d9c7 Merge "libvndksupport: Add android_is_in_vendor_process()" 2019-02-14 18:03:19 +00:00
Treehugger Robot 941cb7606c Merge "Skip enabling dm-verity for live GSI when needed" 2019-02-14 17:55:56 +00:00
Suren Baghdasaryan d032a92c04 Fix cgroup support for recovery mode
In recovery mode a separate set of cgroups should be mounted. Add a
cgroups.recovery.json file to describe cgroups mounted during recovery.
Change cgroups descriptor parset to allow cgroups and cgroups2 sections
to be omitted.

Bug: 124270406
Test: "adb reboot sideload; adb devices" shows 'sideload' as expected

Change-Id: Ic32bd2b4612ec8390064f87d4655d1bd1183d741
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-14 17:08:40 +00:00
Treehugger Robot 612a6d6ba3 Merge "Use new static target for libdexfile_support." 2019-02-14 14:36:32 +00:00
Victor Chang 785ba2e68e Linker namespace changes for moving ICU4C to APEX
libandroidicu is used by various libraries, e.g. libxml2, minikin.
Thus, expose libandroidicu to default namespace.

libpac is only used by libjni_pacprocessor (part of framework).

libicuuc, libicui18n are not exposed to default namespace,
because everyone else, except app, should use libandroidicu.
They are exposed to classloader namespace from runtime namespace
via the work done in libnativeloader in http://r.android.com/887453
b/120786417 has more details about these 2 libraries.

Bug: 120659668
Test: m droid
Change-Id: I2cd3378f1eb94b7bb1c942738b59d7e577a5f8f0
2019-02-14 10:42:27 +00:00
junyulai 54302442e2 Refactor OWNERS files for Android Core Networking
Bug: 120829091
Test: build/make/tools/checkowners.py -c -v path/OWNERS
Change-Id: I0b9dd6a6c01e46d887d1161179ca3791f461dce6
2019-02-14 14:13:53 +08:00
Suren Baghdasaryan f5b7361cf4 Merge "Suppress error log when timerslack_ns write fails for already dead process" 2019-02-14 05:44:34 +00:00
Suren Baghdasaryan 2bc522878d Suppress error log when timerslack_ns write fails for already dead process
lmkd uses set_sched_priority to expedite killing of its victims and this
sometimes results in timerslack_ns writes for an process which is already
dead. These messages are detrimental during troubleshooting and do not
indicate a real problem, therefore need to be suppressed.

Bug: 124324891
Test: lmkd_unit_test

Change-Id: I5bc071b47d386c279dd9a56eee51dba7797f4520
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-14 03:51:17 +00:00
Treehugger Robot 4ecbe76354 Merge "Mark libs as double_loadable" 2019-02-14 02:10:05 +00:00
Treehugger Robot 6332b7a368 Merge "Update OWNERS for libnativebridge" 2019-02-14 01:42:28 +00:00
Treehugger Robot ebadad5c56 Merge "Add TEST_MAPPING for system/core/rootdir/etc" 2019-02-14 00:11:36 +00:00
Treehugger Robot 48c6d139b3 Merge "Add compat symlinks into the Runtime APEX for the ART binaries." 2019-02-13 23:08:01 +00:00
Treehugger Robot ac4c2d8947 Merge "libmeminfo: change dmabuf_dump from soc_specific to product_specific" 2019-02-13 22:39:49 +00:00