Commit graph

41908 commits

Author SHA1 Message Date
Yifan Hong
d5c59f729e Merge "healthd: libbatterymonitor: recovery_available" into stage-aosp-master 2018-07-18 19:54:58 +00:00
Yifan Hong
90fdc72409 healthd: libbatterymonitor: recovery_available
Bug: 80132328
Test: builds
Change-Id: I4d5ac73431fb002cc839fed2d97b1acff3fde263
Merged-In: I4d5ac73431fb002cc839fed2d97b1acff3fde263
(cherry picked from commit 0e317d7873)
2018-07-18 11:28:29 -07:00
Yifan Hong
851f5b226c Merge changes from topic "health_cleanup" into stage-aosp-master
* changes:
  healthd: add missing libbatteryservice_headers dep
  storaged: fix headers.
2018-07-18 17:25:51 +00:00
Tom Cherry
97c0fd5287 Merge "ueventd: add a test for ueventd_parser.cpp"
am: bd130567f8

Change-Id: I7337e84645a9f18ffc263b681eca88285d95b69d
2018-07-18 10:04:04 -07:00
Tom Cherry
bd130567f8 Merge "ueventd: add a test for ueventd_parser.cpp" 2018-07-18 16:56:04 +00:00
Joel Fernandes
70aa2a3475 Merge "libcutils: ashmem: Avoid doing fd checks for ashmem calls"
am: 5fd5be33e6

Change-Id: Ieed029cda8a99e528c2297005122b898452ab3d9
2018-07-17 19:28:23 -07:00
Joel Fernandes
5fd5be33e6 Merge "libcutils: ashmem: Avoid doing fd checks for ashmem calls" 2018-07-18 02:14:54 +00:00
Joel Fernandes
56cd651e7a libcutils: ashmem: Avoid doing fd checks for ashmem calls
Callers already verify that they are calling ashmem API on a valid fd by
calling ashmem_valid first. Lets make the fstat syscall only if the
ioctl returns -ENOTTY. This means in the regular case, only 1 syscall is
needed (ioctl) vs the current 2 (fstat+ioctl).

Some data to show improvements in reduction of vfs_getattr calls in the
kernel by 10x when doing a camera.

Test: Boot and camera CTS
Bug: 111418894
Change-Id: I992620bbe44355e54ba19eeac81da586c5e5a6e0
Signed-off-by: Joel Fernandes <joelaf@google.com>
2018-07-17 17:02:44 -07:00
Jerry Zhang
a515d5bd27 Merge changes I31e444f3,If07ff05f,If3ba190d
am: cb140c04c9

Change-Id: I1fd605920a444413498322ba6810aa5b6a018a20
2018-07-17 15:46:26 -07:00
Yifan Hong
9a81d54ce3 healthd: add missing libbatteryservice_headers dep
It used to use global header include dirs, which is bad.
Test: builds
Bug: 68724651

Change-Id: Ib5354c66633499ad57fe5997e2c35283ba5e408f
Merged-In: Ib5354c66633499ad57fe5997e2c35283ba5e408f
(cherry picked from commit 530ac5bad1)
2018-07-17 15:36:14 -07:00
Yifan Hong
acd2d30cec storaged: fix headers.
Add missing libbatteryservice_headers dependency.
It used to use global header include dirs, which is bad.

Add old transitive dependency from libbatteryservice_headers
as well.

Test: builds
Bug: 68724651

Change-Id: Idcc4452160dce70b4f8b48e2d809dcd5744b93b4
Merged-In: Idcc4452160dce70b4f8b48e2d809dcd5744b93b4
(cherry picked from commit 0b31908912)
2018-07-17 15:36:09 -07:00
Jerry Zhang
cb140c04c9 Merge changes I31e444f3,If07ff05f,If3ba190d
* changes:
  adb: Add io size and zero packet to usb_handle
  adb: Have device usb_handle return io size
  adb: Expose device usb_handle through libadbd
2018-07-17 22:35:36 +00:00
Tom Cherry
5f0198bfbb ueventd: add a test for ueventd_parser.cpp
Test: this unit test
Change-Id: Ib23f23ea5b362bb458adf8208573e5dc80ad6cf0
2018-07-17 15:28:51 -07:00
Yifan Hong
31150c1121 healthd: overridden by health@2.0-service
Test: boots
Bug: 79107699
Bug: 77541952
Bug: 79107699
Change-Id: Ida4cf80d3553365b673e30cdd19590c156cb52e0
Merged-In: Ida4cf80d3553365b673e30cdd19590c156cb52e0
(cherry picked from commit 28d2fb80b2)
2018-07-17 11:57:44 -07:00
Yifan Hong
3a39eec307 healthd use vintf_fragments
This encourages device manufacturers to use
service.override over service and to remove healthd
on device, because it is one less step to do.

