Commit Graph

23958 Commits

Author SHA1 Message Date
Jorge Lucangeli Obes 52807711fe Merge "Add description of 'namespace' option."
am: 4588ed7b5f

Change-Id: I43d097498527f86c72fd3748afb0e31b53591501
2016-08-31 21:05:50 +00:00
Treehugger Robot 4588ed7b5f Merge "Add description of 'namespace' option." 2016-08-31 21:00:41 +00:00
Josh Gao 8c23285a85 Merge "base: disallow close() on unique_fd."
am: ca82aa7d1e

Change-Id: I2caa59dad273423500da25a03dfc56592de4fafe
2016-08-31 20:53:49 +00:00
Josh Gao ca82aa7d1e Merge "base: disallow close() on unique_fd." 2016-08-31 20:47:13 +00:00
Daniel Rosenberg 16d32620e4 Merge "sdcard: Fix bad merge"
am: 6a5ed849e8

Change-Id: I6f23ba29758ca48d4f925b5f3bd4cf6f6c3b5752
2016-08-31 20:33:18 +00:00
Treehugger Robot 6a5ed849e8 Merge "sdcard: Fix bad merge" 2016-08-31 20:26:02 +00:00
Jorge Lucangeli Obes cd2518c19c Add description of 'namespace' option.
Bug: None
Change-Id: Ib71005eb9823c7511b07d4060d08411ce3d0a8f0
2016-08-31 15:23:44 -04:00
Elliott Hughes 910799cf41 Merge "Add android::base::Readlink."
am: a7c4424ebc

Change-Id: Id49c69cc8aceb1ec974e58d341022dd713c9b7cb
2016-08-31 18:05:47 +00:00
Treehugger Robot a7c4424ebc Merge "Add android::base::Readlink." 2016-08-31 17:56:40 +00:00
Elliott Hughes d3ff6e5231 Add android::base::Readlink.
Bug: http://b/30988271
Change-Id: Ib844d7c9e33465dabf7aee5e24dc3d1d8d799abd
2016-08-31 09:35:44 -07:00
Daniel Rosenberg 9526819c70 sdcard: Fix bad merge
A few changes got dropped along merge resolution. This adds them back

Affected CLs:
Ie188cb044be2ad87166f2d43c32a1f6b97660de0
Ibdb72ad16a1e6c3a01edcb03d003c42de7a03cd6

Change-Id: I1924f5a4bd7564ceaf9bb3a45b7fb7804b3619d7
2016-08-31 00:04:22 +00:00
Felipe Leme a3dae40970 Merge changes I0af0ad24,I942c92fd,Ibc8920dd,Icfce9c1e,I1c6cc616, ...
am: 5b136369ca

Change-Id: I678f8117142c03212b3ec927e48eb6c09199844b
2016-08-30 22:55:52 +00:00
Felipe Leme 24fcc797bc DO NOT MERGE: Split 'generating' and 'pulling' in 2 messages.
am: 680f4a4888  -s ours

Change-Id: Id29ad7d15cd8c2d548adaea9e4af453e3f6fbe8f
2016-08-30 22:55:51 +00:00
Felipe Leme a524bd336e DO NOT MERGE: Ignore bugreportz output when it's not supported.
am: f33fcb6418  -s ours

Change-Id: Ib32f3c8c4ccd73a1c93f0563dfd79690fdd8ff0d
2016-08-30 22:55:48 +00:00
Felipe Leme 91375a8e4e DO NOT MERGE: Deprecated 'adb bugreport' with flat files.
am: b3239728bb  -s ours

Change-Id: I1a62177a57a91e89c14b5955f4946fc589f2704d
2016-08-30 22:55:44 +00:00
Felipe Leme c5059e1acb DO NOT MERGE: Minor improvements on bugreport generation.
am: 6e2869680c  -s ours

Change-Id: I1987d9d6336018566f5681523bf3d7e946d7af84
2016-08-30 22:55:41 +00:00
Felipe Leme b63cc28a4d DO NOT MERGE: Removed extra 'pulling file' message.
am: daf4628f36  -s ours

Change-Id: Idef6f24c1e590f1ffb3ccdfd2cd8679f3976dadc
2016-08-30 22:55:37 +00:00
Felipe Leme e2c9dfd13a DO NOT MERGE: Show bugreport progress.
am: 6f5080faa5  -s ours

