Commit graph

42128 commits

Author SHA1 Message Date
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
Chih-hung Hsieh
1459c0ff14 Merge "Declare __FAKE_USE_VA_ARGS as a variadic function."
am: 835d76496d

Change-Id: I7435c5df4e1c23fda82644197aae1c725ed6d701
2018-07-23 16:30:40 -07:00
Chih-hung Hsieh
835d76496d Merge "Declare __FAKE_USE_VA_ARGS as a variadic function." 2018-07-23 23:18:41 +00:00
Ryan Prichard
9b97896a74 Merge "Restore the libsync __ANDROID_API__ guard"
am: 7af64cbbbe

Change-Id: I4a1883a8a750a8a2ac92f470b07a9b16df7d5150
2018-07-23 15:49:32 -07:00
Ryan Prichard
7af64cbbbe Merge "Restore the libsync __ANDROID_API__ guard" 2018-07-23 22:44:37 +00:00
Sandeep Patil
efc5479085 fs_mgr: libdm: add support android-verity target.
The support for android-verity makes it possible for us to test
raw verified filesystem images to be attached to android-verity
target and have it verified by the kernel.

This makes the testing of android-verity device mapper target
much easier as it doesn't _have_ to be used for root mount.

Bug: 72722987
Test:
 $ losetup /dev/block/loop0 /data/local/tmp/verity_fs.img
 $ dmctl create verity-fs android-verity 0 4200 \
   Android:7e4333f9bba00adfe0ede979e28ed1920492b40f 7:0

Change-Id: Ica6bf5c6e1fd758fdb4005fc8a09755f369a8a0f
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-07-23 15:24:55 -07:00
Sandeep Patil
0d469de9a0 dmctl: Do not skip argument if not matched with '-ro'.
'dmctl create' command would fail if '-ro' flag is not
used. This happend because the argument in place of '-ro'
is skipped unconditionally.

Bug: 72722987
Test:
 $ losetup /dev/block/loop0 fs.img
 $ dmctl create FOO linear 0 25600 /dev/block/loop0 0

Change-Id: I3f6264336b9c9a1b5de76f3a1d29e6045453f9cb
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-07-23 14:50:26 -07:00
Josh Gao
9404f2da14 Merge changes from topic "looper_unique_fd"
am: 7e7cefa2c7

Change-Id: Id920135cff272f593b71ef8cb7ff41ee16de4484
2018-07-23 14:36:43 -07:00
Josh Gao
7e7cefa2c7 Merge changes from topic "looper_unique_fd"
* changes:
  libutils: switch Looper's fds to unique_fd.
  libziparchive: use fdsan in ZipArchive.
2018-07-23 21:26:11 +00:00
Josh Gao
91c25c0159 adb: fix forward --list, --remove(-all) with multiple devices.
Also, fix error reporting when forward fails because we can't get a
transport, because there's either zero, or more than one transport that
matches the request.

Bug: http://b/111021517
Bug: http://b/111374366
Change-Id: Ia4c3bf6215c3ff4e9023ba1af556f5b10463bd6d
Test: manual
2018-07-23 14:11:26 -07:00
David Anderson
af5064d47c Merge "fs_mgr: Add a method for creating one-off partition instances."
am: 67c5ca20e2

Change-Id: I5ce89869e60d29fc67bfb29c6e3bde9a1e9f7dd4
2018-07-23 13:40:11 -07:00
Treehugger Robot
67c5ca20e2 Merge "fs_mgr: Add a method for creating one-off partition instances." 2018-07-23 20:29:10 +00:00
Chih-Hung Hsieh
67f72bde26 Declare __FAKE_USE_VA_ARGS as a variadic function.
This avoids 2 static analysis warnings:
* assigned but unused variables in __VA_ARGS__
* unused expression result in __VA_ARGS__

Bug: 111614304
Test: make with WITH_TIDY=1
Change-Id: I4faae8787f6cc76de7ff4b6d08d25d0cb47324ea
2018-07-23 13:03:19 -07:00
TreeHugger Robot
c67c7f9a3a Merge "Revert "Use more shared libraries in adb and init."" into stage-aosp-master 2018-07-23 19:18:34 +00:00
Luis Hector Chavez
9cd253c852 Merge "adb: Fix adb remount"
am: a54c293822

Change-Id: I09b604d98784c56af74d771def395127af45a40d
2018-07-23 12:06:40 -07:00
David Anderson
23de22d54b fs_mgr: Add a method for creating one-off partition instances.
fastbootd needs to temporarily map and unmap logical partitions in order
to flash them. To make this easier, this change introduces fs_mgr
methods to create and destroy a single logical partition by name.

Bug: 79173901
Test: N/A
Change-Id: Ic085f2175c26a5edf5f18544012dcfe6d8088f09
2018-07-23 11:43:27 -07:00
Treehugger Robot
a54c293822 Merge "adb: Fix adb remount" 2018-07-23 18:19:56 +00:00
Hridya Valsaraju
22c2202e75 Revert "Use more shared libraries in adb and init."
This reverts commit fbd79687e6.

Reason for revert: b/111734137

Change-Id: I70e23ed20d16821a555b448d4ac76fe9e130afa5
2018-07-23 17:48:57 +00:00
Dario Freni
4fa866a467 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
2018-07-23 16:14:36 +01:00
Luis Hector Chavez
46b55e83c5 adb: Fix adb remount
This change makes `adb remount` work again in some devices.

Bug: None
Test: `adb remount` in taimen
Change-Id: I04ec043fdb868f18a53a012c82e239c862ae7eff
2018-07-21 22:49:14 -07:00