Test: make VINTF metadata
Bug: 66917623
Bug: 77541952
Bug: 79107699
Change-Id: I1cac3570f64a0308b1f2d465205f98a97e4b4320
Merged-In: I1cac3570f64a0308b1f2d465205f98a97e4b4320
(cherry picked from commit 2db565d75f)
2018-07-17 11:57:38 -07:00
Jerry Zhang
cda7c3b27c adb: Add io size and zero packet to usb_handle
Fastboot protocol doesn't include zero packets,
so make it possible to configure that.

Allow fastbootd to see how many bytes the handle
can read/write at once.

Test: adb works
Bug: 78793464
Change-Id: I31e444f384d9d0cdf1ea936439b2028f8151c3b8
2018-07-17 11:54:38 -07:00
Jerry Zhang
16b78db945 adb: Have device usb_handle return io size
Previously, read and write would return 0
on success. Now it will return the number
of bytes read/write. This is more consistent
with other usb handles and is needed in order
to handle partial packets (for fastbootd).

Update usb_write in other usb handles
to return amount written.

Change transport_usb accordingly.

Test: adb works
Bug: 78793464
Change-Id: If07ff05fbc8120343f20661475d34f4e5ff805de
2018-07-17 11:53:30 -07:00
Jerry Zhang
b156c60ad4 adb: Expose device usb_handle through libadbd
Fastbootd will reuses adb's functionfs transport
implementation.

Move it to daemon/include as well so it can be accessed
with "adbd/usb.h". Otherwise usb.h will conflict with
other imports.

Test: adb builds and works
Bug: 78793464
Change-Id: If3ba190d5c74b5f3633411f0484195e5a2a34d44
2018-07-17 11:53:06 -07:00
Yi Kong
6705b6c7cd Merge "[adb] Modernize codebase by replacing NULL with nullptr"
am: a63b3309ff

Change-Id: I7183b79b8210e15986418187b0dcc13233bed294
2018-07-17 10:55:17 -07:00
Yi Kong
a63b3309ff Merge "[adb] Modernize codebase by replacing NULL with nullptr" 2018-07-17 17:45:30 +00:00
Yi Kong
2a6a58a818 Merge "[libutils] Modernize codebase by replacing NULL with nullptr"
am: ab3203f383

Change-Id: I5c2aaaea705a3ab82a5ad999f813e4cc22e63401
2018-07-17 10:06:10 -07:00
Yi Kong
ab3203f383 Merge "[libutils] Modernize codebase by replacing NULL with nullptr" 2018-07-17 16:55:08 +00:00
Christopher Ferris
6286088afe Merge "Clean up logging code."
am: 17a02a33bb

Change-Id: I23be231fd1145912c8a35c221656844bf47abc79
2018-07-16 18:25:06 -07:00
Christopher Ferris
17a02a33bb Merge "Clean up logging code." 2018-07-17 01:18:03 +00:00
Yi Kong
e1731a4f2e [libutils] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: I5e89ec8c42151875439d2656475a8739ab9cb7dc
2018-07-16 18:11:34 -07:00
Jerry Zhang
8666830fb1 Merge "fastboot: Refactor string constants to constants.h"
am: fcc16c53e1

Change-Id: I97770eed7cb35989fac6bc51dfb5ec1c33e3872a
2018-07-16 17:16:43 -07:00
Tom Cherry
689d86a029 Merge "ueventd: let scripts provide firmware directories"
am: b504f38d7e

Change-Id: I6dd9cfe20b733fad5afb066b07484c33eb599c02
2018-07-16 17:15:18 -07:00
Treehugger Robot
fcc16c53e1 Merge "fastboot: Refactor string constants to constants.h" 2018-07-16 23:48:49 +00:00
Tom Cherry
b504f38d7e Merge "ueventd: let scripts provide firmware directories" 2018-07-16 23:00:53 +00:00
Christopher Ferris
c637ada7e4 Clean up logging code.
Test: Verify that tombstones still contain the log message data.
Change-Id: I303dec944e58a0c4f5edfed22caaf1f2462ea3e8
2018-07-16 15:57:38 -07:00
Jerry Zhang
769a9c1d11 fastboot: Refactor string constants to constants.h
This allows them to be shared between host and device
implementations.

