Commit graph

29296 commits

Author SHA1 Message Date
Steven Moreland
5011270225 Revert "Start hwservicemanager earlier."
This reverts commit 9e36331174.

Reason for revert: a DOA device

Bug: 36546734

Change-Id: I0456247d362fe43b8c37623d04432eb494f68f68
2017-03-24 06:05:41 +00:00
Elliott Hughes
561da6aa82 "Requested dump for tid XXX" message shouldn't be fatal.
This just means we were asked to dump, not that something necessarily went
wrong.

Bug: http://b/36191903
Test: builds
Change-Id: I5638b38f3a13081b1e971512f43238010febb59c
2017-03-23 23:04:27 -07:00
Keun-young Park
b0416c3dfc Merge "add kill all for shutdown_timeout of 0"
am: dd26e1a28c

Change-Id: Icea19092ec3743f045cb650d2810cc635bb58908
2017-03-24 05:21:05 +00:00
Treehugger Robot
dd26e1a28c Merge "add kill all for shutdown_timeout of 0" 2017-03-24 05:15:20 +00:00
Brian Carlstrom
e3c1d61a89 Merge "Fix spelling error in warning"
am: 79e0fb87eb

Change-Id: I0f4dabb3c2523bc0780cc2b5810272e19d115cbe
2017-03-24 04:54:04 +00:00
Treehugger Robot
79e0fb87eb Merge "Fix spelling error in warning" 2017-03-24 04:51:09 +00:00
Yongqin Liu
d0e63f4718 Merge "init: use read_file and write_file to implement do_copy builtin"
am: 7f0d15a6f2

Change-Id: Iab65e493213fb8e132afcaa990ea7304fded9d6a
2017-03-24 02:31:44 +00:00
Treehugger Robot
7f0d15a6f2 Merge "init: use read_file and write_file to implement do_copy builtin" 2017-03-24 02:26:14 +00:00
Tom Cherry
0da0d9e79b Merge "init: Prevent spin loop while waiting for exec or property"
am: c1ca1a8328

Change-Id: I591ac447da8d1a6f5db9e2aa48e30c80e0c5e631
2017-03-24 01:56:23 +00:00
Tom Cherry
4f117206a8 Merge "init: Remove superfluous error check"
am: 186edb1aef

Change-Id: Ia073b90dbe7ffd2443cf4d4fd183adb2223115c3
2017-03-24 01:54:38 +00:00
Keun-young Park
c13d89246d Merge "add clear log for reboot start / end"
am: 6e6eb48e71

Change-Id: I8c698e4ed808f8b5de5cd2e090af3b7b72623732
2017-03-24 01:54:25 +00:00
Treehugger Robot
c1ca1a8328 Merge "init: Prevent spin loop while waiting for exec or property" 2017-03-24 01:52:37 +00:00
Treehugger Robot
186edb1aef Merge "init: Remove superfluous error check" 2017-03-24 01:51:31 +00:00
Treehugger Robot
6e6eb48e71 Merge "add clear log for reboot start / end" 2017-03-24 01:50:57 +00:00
Keun-young Park
aa08ea458a add kill all for shutdown_timeout of 0
- If it is explicitly set to 0, active processes can block
  umount completely. Safe to kill all processes and umount.
- also add additional sync after emulated partition umount
  as that can change /data partition files

bug: 36004738
Test: many reboots

Change-Id: I6c9b07b6fdece44b9caec4e45ecf26a20d0eb96e
2017-03-23 18:01:24 -07:00
Yongqin Liu
82bac0de6d init: use read_file and write_file to implement do_copy builtin
this will make the implementation more cleaner,
and has error message output when failed on some operations

also add the O_TRUNC flag explicitly for the open function
called in write_file.

And add more test on read_file and write_file functions

Test: manual with hikey

Change-Id: Ifc1086a20e85db6980b497b1150a8a7952e672d6
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2017-03-24 08:34:25 +08:00
Tom Cherry
77ddcd5a3f init: Prevent spin loop while waiting for exec or property
Currently, when we are waiting for an exec service or a property, if
there are either any services to be restarted or any more commands to
be run, we set the epoll_timeout to handle these events.  However, we
don't actually restart and processes or execute any commands while
waiting, so this essentially turns this waiting into a spin loop,
particularly in the common case of having more commands to execute,
where epoll_timeout is set to 0.

The change only sets epoll_timeout if we're not waiting.

