Commit Graph

38600 Commits

Author SHA1 Message Date
Tom Cherry 7b649a5b50 Merge "init: add host side parser for init"
am: 49fd480ede

Change-Id: Idf901f1b3094f5ff3f3a3886f1dc72157282ee17
2018-03-01 00:16:28 +00:00
Tom Cherry 49fd480ede Merge "init: add host side parser for init" 2018-03-01 00:04:49 +00:00
Josh Gao 2776845aa5 adb: switch over to Android.bp.
Rearrange some files while we're doing this.

Bug: http://b/71721338
Test: manually ran adb on windows
Change-Id: Ie47bda82279e4b9521505ad0353bf9ef649fc7d7
2018-02-28 15:29:50 -08:00
Josh Gao 9ba182e3bb Merge "adb: add a way to make the server intentionally leak."
am: 1ac7150590

Change-Id: I4765b5726985555c5c7b325da2b779c7f1687dc0
2018-02-28 23:07:50 +00:00
Treehugger Robot 1ac7150590 Merge "adb: add a way to make the server intentionally leak." 2018-02-28 22:56:30 +00:00
Josh Gao e2176118f4 adb: add a way to make the server intentionally leak.
Add a way to test LeakSanitizer with the server by adding an
environment variable that intentionally leaks.

Test: ASAN_OPTIONS=detect_leaks=1:leak_check_at_exit=1 ADB_LEAK=1 adb server nodaemon
Change-Id: I7255d45335fa009dc9e5de99dff67af52bd70e06
2018-02-28 14:16:14 -08:00
Colin Cross ab9ca8beb5 Merge "Make memunreachable_binder_test suitable for VTS"
am: c8a22bc1af

Change-Id: Ia56784ec3ec783a5d0ff610104a944a3ba18e461
2018-02-28 19:19:16 +00:00
Colin Cross c8a22bc1af Merge "Make memunreachable_binder_test suitable for VTS" 2018-02-28 19:11:42 +00:00
Tom Cherry de6bd50d42 init: add host side parser for init
Create a host side parser for init such that init rc files can be
verified for syntax correctness before being used on the device.

Bug: 36970783
Test: run the parser on init files on host

Change-Id: I7e8772e278ebaff727057308596ebacf28b6fdda
2018-02-28 10:45:45 -08:00
Luis Hector Chavez 677288c80a Merge "Change the remount command to be more container-friendly"
am: d24c8484c8

Change-Id: I878aa9f99481ba1cc2b358d163e6a396ef7c39a9
2018-02-28 17:00:15 +00:00
Treehugger Robot d24c8484c8 Merge "Change the remount command to be more container-friendly" 2018-02-28 16:48:37 +00:00
Tom Cherry 1748e6f9a0 Merge "libprocessgroup: remove legacy C string handling and build for host"
am: 304dacae8a

Change-Id: Ib977b81965bbf6f9186606a267ef96f9e140e15c
2018-02-28 16:30:30 +00:00
Tom Cherry 304dacae8a Merge "libprocessgroup: remove legacy C string handling and build for host" 2018-02-28 16:22:09 +00:00
Dan Willemsen 3cfc767032 Merge "Mark crash_dump.policy as not supported on mips"
am: c0d4786989

Change-Id: I93451539cbfc92e50cbef697983d5d38eb3923bf
2018-02-28 03:21:53 +00:00
Treehugger Robot c0d4786989 Merge "Mark crash_dump.policy as not supported on mips" 2018-02-28 03:07:21 +00:00
Colin Cross 51e6c252c4 Make memunreachable_binder_test suitable for VTS
Link statically against libmemunreachable to avoid runtime
dependency on libmemunreachable.so.
Provide a better error when run as non-root.
Rename the test to MemunreachableBinderTest.
Add comments explaining the test sequence.

Bug: 28275695
Test: memunreachable_binder_test
Change-Id: Iddfba636205b7ca3ad31a6ba2c4e85abadd32d0d
2018-02-27 18:29:18 -08:00
Josh Gao 2c1b3e9761 Merge changes I0783be05,Id8178913
am: 09d5e258ef

Change-Id: I611aab78988a959d3660c09fd5854e4f657e40b4
2018-02-28 01:41:42 +00:00
Josh Gao 09d5e258ef Merge changes I0783be05,Id8178913
* changes:
  adb: allow reentrant calls to fdevent_run_on_main_thread.
  adb: stop using quick_exit.
2018-02-28 00:14:58 +00:00
Dan Willemsen e2b6cd28f2 Mark crash_dump.policy as not supported on mips
The recent change to detect missing source files broke reading makefiles
for mips, since this didn't specify a source file.

