Commit Graph

26703 Commits

Author SHA1 Message Date
Treehugger Robot c8121ba029 Merge "Support arbitrary-length properties in property_list." 2017-01-27 03:18:04 +00:00
Treehugger Robot ff21dba167 Merge "liblog: export log/log_read.h to vndk" 2017-01-27 02:14:34 +00:00
Elliott Hughes 4eacd70f85 Support arbitrary-length properties in property_list.
Bug: http://b/33926793
Test: visual inspection
Change-Id: Ida84c3aaafa5411a9886f8d3d45679fd60ddc00d
2017-01-26 17:33:12 -08:00
Treehugger Robot 296f7dad19 Merge "Don't use private libc++ macros." 2017-01-27 00:42:21 +00:00
Mark Salyzyn 9b844bc6e1 liblog: export log/log_read.h to vndk
Test: gTest liblog-unit-tests
Bug: 34250038
Change-Id: I2904b950eb399a4f34c5da31b51703e8f2d5ea93
2017-01-26 16:10:59 -08:00
Josh Gao 6fe7045e0e Merge "debuggerd_handler: remove PR_SET_DUMPABLE check." 2017-01-26 23:11:21 +00:00
Josh Gao e5288f292a debuggerd_handler: remove PR_SET_DUMPABLE check.
crash_dump has CAP_SYS_PTRACE and this was never obeyed by debuggerd.

Change-Id: Ifee5e94b97b1f6440ad0be79758f0db2d2aaba2e
2017-01-26 15:08:18 -08:00
Dan Albert 9ccdd5fb17 Don't use private libc++ macros.
The visibility macros just expand to the defaults, so this isn't
needed anyway.

Test: mm
Bug: http://b/34740564
Change-Id: If0ba6b412554300823219405c1e801ceec747dd0
2017-01-26 14:58:26 -08:00
Treehugger Robot 6f9a034cb9 Merge "Allow __NR_pipe for 32-bit processes" 2017-01-26 22:25:20 +00:00
Josh Gao dd87331974 Merge "adb: fix darwin build." 2017-01-26 22:03:16 +00:00
Josh Gao 06766a8b29 adb: fix darwin build.
Bug: none
Test: mma on mac
Change-Id: I49ef3c4892c7942a235d317d90386c7d8a872868
2017-01-26 14:01:34 -08:00
Elliott Hughes fc267f865e Merge "fastboot: Workaround for touchbar hang on MBP 2016" 2017-01-26 21:39:39 +00:00
Mark Salyzyn b3d294dd8f Merge changes Ib3354417,I400cf4cc
* changes:
  liblog: add log/log_read.h
  liblog: add log/log_time.h
2017-01-26 21:38:22 +00:00
Mark Salyzyn a19f8ebc93 Merge "liblog: add log/log_system.h" 2017-01-26 21:37:52 +00:00
Josh Gao 6205a1d841 Merge "adb: add libusb implementation for Linux/Darwin." 2017-01-26 21:23:10 +00:00
Mark Salyzyn 21de8aca67 liblog: add log/log_read.h
Move log reading definitions to their own home.

struct logger_entry
struct logger_entry_v2
struct logger_entry_v3
struct logger_entry_v4
LOGGER_ENTRY_MAX_PAYLOAD
LOGGER_ENTRY_MAX_LEN
struct log_msg
android_logger_get_id()
android_logger_clear()
android_logger_get_log_size()
android_logger_get_log_readable_size()
struct logger_list
android_logger_get_statistics()
android_logger_get_prune_list()
android_logger_set_prune_list()
android_logger_list_alloc()
android_logger_list_alloc_time()
android_logger_list_free()
android_logger_list_read()
android_logger_open()
android_logger_list_open()

Deal with a possible scenario where fcntl.h was not included at the
top of the source files, and log/log_read.h inclusion of fcntl.h
conflicts with a source file inclusion of sys/cdefs.h definition of
__unused macro.

Test: gTest liblog-unit-tests --gtest_filter=\
      liblog.__android_log_write__android_logger_list_read:\
      liblog.android_logger_get_
Bug: 34250038
Change-Id: Ib33544171563d6a351164754c254c4385686025b
2017-01-26 21:13:31 +00:00
Paul Lawrence 31b2a9d7a3 Allow __NR_pipe for 32-bit processes
Used by 32-bit debuggers

Bug: 34716063
Test: Make sure a Chrome crash produces a valid stack trace in logcat
Change-Id: Ie42f035da7f19ace403eb2111524f02c0bbfd0d5
2017-01-26 12:31:55 -08:00
Keith Mok d23afb5980 fastboot: Workaround for touchbar hang on MBP 2016
fastboot will try to set usb configuration on connected
usb devices. When it tries to change the usb configuration
on iBridge device on MBP 2016 model, it hangs, and frozen
the touchbar. Skip set usb configuration.

