Commit graph

43372 commits

Author SHA1 Message Date
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
Josh Gao
4f911e3bf6 adb: switch version back to 40.
The version bump we did wasn't actually needed, since adbd doesn't
check for either feature flag we added. Revert the change and clarify
the comment suggesting the version bump when adding features.

Test: ./test_adb.py
Test: ./test_device.py
Change-Id: I92e7f392bcb36b3bf9a236f2d31ba5133de8d72a
2018-11-01 13:25:31 -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
Treehugger Robot
312339167e Merge "Mount vendor overlay from the system partition" 2018-11-01 04:24:33 +00:00
Treehugger Robot
cc684eb085 Merge "libprocinfo: provide MapInfo structure for reading maps." 2018-11-01 02:46:47 +00:00
Treehugger Robot
91c47309a0 Merge "liblog: Fix memory leaks" 2018-11-01 02:11:31 +00:00
Justin Yun
6bab0a9c23 Mount vendor overlay from the system partition
Using overlayfs, the system partition may provide files for older
version of vendor partitions by overlaying on the vendor partition.
Directories in /system/vendor_overlay will be overlaid on the
directories in /vendor to override existing files or provide new
files.

This feature works only if the kernel support overlayfs and has a
patch for override_creds. Otherwise, no-op.

Bug: 114679254
Test: Build and boot: nothing affected without overlayfs, or
                      vendor file is overrided with overlayfs

Change-Id: Iff3a308945299034123ba7bcb40dc787e102730e
2018-11-01 10:26:12 +09:00
Peter Collingbourne
d7157c22af Introduce additional service options for controlling memory cgroups.
The memcg.limit_percent option can be used to limit the cgroup's
max RSS to the given value as a percentage of the device's physical
memory. The memcg.limit_property option specifies the name of a
property that can be used to control the cgroup's max RSS. These
new options correspond to the arguments to the limitProcessMemory
function in frameworks/av/media/libmedia/MediaUtils.cpp; this will
allow us to add these options to the rc files for the programs that
call this function and then remove the callers in a later change.

There is also a change in semantics: the memcg.* options now have
an effect on all devices which support memory cgroups, not just
those with ro.config.low_ram or ro.config.per_app_memcg set to true.
This change also brings the semantics in line with the documentation,
so it looks like the previous semantics were unintentional.

Change-Id: I9495826de6e477b952e23866743b5fa600adcacb
Bug: 118642754
2018-10-31 17:09:59 -07:00
Victor Chang
6b15a6b1ad Fix bootchart
Found the following 2 binary is not in the path
system/core/init/grab-bootchart.sh: line 20: bootchart: command not found
system/core/init/grab-bootchart.sh: line 21: gnome-open: command not found

Use a more commonly available command to create bootchart

Test: system/core/init/grab-bootchart.sh started a bootchart
successfully

Change-Id: I6d5b4a692af2fd53ea636b768f55c697586e6898
2018-10-31 21:00:19 +00:00
Yabin Cui
bb3e479268 Merge "libbase: support char parameter in StartsWith/EndsWith." 2018-10-31 18:42:33 +00:00
Treehugger Robot
1206850289 Merge "fs_mgr: overlayfs takes const std::vector<const fstab_rec*>&" 2018-10-31 17:52:18 +00:00
Mark Salyzyn
a762e007c5 fs_mgr: overlayfs takes const std::vector<const fstab_rec*>&
fs_mgr_overlayfs_mount_all() and fs_mgr_overlayfs_required_devices()
to also take const std::vector<const fstab_rec*>& argument.

Bug: 117933812
Test: manual adb-remount-test.sh
Change-Id: Ic72fcca1fe32c311ff3f903c7275e6f7dfba46a7
2018-10-31 14:42:44 +00:00
Treehugger Robot
e26b8b0181 Merge "debuggerd_fallback: fix fd leak." 2018-10-31 06:05:28 +00:00
Bo Hu
3e3797a947 Merge "adb: print emulator console output" 2018-10-31 04:28:17 +00:00
Yabin Cui
0fe48f943d libprocinfo: provide MapInfo structure for reading maps.
Bug: none
Test: run libprocinfo_test.
Change-Id: I4d3c0f3012e91571aef7ebf4b154df1c9c5addc2
2018-10-30 17:36:09 -07:00
Yabin Cui
a656b98634 libbase: support char parameter in StartsWith/EndsWith.
Bug: 117568547
Test: run libbase_test.
Change-Id: I5a6a412733c594f5a116f333b8e091d2d9f60e06
2018-10-30 17:20:50 -07:00
Josh Gao
08163cb032 debuggerd_fallback: fix fd leak.
Previously, when we received simultaneous dump requests, we were CASing
a file descriptor value into a variable, and then failing to close it
if the CAS failed.

Bug: http://b/118412443
Test: debuggerd_test
Change-Id: I075c35a239426002eb9416da3d268c3d1a18e9d2
2018-10-30 15:33:58 -07:00
bohu
09faa66006 adb: print emulator console output
It is very helpful to see the output of the following adb command:
adb emu <emulator commands...>

Change-Id: I7905370fb955de4d457a323a7e9e780aaca5d45e
2018-10-30 14:36:33 -07:00