Test: fastboot works
Bug: 78793464
Change-Id: I79271687850ade2a904fd03d6a97dad1a9ab8e1c
2018-07-16 14:18:41 -07:00
Yifan Hong
5e389e354f [automerger skipped] Merge "libbatterymonitor: vendor_available"
am: 895acebe94  -s ours

Change-Id: If9cbc457e901f94318daf414d9cc3377e929f2e1
2018-07-16 13:37:58 -07:00
Treehugger Robot
895acebe94 Merge "libbatterymonitor: vendor_available" 2018-07-16 20:16:02 +00:00
Yifan Hong
3da9f08903 libbatterymonitor: vendor_available
libbatterymonitor is a static library.
Also removed unused libbinder dependency.

Test: pass
Bug: 111454508
Merged-In: I1f17ee643e6ed1bb2c11a6f3189a448dba2927ac
Change-Id: I1f17ee643e6ed1bb2c11a6f3189a448dba2927ac
(cherry picked from commit ffff9aae02)
2018-07-16 11:26:04 -07:00
David Anderson
1a2b2c4203 Merge "liblp: Add a method to create sparse images of the super partition."
am: 97d3fd8fb0

Change-Id: Ib9ff2dca5d1b4e5c5c714773f111076950996f12
2018-07-16 10:24:32 -07:00
Treehugger Robot
97d3fd8fb0 Merge "liblp: Add a method to create sparse images of the super partition." 2018-07-16 17:17:54 +00:00
David Anderson
87ccc12583 Merge "liblp: Move image reading/writing functions to a new cpp file."
am: fcb0ef9c98

Change-Id: I68aa4054ccb6bd3754a30a91313c4ef3cde20734
2018-07-16 10:17:54 -07:00
David Anderson
d22e078795 Merge "liblp: Force more sizes to be a multiple of the sector size."
am: 474990089a

Change-Id: Id92b7a1a907069b882ca60a27cdf9f458b5fb2cf
2018-07-16 10:17:17 -07:00
David Anderson
c00aad1820 Merge "liblp: Add block device size to LpMetadataGeometry."
am: f78c9643e0

Change-Id: Ifceb7a145c437549232efe786397512e1d07a974
2018-07-16 10:16:44 -07:00
Treehugger Robot
fcb0ef9c98 Merge "liblp: Move image reading/writing functions to a new cpp file." 2018-07-16 17:11:03 +00:00
Treehugger Robot
474990089a Merge "liblp: Force more sizes to be a multiple of the sector size." 2018-07-16 17:08:49 +00:00
Treehugger Robot
f78c9643e0 Merge "liblp: Add block device size to LpMetadataGeometry." 2018-07-16 17:07:58 +00:00
Yi Kong
f2b4259b93 Merge "libcutils: remove rather than fix the mutex."
am: 39e7a1c981

Change-Id: Ie1084574143f2d1e4b4995f7682948b77b5334b6
2018-07-14 14:27:25 -07:00
Yi Kong
39e7a1c981 Merge "libcutils: remove rather than fix the mutex." 2018-07-14 21:18:54 +00:00
Yi Kong
6259c5f204 Merge "[logd] Modernize codebase by replacing NULL with nullptr"
am: 2a989cf525

Change-Id: Ic608288e6a055e7d7236be22b7c564a565a86987
2018-07-13 21:40:27 -07:00
Yi Kong
86f7a3c1c1 Merge "Remove execute bit for source files"
am: dc8483cc04

Change-Id: Ie60e02dedca7f002e33a47eb786ac8bca18b6c0f
2018-07-13 21:39:48 -07:00
Yi Kong
0f45e589ef Merge "Modernize codebase by replacing NULL with nullptr"
am: 9154fbc8df

Change-Id: I439ffa4df2e5672ed2b66d88abbb61ed67355926
2018-07-13 21:38:41 -07:00
Yi Kong
2a989cf525 Merge "[logd] Modernize codebase by replacing NULL with nullptr" 2018-07-14 02:48:17 +00:00
Yi Kong
aed415cc47 [adb] Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.

Test: m
Bug: 68236239
Change-Id: Ia8c4deacafed2f3b7dbc3d4c3c77c6c632e3de81
2018-07-13 18:21:00 -07:00
David Anderson
b36db4ba0e liblp: Add a method to create sparse images of the super partition.
This change enables flashing of the super partition without using
lpflash or adding explicit fastboot support for the liblp image format.

Bug: 79173901
Test: image can be flashed to device and read by liblp
Change-Id: Id6c5e595ba831644364b7335b58cf6a43d5833c3
2018-07-13 18:17:56 -07:00