Bug: https://code.google.com/p/android/issues/detail?id=231129
Change-Id: Ib055fc0524d26092555fc135588fa362e70eeb39
2017-01-26 19:57:09 +00:00
Treehugger Robot 1cb8d9df6c Merge changes Iad5b5abf,Iad3704cc,If182dd9b
* changes:
  liblog: add log/log_radio.h
  liblog: add log/log_id.h
  ndk: reverse course on android/log.h
2017-01-26 18:42:22 +00:00
Treehugger Robot cb199c3fc7 Merge "fs_mgr_verity: correct dm_target_spec->next" 2017-01-26 16:15:21 +00:00
Treehugger Robot 7e51c66d86 Merge "logcat: test: increase retry on fgetLongTimestamp to 4, and sleep to settle to 3" 2017-01-26 15:38:10 +00:00
Treehugger Robot 517f6d476e Merge "Fix a crash when parsing fastboot command-line arguments" 2017-01-26 07:23:18 +00:00
Treehugger Robot 294f7312dd Merge "Add mode bits to a call to open with O_CREAT" 2017-01-26 06:55:59 +00:00
bowgotsai ce25baf06f fs_mgr_verity: correct dm_target_spec->next
dm_target_spec->next should be set to the next multiple of 8.
It doesn't matter before because dm_ioctl->target_count is set to 1 so
only the first dm_target_spec will be processed.

Bug: None
Test: check device can boot with dm-verity
Change-Id: I96b9b0307a40b05640db06d1c614c16d8144bb47
2017-01-26 11:34:06 +08:00
Pavlin Radoslavov 6adbd4e787 Fix a crash when parsing fastboot command-line arguments
Fix a crash when running "fastboot reboot bootloader"

Test: Manual run "fastboot reboot bootloader" and "fastboot reboot emergency"
Change-Id: I6d163a5b640afcae1dfa606f409e23ec5f499184
2017-01-25 19:07:46 -08:00
Yabin Cui a59c7bcc48 Merge "base: support logging before enter main function." 2017-01-26 02:30:58 +00:00
Treehugger Robot 8c0cf30a6b Merge "Switch fs_mgr/*.c to C++." 2017-01-26 02:24:23 +00:00
Vijay Venkatraman 812b7d5d52 Merge "Exporting C++ headers from system/core" 2017-01-26 01:39:41 +00:00
George Burgess IV 09175a0264 Add mode bits to a call to open with O_CREAT
Open with O_CREAT needs mode bits: https://linux.die.net/man/3/open

Found by running clang FORTIFY over AOSP.

Bug: 32073964
Test: Now builds with clang FORTIFY.
Change-Id: Iee4c93c5482f510e0adf8104c27e394b5d87ec88
2017-01-25 17:31:43 -08:00
Treehugger Robot 5b202c4376 Merge "init.rc, typo: fs-post-data -> post-fs-data" 2017-01-26 00:47:18 +00:00
Yabin Cui 0c68953778 base: support logging before enter main function.
Bug: http://b/30974760
Test: run libbase_test.

