Commit graph

43286 commits

Author SHA1 Message Date
Patrick Baumann
24439442a8 Removes ASEC-related install flags
Bug: 109941548
Test: install still works
Change-Id: Ibaf87e678217a1ce140b4024d16ceb8d27fadec0
2018-12-07 16:15:31 +00:00
Treehugger Robot
a50225ae36 Merge "run-as: Use 2-space clang-format." 2018-11-06 21:01:49 +00:00
Treehugger Robot
612c2854ad Merge "fs_mgr: enable DT fstab based on its status node appropriately" 2018-11-06 20:30:44 +00:00
David Anderson
88fd7e60d0 Merge "liblp: Fix flashing metadata to multiple block devices." 2018-11-06 19:45:26 +00:00
Yabin Cui
bcbffddb10 run-as: Use 2-space clang-format.
Bug: none
Test: none.
Change-Id: I8fc2f9a534675347bae5af0ce12b0bf3d7c32d55
2018-11-06 11:18:44 -08:00
Tom Cherry
1eb04561c1 fs_mgr: enable DT fstab based on its status node appropriately
Follow the typical device tree guidelines that a node is only enabled
if it does not have a 'status' property or if it does have a 'status'
property with a value of 'ok' or 'okay'.

Bug: 117933812
Test: status='disabled' DT fstab is not present when reading fstab
Change-Id: Icb4cbe654757658460aabfdb952d71fb8354e09e
2018-11-06 10:44:51 -08:00
David Anderson
fa36e318cf Merge "init: Regenerate uevents for dependent super partition devices." 2018-11-06 17:52:17 +00:00
Sandeep Patil
c68ac11c8a Merge "libmeminfo: Add libmeminfo to gather global and per-process memory stats" 2018-11-06 13:28:06 +00:00
David Anderson
f89b1df1a5 init: Regenerate uevents for dependent super partition devices.
This patch adds another uevent-regeneration pass to the first stage
mount. When the super partition spans multiple block devices, we need
/dev/block/by-name symlinks to have been created before we begin mapping
dynamic partitions.

Bug: 116802789
Test: retrofit device boots
Change-Id: I00bb277e1d81385a457c5b4205a95d8fbe365bb2
2018-11-05 17:53:49 -08:00
Treehugger Robot
32b3f60a7a Merge "Suppress lint warnings on google-default-arguments" 2018-11-06 01:25:47 +00:00
Treehugger Robot
a123155f3e Merge "Fix run-as for non-owner users" 2018-11-06 01:17:37 +00:00
David Anderson
7632f0c286 liblp: Fix flashing metadata to multiple block devices.
Although metadata is only stored on the first block device, we ideally
want to validate all the block devices before flashing. This patch does
that and in the process converts ValidateAndSerializeMetadata to use
IPartitionOpener.

Bug: 116802789
Test: manual test
      liblp_test gtest

Change-Id: I3f24cfc6f5607309dc3cded0423326c5ba293d26
2018-11-05 19:57:47 +00:00
Sandeep Patil
54d8721374 libmeminfo: Add libmeminfo to gather global and per-process memory stats
The library is expected to be a unified place for all components to read
both global and per-process memory accounting form kernel including
getting the working set. This change adds the PageInfo, MemInfo and
ProcMemInfo classes and verifies the implementation against libpagemap
for correctness.

Adds a procmem2 tool show the usage.

TODO: Plumbing in os_debug, add vmastats, zoneinfo etc parsing.

Test: libmeminfo_test 1
Test: procmem2 1
Test: procmem2 -h -W 1
Test: procmem2 -h -w 1
Test: libmeminfo_benchmark
Bug: 111694435
Bug: 114325007

Change-Id: I280440b1dc26a498170686d10fcf63f953a0dcbd
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-11-05 10:42:46 -08:00
Treehugger Robot
e0c3a8d97b Merge "Check sepolicy context for mounting vendor overlay" 2018-11-05 17:58:16 +00:00
Justin Yun
ad55005b19 Check sepolicy context for mounting vendor overlay
The vendor overlay source directory must have the same sepolicy
context with the target vendor directory.
Otherwise, the vendor overlay will fail to mount.

Bug: 112955896
Test: Check if a source directory that has a differnt context fails
      to mount on vendor directory.
