Commit graph

44544 commits

Author SHA1 Message Date
Tom Cherry
7b98b64dda fs_mgr: add test_suites: ["device-tests"]
Bug: 124837435
Test: tree-hugger
Change-Id: Ia82eb9000b62926abbea108fdd77f15f4a2a1f8c
2019-02-21 11:42:04 +08:00
Bowgo Tsai
918668a2cd libfs_avb: support rollback protection for Live GSI
This commit extracts the security patch level (SPL), e.g.,
com.android.build.system.security_patch = 2019-04-05 from AVB property
descriptors when attempting to mount a standalone image (e.g., live
GSI). Then compares the SPL between the old system.img and the new live
system.img for rollback protection.

Bug: 122705329
Test: boot an old Live GSI, checks rollback is detected
Change-Id: I7aae58c0b2062a3ff57ed932ad58e7b604453fed
2019-02-21 10:32:18 +08:00
Josh Gao
effcb96670 Merge "adb: update symlink timestamps." 2019-02-21 02:31:03 +00:00
Julien Desprez
f4f54b1d69 Revert the explicit config, see topic
Other CL in topic address the issue of the file pusher.
The explicit config for this module will not be required
anymore.

Test: atest -v ziparchive-tests
Bug: 124515549
Change-Id: I4dad8adbce0817009158bc191c2cce86c38d9e3e
2019-02-20 13:29:11 -08:00
Josh Gao
7b1cb66a83 adb: update symlink timestamps.
Bug: http://b/120162375
Test: adb sync; adb shell touch -h -d 2008-01-0101:01:01 /system/bin/ls; adb sync; adb sync
Change-Id: Iedf54528b164913739c66c71d20006e484a4f5e4
2019-02-20 13:17:56 -08:00
Tom Cherry
15800946e0 __android_log_is_debuggable() shouldn't be an apex symbol
Remove a superfluous check in fs_mgr, since those return values are
already impossible for a non-debuggable build.  Replace a one time
call to __android_log_is_debuggable(), since there's no reason to
cache the value or use this symbol.

Test: build
Change-Id: Icd4bef7b616c49d304303747388d7e3018c6fcfc
2019-02-20 12:52:02 -08:00
Yifan Hong
4bb7b18fe1 Merge changes from topic "libprocessgroup_json"
* changes:
  Add schema for task profiles
  Move rootdir/*.json to libprocessgroup
2019-02-20 20:35:47 +00:00
Tom Cherry
4e47753338 Merge "liblog: add stubs variant" 2019-02-20 20:33:36 +00:00
Tom Cherry
fe1f701761 liblog: add stubs variant
Ensure that only the symbols in liblog.map.txt can be used by the
platform.

Bug: 123349183
Test: build
Change-Id: I99ae5d0e8ba8f5061ec20701c941d861c9eb615d
2019-02-20 12:32:12 -08:00
Treehugger Robot
14efb903bb Merge "Add the 'unrestricted' config section for vndk_lite devices" 2019-02-20 18:12:27 +00:00
Vic Yang
1cae1b0f81 Merge "libprocessgroup: Fix memcg path for apps" 2019-02-20 17:54:16 +00:00
Julien Desprez
fb4c13500f Temporarily @ignore test_reconnect
For the purpose of on-boarding all the other tests,
skip test_reconnect for now.

Test: atest -v adb_integration_test_adb
Bug: 123247844
Change-Id: I50269272adbfc3f946d71bae13677546566d541f
2019-02-20 09:42:49 -08:00
Tom Cherry
86f38d56b8 Merge "init: Ignore "ro." restrictions when reading prop files" 2019-02-20 16:59:39 +00:00
Treehugger Robot
de3c3e8c76 Merge "adbd: log when exiting due to root/unroot/tcpip/usb." 2019-02-20 11:40:26 +00:00
Jiyong Park
137e0308b7 Add the 'unrestricted' config section for vndk_lite devices
This is essentially the same change as
bcb5ba75a5
for ld.config.vndk_lite.txt.

Bug: 124789446
Test: atest CtsBionicTestCases on marlin
Change-Id: I6b65ec4df1626d625975c9834bf96ac9ff6cc3f3
2019-02-20 16:43:22 +09:00
Kevin Chyn
4275d9b887 Merge "Expose libandroidicu to llndk namespace" 2019-02-20 06:33:21 +00:00
Victor Chang
ff67ef3c7d Expose libandroidicu to llndk namespace
Bug: 124772622
Test: Treehugger
Change-Id: If936eb377c7f0994a9225b8099a672addb2f9ed6
2019-02-20 01:10:06 +00:00
Treehugger Robot
2baecf3c8f Merge "Adding GSI fstab entries when needed" 2019-02-20 00:36:29 +00:00
Josh Gao
b8573e2082 Merge "Hopefully fix more darwin build breakage." 2019-02-19 22:38:41 +00:00
Josh Gao
d3387380f7 Hopefully fix more darwin build breakage.
Silence narrowing warnings by manually casting to a smaller type,
convert static_asserts to CHECKs, and switch from using MSG_CMSG_CLOEXEC
to manually setting FD_CLOEXEC.

Test: mma
Change-Id: I8aa02804179d754de860279fe34773800b937ab6
2019-02-19 14:37:02 -08:00
Vic Yang
ab8d6ab62d libprocessgroup: Fix memcg path for apps
The expected memcg path for apps is
/dev/memcg/apps/uid_<uid>/pid_<pid>.  Right now we are missing the
"apps" component.  Fix it.

Bug: 124776663
Test: Boot on a Go device and does not see error from lmkd anymore.
Change-Id: I0e4c1d8520463fabb171ff4e61479034b6446548
2019-02-19 14:09:00 -08:00
Tom Cherry
7e6dc56b85 Merge "load selinux property_contexts in /odm and /product" 2019-02-19 21:34:35 +00:00
Yifan Hong
72ff585bd0 Add schema for task profiles
- Add proto3 files as schema for JSON task profiles / cgroups
  files.

- Add tests to ensure the JSON files (on the device) conforms
  the schema. (libprocessgroup_proto_test)

Test: libprocessgroup_proto_test

Bug: 123664216
Change-Id: I1cab73bd0d3852ff8827fee0be22373da8a6fc5b
2019-02-19 13:26:46 -08:00
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