Commit graph

48021 commits

Author SHA1 Message Date
Jone Chou
3418abfed7 Merge "bootstat: add reboot,longkey sub-reason to known set"
am: c0349199db

Change-Id: Id5e04ad52660200b30b8da615808cf48b9733028
2019-06-25 00:48:10 -07:00
Treehugger Robot
c0349199db Merge "bootstat: add reboot,longkey sub-reason to known set" 2019-06-25 07:13:32 +00:00
Elliott Hughes
6c79fd22be Merge "Revert "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."""
am: 12794c039a

Change-Id: I159acda6fa2235aa9c2707275bffea1486142110
2019-06-24 23:28:02 -07:00
Elliott Hughes
12794c039a Merge "Revert "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND.""" 2019-06-25 05:56:53 +00:00
Elliott Hughes
fab9f30f6f Revert "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND.""
This reverts commit b00e66f754.

Reason for revert: http://b/135753060

Change-Id: I30f472427f52076b64902420f9538b4a880a2cbe
2019-06-25 05:42:55 +00:00
Tom Cherry
3a12494dc5 Merge "init: Handle properties in the background of calling fs_mgr"
am: 84fc269b6e

Change-Id: I1e6f0aca3351789ccd0eb3c68ab20e606ce7f9ce
2019-06-24 16:20:15 -07:00
Tom Cherry
84fc269b6e Merge "init: Handle properties in the background of calling fs_mgr" 2019-06-24 22:46:09 +00:00
Tom Cherry
a4754b12c4 Merge "Actually make fs_path_config / fs_path_config_from_file private"
am: 20670249d0

Change-Id: I38f4395c5aaa35015900f0c3e4f52d82c1e09b0f
2019-06-24 14:31:37 -07:00
Tom Cherry
9d4c75764d Merge "Avoid get same timestamps in log testcase"
am: 3f6b16395d

Change-Id: I4efdeba6449682016c643b70159594b9b5617533
2019-06-24 14:30:26 -07:00
Tom Cherry
20670249d0 Merge "Actually make fs_path_config / fs_path_config_from_file private" 2019-06-24 20:24:12 +00:00
Tom Cherry
71bdf2820e init: Handle properties in the background of calling fs_mgr
It's been a long standing problem that init calls fs_mgr functions
synchronously and therefore stops handling properties, which causes
deadlocks if either fs_mgr, or vdc, or vold attempt to set
properties.

Previous work, b/21904461, shows that there is a large performance
penalty for adding any amount of locking to properties, so moving
property service into its own thread generically is not a viable
option.  However, we can be sure that init is not setting properties
while the fs_mgr functions are running, so we can poll the property
socket in a thread while we call these functions.

The other alternative would have been to separate the fs_mgr functions
into smaller pieces and revisit the main init loop between each
piece.  Unfortunately, this would be difficult, since
fs_mgr_mount_all() calls out to different processes via logwrapper,
which synchronously polls on a logging FD from the child, among other
complexities that would make this strategy much more difficult than it
would be worth.

Bug: 21904461
Test: device boots, including when setting property in
      fs_mgr_mount_all()

Change-Id: Ib0b7123024035884f9d90f9b489c1e2f5a2e1707
2019-06-24 13:23:49 -07:00
Tom Cherry
3f6b16395d Merge "Avoid get same timestamps in log testcase" 2019-06-24 20:14:37 +00:00
Tom Cherry
83ec2fadb5 Merge "init: use a property instead of file to communicate cold boot done"
am: af274fd086

Change-Id: I47490d2fb48c42131431219dc5cd62bcd55801cc
2019-06-24 12:53:46 -07:00
Tom Cherry
af274fd086 Merge "init: use a property instead of file to communicate cold boot done" 2019-06-24 19:39:03 +00:00
Jone Chou
b9a8033037 bootstat: add reboot,longkey sub-reason to known set
regular expression:
- "reboot,longkey,.*" (184)

regex is dependent on:
- https://android-review.googlesource.com/947976

Test: none
Bug: 132955428
Bug: 133520088
Change-Id: I53d13d95ac11ac73273824156363378372a562ed
2019-06-24 06:29:49 +00:00
Mohammad Islam
040df27b1d Merge "Prevent definitions of expected.h from being included twice"
am: 99087decb9

