Commit graph

18974 commits

Author SHA1 Message Date
Hung-ying Tyan
dc738eaf15 Allow paths of .rc files to be specified at mount_all
In current implementation, the mount_all command imports all .rc files
under /{system,vendor,odm}/etc/init/ after mouting filesystems is complete.
There's a need from ODMs to import different .rc files under different boot
modes (e.g., factory mode). Without this support, they will have to fiddle
around the init implementation.

This commit makes mount_all import the .rc files/directories specified
as additional arguments. If no path is given, the original ones are applied
the same way as the current implementation.

BUG: 26549689
Change-Id: Ie67ce13dde4c440ff8bf534826bc392c882a433f
2016-01-21 09:35:43 +08:00
Christopher Ferris
13655cdc77 Merge "Modify tests to use executable memory." 2016-01-16 17:44:18 +00:00
Christopher Ferris
61c48ac854 Modify tests to use executable memory.
The check_unreadble_elf_* tests only create a readable map. I changed
libunwind to disallow unwinding through non-executable maps, so make
the maps executable too.

Bug: 26589772
Change-Id: Idbe6426ac4d3243779b819c8f1aebdcdacb0669f
2016-01-15 16:08:58 -08:00
Josh Gao
7db2cb67be Merge "adb: tag fatal, fatal_errno with printf attribute." 2016-01-15 23:51:05 +00:00
Josh Gao
56e9bb9bd6 adb: tag fatal, fatal_errno with printf attribute.
Also, fix bugs that this uncovered. In particular, the sysdeps_win32
FATAL macro would only print __FUNCTION__.

Change-Id: I6307ec9749edec21b4fee192e135a86ec445c84b
2016-01-15 15:25:31 -08:00
Josh Gao
3472410eac Merge "Increase the maximum shell command length to 4096ish." 2016-01-15 23:06:37 +00:00
Josh Gao
7e6683ce40 Increase the maximum shell command length to 4096ish.
The actual maximum length will depend on the version of the shell
protocol being used, and any additional parameters being passed through
(e.g. TERM=xterm-256color). This should be able to be raised to 64K for
devices with commit 3d2904c (L-MR1 and above), but that'll require some
plumbing.

Bug: http://b/20467103
Change-Id: Idf0c46af5b18b854110aba58df13a53297d2475f
2016-01-15 15:02:19 -08:00
Dan Albert
422359aad4 Merge "Fix a couple sign-comparison warnings." 2016-01-15 21:29:58 +00:00
Christopher Ferris
9162c1496d Merge "Add a ZipArchiveStreamEntry class." 2016-01-15 21:00:46 +00:00
Dan Albert
bac7bb5c16 Fix a couple sign-comparison warnings.
Bug: http://b/26523949
Change-Id: Id33146b5544147945fee3f14f7f72f39bae449f6
2016-01-15 12:18:14 -08:00
Josh Gao
a590596dca Merge "debuggerd: fix debug.debuggerd.wait_for_gdb." 2016-01-15 19:32:08 +00:00
Josh Gao
c362c45949 debuggerd: fix debug.debuggerd.wait_for_gdb.
Bug: http://b/26513486
Change-Id: I01c28ce810a49f8a4e0e2a86c7d018d95f9617c8
2016-01-15 11:31:17 -08:00
Josh Gao
1bf7000033 Merge "debuggerd: fix several bugs caused by fork/setuid change." 2016-01-15 19:30:03 +00:00
Josh Gao
7c89f9e955 debuggerd: fix several bugs caused by fork/setuid change.
Previously, we weren't PTRACE_ATTACHing to all of the threads of a
process, and we were also trying to do it after forking and dropping
privileges. This patch ensures that all ptrace attaching/detaching
happens in one place, before forking/exiting respectively.

Bug: http://b/26443860
Bug: http://b/26436605
Bug: http://b/26436486
Change-Id: Id94e0c1d9d56c051d0dd281d895aaa3285079198
2016-01-14 15:06:37 -08:00
Christopher Ferris
e6884ce56f Add a ZipArchiveStreamEntry class.
This allows someone to stream the data out of a zip archive
instead of extracting to a file or to memory.

Included in this change is a small cleanup of the makefile.

