Commit graph

42298 commits

Author SHA1 Message Date
Sandeep Patil
6d79d9f303 Merge changes Ica6bf5c6,I3f626433
am: 56f76ec018

Change-Id: I5f98902dafea961c892ace0145fbcf923b6838cb
2018-07-25 19:38:10 -07:00
Treehugger Robot
56f76ec018 Merge changes Ica6bf5c6,I3f626433
* changes:
  fs_mgr: libdm: add support android-verity target.
  dmctl: Do not skip argument if not matched with '-ro'.
2018-07-26 02:29:12 +00:00
Josh Gao
997cfac89f adb: split daemon services out of service_to_fd.
Let minadbd override daemon services by pulling out the daemon services
into a separate translation unit, that isn't compiled into libadbd.

Bug: http://b/111831478
Test: mma
Change-Id: Iecfebea371e03864108eca9a4d2e9cfd5db34749
2018-07-25 18:49:37 -07:00
Josh Gao
954adcc541 adbd: turn on fdsan warnings.
Test: mma
Test: python test_device.py
Change-Id: Ic90fac0b731b0aa9fa934f4472b0c40f1263c340
2018-07-25 18:49:37 -07:00
Josh Gao
6523309151 adb: add error-generating overload of adb_close(unique_fd).
Test: mma
Change-Id: Id9c1230394afe980ba90dbd5150b65e8bf997b6c
2018-07-25 18:49:37 -07:00
Josh Gao
56300c9d00 adb: fix register_socket_transport related double-closes.
Multiple codepaths were closing the fd they passed into
register_socket_transport on failure, which would close the fd itself.

Switch things over to unique_fd to make it clear that we don't actually
have to close on failure.

Test: mma
Change-Id: I2d9bdcb1142c24931d970f99ebdf9a8051daf05c
2018-07-25 18:49:37 -07:00
Josh Gao
e261f6b410 adb: fix double close in local_connect_arbitrary_ports.
register_socket_transport takes ownership of the fd, leading to a
double close if the registration fails.

Test: mma
Change-Id: I9d699af1a979bedc1dc466427436d47f09d0a88f
2018-07-25 18:08:45 -07:00
Josh Gao
73a5ee4df5 adb: use adb's unique_fd instead of android::base.
Replace all usages of android::base::unique_fd with the unique_fd from
adb_unique_fd.h, which calls adb_close instead of close on Windows.

Most of these changes are no-ops, except for the ones to
create_service_thread, which was probably pretty broken on Windows.

Test: python test_device.py
Test: adb_test
Test: wine adb_test.exe
Change-Id: Ia4d03f9e2e7ddc88c97dc64172d721f93f3bf853
2018-07-25 18:08:45 -07:00
Josh Gao
2deb787ee2 adb: move remount_service.h into daemon.
Test: treehugger
Change-Id: I1a895d52da2c2ef281d562be778cfe0a01854a4f
2018-07-25 18:08:45 -07:00
Josh Gao
86acb863ff adb: split shell_service.h into client/daemon/protocol parts.
Test: treehugger
Change-Id: I67042f6b29a8a07619b8d56e7376d49b956a840c
2018-07-25 18:08:44 -07:00
Josh Gao
edec033b26 adb: split file_sync_service.h into client and daemon parts.
Test: treehugger
Change-Id: I648c7001903a91448c69986e08a6cd2dd76ed793
2018-07-25 18:08:32 -07:00
Arve Hjønnevåg
c97372e73b Merge "trusty: tipc_test: Read output and test result from ta2ta_ipc_test"
am: 7b7e416649

Change-Id: I17c82528a7e373dd18137c7c976e868d4718bd5f
2018-07-25 17:24:18 -07:00
Arve Hjønnevåg
7b7e416649 Merge "trusty: tipc_test: Read output and test result from ta2ta_ipc_test" 2018-07-26 00:17:54 +00:00
Elliott Hughes
5ae98112eb Merge "trusty: add the trusty folks to the system/core/trusty/ OWNERS."
am: e663c78d92

Change-Id: I293f21462010e8098b226277636f04b4cd4b02a7
2018-07-25 16:59:03 -07:00
Shawn Willden
8975fb338f Merge "Add OWNERS file to gatekeeperd"
am: c6b85a61e3

