Commit graph

29757 commits

Author SHA1 Message Date
Elliott Hughes
94202c2b9d Merge "Improve udev failure diagnostics."
am: 5ad9ba12df

Change-Id: I6ef9050b822c63ab79fd93bfb86ef96837727904
2017-05-05 21:37:14 +00:00
Elliott Hughes
5ad9ba12df Merge "Improve udev failure diagnostics." 2017-05-05 21:33:56 +00:00
Elliott Hughes
cd35664cdc Improve udev failure diagnostics.
A couple of folks had trouble understanding the existing message.

Before:

  8XV7N15917000596	no permissions (udev requires plugdev group membership); see [http://developer.android.com/tools/device.html]

After:

  8XV7N15917000596	no permissions (user buttmunch is not in the plugdev group); see [http://developer.android.com/tools/device.html]

This also fixes a libusb regression where we wouldn't show anything for
devices where we don't have permissions.

Bug: http://b/37707122
Test: ran "adb devices" as user buttmunch
Change-Id: I2fcd735ff4178145432b532a6e4dc8c93b2743fd
2017-05-05 12:50:16 -07:00
Christopher Ferris
497029004a Merge "Use async safe logging in signal handlers."
am: fd8fab19df

Change-Id: I66b41a0d3035439f85acc52e98348de0bba56576
2017-05-05 17:56:59 +00:00
Christopher Ferris
fd8fab19df Merge "Use async safe logging in signal handlers." 2017-05-05 17:49:04 +00:00
Thierry Strudel
140d1f51a1 Merge "fs_mgr_avb: allow verification error when the device is unlocked"
am: 7245ab6a11

Change-Id: Ibdc7cd211aa89ba36735dec25cf8cd3d11fa4da0
2017-05-05 16:45:52 +00:00
Thierry Strudel
7245ab6a11 Merge "fs_mgr_avb: allow verification error when the device is unlocked" 2017-05-05 16:37:26 +00:00
Bowgo Tsai
1140954877 fs_mgr_avb: allow verification error when the device is unlocked
Current AVB flow in fs_mgr doesn't allow verification error even if the
device is unlocked. This makes first stage mount fail when the device
is flashed with a different-sized boot.img because there is verification
error (HASH_MISMATCH) for the boot partition.

Fix this by allowing verification error only when the device is
unlocked. Whether to enable dm-verity for HASHTREE partitions is still
controlled by the HASHTREE_DISABLED flag in the top-level vbmeta.

Bug: 37985430
Test: First stage mount /vendor with AVB on a device.
      Check dm-verity is enabled on /vendor.
Test: Unlock device, flash a different-sized boot.img. Boot device and check
      dm-verity is still enabled on /vendor.
Test: First stage mount /vendor with AVB on a device with HASHTREE_DISABLED
      is set on the top-level vbmeta, check dm-verity is not enable on /vendor.

Change-Id: I709431bc1c37e4f86133d171cee8e90621cdb857
2017-05-05 22:36:40 +08:00
Steven Moreland
1561e34bf4 Merge "trusty/storage/* to Android.bp"
am: 1dcd257a21

Change-Id: Ia4397b245c0f34e67f3c3d46193af6bf3331c29c
2017-05-05 03:44:02 +00:00
Keun-young Park
2f3718c472 Merge "use passed blk dev name for quota / super block check"
am: 7b706c5b9e

Change-Id: I24a1f92821c0bd204eb25f0aaa4e46a962565291
2017-05-05 03:40:32 +00:00
Treehugger Robot
1dcd257a21 Merge "trusty/storage/* to Android.bp" 2017-05-05 03:36:06 +00:00
Treehugger Robot
7b706c5b9e Merge "use passed blk dev name for quota / super block check" 2017-05-05 03:33:16 +00:00
Keun-young Park
9519688411 use passed blk dev name for quota / super block check
- It was using blk dev name from fstab and quota / super block check was always
  failing for FDE

bug: 37913441
Test: reboot and confirm quota
Change-Id: I8a9e890ef2787f2959e6a0225c6b21d35602f19e
2017-05-04 18:31:06 -07:00
Christopher Ferris
f30a810bce Use async safe logging in signal handlers.
Test: Boot on bullhead.
Test: Ran the libbacktrace tests on bullhead.
Test: Added a temporary log message in the signal handler, and ran the
Test: backtrace tests.
Change-Id: I0a6888c9f311af2c8cc7fbb4929315911bd2bb3c
2017-05-04 17:15:17 -07:00
Elliott Hughes
e03caa00ef Merge "Clean up the partition name mapping in fastboot."
am: bdbcdf3a16

Change-Id: I424b6bd4141df78471fc2b51a02df96ece70059e
2017-05-05 00:08:48 +00:00
Elliott Hughes
bdbcdf3a16 Merge "Clean up the partition name mapping in fastboot." 2017-05-05 00:04:45 +00:00
Josh Gao
2ca23fa508 Merge changes from topic 'adb_thread_safety'
am: 9083ff1c24

Change-Id: I55e4d18648d3ceb915840ee5d25b2e8146a0bef6
2017-05-04 23:52:50 +00:00
Josh Gao
9083ff1c24 Merge changes from topic 'adb_thread_safety'
* changes:
  adb: wait for devices to come up instead of sleeping for 3s.
  adb: initialize mDNS asynchronously.
  adb: add fdevent_run_on_main_thread.
2017-05-04 23:47:32 +00:00
Elliott Hughes
5f865e5943 Merge "This code has moved to toybox proper."
am: c5dbd7134d

Change-Id: I653790cc381755645decbdfb2c57be0e61628b6e
2017-05-04 23:27:55 +00:00
Treehugger Robot
c5dbd7134d Merge "This code has moved to toybox proper." 2017-05-04 23:21:36 +00:00
Josh Gao
b80ef5e6fd Merge "adb: make darwin build with thread safety analysis."
am: 971e6585a6

Change-Id: I504a569348bcdbb3933cf8b5b1a793868feed035
2017-05-04 23:13:15 +00:00
Josh Gao
971e6585a6 Merge "adb: make darwin build with thread safety analysis." 2017-05-04 23:05:38 +00:00
Josh Gao
fd713e53e8 adb: wait for devices to come up instead of sleeping for 3s.
Replace a hard-coded 3 second sleep with logic to wait until we've
scanned USB devices once and they've all come online.

Before:
    adb shell true  0.00s user 0.00s system 0% cpu 3.047 total

After:
    adb shell true  0.00s user 0.00s system 9% cpu 0.041 total

Bug: http://b/37869663
Test: `time adb shell true` after adb kill-server
Change-Id: I251d42afb885908ed9d03167287594ea16650d3f
2017-05-04 16:03:12 -07:00
Josh Gao
04a8218f09 adb: make darwin build with thread safety analysis.
Test: mma on darwin
Change-Id: I44dfc53fc381e60de83f3bc503691cdb8179ca91
2017-05-04 16:03:12 -07:00
Josh Gao
6f46e6b912 adb: initialize mDNS asynchronously.
Use fdevent_run_on_main_thread to initialize mDNS in a thread and
register an fdevent from the main thread upon success.

This reduces the startup time of `adb server` by ~3 seconds when mDNS
can't be successfully started. With an already running adb server,
`time adb server nodaemon` goes from:

    adb server nodaemon  0.00s user 0.16s system 4% cpu 3.817 total

to:

    adb server nodaemon  0.00s user 0.01s system 1% cpu 0.665 total

Bug: http://b/37869663
Test: `adb server nodaemon` with an existing adb server
Change-Id: Ia5a1a2a138610f3bf6792400050ca68f95ae3734
2017-05-04 16:03:12 -07:00
Josh Gao
4c936397c1 adb: add fdevent_run_on_main_thread.
Add a function to run a function on the main thread, to allow fdevents
that depend on a blocking function to be registered.

Bug: http://b/37869663
Test: adb_test on linux
Change-Id: I84a0b372360420b7647057297b8f437e8afa874e
2017-05-04 16:03:12 -07:00
Mark Salyzyn
bfead93a3a Merge "libcutils: fs_config internal table alias test"
am: 8fad110bfa

Change-Id: I53835ad38965fd315b6463605d4cee5d580da154
2017-05-04 21:12:53 +00:00
Christopher Ferris
b34a9d11ec Merge "Move all logging to use the async safe logging."
am: d673da4bfb

Change-Id: I78783a8204b92404405c7bde6f4a0e7e92c72644
2017-05-04 21:12:34 +00:00
Treehugger Robot
8fad110bfa Merge "libcutils: fs_config internal table alias test" 2017-05-04 21:06:12 +00:00
Christopher Ferris
d673da4bfb Merge "Move all logging to use the async safe logging." 2017-05-04 21:00:07 +00:00
William Roberts
b46b61049b Merge "init: cleanup exec_service documentation"
am: 61559e491e

Change-Id: I0fa614975f5fbdf7f58be724e4cea4258eda79c3
2017-05-04 20:06:02 +00:00
Treehugger Robot
61559e491e Merge "init: cleanup exec_service documentation" 2017-05-04 19:54:17 +00:00
Mark Salyzyn
0f6a270d24 libcutils: fs_config internal table alias test
Private interface to permit testing only added to fs_config to
expose android_files and android_dirs.

Make sure that both paths to a partition are specified in fs_config
internal tables.

Test: gTest libcutils-unit-test --gtest_filter=fs_config.*
Bug: 37703469
Change-Id: Ida5fccdb786dc6d67325005d4fdd1fa1ffaef396
2017-05-04 11:41:17 -07:00
William Roberts
323d5791b4 init: cleanup exec_service documentation
The exec_service documentation was difficult to read, clarify it.

Tests:
Run grip.py to verify that the markdown still works correctly.
Run aspell to verify spelling.

Change-Id: I29bdd456f3d3ea2a91c9d4772bd09a5a195f97a9
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2017-05-04 11:14:23 -07:00
Elliott Hughes
8dd31c23ca Merge "Remove bogus _LARGEFILE_SOURCE."
am: 3d7ee068e0

Change-Id: Ifb7cc331b99a8d1260eec665d78ba347f91f2ff0
2017-05-04 17:39:19 +00:00
Treehugger Robot
3d7ee068e0 Merge "Remove bogus _LARGEFILE_SOURCE." 2017-05-04 17:33:54 +00:00
Steven Moreland
7f0a5bd767 trusty/storage/* to Android.bp
Test: links
Bug: 37512442
Change-Id: I53449f572e41a24a4e49b16ef01bdbb23cc10cb5
2017-05-04 15:51:50 +00:00
Elliott Hughes
be9024dfbb This code has moved to toybox proper.
Bug: http://b/36653902
Test: ran toybox tests
Change-Id: If0f858121fa29b49fe85c3c21eacd8d5c55fb57b
2017-05-03 22:56:10 -07:00
Elliott Hughes
45964a8e90 Clean up the partition name mapping in fastboot.
Also remove -p.

Bug: N/A
Test: builds
Change-Id: Iea55affc7262323c0d341003359d3175580efbfd
2017-05-03 22:45:37 -07:00
Elliott Hughes
92433d8af0 Remove bogus _LARGEFILE_SOURCE.
Bug: N/A
Test: builds
Change-Id: I145a521a58dc8f838ce188540b02bcda4e81b610
2017-05-03 22:21:16 -07:00
Jin Qian
06c1500a14 Merge "init: manually restorecon mke2fs tools on ramdisk"
am: e2629c5682

Change-Id: Iaa0683ce7931e7408fd836ee058ef4528fc07579
2017-05-04 02:12:18 +00:00
Treehugger Robot
e2629c5682 Merge "init: manually restorecon mke2fs tools on ramdisk" 2017-05-04 02:07:02 +00:00
Christopher Ferris
47dea71b16 Move all logging to use the async safe logging.
Also, add a link to the .clang-format-2 for this directory and clang
format the files that changed.

Bug: 31919199

Test: Boot bullhead.
Test: Run unit tests on bullhead. There are a few that fail, but they
Test: failed before and are not a result of this change.
Change-Id: I3d3b2111f6f6bf8a0d7039295d34d5168c191651
2017-05-03 18:04:18 -07:00
Josh Gao
ff9d6425d4 Merge "adb: use the actual wMaxPacketSize for usb endpoints."
am: c7988b1f68

Change-Id: Ia81c0e97857823759c7f71ecfca252259d41fee5
2017-05-04 00:16:41 +00:00
Josh Gao
c7988b1f68 Merge "adb: use the actual wMaxPacketSize for usb endpoints." 2017-05-04 00:12:23 +00:00
Yueyao Zhu
061003841e Merge "Add dtbo image support for device tree overlay"
am: 5eefcbdd3b

Change-Id: I9bc2bfd6f56482d8776e46da60d8b63d69f75ab5
2017-05-03 23:56:38 +00:00
Treehugger Robot
5eefcbdd3b Merge "Add dtbo image support for device tree overlay" 2017-05-03 23:48:25 +00:00
Tom Cherry
c43da33005 Merge "Make /data/data a symlink to /data/user/0"
am: 49bbe16447

Change-Id: I3af2449abd0b1bb4d839d7a17239fe574ed2e88c
2017-05-03 23:46:50 +00:00
Josh Gao
0c91897714 Merge "adb: enable -Wthread-safety on linux/darwin."
am: 2983d2710e

Change-Id: I0fcbadd46a16028b2e69cba1f82975e4e50fd4cf
2017-05-03 23:44:00 +00:00
Tom Cherry
49bbe16447 Merge "Make /data/data a symlink to /data/user/0" 2017-05-03 23:43:00 +00:00