Change-Id: I8b679a679c3502ff4ea0bc4f9e918303657fa424
2016-01-14 12:30:20 -08:00
Steve Fung
047597b3fc Merge "crash_reporter: Remove udev collector from Android build" 2016-01-14 00:16:21 +00:00
Dimitry Ivanov
ebe04a9b89 Merge "Add libRS.so to the list of public libraries" 2016-01-13 23:27:20 +00:00
Dimitry Ivanov
cdb6fee17c Add libRS.so to the list of public libraries
Bug: http://b/26509995
Change-Id: I8c0ae3629928171d229a901cfc997780665e3ae8
2016-01-13 15:19:35 -08:00
Mark Salyzyn
7b7b2da6b8 Merge "logd: prune maintain per-id watermark" 2016-01-13 20:23:28 +00:00
Elliott Hughes
7a6cb3063c Merge "Toolbox: |ps -t| now correctly displays the USER for threads" 2016-01-12 23:07:12 +00:00
Phani (Gargey) Avadhanam
6268d4c057 Toolbox: |ps -t| now correctly displays the USER for threads
use tid to display thread information

Bug: https://code.google.com/p/android/issues/detail?id=198564
Bug: http://b/26470660
Signed-off-by: "Phani (Gargey) Avadhanam" <pgargey@codeaurora.org>
Change-Id: Ife8ce59d7b6eb6906ab39acebea18c7aee50339a
2016-01-12 15:06:09 -08:00
Mark Salyzyn
ae6aa1f1ed Merge "logd: wrap timed entry too early, timeout immediately" 2016-01-12 21:57:50 +00:00
Tom Cherry
b45f8179be Merge "Remove special case handling of "ro." properties permissions" 2016-01-12 20:36:32 +00:00
Mark Salyzyn
27460366e8 Merge "logd: unaligned access on security buffer" 2016-01-12 19:30:13 +00:00
Mark Salyzyn
4690640760 logd: unaligned access on security buffer
Bug: 26485626
Change-Id: I990447ca59982bb2de15decda575fd0e2838b5ed
2016-01-12 10:09:31 -08:00
Elliott Hughes
e4b332c7e4 Merge "libnetutils: Check socket() return value" 2016-01-12 04:46:37 +00:00
Steve Fung
c490e0fe98 crash_reporter: Remove udev collector from Android build
Currently one of the udev collector tests is failing due to the lack
of gzip on the device.  Since we don't have gzip nor udev in Android builds,
remove the udev collector (and tests) from Android builds.

See http://r.android.com/184708 for discussion on removing the udev
collector completely from the source.

Bug: 25779348
Test: `/data/nativetest/crash_reporter_tests/crash_reporter_tests` passes

Change-Id: I883359ac8219f2e1fa6a78927433dbc0be295fe7
2016-01-12 01:46:51 +00:00
Mark Salyzyn
507eb9fec2 logd: prune maintain per-id watermark
Without this change LogBuffer::prune and LogBuffer::erase
contributes 16.7% and 1.79% respectively. With this change,
they contributes 3.06 and 2.33% respectively. Pruning is
performed roughly 1 in every 255 log entries, a periodic
tamer latency spike.

Bug: 23685592
Change-Id: I6ae1cf9f3559bca4cf448efe8bcb2b96a1914c54
2016-01-11 14:46:51 -08:00
Tom Cherry
c787cf291a Remove special case handling of "ro." properties permissions
Currently, properties that begin with "ro." are special cased to skip
over the "ro." part of the prefix before matching with entries in
property_contexts.  This is not strictly needed however and it is
causing complications with the separated prop files work from Bug
21852512, so it is now removed.

Bug 26425619

Change-Id: I3cd14fa2176f96b3931e5f6a50c4a7bcd3af3da6
2016-01-11 14:00:40 -08:00
Dimitry Ivanov
cd60e4bdd6 Merge "Make libwebviewchromium_plat_support.so public" 2016-01-11 17:59:30 +00:00
Jorge Lucangeli Obes
6fe9930722 Merge "adbd: Depend only on libminijail." 2016-01-08 23:59:32 +00:00
Elliott Hughes
46798ecd17 Merge "Improve dumb terminal support (emacs is dumb)." 2016-01-08 23:53:30 +00:00
Elliott Hughes
d68ad69d1d Improve dumb terminal support (emacs is dumb).
Bug: http://b/26444032
Change-Id: Iaff4b09b613fd30ab7c4c73e096da34f37e0de07
2016-01-08 15:47:07 -08:00
Jorge Lucangeli Obes
fd3c12d224 Merge "adbd: Remove check for set_supplementary_gids." 2016-01-08 22:49:00 +00:00
Alex Vakulenko
c480b8e6dd Merge "metricsd: Split out the trait name from the command name" 2016-01-08 22:00:35 +00:00
Alex Vakulenko
ba95a94e3e metricsd: Split out the trait name from the command name
weaved::Service::AddCommandHandler() and SetStateProperty() now
expect the trait name as a separate argument.