Change-Id: Ie869e93279f6a4fda26bb9393220282102229636
2018-07-25 16:56:56 -07:00
Treehugger Robot
e663c78d92 Merge "trusty: add the trusty folks to the system/core/trusty/ OWNERS." 2018-07-25 23:54:19 +00:00
Treehugger Robot
c6b85a61e3 Merge "Add OWNERS file to gatekeeperd" 2018-07-25 23:46:29 +00:00
Chih-Hung Hsieh
7585d2270e Merge "Declare __fake_use_va_args as a variadic function."
am: e352a75b90

Change-Id: I4cfeb23cab215741944485baa47450115ed671e0
2018-07-25 16:44:45 -07:00
Treehugger Robot
e352a75b90 Merge "Declare __fake_use_va_args as a variadic function." 2018-07-25 23:34:18 +00:00
Shawn Willden
6cf9bdadee Add OWNERS file to gatekeeperd
Test: Yes, that would be nice, wouldn't it?
Change-Id: I4116c2546bbc15ef5edb90867ed156637bb125c6
2018-07-25 15:02:38 -07:00
Elliott Hughes
e87aaf9831 trusty: add the trusty folks to the system/core/trusty/ OWNERS.
Bug: N/A
Test: N/A
Change-Id: Icd74a1fa322b4f7bd6a6a4d9e1b375b5598f84b6
2018-07-25 15:01:15 -07:00
Chih-Hung Hsieh
62b0ef556d Declare __fake_use_va_args as a variadic function.
* New clang compiler requires variadic function to have
  at least one named parameter type.
* Use ##__VA_ARGS__ to work with empty __VA_ARGS__.
* Fix one ALOG_ASSERT parameter bug in lmkd/lmkd.c.

Bug: 111614304
Test: make with WITH_TIDY=1
Change-Id: I90f35aa88527a6897954f69a35b256a157a725c5
2018-07-25 14:36:35 -07:00
Tao Bao
a9fad6cd15 fs_mgr: Build and use shared libs.
Bug: 78793464
Test: `m dist`
Change-Id: I21ed5de72217c5cfa37e0217b0e79ed0a6f82031
2018-07-25 13:42:39 -07:00
Jerry Zhang
3014fd00ca Merge "libsparse: Add sparse typed callback"
am: 3edffdb794

Change-Id: I0fec7cbb940848ea7081f5524d5f43790693b4a6
2018-07-25 13:15:59 -07:00
Treehugger Robot
3edffdb794 Merge "libsparse: Add sparse typed callback" 2018-07-25 20:03:44 +00:00
Jerry Zhang
db69f0d47f libsparse: Add sparse typed callback
Currently, sparse_file_callback uses libsparse's
own logic for reading a file into a buffer. However,
a caller may want to use their own logic for doing
this in order to customize the buffer size and parallelize
the reads/writes. Also, a caller may want to implement
fill blocks with their own logic as well. To do this
add sparse_file_typed_callback which calls a different
callback function depending on the type of the sparse
chunk being written.

Test: Use typed callback for fd writes
Bug: 78793464
Change-Id: I75955a464fc05991f806339830fdfa05fda354b9
2018-07-25 11:04:03 -07:00
Tobias Thierer
c526c79b37 Merge "Revert "Add derived UsbTransport class with USB reset method""
am: f6ee8fe515

Change-Id: Ia50999004b5505566051e3927daa646a2024687b
2018-07-25 08:34:14 -07:00
Tobias Thierer
f6ee8fe515 Merge "Revert "Add derived UsbTransport class with USB reset method"" 2018-07-25 15:24:54 +00:00
Tobias Thierer
ec1542f22d Revert "Add derived UsbTransport class with USB reset method"
This reverts commit ceb7cbf5fd.

Reason for revert: Broke mac builds:
system/core/fastboot/usb_osx.cpp:513:35: error: use of undeclared identifier 'USB_TRANSACTION_TIMEOUT'
USB_TRANSACTION_TIMEOUT, USB_TRANSACTION_TIMEOUT);
^

Change-Id: Ibe2f9ff2d5c63f9d33f4bd6d9ba962604cf8caeb
2018-07-25 10:41:24 +00:00
Jerry Zhang
5de2be5cd5 Move recovery to /system/bin
Executables should be in /system/bin
rather than sbin. Change lookup paths
in a few places to reflect this.

Test: recovery is in system/bin
Bug: 78793464
Change-Id: Ibcdff7abf1f21e2566e02cad8bdb3c26ee500534
2018-07-24 21:42:23 -07:00
Yi Kong
e21533137e Merge "[libsysutils] Modernize codebase by replacing NULL with nullptr"
am: 1c92fa4480