Change-Id: I88bfa3fb03fa3e48d065cc6cb41757b33596800b
2016-08-30 22:55:34 +00:00
Felipe Leme 67e86096e3 DO NOT MERGE: Refactored functions that copy sdout and stderr to strings to use a callback.
am: 0d4f0508c0  -s ours

Change-Id: I4e6d14b35be89869d6853d1d4ba155823fa207e1
2016-08-30 22:55:30 +00:00
Felipe Leme 53c122bbe8 DO NOT MERGE: Split bugreport() into its own file and added unit tests.
am: 698e065e14  -s ours

Change-Id: Iebbdfef75e812db2d2252f50055b6df626ce05d6
2016-08-30 22:55:27 +00:00
Todd Kennedy c8554a9a22 DO NOT MERGE: use 'cmd' command for install-multiple
am: 248722e7eb  -s ours

Change-Id: I4f3d38f9c6982289aada34cc3f65f47180ec2470
2016-08-30 22:55:23 +00:00
Christopher Tate b331588156 DO NOT MERGE: Ensure the target sees a proper EOD marker during restore
am: c42f1bb3e9  -s ours

Change-Id: Ic2d1c391f6876a569eafe3850ceb5f048804105b
2016-08-30 22:55:19 +00:00
Treehugger Robot 5b136369ca Merge changes I0af0ad24,I942c92fd,Ibc8920dd,Icfce9c1e,I1c6cc616, ...
* changes:
  DO NOT MERGE: Split 'generating' and 'pulling' in 2 messages.
  DO NOT MERGE: Ignore bugreportz output when it's not supported.
  DO NOT MERGE: Deprecated 'adb bugreport' with flat files.
  DO NOT MERGE: Minor improvements on bugreport generation.
  DO NOT MERGE: Removed extra 'pulling file' message.
  DO NOT MERGE: Show bugreport progress.
  DO NOT MERGE: Refactored functions that copy sdout and stderr to strings to use a callback.
  DO NOT MERGE: Split bugreport() into its own file and added unit tests.
  DO NOT MERGE: use 'cmd' command for install-multiple
  DO NOT MERGE: Ensure the target sees a proper EOD marker during restore
2016-08-30 22:46:17 +00:00
Felipe Leme 680f4a4888 DO NOT MERGE: Split 'generating' and 'pulling' in 2 messages.
BUG: 30799929
Change-Id: I0af0ad2478c57ffc5b2c953118e01677f788d14a
(cherry picked from commit 9c0be90528)
(cherry picked from commit 321c21e2df)
2016-08-30 13:06:37 -07:00
Felipe Leme f33fcb6418 DO NOT MERGE: Ignore bugreportz output when it's not supported.
On devices running M or below, calling 'bugreportz -v' writes
'/system/bin/sh: bugreportz: not found' in the stdout output, which must
be redirected to stderr so it's not shown in the flat-file bugreport,
above the bugreport header.

BUG: 30451114

Change-Id: I942c92fdf6ae85e0cde7b9f94b9eb0b1fecad77a
(cherry picked from commit 9a882a3ef3)
(cherry picked from commit b0022b036e)
2016-08-30 13:06:35 -07:00
Felipe Leme b3239728bb DO NOT MERGE: Deprecated 'adb bugreport' with flat files.
Starting on Android N, zipped bugreports contain more information than
flat-file, text bugreports. On N, calls to 'adb bugreport' would still
generate a flat-file bugreport, but with a warning.

With this change, 'adb bugreport' will generate a zipped bugreport in
the current directory, using the bugreport name provided by the
device. Similarly, calling 'adb bugreport dir' will generate a bugreport
with a device-provided name, but in such directory.

BUG: 30451114
BUG: 29448020

Change-Id: Ibc8920dd44a5f62feb15bf3fefdcb0bdbf389a90
(cherry picked from commit 307951e124)
(cherry picked from commit f8d9e4eb00)
2016-08-30 13:06:33 -07:00
Felipe Leme 6e2869680c DO NOT MERGE: Minor improvements on bugreport generation.
- Skipped artificial 100/100 message, since pulling will take care of
  the final 100% progress.