Note that the only way to stop waiting for an exec service or a
property is for a signal or property to be delivered to init, which
happens through the epoll fds, so it's safe to indefinitely wait for
epoll to return.

Test: Boot bullhead
Change-Id: Iae3b217eb28182038b464fd39df8e7d27b5e23ff
2017-03-23 17:17:54 -07:00
Keun-young Park
3cd8c6f912 add clear log for reboot start / end
- hard to tell if reboot itself is problem or not.

bug: 36004738
Test: reboot and check last kmsg
Change-Id: I0de0e10eac9ac336cc352ddee22a4a1d9e46cb79
2017-03-23 16:55:24 -07:00
Tom Cherry
9bdddd713a init: Remove superfluous error check
new doesn't return nullptr in C++, so there is no need to check for
it.

Test: Boot bullhead
Change-Id: I666afb1ba7082dd8d5b9911605b7e20a5561b49e
2017-03-23 16:44:42 -07:00
Mikhail Lappo
13d779d6b0 Merge "Possible null pointer miss on realloc"
am: 9bbbaf1480

Change-Id: I8dba5053954efd4374aecce98771b3348ffd073b
2017-03-23 23:31:42 +00:00
Treehugger Robot
9bbbaf1480 Merge "Possible null pointer miss on realloc" 2017-03-23 23:26:40 +00:00
Josh Gao
ff468dce4c adb: allow symlinks to directories in directory_exists.
Bug: http://b/36516955
Test: python test_device.py
Change-Id: Ie81e87aac3b157182bde0955bdba23d48bfea873
2017-03-23 16:19:55 -07:00
Christopher Ferris
5ea2c1f20a Test unwinding through a signal handler.
Also make backtrace_testlib.c C++.

Bug: 34468756
Test: Ran new unit test on host x86, host x86_64, angler (32 bit, 64 bit),
Test: fugu.
Change-Id: Ia810f596c2df56cd56e8ab17e6c19be0c48d737f
2017-03-23 16:16:02 -07:00
Mikhail Lappo
26464914fe Possible null pointer miss on realloc
Realloc can return null pointer which
will cause a crash then. Patch introduces
check for controlled 'die' in case memory is
not available

Change-Id: I279028339b1fe756d8a511834e164e59d4cab110
2017-03-23 22:41:14 +01:00
Elliott Hughes
0cb8c69bf2 Merge "Switch "adb sideload" over to lseek/read."
am: c0ca39c41a

Change-Id: Ia50ff02ed1e11f6bac3d5ef2e5d09c03fa6f216c
2017-03-23 21:21:34 +00:00
Elliott Hughes
c0ca39c41a Merge "Switch "adb sideload" over to lseek/read." 2017-03-23 21:06:51 +00:00
Adam Lesinski
7cfe1d69b0 Merge "libziparchive: fix mac os breakage"
am: 390f3b364c

Change-Id: Ib7e882634636f74092487766f4abc8d969b0468a
2017-03-23 21:05:03 +00:00
Treehugger Robot
390f3b364c Merge "libziparchive: fix mac os breakage" 2017-03-23 20:58:58 +00:00
Mark Salyzyn
e1d2e3436e Merge "libcutils: fs_config() add check /odm/etc/fs_config_*"
am: 1e62880f70

Change-Id: Iad391f827bcb33cc03cb6fb8f602c48f1102d431
2017-03-23 19:59:45 +00:00
Treehugger Robot
1e62880f70 Merge "libcutils: fs_config() add check /odm/etc/fs_config_*" 2017-03-23 19:54:14 +00:00
Jeff Vander Stoep
bfc4da8369 Merge "Create dir in /data for vendor customization"
am: c39a31f002

Change-Id: Icc41ac9e849afd0250944ff8cc3b00e3b78ed52b
2017-03-23 19:43:21 +00:00
Treehugger Robot
c39a31f002 Merge "Create dir in /data for vendor customization" 2017-03-23 19:36:52 +00:00
Adam Lesinski
b02d690336 libziparchive: fix mac os breakage
Add ftruncate64 to utils/Compat.h definitions for mac.

Change-Id: I82cb46927be911e867b606f4f4429a5e1b1987f7
Test: builds on mac
2017-03-23 12:02:09 -07:00
Brian Carlstrom
6d1da7c607 Fix spelling error in warning
Test: m -j32 -k
Bug: 36450628
Change-Id: I0f6463f3de3dcf45f396c7f406f8c1d6b79bf7f9
2017-03-23 11:29:57 -07:00
Adam Lesinski
a41597ba0e Merge "libziparchive: Add ability to backup in ZipWriter"
am: 0e19795a62