Bug: 73904572
Test: lunch aosp_mips-eng; m nothing
Test: lunch aosp_arm-eng; m crash_dump.policy
Test: lunch aosp_arm64-eng; m crash_dump.policy
Test: lunch aosp_x86-eng; m crash_dump.policy
Test: lunch aosp_x86_64-eng; m crash_dump.policy
Change-Id: I28864b5af59267f1ab83084128f2c59b04039374
2018-02-27 15:35:11 -08:00
Josh Gao e39ccd3cbd adb: allow reentrant calls to fdevent_run_on_main_thread.
Previously, reentrant calls to fdevent_run_on_main_thread would
deadlock.

Test: adb_test on host
Change-Id: I0783be0558dcaf61ddbe76d13ac6917fc2de0be0
2018-02-27 14:50:07 -08:00
Josh Gao d51c6df1ef adb: stop using quick_exit.
We don't actually need to use quick_exit to avoid calling static
destructors, since we have -Wexit-time-destructors to guarantee we
don't actually have any, and this precludes the use of asan's exit time
leak checking, so switch back to atexit/exit.

Test: ASAN_OPTIONS=detect_leaks=1:leak_check_at_exit=1 adb server nodaemon with a manually inserted leak
Change-Id: Id8178913f64cb02c820c5073351369a9e4d8c74d
2018-02-27 14:50:07 -08:00
Luis Hector Chavez 0db4b7a95b Change the remount command to be more container-friendly
Passing in MS_REMOUNT | MS_BIND tells the kernel to only remove the
MS_RDONLY flag and keep all the other flags the same. This is also the
only kind of remount that is allowed in Linux containers (to be more
precise, within user namespaces).

This change also attempts to always run the remount command when dealing
with /, since containers will almost always run a loop device, and since
the number of the device changes, it is not convenient to put it in the
fstab. Plus, the container won't have permission to modify it, but might
be able to perform the remount.

Bug: 72178046
Test: `adb remount` works in both sailfish and Chrome OS
Change-Id: I9e8ec8afcd57f67875a312824667768b3aa89faa
2018-02-27 14:37:26 -08:00
Tom Cherry 574a081623 libprocessgroup: remove legacy C string handling and build for host
Bug: 36970783
Test: kill zygote and see that its children die correctly
Change-Id: I1b0e9a9cdb834a000fec82323d690e3bd288692d
2018-02-27 14:12:19 -08:00
Erik Kline c4a42dd62d Merge "EndsWith *suffix*"
am: 73664df55e

Change-Id: I7c2a04e4620ecbf1b1e539e5b6e31c1802833d51
2018-02-27 16:47:36 +00:00
Treehugger Robot 73664df55e Merge "EndsWith *suffix*" 2018-02-27 16:39:43 +00:00
Erik Kline b154d18d11 EndsWith *suffix*
Possibly an old copy and paste error.

Test: built
Change-Id: Ie86203d65b4021ed4b787d2330729ab0b1d73e9d
2018-02-27 16:12:55 +09:00
Jaegeuk Kim 81e692c04b Merge "fs_mgr: add sysfs_path=%s to indicate a location of sysfs entry"
am: badaa56639

Change-Id: Ia26e3e4672eb5a4c3c243c7a56f505fe61f8e9c1
2018-02-27 06:28:15 +00:00
Jaegeuk Kim badaa56639 Merge "fs_mgr: add sysfs_path=%s to indicate a location of sysfs entry" 2018-02-27 06:20:23 +00:00
Jaegeuk Kim efd3b9c28f fs_mgr: add sysfs_path=%s to indicate a location of sysfs entry
This patch adds sysfs_path=%s in fstab to get the sysfs entry path.
One example is that vold is able to conduct UFS-specific operations given the
below fstab entry.

/dev/block/bootdevice/by-name/userdata  /data f2fs  noatime,nosuid,nodev,discard
  latemount,wait,check,fileencryption=ice,quota,formattable,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc

Bug: 63264275
Bug: 68721792
Change-Id: I5097873893948f12296ac5eaa0c2a59a6e6dd9e1
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2018-02-26 15:47:09 -08:00
Tom Cherry d59fed22c5 Merge "init: Reboot after timeout passes during reboot"
am: 89063827b1

Change-Id: I8db8b48e25b086c341787fbde2d4a2c7d922001d
2018-02-26 17:52:33 +00:00
Tom Cherry 89063827b1 Merge "init: Reboot after timeout passes during reboot" 2018-02-26 17:41:11 +00:00
Steven Moreland f664fbd336 Merge "libutils: remove subdirs"
am: 876d9c3159