Change-Id: I2522a8ddc96d4d9b0f34d25a081d20d1ac2dd27a
2018-11-05 17:57:41 +00:00
Nicholas Sauer
0c5411c7ca Fix run-as for non-owner users
bug: 118501138
bug: 80126373
Test: cts-tradefed run cts-dev -a arm64-v8a -m CtsJvmtiRunTest1908HostTestCases
Change-Id: Iee25afbffc6990b46f508bfe8a9953bd2a35d118
2018-11-05 08:58:19 -08:00
Elliott Hughes
abd6627983 Merge "healthd: BatteryMonitor: Fix compiler warning" 2018-11-03 05:09:59 +00:00
David Anderson
15e1b3b85a Merge "adbd: Fix adb remount when switching roots during first-stage init." 2018-11-03 03:17:30 +00:00
David Anderson
f27803c435 Merge "fs_mgr: Allow overriding the super partition name via the kernel commandline." 2018-11-03 03:15:32 +00:00
Treehugger Robot
3b554d3dbf Merge "fs_mgr: overlay backing, force filesystem for f2fs" 2018-11-02 23:41:07 +00:00
Elliott Hughes
bfb465c733 Merge "Add missing <android/log.h> documentation." 2018-11-02 23:32:43 +00:00
Jaewoong Jung
c728550de7 Merge "Revert "Revert "adb: append the libwinpthread COPYING to adb's NOTICE.""" 2018-11-02 23:05:49 +00:00
Jaewoong Jung
1272e7a592 Revert "Revert "adb: append the libwinpthread COPYING to adb's NOTICE.""
This reverts commit 6374076ce4.

Reason for revert: The Soong side change broke darwin_mac build.

Change-Id: I8d3c1d4e075c333b4890cb620dd106d16800d7f4
2018-11-02 23:00:50 +00:00
Treehugger Robot
82c88d9b00 Merge "ueventd: don't skip restorecon after the cold boot" 2018-11-02 22:57:27 +00:00
David Anderson
337052a35a Merge "fastbootd: Partition commands should update all metadata slots." 2018-11-02 22:40:20 +00:00
Treehugger Robot
fe9b71d734 Merge changes I9067b933,I64fac7e1
* changes:
  llkd: stutter pre-panic message to both last kernel and last logcat
  llkd: Add waiting task to dump
2018-11-02 22:36:04 +00:00
Treehugger Robot
cfa7e249b5 Merge "llkd: add ro.llk.sysrq_t" 2018-11-02 22:32:56 +00:00
Jaewoong Jung
d465c7e52d Merge "Revert "adb: append the libwinpthread COPYING to adb's NOTICE."" 2018-11-02 22:25:34 +00:00
Treehugger Robot
5ff35fbd6d Merge "llkd: add bit_wait_io to stack monitoring" 2018-11-02 22:02:09 +00:00
David Anderson
0bfa1c8b3c fs_mgr: Allow overriding the super partition name via the kernel commandline.
For retrofit devices where the super partition is not called "super",
this allows the correct partition to be passed via the kernel
command-line, i.e.:

  androidboot.super_partition=system

Since retrofitting is only supported for A/B devices, we assume that
a partition named this way must be slot-suffixed.

Bug: 116802789
Test: manual test
Change-Id: I930dbbd397d5552e9ded89baa5a7bb0e63c67426
2018-11-02 14:51:16 -07:00
Mark Salyzyn
2fde1ec836 fs_mgr: overlay backing, force filesystem for f2fs
Under the condition of an existing, but broken, filesystem on the
scratch device, force recreation. Add the -f flag for f2fs,
already present for ext4.

Test is enhanced.  The test needs to check, and if necessary wipe
out any existing overrides and reboot before running the remainder
of test.  Report which overrides are being used, and how they are
setup.  Fail if they are not as expected.  Improve efficiency of
checks by reducing the duplication of commands issued to the device.

Test: adb-remount-test.sh
Bug: 109821005
Change-Id: I9ac4fac952e334c00b089fec0b73b2cd2cc0af5c
2018-11-02 13:41:07 -07:00
Elliott Hughes
a38c2b6910 Add missing <android/log.h> documentation.
Bug: N/A
Test: N/A
Change-Id: Iec6db210055eb2765b98fd76c53bc77f3c28aaea
2018-11-02 13:18:41 -07:00
Treehugger Robot
051f4d5643 Merge "Do not hwasanitize init_first_stage." 2018-11-02 20:14:51 +00:00
Mathieu Chartier
f8d62f06e7 Merge "libbase: add Fdopendir that takes a unique_fd." 2018-11-02 19:30:18 +00:00
ShevT
9d98a6ac93 healthd: BatteryMonitor: Fix compiler warning
system/core/healthd/BatteryMonitor.cpp:248:19: note: initialize the variable 'i' to silence this warning
    unsigned int i;
                  ^
                   = 0
1 warning generated.

Change-Id: Ib2fa0061d657fd93871ca8a9056d173d5b7ab58d
2018-11-02 17:59:09 +00:00
Oleksiy Avramchenko
dd5802a27e ueventd: don't skip restorecon after the cold boot
We need to do restorecon after the cold boot, otherwise the newly
created sysfs nodes won't be labelled.