- Consolidated unsupported lines in just one message.
- Let user know the bugreport can still be recovered when it could not
  be copied to the destination directory.

BUG: 30451114

Change-Id: Icfce9c1e8e7ed407719728b9874679ac40b21eab
(cherry picked from commit 80a65d03c9)
(cherry picked from commit 5f6eacaeda)
2016-08-30 13:06:32 -07:00
Felipe Leme daf4628f36 DO NOT MERGE: Removed extra 'pulling file' message.
Taking a zip bugreport has 2 phases: generating the bugreport and
pulling the file.

Initially adb was printing 2 messages, but since the latter is almost
instantaneously, it could be confusing to have 2 lines...

Fixes: 30451250
Change-Id: I1c6cc6163492c1fb6064667dfdb7aaf6ed4c4c6f
(cherry picked from commit f7c38b4c03)
(cherry picked from commit 33ae849fef)
2016-08-30 13:06:30 -07:00
Felipe Leme 6f5080faa5 DO NOT MERGE: Show bugreport progress.
adb calls bugreportz to generate a bugreport; initially, bugreportz
would only report the final status of the operation (OK or FAIL), but
now it sends intermediate PROGRESS lines reporting its progress (in the
form of current/max).

Similarly, the initial implementation of 'adb bugreport <zip_file>'
would print an initial 'please wait' message and wait for the full
stdout before parsing the result, but now it uses a new callback class
to handle the stdout as it is generated by bugreportz.

BUG: 28609499

Change-Id: I6644fc39a686279e1635f946a47f3847b547d1c1
(cherry picked from commit cd42d658b2)
(cherry picked from commit 97b73a0daf)
2016-08-30 13:06:28 -07:00
Felipe Leme 0d4f0508c0 DO NOT MERGE: Refactored functions that copy sdout and stderr to strings to use a callback.
BUG: 28609499

Change-Id: I04aea346e18678ea00797f7f659480edba4436c2
(cherry picked from commit 07ac8554b4)
(cherry picked from commit d18854218e)
2016-08-30 13:06:26 -07:00
Felipe Leme 698e065e14 DO NOT MERGE: Split bugreport() into its own file and added unit tests.
bugreport() will be soon refactored to track progress, which will
require more comprehensive unit tests.

As such, it's better to move it to its own files, which in turn also
requires moving send_shell_command() and usage() to commandline.h.

Fixes: 30100363
Bug: 30268737

Change-Id: I3cdf114a0b5547293320042ff0749a60886440b0
(cherry picked from commit 78e0963e4b)
(cherry picked from commit 218e1ff759)
2016-08-30 13:06:23 -07:00
Todd Kennedy 248722e7eb DO NOT MERGE: use 'cmd' command for install-multiple
adb install-multiple makes a minimum of 3 calls to the 'pm' command. This
causes at least 3 separate "pm" processes to be spun up. Instead, use the
'cmd' command which runs in the existing system_server process.

Bug: 27483932
Change-Id: Ia1bed405c3d7e675a1a56ff82c692aaa94388a5c
(cherry picked from commit 4838ae1ab5)
2016-08-30 13:06:12 -07:00
Christopher Tate c42f1bb3e9 DO NOT MERGE: Ensure the target sees a proper EOD marker during restore
Malformed or corrupt archives may be missing their in-band EOD
content, so make sure that the target sees one regardless rather
than continuing to block on read, expecting in-band signaling.

Bug 28056941

Change-Id: Ic39966d3448787a8c511783d39172032ed9589c3
(cherry picked from commit 2bcdda8e5d)
2016-08-30 13:06:05 -07:00
John Reck 9cbbe2d9df Merge "Fix access check"
am: 87ef739dba

Change-Id: Iee618c55186988f79e926a34cd7692f1d01a7f99
2016-08-29 22:28:56 +00:00
John Reck 87ef739dba Merge "Fix access check" 2016-08-29 22:15:23 +00:00
Josh Gao 6496c4bf6f base: disallow close() on unique_fd.
unique_fd's implicit conversion to int allows it to be passed to
close(2), which is dangerous because unique_fd will think that it still
has ownership of the now-closed fd. Disallow this by providing an
overload for close that's tagged with an attribute that gives a
compile-time error.