Change-Id: I3f45fc21e8fe6301b5fef027728ea91f2188911d
2017-01-25 15:50:47 -08:00
bowgotsai cea7ea7825 Switch fs_mgr/*.c to C++.
This is the minimal change just to keep it building, and doesn't
attempt to clean up the code.

Bug: 34336098
Test: check device can boot

Change-Id: I5ff897874f1f14a9a5d1f14fedf1b0749e86dbb3
2017-01-26 07:49:41 +08:00
Mark Salyzyn dd61659e73 liblog: add log/log_system.h
Move SLOG logging macros to their own home.

SLOGV
SLOGV_IF
SLOGD
SLOGD_IF
SLOGI
SLOGI_IF
SLOGW
SLOGW_IF
SLOGE
SLOGE_IF

Test: gTest liblog-unit-tests --gtest_filter=liblog.SLOG
Bug: 34250038
Change-Id: I456c7ad23152dc1c7b39143d87401a8737e24d64
2017-01-25 15:41:43 -08:00
Mark Salyzyn 52c140ca72 liblog: add log/log_time.h
Move log_time definitions to their own home.

struct log_time

Test: gTest liblog-unit-tests --gtest_filter=liblog.log_time
Bug: 34250038
Change-Id: I400cf4cc865d1c167699a4654ecb69455a18e604
2017-01-25 15:41:43 -08:00
Mark Salyzyn c89fea44ac liblog: add log/log_radio.h
Move RLOG logging macros to their own home.

RLOGV
RLOGV_IF
RLOGD
RLOGD_IF
RLOGI
RLOGI_IF
RLOGW
RLOGW_IF
RLOGE
RLOGE_IF

Test: gTest liblog-unit-tests --gtest_filter=liblog.RLOG
Bug: 34250038
Change-Id: Iad5b5abf23c7a537ff5293bb55a6633dce2e837d
2017-01-25 15:41:43 -08:00
Mark Salyzyn 3cdbdd522f liblog: add log/log_id.h
Move common log_id_t and simple internal support function definitions
that use it from log/log.h to log/log_id.h.

log_id_t
__android_log_buf_write
__android_log_buf_print
android_name_to_log_id
android_log_id_to_name

Test: gTest liblog-unit-tests --gtest_filter=\
      liblog.log_id:\
      liblog.__android_log_buf_print:\
      liblog.__android_log_buf_write:\
      liblog.__android_log_buf_print__concurrent64
Bug: 34250038
Change-Id: Iad3704cc72943a3094e1193a6d032c7f29a6cd5c
2017-01-25 15:41:43 -08:00
Mark Salyzyn 5c967da341 ndk: reverse course on android/log.h
move LOG macros to log/log_main.h

move include/android/log.h to liblog/include/android/log.h

Test: compile of all components and gTest liblog-unit-tests
Bug: 34250038
Bug: 30465923
Change-Id: If182dd9b83689e8b7bc1a44b2f5d913c7ee5eeee
2017-01-25 15:41:43 -08:00
Vijay Venkatraman 01678a0c84 Merge "Revert "Revert "Exporting C headers from system/core""" 2017-01-25 23:37:01 +00:00
Mark Salyzyn e7e21ea67f logcat: test: increase retry on fgetLongTimestamp to 4, and sleep to settle to 3
Test: gTest logcat-unit-tests
Bug: 34454772
Change-Id: I8557b0f7f25c4aa160a23a2428c9b53c8e3b26e1
2017-01-25 15:29:29 -08:00
Josh Gao 1c70e1bcbc adb: add libusb implementation for Linux/Darwin.
Add a libusb-based implementation alongside the existing native
implementations, controlled by the ADB_LIBUSB environment variable.

Windows will need more work for the usb driver.

Bug: http://b/31321337
Test: python test_device.py on linux/darwin, with ADB_LIBUSB=0 and 1
Change-Id: Ib68fb2c6c05475eae3ff4cc19f55802a6f489bb7
2017-01-25 13:52:53 -08:00
Josh Gao 4c38a921c2 Merge changes I21eefab9,I0ac7d78a
* changes:
  adb: move usb_* to client/usb_*.
  adb: reorganize adbd USB handling code.
2017-01-25 21:52:45 +00:00
Josh Gao 9e60a54f67 Merge "Give crash_dump CAP_SYS_PTRACE." 2017-01-25 21:16:58 +00:00
Vijay Venkatraman 651f8383e6 Revert "Revert "Exporting C headers from system/core""
This reverts commit a3f2be2b73.

Test: compile
Change-Id: I04b3a8e47e1fa3eb9d80c14ae3a90c68a780e858
2017-01-25 12:50:29 -08:00
Josh Gao 4d61417997 Merge changes Ie6c1832a,I0275ffca
* changes:
  debuggerd_handler: don't dump PR_NO_NEW_PRIVS processes.
  debuggerd_handler: don't resend nonfatal signals when not dumping.
2017-01-25 20:03:22 +00:00
Josh Gao 36397cb168 Give crash_dump CAP_SYS_PTRACE.
CAP_SYS_PTRACE is needed to ptrace processes that have capabilities
greater than their bounding set. Eventually, this will still be an
improvement, because we can ptrace attach, and then turn on a seccomp
filter that blocks further attaches.

Bug: http://b/34694637
Test: debuggerd `pidof system_server`
Change-Id: I4b9da164ec1fbb5060fdba590e886ac24b6a0785
2017-01-25 11:48:23 -08:00
Josh Gao 7e14d020f1 debuggerd_handler: don't dump PR_NO_NEW_PRIVS processes.
We can't do an selinux transition when this is on.

Bug: http://b/34472671
Test: logcat -c; debuggerd `pidof media.codec`; logcat
Change-Id: Ie6c1832ab838df48879c32a86126862de9a15420
2017-01-25 11:16:03 -08:00
Josh Gao 529b3066d5 debuggerd_handler: don't resend nonfatal signals when not dumping.
Bug: http://b/34516140
Test: debuggerd -b `pidof surfaceflinger`
Change-Id: I0275ffca24bf4840e264eaa4b79611e2404edfb0
2017-01-25 11:15:01 -08:00
Josh Gao fc12c4b81e Merge "crash_dump: properly dump when we can't talk to tombstoned." 2017-01-25 19:14:09 +00:00
Steven Moreland f38aab4621 init.rc, typo: fs-post-data -> post-fs-data
Test: pass
Change-Id: Icafdb7ec61935b35db85096b49e7f232a456f620
2017-01-25 10:52:40 -08:00
Treehugger Robot 0a3c2392c7 Merge "fs_mgr: support using libavb to enable dm-verity" 2017-01-25 18:24:30 +00:00