Commit Graph

27100 Commits

Author SHA1 Message Date
Josh Gao 7257f2ad7d Merge "adb: fix darwin build."
am: dd87331974

Change-Id: Ie1509f3660d983c0763ca61b3585c333b66c1ea1
2017-01-26 22:06:54 +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 0474cfba64 Merge "fastboot: Workaround for touchbar hang on MBP 2016"
am: fc267f865e

Change-Id: I5b5cc5829be22911c9051b9706bf4242dcc7d8ac
2017-01-26 21:43:24 +00:00
Mark Salyzyn 15d2054891 Merge changes Ib3354417,I400cf4cc
am: b3d294dd8f

Change-Id: I063ff0827ff4769c558b2b5100caba9d4b884a76
2017-01-26 21:42:56 +00:00
Mark Salyzyn 88c2dc6d85 liblog: add log/log_read.h
am: 21de8aca67

Change-Id: I1112987479ce288dce754e55ee33e606aa764552
2017-01-26 21:42:54 +00:00
Mark Salyzyn 0ff1ccdf25 liblog: add log/log_time.h
am: 52c140ca72

Change-Id: Iead9ae24411464c9555c0bc24394633415e58c5a
2017-01-26 21:42:50 +00:00
Mark Salyzyn ed8ffa2b50 Merge "liblog: add log/log_system.h"
am: a19f8ebc93

Change-Id: I0be2c41f57e9f4d3d4b4a7de6b30fba57ee5f510
2017-01-26 21:42:37 +00: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 27f93f87db Merge "adb: add libusb implementation for Linux/Darwin."
am: 6205a1d841

Change-Id: Ic43cd34c095cde71f4c089ac83ec36bd7670cb98
2017-01-26 21:27:23 +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
Mark Salyzyn 6c35bab6e6 Merge changes Iad5b5abf,Iad3704cc,If182dd9b
am: 1cb8d9df6c

Change-Id: I204cfa00d4ab0f268281478458adf50e15a4072e
2017-01-26 18:48:14 +00:00
Mark Salyzyn a3ec4989cd liblog: add log/log_radio.h
am: c89fea44ac

Change-Id: I3cb3a138632a2bcba03e76813f4d2258130faf1d
2017-01-26 18:48:13 +00:00
Mark Salyzyn c1ff272cc8 liblog: add log/log_id.h
am: 3cdbdd522f

Change-Id: I59608012809c77f28487f00329fbff975a06e7e4
2017-01-26 18:48:06 +00:00
Mark Salyzyn 37e1ee432c ndk: reverse course on android/log.h
am: 5c967da341

Change-Id: Id8cf37817462359131caaa6ddd786323b8218771
2017-01-26 18:48:00 +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
bowgotsai 852afd14c8 Merge "fs_mgr_verity: correct dm_target_spec->next"
am: cb199c3fc7

Change-Id: I92b912f75c2589b520cc5ec4c1f94e68abc210e2
2017-01-26 16:19:02 +00:00
Treehugger Robot cb199c3fc7 Merge "fs_mgr_verity: correct dm_target_spec->next" 2017-01-26 16:15:21 +00:00
Mark Salyzyn 6d1cabbf57 Merge "logcat: test: increase retry on fgetLongTimestamp to 4, and sleep to settle to 3"
am: 7e51c66d86

Change-Id: Ia81a244a06b9e0695db5c1471e7a034bb0a51e27
2017-01-26 15:42:30 +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
bowgotsai 47878de7d1 fs_mgr: Switch to LOG()/PLOG() defined in <android-base/logging.h>
This is the minimal change just to replace KLOG_{INFO, WARNING, ERROR}
defined in <cutils/klog.h> to LOG()/PLOG() defined in
<android-base/logging.h>.

The logging.h uses program invocation name as the tag when logging.
e.g., init logs will have "init: ..." at the beginning in each line.
To facilitate debugging, this commit adds [libfs_mgr] after the tag,
and the resulting output will like this:

  [   11.278002] init: [libfs_mgr]Enabling dm-verity for system (mode 2)
  [   11.283309] init: [libfs_mgr]loading verity table: '1 /dev/block/platform/soc.0/f9824900.sdhci/by-name/system ...'
  [   11.337884] init: [libfs_mgr]Not running /system/bin/tune2fs on /dev/block/dm-0 (executable not in system image)
  [   11.362281] init: [libfs_mgr]__mount(source=/dev/block/dm-0,target=/system,type=ext4)=0
  [   11.376331] init: [libfs_mgr]Requested quota status is match on /dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor
  [   11.398237] init: [libfs_mgr]__mount(source=/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor,target=/vendor,type=ext4)=0
  [   11.410735] init: [libfs_mgr]Requested quota status is match on /dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata
  [   11.426783] init: [libfs_mgr]check_fs(): mount(/dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata,/data,ext4)=-1: Invalid argument
  [   11.439154] init: [libfs_mgr]Running /system/bin/e2fsck on /dev/block/platform/soc.0/f9824900.sdhci/by-name/userdata

Bug: 34336098
Test: check device can boot

Change-Id: Idcbaca1050e2d8eabe1e4510a0af03aa0312d03a
2017-01-26 21:47:55 +08:00
Pavlin Radoslavov 1c1ee87e35 Merge "Fix a crash when parsing fastboot command-line arguments"
am: 517f6d476e

Change-Id: I739fb29f259503f0fe39d7b0122cbbb134cfcee1
2017-01-26 07:29:30 +00:00
Treehugger Robot 517f6d476e Merge "Fix a crash when parsing fastboot command-line arguments" 2017-01-26 07:23:18 +00:00
George Burgess IV 990c4c611b Merge "Add mode bits to a call to open with O_CREAT"
am: 294f7312dd

Change-Id: If4b9d8f5733606865a7efdcbfec015b2c07da807
2017-01-26 06:58:28 +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 14e66c5989 Merge "base: support logging before enter main function."
am: a59c7bcc48

Change-Id: Icbb97c807bee8cc7394260dcb612f88855241fea
2017-01-26 02:32:33 +00:00
bowgotsai e41dc8e906 Merge "Switch fs_mgr/*.c to C++."
am: 8c0cf30a6b

Change-Id: I9faf773fd39e4cbc1e7b500f4fa6aeaa60589441
2017-01-26 02:32:02 +00: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 f484dd3401 Merge "Exporting C++ headers from system/core"
am: 812b7d5d52

Change-Id: I218819c51271db63d6ecbc1e5ac51674bfd6fc4a
2017-01-26 01:44:07 +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
Steven Moreland e0ac5d8304 Merge "init.rc, typo: fs-post-data -> post-fs-data"
am: 5b202c4376

Change-Id: Ia61968e7d1e5cd94c0657c710f763501f2ef1f77
2017-01-26 00:52:04 +00: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 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 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 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 e6588b4bfa Merge "Revert "Revert "Exporting C headers from system/core"""
am: 01678a0c84

Change-Id: I1d7d67b45e71bfc6b7bb33ab77bc61c9cf7b8538
2017-01-25 23:40:00 +00:00
Vijay Venkatraman 01678a0c84 Merge "Revert "Revert "Exporting C headers from system/core""" 2017-01-25 23:37:01 +00:00