Commit graph

39172 commits

Author SHA1 Message Date
Treehugger Robot
18be1e2f7e Merge "Add support for /product-services partition." 2018-07-27 17:15:05 +00:00
Elliott Hughes
78f5431ff1 Merge "Revert "Switch to PCRE grep."" 2018-07-27 15:06:58 +00:00
Treehugger Robot
ff01e54285 Merge "Suppress gnu-zero-variadic-macro-arguments warning." 2018-07-26 23:22:44 +00:00
Elliott Hughes
f9408d5cdf Revert "Switch to PCRE grep."
This reverts commit 90a018a87a.

Not a clean revert because things have changed slightly, and I'm sticking
with the egrep/fgrep shell scripts for now.

Bug: http://b/111849261
Bug: https://bugs.exim.org/show_bug.cgi?id=2294
Test: manual
Change-Id: I72ae637c84f0eb1c2b5291db73ebff1628d54110
2018-07-26 14:52:45 -07:00
Tom Cherry
8b25b87074 Merge "ueventd: Add dynamic kernel module loading" 2018-07-26 21:40:36 +00:00
Chih-Hung Hsieh
cd3965e425 Suppress gnu-zero-variadic-macro-arguments warning.
Bug: 111614304
Test: make with WITH_TIDY=1
Change-Id: I2a52073202f42d1912363ae864f2f7f892589cea
2018-07-26 14:33:12 -07:00
Treehugger Robot
46f281edf5 Merge changes Ic90fac0b,Id9c12303,I2d9bdcb1,I9d699af1,Ia4d03f9e, ...
* changes:
  adbd: turn on fdsan warnings.
  adb: add error-generating overload of adb_close(unique_fd).
  adb: fix register_socket_transport related double-closes.
  adb: fix double close in local_connect_arbitrary_ports.
  adb: use adb's unique_fd instead of android::base.
  adb: move remount_service.h into daemon.
  adb: split shell_service.h into client/daemon/protocol parts.
  adb: split file_sync_service.h into client and daemon parts.
2018-07-26 20:10:04 +00:00
Christopher Ferris
d1a1202eb7 Merge "Create lookup table of DEX symbols." 2018-07-26 20:01:15 +00:00
Chris Fries
d6f97d67e0 Merge "Add support for fastboot transport timeouts and USB Reset() on linux" 2018-07-26 19:52:59 +00:00
Dario Freni
3613710099 Add support for /product-services partition.
This CL is largely and adaptation of
Ie996def20e25dc1afe0c74af2096af844934b2dc

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and
flashed on device. Also successfully built image with
/system/product-services and no dedicated /product-services partition.

Change-Id: I1046dfe19bf874da929c9131b76a1f85422fbb80
Merged-In: I1046dfe19bf874da929c9131b76a1f85422fbb80
2018-07-26 16:27:28 +00:00
Aaron Wisner
acf78d462f Add support for fastboot transport timeouts and USB Reset() on linux
USB Reset() allows simulating unplugging and replugging device.

Test: build and run fastboot on mac 10.13.3
Test: glinux build and run fastboot
Change-Id: Id924d063e549a4cca9dda03afd8f8fe266f6d2ab
2018-07-26 11:19:44 -05:00
Andrew F. Davis
9963847419 ueventd: Add dynamic kernel module loading
For some platforms it is not known at build time what devices
will be attached at runtime. Building into the kernel or pre-loading
at init all the modules that could be needed would unnecessary bloat
the kernel. The solution is dynamic kernel module loading.

The kernel will generate uevents when devices are added, userspace
should monitor for these events and load the compatible modules.

The init process already monitors for uevents, add here the ability
to respond to modalias events and preform the correct action.

Adding this to init is preferred over an external program as we
can read and process the module alias and dependency files once,
instead of for each module needing to be loaded.

Test: Run on Beagle-X15, check all needed modules are loaded (lsmod)
Change-Id: I1b57d9aeb0a9770f309207183dc4bc2b7b905f14
Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
2018-07-26 09:42:22 -05:00
Tobias Thierer
28fb130cbb Merge "Revert "libsparse: Add sparse typed callback"" 2018-07-26 10:36:07 +00:00
Tobias Thierer
fca4a9c279 Revert "libsparse: Add sparse typed callback"
This reverts commit db69f0d47f.

Reason for revert: Broke the build:

In file included from system/core/libsparse/sparse.cpp:26:
system/core/libsparse/output_file.h:34:72: error: unknown type name 'off64_t'; did you mean 'off_t'?
int (*skip_write)(void*, off64_t), void* priv,
^~~~~~~
off_t
/Applications/Xcode6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/_types/_off_t.h:30:25: note: 'off_t' declared here
typedef __darwin_off_t off_t;
^
1 error generated.

Bug: 78793464
Change-Id: I0f8bc4e9aa2f74612bfd8721d00d961e3f7e695f
2018-07-26 05:23:45 +00:00
Tao Bao
9ff0669ac1 Merge "fs_mgr: Build and use shared libs." 2018-07-26 04:48:46 +00: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
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
7b7e416649 Merge "trusty: tipc_test: Read output and test result from ta2ta_ipc_test" 2018-07-26 00:17:54 +00: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
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
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
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
Treehugger Robot
1c92fa4480 Merge "[libsysutils] Modernize codebase by replacing NULL with nullptr" 2018-07-25 01:52:28 +00:00
Treehugger Robot
2efcb522df Merge "init: fix typo in error message" 2018-07-25 00:43:30 +00: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
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
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
48e3cdef33 Merge "[libsparse] Modernize codebase by replacing NULL with nullptr" 2018-07-24 04:05:03 +00: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
Chih-hung Hsieh
835d76496d Merge "Declare __FAKE_USE_VA_ARGS as a variadic function." 2018-07-23 23:18:41 +00:00