Change-Id: Id15ab4bf8bd40640d2a301f0464230b620e8b603
2017-03-23 18:07:27 +00:00
Treehugger Robot
0e19795a62 Merge "libziparchive: Add ability to backup in ZipWriter" 2017-03-23 17:59:47 +00:00
Jeff Vander Stoep
61efb0dab8 Create dir in /data for vendor customization
Vendor owns /data/vendor.

HAL data must go in /data/vendor/hardware/.

Bug: 34980020
Test: build and boot AOSP Marlin. Observe /data/vendor and
      /data/vendor/hardware exist and are empty.
Change-Id: I6fe96e3c76a10a5eb480ba10e10d4d006de56c12
2017-03-23 10:30:34 -07:00
Fernando Lugo
69482cc127 Merge changes I0ad349f2,I0f528cf1
am: 27a091d4a1

Change-Id: Ifac25d45d429da636dbcac608b865163effffc93
2017-03-23 16:55:45 +00:00
Fernando Lugo
27a091d4a1 Merge changes I0ad349f2,I0f528cf1
* changes:
  fs_mgr: allow using legacy A/B suffix
  fs_mgr: adapt to new A/B support
2017-03-23 16:52:51 +00:00
Christopher Ferris
ab481277f1 Merge "Initialize si_code in siginfo."
am: 446538b5ad

Change-Id: I0b51f6d4351f0f918ac4f78ba24400271505b74e
2017-03-23 16:45:42 +00:00
Christopher Ferris
446538b5ad Merge "Initialize si_code in siginfo." 2017-03-23 16:38:11 +00:00
Narayan Kamath
99e39e845b Merge "logwrapper: add a benchmark for android_fork_execvp_ext"
am: 1620c51f75

Change-Id: Ib0e80fda748782f52deedcdf699304a268002096
2017-03-23 11:59:56 +00:00
Treehugger Robot
1620c51f75 Merge "logwrapper: add a benchmark for android_fork_execvp_ext" 2017-03-23 11:56:10 +00:00
Narayan Kamath
1e7180f598 Merge "Logwrapper: Remove unused support for input / output processing."
am: fa339a4f5c

Change-Id: I118a761301df851ae21618a5097904ba84d654a1
2017-03-23 10:07:20 +00:00
Narayan Kamath
fa339a4f5c Merge "Logwrapper: Remove unused support for input / output processing." 2017-03-23 10:04:26 +00:00
Narayan Kamath
f704193384 logwrapper: add a benchmark for android_fork_execvp_ext
Current results on an aosp_angler (32 bit) :

Benchmark                           Time           CPU Iterations
-----------------------------------------------------------------
BM_android_fork_execvp_ext   15019207 ns    1002131 ns        700

Test: android_fork_execvp_ext_benchmark

Change-Id: I3d4339ff5cbb9a641cbb14f0b55d2b5fc18cdfde
2017-03-23 10:02:21 +00:00
Steven Moreland
0a85db775e Merge "Start hwservicemanager earlier."
am: fcd509298d

Change-Id: I3abfc8e790b57f97503e507702aa184ae9fe0dca
2017-03-23 03:47:01 +00:00
Treehugger Robot
fcd509298d Merge "Start hwservicemanager earlier." 2017-03-23 03:39:40 +00:00
Fernando Lugo
ce9d7db979 fs_mgr: allow using legacy A/B suffix
Right now all platforms supporting A/B have not fixed
androidboot.slot_suffix kernel command line parameter. To avoid breaking
all those platform allow using legacy support bootloaders get fixed.

Bug: 36533366
Test: boot
Change-Id: I0ad349f262d0b7f4897f3e184cb053b1440b2d5b
Signed-off-by: Fernando Lugo <flugo@google.com>
2017-03-22 19:22:25 -07:00
Fernando Lugo
d1dcedd3fb fs_mgr: adapt to new A/B support
In the new A/B partition support suffixes don't have "_". So, fix fs_mgr
code that assumes it has "_"

Bug: 36533366
Test: boot
Change-Id: I0f528cf1e8fecacb1b4ae34f6dc42e18ebe777bb
Signed-off-by: Fernando Lugo <flugo@google.com>
2017-03-22 19:21:56 -07:00