Bug: 118861992
Test: manual - do insmod, check sysfs nodes are properly labelled
Change-Id: I4bdfb4a68206724a568d8cbb6c644ba8764b5fa7
2018-11-02 15:43:11 +00:00
Mathieu Chartier
1666bafa70 libbase: add Fdopendir that takes a unique_fd.
Using fdopendir with unique_fd correctly is more annoying than it
should be, because fdopendir doesn't close the file descriptor
received upon failure.

Add an android::base::Fdopendir that does that handles the failure
case.

Bug: 118818285
Test: treehugger
Change-Id: I5dbbe0eb82242bc7716f84735ffc7644febcfd65
2018-11-02 08:24:38 -07:00
David Anderson
63ffb447a7 fastbootd: Partition commands should update all metadata slots.
Without this, it is much more difficult to ensure that the "a" and "b"
slots are both bootable during development. We already update all
metadata slots for update-super, so we should here as well.

Bug: N/A
Test: fastboot flashall
      fastboot set_active other
      fastboot flashall
Change-Id: Ib661e35fa89171a68a0b1da195dc5ba0375d72e4
2018-11-01 17:43:45 -07:00
Jaewoong Jung
6374076ce4 Revert "adb: append the libwinpthread COPYING to adb's NOTICE."
This reverts commit d3bf1a8d7e.

Reason for revert: Now Soong can handle NOTICE files for static libraries.

Bug: 36073965
Test: mma + visual check
Change-Id: I52ebd3518f4d15800f878a6401df2c3a2d6713eb
2018-11-01 22:33:21 +00:00
Evgenii Stepanov
1f47f4add4 Do not hwasanitize init_first_stage.
Current hwasan implementation breaks when stderr (fd 2) is missing.

Bug: 118776698
Test: hwasan boots without serial console
Change-Id: Id095a87212096526a497563adab3d7f2f9fe8ab0
2018-11-01 13:43:50 -07:00
Howard Ro
6d7c8fcc92 Merge "Remove libmetricslogger_static" 2018-11-01 20:24:11 +00:00
Peter Collingbourne
166ae693d4 Merge "Introduce additional service options for controlling memory cgroups." 2018-11-01 17:55:34 +00:00
Treehugger Robot
2141f9a6c4 Merge "Convert more modules to Android.bp" 2018-11-01 16:02:27 +00:00
Treehugger Robot
8da39ef62a Merge "Make fs_mgr_access() available to user build" 2018-11-01 15:44:30 +00:00
Mark Salyzyn
3c3b14d0de llkd: stutter pre-panic message to both last kernel and last logcat
Test: compile
Bug: 118712403
Change-Id: I9067b9335b2685169bcf8b1dc0248f7ff4315046
2018-11-01 08:14:03 -07:00
Mark Salyzyn
53e782d531 llkd: Add waiting task to dump
Consider reporting d (lock dump) and w (waiting tasks) after
t (stack dump) as the ramoops buffer could be overflowed.

Test: compile
Bug: 118712403
Change-Id: I64fac7e13c14a1cbc45c9e35fe7746f9b778dcf4
2018-11-01 08:13:53 -07:00
Mark Salyzyn
bd7c856507 llkd: add ro.llk.sysrq_t
Allow sysrq stack trace dump to be disabled by ro.llk.sysrq_t.

Default is true if not on a limited memory device ro.config.low_ram.
Value is true if the property value is "eng" and on a userdebug or
eng device, signaled by the ro.debuggable set to 1.

Test: compile
Bug: 118712403
Change-Id: I02e999dc640125b6a08dca10077716e5d006da49
2018-11-01 08:13:44 -07:00
Mark Salyzyn
bb1256a728 llkd: add bit_wait_io to stack monitoring
This will discover if the I/O is starved.

Add the ability to search for " <symbol>.cfi+0x".

Cleaned up README.md to reflect current defaults.

Test: none
Bug: 113648929
Change-Id: I990a54f99de536406fd752a490e60f962380d71a
2018-11-01 08:13:33 -07:00
Justin Yun
818ff63f09 Make fs_mgr_access() available to user build
fs_mgr_access() is used by a public function that is avaliable to
user build.

Test: build fs_mgr for user variant.
Change-Id: I1ec977fa1920add7db3023b181a9a7666b0890b5
2018-11-01 17:25:39 +09:00
Dan Willemsen
3e963f9df7 Convert more modules to Android.bp
Test: cd system/core; mma
Test: check for mkbootfs in build artifacts
Test: out/host/linux-x86/nativetest64/libcrypto_utils_test/libcrypto_utils_test
Test: out/host/linux-x86/nativetest64/libnativebridge-tests/*_test
Change-Id: I71141bd85f052d5d86763a8b79b219cc4c46aafb
2018-10-31 21:53:37 -07:00