Commit graph

38482 commits

Author SHA1 Message Date
Jeff Vander Stoep
148dea71a5 init.rc: create /data/system/dropbox
Ensure dropbox has the new dropbox_data_file label.

Bug: 31681871
Test: ls -dZ /data/system/dropbox
    u:object_r:dropbox_data_file:s0 /data/system/dropbox

Change-Id: Ia67646f4a789155e20650c33fe4412cae7f930d2
2018-04-18 07:15:37 -07:00
Treehugger Robot
ca10ecb3ae Merge "Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery."" 2018-04-17 16:53:30 +00:00
Paul Crowley
c73b21558b Re-land "If enablefilecrypto or init_user0 fails, reboot into recovery."
An earlier such change was reverted in commit e242a97db5.

Bug: 70487538
Test: ensure that angler can boot
Merged-In: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
Change-Id: Id5f57fce1c9b817a2650e0c848143d8a0d286bf0
2018-04-17 09:03:57 -07:00
Treehugger Robot
0eee579fa2 Merge "Make bootstat container-friendly" 2018-04-17 16:01:06 +00:00
Treehugger Robot
8a34e636ca Merge "Remove out of date comment." 2018-04-17 01:38:11 +00:00
Treehugger Robot
b245377f0e Merge "Remove header version check for command "fastboot boot boot.img"" 2018-04-17 01:31:06 +00:00
Treehugger Robot
e3b149c754 Merge "Use ld when lld fails" 2018-04-17 00:31:05 +00:00
Hridya Valsaraju
d016ee4dbe Remove header version check for command "fastboot boot boot.img"
The header version argument is meant for creation of boot images
using boot and flash:raw commands. It is unnecessary to specify the same
while using the boot command with a complete boot image.

Bug: 77920157
Test: fastboot boot boot.img
Change-Id: Ia8fca4180e15906a3ae7c732496a744eb4b15e91
Merged-In: Ia8fca4180e15906a3ae7c732496a744eb4b15e91
2018-04-16 16:55:58 -07:00
Chih-Hung Hsieh
29e54f8e75 Use ld when lld fails
* Android's clang lld link rules do not work with the special link order of
  libunwind_llvm yet.