Change-Id: Ibeda0198208fd195028668270377a6d75154ce4e
2018-07-24 19:04:47 -07:00
Treehugger Robot
1c92fa4480 Merge "[libsysutils] Modernize codebase by replacing NULL with nullptr" 2018-07-25 01:52:28 +00:00
Tom Cherry
4d71e6fb45 Merge "init: fix typo in error message"
am: 2efcb522df

Change-Id: I36cc5ebced34cbd288123a71081997c909361890
2018-07-24 17:55:51 -07:00
Treehugger Robot
2efcb522df Merge "init: fix typo in error message" 2018-07-25 00:43:30 +00:00
Yabin Cui
a9fa007c2e Merge "libprocinfo: return error msg instead of printing it."
am: 220c1d5589

Change-Id: I4e697bf6370cb95bed686dd2c769891fc6bceabd
2018-07-24 16:35:21 -07:00
Yi Kong
4888525c55 [libsysutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: I9e95daa0750f2622d1c4788941fdfae23ee61801
2018-07-24 16:34:27 -07:00
Yabin Cui
220c1d5589 Merge "libprocinfo: return error msg instead of printing it." 2018-07-24 23:28:01 +00:00
Tom Cherry
5c5e24c1b6 Merge "Add recovery_available: true to init dependencies"
am: 24f226df87

Change-Id: Ie66aeb501eaa63b92cede2344004e05d2745bb55
2018-07-24 16:26:50 -07:00
Treehugger Robot
24f226df87 Merge "Add recovery_available: true to init dependencies" 2018-07-24 23:16:05 +00:00
Tom Cherry
8c901dda30 init: fix typo in error message
Test: none
Change-Id: Ie8417c7c6e3f6600544006c4a84b5bdfaff9725f
2018-07-24 15:54:33 -07:00
Yabin Cui
5f036ab89b libprocinfo: return error msg instead of printing it.
So users can decide whether to print error msg or not.

Bug: none
Test: run libprocinfo_test.
Change-Id: Ie1afcb58cb97493c7ffade6841b6eb7a800a3981
2018-07-24 14:34:06 -07:00
Tom Cherry
1151d15be5 Add recovery_available: true to init dependencies
Init needs this in order to be built in Android.bp

Test: build
Change-Id: I695438d69cc71b739b7648c4008ff3760da58ef0
2018-07-24 13:45:50 -07:00
Chris Fries
34bdf4e824 Merge "Add derived UsbTransport class with USB reset method"
am: 56795ac483

Change-Id: I0203e059f415ee63600a7f55c42107c21569d96e
2018-07-24 12:41:55 -07:00
Chris Fries
56795ac483 Merge "Add derived UsbTransport class with USB reset method" 2018-07-24 19:30:02 +00:00
Aaron Wisner
ceb7cbf5fd Add derived UsbTransport class with USB reset method
For testing there needs to be a way to simulate unplugging and
replugging a device. This change adds support for a USB reset
method that does this.

Also add timeouts, so USB reads/writes don't block forever
on an unresponsive device.

Test: glinux, fastboot tool still works
Test: Reset confirmed working via wireshark Linux URB captures

Change-Id: I7213a2395d4ef1c0238810e4929ab966e78c8b55
2018-07-24 11:24:15 -05:00
Yi Kong
d322a108b7 Merge "[libsparse] Modernize codebase by replacing NULL with nullptr"
am: 48e3cdef33

Change-Id: I126abfd2b7f2c1793ded0602885893350e40f266
2018-07-23 21:12:51 -07:00
Yi Kong
48e3cdef33 Merge "[libsparse] Modernize codebase by replacing NULL with nullptr" 2018-07-24 04:05:03 +00:00
Josh Gao
8aef0f7a5b Merge "adb: fix forward --list, --remove(-all) with multiple devices."
am: 32acd3171a

Change-Id: If122eee9334922f39a29ed0f2d543dec78e0661d
2018-07-23 18:08:00 -07:00
Treehugger Robot
32acd3171a Merge "adb: fix forward --list, --remove(-all) with multiple devices." 2018-07-24 00:47:47 +00:00
Yi Kong
17ba95ed9e [libsparse] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: I43dae734817cae7a260ffc7afcd85fbd4451eddf
2018-07-23 23:32:01 +00:00