BUG: 26443877
Change-Id: I2ad587d984375a7ebd70c7dc804b446b66d6be1b
2016-01-08 13:51:15 -08:00
Alex Vakulenko
b50bc6b360 Merge "metrics: Switch to use Binder interface to weaved" 2016-01-08 21:50:07 +00:00
Jorge Lucangeli Obes
218eb7c820 adbd: Depend only on libminijail.
With https://android-review.googlesource.com/#/c/195460,
adbd can depend only on libminijail, without having to include its
dependencies.

Bug: 26099611
Change-Id: I2312d8584dda88b4a4619d3100d0983fa2833ba5
2016-01-08 13:33:01 -08:00
Colin Cross
5e19382e1c Merge "debuggerd_test: provide stub selinux/android.h" 2016-01-08 20:49:47 +00:00
Colin Cross
710056efb8 Merge "libinit: depend on libselinux" 2016-01-08 20:49:42 +00:00
Bertrand Simonnet
f9f4ee8b72 Merge "init: Allows shutting down cleanly." 2016-01-08 20:48:34 +00:00
Dimitry Ivanov
90bf68e8d1 Make libwebviewchromium_plat_support.so public
Add libwebviewchromium_plat_support.so to the list
of public libraries.

Bug: http://b/26461431
Change-Id: I958a1182198bf59d9b6fc818953212ce505d6bdd
2016-01-08 12:35:38 -08:00
Bertrand SIMONNET
b7e03e82b8 init: Allows shutting down cleanly.
When ro.build.shutdown_timeout is set, init will send a SIGTERM signal to
all services on reboot. The normal shutdown process will continue once
all services have exited or after the shutdown timeout
(ro.build.shutdown_timeout).

If ro.build.shutdown_timeout is not set, we assume a 0s timeout.

Bug: 26216447
Test: manual: Ask to reboot. All services exit cleanly.

Change-Id: If921f6e8d87211e500ac9fa86f3e1eabe02d18cf
2016-01-08 11:12:15 -08:00
Jorge Lucangeli Obes
fd79a5d9c1 adbd: Remove check for set_supplementary_gids.
With https://android-review.googlesource.com/#/c/195400, Minijail will
check for this failure so there's no need to do it here, which allows
to simplify the code.

Bug: 26099611
Change-Id: I7c876fdcab874ed403f82bdd5a4048c0f1e5db58
2016-01-08 10:56:20 -08:00
Elliott Hughes
19616ce100 Merge "init.rc: Reland "mkdir /data/misc/vold"" 2016-01-08 17:12:53 +00:00
Yu Ning
c1149ff0c3 init.rc: Reland "mkdir /data/misc/vold"
Creation of /data/misc/vold was first introduced by commit 25775e8. It
then got reverted, probably inadvertently, by:

 commit 2e24bcfdce
 Author: Paul Lawrence <paullawrence@google.com>
 Date:   Fri May 22 18:31:55 2015 +0000

     Revert "Set up crypto for user directories in init."

This folder is required by vold. In its absence, if one tries to format
an SD card as internal storage, an error will occur, with the following
message printed to logcat:

 01-08 06:31:48.389  1002  1069 E vold    : Failed to persist key

Restoring /data/misc/vold fixes this bug.

This fix has been verified on the emulator, which currently does not
allow its virtual SD card to be adopted, but another CL will be uploaded
to enable that.

Change-Id: Ibb87ee821630a038a6f9b7b6a9da50fe03ca690d
Signed-off-by: Yu Ning <yu.ning@intel.com>
2016-01-08 14:51:32 +08:00
Alex Vakulenko
53ca76f2f3 metrics: Switch to use Binder interface to weaved
Now that weaved provides a binder interface for its IPC, switch
to using it instead.

BUG: 23782171
Change-Id: Ic3c485f99580fe41e287eaf238f033149787f181
2016-01-07 16:20:04 -08:00
Mark Salyzyn
0157097845 logd: wrap timed entry too early, timeout immediately
Bug: 26447386
Change-Id: I8d5588831f558061ef21b2a5aeedc865e9ae4cc7
2016-01-07 15:13:14 -08:00
Bertrand Simonnet
a649a7df15 Merge "Fix documentation." 2016-01-07 01:22:23 +00:00
Bertrand SIMONNET
146360b4a6 Fix documentation.
This fixes the documentation for UploadService and the README file:
* stop mentioning Chrome OS as we forked the code.
* update the histogram declaration workflow. It is not tied to Chrome's
  histograms.xml file anymore.
* update the architecture explanation of metricsd. We split
  metrics_daemon into two daemons and are now using binder to log
  metrics.
* convert README to markdown to make it prettier when viewed in gitiles.

Bug: 26314417

Change-Id: I1e492f1211c1784e65dd4d3e473bb9aacefc3b5d
2016-01-06 17:19:30 -08:00