Test: m
Change-Id: I514591335b337f2f57c1df371cf3979304aea17c
2016-08-29 14:37:49 -07:00
Dan Willemsen ded1346ca5 Merge "Convert to Android.bp"
am: 10348cbeb9

Change-Id: Ica8fd833a664df6255f3835f2c755751bb98f8d5
2016-08-29 20:40:25 +00:00
Treehugger Robot 10348cbeb9 Merge "Convert to Android.bp" 2016-08-29 20:32:12 +00:00
Mitchell Wills 6a5fa764c1 Merge "Tag hostapd binary with CAP_NET_ADMIN | CAP_NET_RAW" into stage-aosp-master 2016-08-29 20:03:19 +00:00
Christopher Ferris c4abab8578 Merge "Update for kernel headers v4.7.2."
am: 73d2cc570d

Change-Id: I7ec40925a8d6330ea40e31de499576989ea1b63d
2016-08-29 19:18:15 +00:00
Christopher Ferris 73d2cc570d Merge "Update for kernel headers v4.7.2." 2016-08-29 19:14:10 +00:00
Andreas Gampe f4878c6b88 Merge "Libbase: add C++11 support to DISALLOW_IMPLICIT_CONSTRUCTORS"
am: e7f3a0f9cf

Change-Id: I691b16739bf2dcc5380e3281ee37b9a0f9e92c37
2016-08-29 19:11:39 +00:00
Treehugger Robot e7f3a0f9cf Merge "Libbase: add C++11 support to DISALLOW_IMPLICIT_CONSTRUCTORS" 2016-08-29 18:59:38 +00:00
Andreas Gampe 247924a36f Libbase: add C++11 support to DISALLOW_IMPLICIT_CONSTRUCTORS
Use delete when possible.

Test: m
Test: m test-art-host
Change-Id: Ib741564c7a31348b2f706fe55eb23d9886f865e3
2016-08-29 09:36:31 -07:00
Josh Gao f95e728431 Merge "adb: factor out socket specification."
am: bd7d2e2ec0

Change-Id: I14f452e11395139f5687e5096af5b278eb14d63d
2016-08-27 02:58:50 +00:00
Treehugger Robot bd7d2e2ec0 Merge "adb: factor out socket specification." 2016-08-27 02:50:34 +00:00
Christopher Ferris f83c7923f9 Update for kernel headers v4.7.2.
The new uapi kernel headers added a new SEGV reason code, so
add it to the tombstone code.

Update sync.c to include the needed data structures itself. Someone
else will be fixing this to work on old versus new kernels.

Change-Id: Icb27713ea38a20003c7671a9bca262eebd96099b
2016-08-26 16:48:18 -07:00
Dan Willemsen 194edf772e Convert to Android.bp
See build/soong/README.md for more information.

I tested the following tests on a Nexus9 and linux host, and they
continued to pass:

/data/nativetest{,64}/bootstat_tests/bootstat_tests
out/host/linux-x86/bin/nativetest{,64}/bootstat_tests/bootstat_tests
/data/nativetest64/memunreachable_test/memunreachable_test
out/host/linux-x86/bin/nativetest{,64}/memunreachable_test/memunreachable_test

These continue to fail just like before this change:

/data/nativetest{,64}/sync_test/sync_test (was /system/bin/sync_test)
/data/nativetest{,64}/sync-unit-test/sync-unit-test
/data/nativetest/memunreachable_test/memunreachable_test

Test: See above
Change-Id: I691e564e0cf008dd363e3746223b153d712e024d
2016-08-26 16:19:21 -07:00
John Reck 2e336b1da1 Fix access check
Fixes a bug where USE_CPUSET used access(F_OK)
as a sign that it should try writing to the cpuset
path. It needs to instead use access(W_OK) to
ensure that it has write access as that's what
it would try to open() with.

And stop trying to repeatedly open a file that
doesn't exist.

Change-Id: Ib391ee6f08345051c48a986a732eda30143cb614
2016-08-26 14:05:03 -07:00
Colin Cross 904c1042cd Merge "Replace libziparchive-host with libziparchive"
am: 091b631915

Change-Id: I4ee6244e8fc2fad0edd17be39cd275abbcf8e62d
2016-08-26 20:25:33 +00:00