Change-Id: I74124ec1ca8b4b43cdd0cfdb17bac2402c9f3b4e
2019-06-21 08:10:19 -07:00
Mohammad Islam
99087decb9 Merge "Prevent definitions of expected.h from being included twice" 2019-06-21 09:27:49 +00:00
Christopher Ferris
16f213a23d Merge "Switch case to suite to follow new gtest naming."
am: 4f2048d370

Change-Id: Id5a4cc8818eef71a7ccbc48e32049f313651434f
2019-06-20 23:42:48 -07:00
Christopher Ferris
4f2048d370 Merge "Switch case to suite to follow new gtest naming." 2019-06-21 05:57:45 +00:00
Riddle Hsu
9b54f0f73c Merge "Allow to drop existing fd cache of cgroup path"
am: 1e13891988

Change-Id: I65caea7fddf5567f02e31f63562fe47174a3bb4b
2019-06-20 22:25:21 -07:00
Treehugger Robot
1e13891988 Merge "Allow to drop existing fd cache of cgroup path" 2019-06-21 05:00:30 +00:00
Josh Gao
5c7c698a97 Merge "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND.""
am: 2a6ec6c332

Change-Id: Iee91642ec09022082571e84810f5ef1cb40e35dc
2019-06-20 19:47:40 -07:00
Josh Gao
2a6ec6c332 Merge "Reland "adbd: don't close ep0 until we receive FUNCTIONFS_UNBIND."" 2019-06-21 02:36:56 +00:00
David Anderson
7a7a88e84a Merge "libfiemap_writer: Improve device unwrapping to support simple linear devices."
am: 87db478ad6

Change-Id: I7b248ead7f8b9297d32c6413aab0ef235406a683
2019-06-20 17:25:17 -07:00
Badhri Jagan Sridharan
7fee79550d Merge "usbd: Exit in case of charger mode."
am: 8c63ef828a

Change-Id: Ib3866aa6d6be598dae8be5ca405f481110ecf417
2019-06-20 17:24:55 -07:00
David Anderson
87db478ad6 Merge "libfiemap_writer: Improve device unwrapping to support simple linear devices." 2019-06-20 23:59:06 +00:00
Tom Cherry
68debff5ec Actually make fs_path_config / fs_path_config_from_file private
No one outside of libcutils is using these structs and we don't want
to leak them as they are private.

Test: build
Change-Id: I1c95564a9843c9155a333334008cbff7c7ff1f51
2019-06-20 23:34:30 +00:00
Christopher Ferris
7e21eba5b7 Switch case to suite to follow new gtest naming.
Bug: 135528735

Test: All unit tests pass.
Change-Id: I1f3dc6fe381ec557b6b7bc5cb1c58d210efa63da
2019-06-20 16:18:57 -07:00
Treehugger Robot
8c63ef828a Merge "usbd: Exit in case of charger mode." 2019-06-20 22:47:26 +00:00
Elliott Hughes
a292c30e9c Merge "Finally remove ZipString."
am: 2226fe6ddf

Change-Id: Ia75bde872fa42cf31451b41625e9d5cec75f2b8b
2019-06-20 14:27:38 -07:00
David Anderson
fec781a413 Merge "liblp: Handle invalid alignment offsets correctly."
am: 99f610da3d

Change-Id: Ia2d6150395f4e4705ad8c84d483fe24428ea6cf9
2019-06-20 14:27:17 -07:00
David Anderson
a5d1f552b5 Merge "Remove fs_mgr_wait_for_file."
am: 0b5c3552cc

Change-Id: Ib1f605c7a975c738cda8f2cb017f06b890ab6df9
2019-06-20 14:26:58 -07:00
David Anderson
2864357db0 Merge changes Iae25434a,I13fd6699
am: 71b3afe620

Change-Id: Icfe31e85f64008e7c25614679d2b2785d0be760f
2019-06-20 14:26:36 -07:00
Tom Cherry
2a43e8ffb7 Merge "Remove fs_config endianness functions"
am: 9b229069fb

Change-Id: Ifc484cdbf0eb010af6542390903ecaed2f06a980
2019-06-20 14:26:12 -07:00
Tom Cherry
b9ef822307 Merge "Remove fs_config_generate()"
am: 45f79b1c3b

Change-Id: I5bef71ab65fd45daa94fc16aebb2d8258ce9b275
2019-06-20 14:25:53 -07:00
Christopher Ferris
394faff80c Merge "Fix potential race condition."
am: 61fc364601