Bug: 78118944
Test: make checkbuild and boot
Change-Id: Ife9707f111dfd24cb84b56754a4fc3f826f722c4
2018-04-16 16:00:15 -07:00
Elliott Hughes
77561c1f28 Remove out of date comment.
Bug: https://code.google.com/p/android/issues/detail?id=189821
Test: N/A
Change-Id: I25e64611d0c2db75a9caf0f19e7dd17c725d98a1
2018-04-16 15:22:33 -07:00
Luis Hector Chavez
03aae156b8 Make bootstat container-friendly
This change allows bootstat to read the ro.boot.boottime_offset
property, which is set on devices where Android runs in a container.
This is because the CLOCK_BOOTTIME clock is not reset when (from
Android's perspective) the device restarts, since the host OS does not
restart itself.

Bug: 77273909
Test: CtsBootStatsTestCases

Change-Id: Ifb792864394be0b4686cc9d555c0afced856f4b4
Merged-In: Ifb792864394be0b4686cc9d555c0afced856f4b4
2018-04-16 11:17:42 -07:00
Treehugger Robot
22dc27b9fa Merge "lmkd: Introduce support for legacy kill algorithm that uses minfree levels" 2018-04-15 17:34:59 +00:00
Suren Baghdasaryan
c09b53db7b lmkd: Introduce support for legacy kill algorithm that uses minfree levels
Add ability to switch to the algorithm used by lowmemorykiller driver
for determining when to kill. It uses minfree levels to decide at which
levels of free memory and file cache to kill a process. oom_adj_score
is also determined by comparing current memory resources against minfree
levels.
ro.lmk.use_minfree_levels property is introduces for switching into this
mode. By default it is disabled.

Bug: 77299493
Bug: 75322373
Merged-In: I6b51972951026854a079fcda33d6786b7ed035e4
Change-Id: I6b51972951026854a079fcda33d6786b7ed035e4
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 16:02:36 +00:00
Treehugger Robot
5176b4b37a Merge "lmkd: Switch to using /proc/meminfo to have access to file cache size" 2018-04-15 11:36:46 +00:00
Suren Baghdasaryan
45c9e0b30c lmkd: Switch to using /proc/meminfo to have access to file cache size
Current mechanism of getting system memory state by using sysinfo()
is not enough because it does not provide information about file cache
size which is needed to correctly assess memory state. Switch to using
data from /proc/meminfo that includes information provided by sysinfo()
and file cache size in addition to that.


Bug: 77299493
Bug: 75322373
Merged-In: I16106fc4f9254f17f776803e60502b7b6474e1b7
Change-Id: I16106fc4f9254f17f776803e60502b7b6474e1b7
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 10:03:05 +00:00
Treehugger Robot
b62d5ed25e Merge changes Ie7d80bbb,I8e27f8b9
* changes:
  lmkd: Add zoneinfo and meminfo parsing routines
  lmkd: Optimize frequent file reads by keeping file descriptors open
2018-04-15 09:31:52 +00:00
Suren Baghdasaryan
ceffb41162 lmkd: Add zoneinfo and meminfo parsing routines
/proc/zoneinfo and /proc/meminfo contain information necessary for lmkd
to assess system memory state. Add routines to parse these files.


Bug: 77299493
Bug: 75322373
Merged-In: Ie7d80bbb81fd0d2fc0629f6f678e6afc97fed1f6
Change-Id: Ie7d80bbb81fd0d2fc0629f6f678e6afc97fed1f6
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 07:55:27 +00:00
Suren Baghdasaryan
6499e5ec4a lmkd: Optimize frequent file reads by keeping file descriptors open
To check system memory state lmkd is using same files every time vmpressure
event is received. Instead of opening and closing these files every time
we store the file descriptor and use pread() to reread the file from
the beginning.


Bug: 77299493
Bug: 75322373
Merged-In: I8e27f8b9526e82e3cc313a02fce215c2e4dd3d29
Change-Id: I8e27f8b9526e82e3cc313a02fce215c2e4dd3d29
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-15 07:54:03 +00:00
Elliott Hughes
66b685ef3f Merge "debuggerd: remove maximum abort message length." 2018-04-14 16:17:14 +00:00
Treehugger Robot
bb266150fe Merge changes I78d2dc79,I6e2eaebe
* changes:
  lmkd: Fix usage of ro.lmk.kill_heaviest_task property
  lmkd: Rename is_go_device variable to better reflect its function
2018-04-14 05:59:27 +00:00
Treehugger Robot
2468b7623c Merge "adb: fix adb reverse when adbd has multiple transports." 2018-04-14 00:43:33 +00:00
Josh Gao
1cc7bd80a6 debuggerd: remove maximum abort message length.
Let the logging implementation be the imposer of limits.

Bug: http://b/64759619
Test: debuggerd_test
Change-Id: I8bc73bf2301ce071668993b740880224846a4e75
2018-04-13 17:34:20 -07:00
Treehugger Robot
95a37079f5 Merge "Add missing @addtogroup tags." 2018-04-13 23:50:42 +00:00
Suren Baghdasaryan
818b59b229 lmkd: Fix usage of ro.lmk.kill_heaviest_task property
lmkd should use ro.lmk.kill_heaviest_task property to select between
algorithms for victim selection. Set ro.lmk.kill_heaviest_task default
value to false in order to keep it compatible with previous versions
of lmkd (killing the heaviest task is a new mechanism).

Change-Id: I78d2dc79d9c54e636c26665605518d9c87b535b3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 23:24:24 +00:00
Suren Baghdasaryan
ff61afb002 lmkd: Rename is_go_device variable to better reflect its function
Rename is_go_device variable to low_ram_device to better reflect
its meaning and relation to ro.config.low_ram variable.

Change-Id: I6e2eaebe79cf2e6edf861f7c602e52a5b573ad0a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 23:24:09 +00:00
Treehugger Robot
b518418fbb Merge "lmkd: Add lmkd README file" 2018-04-13 22:29:49 +00:00
Dan Albert
55a76719e2 Add missing @addtogroup tags.
These NDK docs weren't in any groups, so they don't show up in the
new site.

Test: https://irina-dot-devsite.googleplex.com/ndk/reference/group/logging
Test: https://irina-dot-devsite.googleplex.com/ndk/reference/group/sync
Bug: http://b/77236573
Change-Id: I300f96585dec94359ecf96fbf39c6dc3ec4579e5
2018-04-13 14:49:41 -07:00
Suren Baghdasaryan
7e5dea82a5 lmkd: Add lmkd README file
Add README file providing lmkd overview and description for its
properties.

Change-Id: I30236dd4ccaa2b48c31dfb80b63f0b82b49b5744
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-04-13 21:36:44 +00:00
Josh Gao
44899eeb53 adb: fix adb reverse when adbd has multiple transports.
Plumb the transport that we received the adb reverse request on through
to reverse_service, instead of trying to get a unique transport on
devices that have multiple active transports (e.g. a device with USB
(even unplugged) connected via TCP).

Bug: http://b/37066218
Bug: http://b/71898863
Test: `echo foo | nc -l 12345 & adb reverse tcp:12345 tcp:12345; adb shell nc localhost 12345` on a device connected via TCP
Change-Id: Iae199ae787f2e344126bbcacca8544cfc9844a4c
2018-04-13 14:25:28 -07:00
Treehugger Robot
cd71fd5109 Merge changes Ida272d21,If3f29f9e,I7dc5258d,I55258c15,Ibad79770
* changes:
  adb: win32: cleanup winsock initialization.
  adb: win32: properly set EBADF in some functions.
  adb: partially clang-format sysdeps_win32.cpp.
  adb: implement adb_writev.
  adb: switch apacket payload to a type that doesn't initialize its contents.
2018-04-13 20:54:53 +00:00
Treehugger Robot
07de83831f Merge "init: use signalfd to catch SIGCHLD" 2018-04-12 22:49:27 +00:00
Treehugger Robot
ee1b5a605e Merge "Allow vendor-init-actionable for vold-related properties" 2018-04-12 22:33:03 +00:00
Tom Cherry
4396bb85da Merge "init: do not impose vendor_init restrictions on old vendor images" 2018-04-12 22:31:02 +00:00
Ryan Prichard
1325ec8cfb init: use signalfd to catch SIGCHLD
Previously, if init received too many SIGCHLD signals, then the write to
signal_write_fd could fail with EAGAIN. The handler tried to log the
EAGAIN error, and init deadlocked if the interrupted init process had
already acquired a logging-related lock.

Bug: b/77867680
Test: manual
Change-Id: Ief0b5e94d8517827a5a7d03773391ba3ba9447c4
2018-04-12 14:15:26 -07:00
Tom Cherry
a1dbeb8d33 init: do not impose vendor_init restrictions on old vendor images
Do not restrict vendor_init restrictions on vendor images that were
built before P, as they will not have the correct permissions.

Bug: 77732028
Test: test new devices and see vendor_init still works
Change-Id: I636a07b54fbfb248e1d1a68a8f3c4d047fd5a9e9
2018-04-12 10:17:45 -07:00
Treehugger Robot
183b575e78 Merge "storaged: lower capabilities in init" 2018-04-12 15:55:26 +00:00
Treehugger Robot
d652a9e231 Merge "Remove more semicolons at the end of namespaces" 2018-04-12 14:50:07 +00:00
Treehugger Robot
ffc325a3b2 Merge "storaged: update OWNERS" 2018-04-12 10:18:48 +00:00
Pirama Arumuga Nainar
90affce0c8 Remove more semicolons at the end of namespaces
These warnings are triggered by -Wextra-semi (and not -Weverything, as
incorrectly mentioned in I49b6e6af483e011632e6a34c0663c93e5c385aa6).
This warning is added to Hidl-generated libs.

To appease clang-format, this patch also fixes some extra newlines.

Test: Build
Change-Id: I63cf5d8ecba46ad87876ff21848bfff04b12ec6e
2018-04-11 23:14:13 -07:00
Treehugger Robot
53135a4772 Merge "fastboot: fix header_actual calculation" 2018-04-12 05:56:27 +00:00
Jaekyun Seok
00ef7d560c Allow vendor-init-actionable for vold-related properties
Bug: 75987246
Bug: 73871799
Test: succeeded building and tested with taimen
Change-Id: Ifec879f07705a52501757b58b1562a97c668b8b0
Merged-In: Ifec879f07705a52501757b58b1562a97c668b8b0
(cherry picked from commit 65ce3b2cd8)
2018-04-12 12:51:09 +09:00
Fernando Lugo
91dfaecca7 fastboot: fix header_actual calculation
Bug: 77920157
Test: fastboot boot $OUT/kernel
Change-Id: Ibe2f4b9a6476ac11937448e6547b5159af011633
Signed-off-by: Fernando Lugo <flugo@google.com>
2018-04-11 19:02:59 -07:00
David Anderson
3214731cc8 storaged: update OWNERS
Bug: N/A
Test: N/A
Change-Id: Ic3e3fbcb4c4357a286ef05feab68e65390e2eab3
2018-04-11 18:50:14 -07:00
Elliott Hughes
af15fbf9aa Merge "Build /vendor/bin/logwrapper too." 2018-04-11 22:14:28 +00:00
Treehugger Robot
1e4764e90c Merge "Add SIZEOF_MEMBER." 2018-04-11 21:56:25 +00:00
Josh Gao
2e93df2e14 adb: win32: cleanup winsock initialization.
Instead of doing it in 3 arbitrary functions, do it at startup always.

Test: wine adb_test.exe
Change-Id: Ida272d218aee6c331471250edce64d512d3b628a
2018-04-11 12:54:38 -07:00
Josh Gao
011ba4b9bf adb: win32: properly set EBADF in some functions.
Test: treehugger
Change-Id: If3f29f9ee586e29652e9709b3f594a1376ed4bb3
2018-04-11 12:54:38 -07:00
Josh Gao
64a63acba9 adb: partially clang-format sysdeps_win32.cpp.
clang-format some functions that I'm about to touch, but do it in a
separate commit to avoid making the actual changes unreadable.

Test: treehugger
Change-Id: I7dc5258d9ecc1c091d42311149d9e18ae483715b
2018-04-11 12:54:38 -07:00
Josh Gao
116aa0a4ad adb: implement adb_writev.
Change-Id: I55258c155d7b07368ebb45577b2e01ca804cf258
Test: adb_test
Test: python test_device.py
2018-04-11 12:54:36 -07:00
Josh Gao
1ce99576f0 adb: switch apacket payload to a type that doesn't initialize its contents.
Switch from using std::string as the type we use to hold our payload in
apacket to a custom reimplementation that doesn't zero initialize. This
improves bulk transfer throughput in the adb_benchmark microbenchmark
on walleye by ~20%.

Test: adb shell taskset f0 /data/benchmarktest64/adb_benchmark/adb_benchmark
Change-Id: Ibad797701eb1460c9321b0400c5b167b89b2b4d0
2018-04-11 12:54:07 -07:00