Change-Id: Ic160753c87d7172f64c0498b5a0b9f4616c5b86c
2018-02-24 00:58:01 +00:00
Josh Gao 4d74066425 Merge "adb: switch apacket over to a std::string payload."
am: 581a4ceb00

Change-Id: I1a4504b25b189d984f29aaf2b350a473679d1a2e
2018-02-24 00:57:30 +00:00
Treehugger Robot 876d9c3159 Merge "libutils: remove subdirs" 2018-02-24 00:42:15 +00:00
Treehugger Robot 581a4ceb00 Merge "adb: switch apacket over to a std::string payload." 2018-02-24 00:40:35 +00:00
Steven Moreland 9571234e22 libutils: remove subdirs
no longer used in Android

Test/Bug: none

Change-Id: I155d5ade02527bf47893a8bf8bcbb07b0aae53d8
2018-02-23 14:44:22 -08:00
Elliott Hughes 31d17cf622 Merge "Document property expansion."
am: a4644c9bc4

Change-Id: I3dfaee7ccfcbe77cc5ae7cb02bf51551cbcc2f4b
2018-02-23 21:28:04 +00:00
Treehugger Robot a4644c9bc4 Merge "Document property expansion." 2018-02-23 20:41:36 +00:00
Josh Gao 47bee24270 Merge "debuggerd_fallback: don't recursively abort."
am: e0068770e3

Change-Id: Icd587c111d9b1713fdad5622971008b4437b1719
2018-02-23 20:11:48 +00:00
Treehugger Robot e0068770e3 Merge "debuggerd_fallback: don't recursively abort." 2018-02-23 19:58:59 +00:00
David Srbecky c6f7a32ada Merge "Modify the offline handling interface."
am: bc8446992f

Change-Id: If934f7a4c8244544a2f7dfa71d213122f5d37137
2018-02-23 19:42:42 +00:00
David Srbecky bc8446992f Merge "Modify the offline handling interface." 2018-02-23 19:25:02 +00:00
Tom Cherry c9fec9d2be init: Reboot after timeout passes during reboot
There is currently a timeout for reboot, however if the system gets
stuck, particularly during file system operations, there is no safety
mechanism that guarantees the system will still reboot.

This change does all of the optional reboot steps in a separate thread
and waits for this thread with a timeout, such that if the reboot
steps get hung, the system is guaranteed to still reboot.

This is specific to 'reboot'.  Shutdown continues to run unbounded to
run fsck.

Bug: 72781711
Test: Reboot devices hitting and not hitting this timeout
Change-Id: Id5e1b3693bab00602177e28b9b662e1499c32961
2018-02-23 11:03:01 -08:00
Elliott Hughes 7e469ce60c Document property expansion.
Bug: N/A
Test: N/A
Change-Id: I54b9d2d08d98d83060b54981b1c5dc9660b93e8f
2018-02-23 10:40:53 -08:00
David Srbecky 1f2daf1b79 Merge "Adjust DEX file reading to follow layout changes in ART."
am: 8fbdbba9f5

Change-Id: I550ee4892c6c9ec83695ea861af9953fdb5c53fb
2018-02-23 18:05:06 +00:00
David Srbecky 8fbdbba9f5 Merge "Adjust DEX file reading to follow layout changes in ART." 2018-02-23 17:53:23 +00:00
Robert Sesek 19fafd1ae9 Merge "Remove fs_config entries for webview_zygote."
am: 47354e76eb

Change-Id: I9faa6c9c4a83ba6d214e37155ebd84b724bc325f
2018-02-23 17:33:07 +00:00
Christopher Ferris 432981b905 Modify the offline handling interface.
- Add a new function Backtrace::UnwindOffline that takes the stack data.
- Modify BacktraceMap::CreateOffline so it doesn't take the stack data.
  This makes it easier to reuse the map object created this way.

Reusing the map object increases simpleperf speed (unwinds per second) by 50%.

Test: backtrace_test libunwindstack_test
Change-Id: I90cfbae9e50d95d8a0e3cd394b33ba36d65d45f7
2018-02-23 09:14:06 -08:00
Treehugger Robot 47354e76eb Merge "Remove fs_config entries for webview_zygote." 2018-02-23 17:12:17 +00:00
Josh Gao 70adac6a8a debuggerd_fallback: don't recursively abort.
Calls to abort() will always result in our signal handler being called,
because abort will manually unblock SIGABRT before raising it. This
can lead to deadlock when handling address space exhaustion in the
fallback handler. To fix this, switch our mutex to a recursive mutex,
and manually keep track of our lock count.

Bug: http://b/72929749
Test: debuggerd_test --gtest_filter="CrasherTest.seccomp_crash_oom"
Change-Id: I609f263ce93550350b17757189326b627129d4a7
2018-02-22 16:31:38 -08:00