Change-Id: I5f1d1748b53bd909800d72a91423686cb9a7a2e9
2019-06-20 14:25:32 -07:00
David Anderson
1bfcd580c8 libfiemap_writer: Improve device unwrapping to support simple linear devices.
Normally we reject complex dm targets that would invalidate or shift the
block mappings returned via FIEMAP/FIBMAP. Currently the only targets
allowed are crypt, default-key, and bow. This patch adds support for
"linear" as long as there is only one linear target and it targets
sector 0 of the underlying block device.

This is useful for testing gsid, so we can simulate how a
metadata-encrypted device works without having to create a dm-crypt or
dm-default-key node.

Bug: 134536978
Test: manual test
Change-Id: I7c12bc20d95ff4c90402e66bafb4cf2fce7818e2
2019-06-20 13:39:11 -07:00
Elliott Hughes
2226fe6ddf Merge "Finally remove ZipString." 2019-06-20 19:20:39 +00:00
Badhri Jagan Sridharan
abc92991ea usbd: Exit in case of charger mode.
UsbGadget hal is not expected run in charger mode.
This should fix the following errors in charger mode:

[   86.609578] c4    612 init: Received control message 'interface_start' for 'android.hardware.usb.gadget@1.0::IUsbGadget/default' from pid: 565 (/system/bin/hwservicemanager)
[   86.618236] c7      1 init: Could not find 'android.hardware.usb.gadget@1.0::IUsbGadget/default' for ctl.interface_start

Bug: 135566354
Test: Manually verified that usbd exits early in charger mode.
Change-Id: I3ba5be883c49e5ca3e4dad4443528e4eee8b25b9
2019-06-20 12:13:31 -07:00
David Anderson
99f610da3d Merge "liblp: Handle invalid alignment offsets correctly." 2019-06-20 19:09:52 +00:00
David Anderson
0b5c3552cc Merge "Remove fs_mgr_wait_for_file." 2019-06-20 19:09:26 +00:00
David Anderson
71b3afe620 Merge changes Iae25434a,I13fd6699
* changes:
  libdm: Add LoopControl helpers for enabling direct IO.
  libdm: Add helpers for getting the device number of a dm device.
2019-06-20 19:06:32 +00:00
Mohammad Samiul Islam
9f24c38fe3 Prevent definitions of expected.h from being included twice
Bug: 135683564
Test: Included expected.h from two different files. Builds succesfully
    with the fix. Does not build without the fix.

Change-Id: If1962a3b70f7580fa652a043aaf29bf592d1926c
2019-06-20 19:03:32 +01:00
Tom Cherry
9b229069fb Merge "Remove fs_config endianness functions" 2019-06-20 16:41:27 +00:00
Tom Cherry
5550d4e90f Remove fs_config endianness functions
We don't support big endian on Android.

Test: build
Change-Id: I4278ecc139b0ffeba63cf7b3a43b1ce9e858e741
2019-06-20 16:35:50 +00:00
Tom Cherry
45f79b1c3b Merge "Remove fs_config_generate()" 2019-06-20 15:36:46 +00:00
Christopher Ferris
61fc364601 Merge "Fix potential race condition." 2019-06-20 15:01:14 +00:00
David Anderson
ea0dda1473 libdm: Add LoopControl helpers for enabling direct IO.
Bug: 134536978
Test: manual test
Change-Id: Iae25434ac54186fd6006b56eeb7a7f577a880053
2019-06-19 19:29:15 -07:00
David Anderson
d106f1e225 libdm: Add helpers for getting the device number of a dm device.
device-mapper will accept a "major:minor" string in place of a path for
any target parameter that specifies another block devie. This is useful
to have a helper for, since it lets us avoid a call to WaitForFile().

Bug: 134536978
Test: manual test
Change-Id: I13fd6699dd5d405bfa676830825b006b7810aa0f
2019-06-19 19:29:09 -07:00
David Anderson
2ca0700b45 liblp: Handle invalid alignment offsets correctly.
When stacking devices with dm-linear, it is possible to get a -1
alignment offset. In this case we should set alignment_offset to 0
rather than fail later trying to divide -1 by the sector size.

Bug: 134536978
Test: manual test
Change-Id: I3862fdda69531a3b230b7316707469a49ba871d6
2019-06-19 19:23:55 -07:00