Commit Graph

24300 Commits

Author SHA1 Message Date
Josh Gao d70699ef75 adb: extract the adb-specific unique_fd out into its own header. am: 924d35a8d5
am: 2c6ff3d2b5

Change-Id: I921ef808d09872901454a6ed92e2c164df435c0c
2016-09-02 01:11:41 +00:00
Josh Gao 74693b9ea6 adb: add helper to get the ~/.android directory. am: e0b7502c7f
am: 36796df275

Change-Id: I1a070b831ec9e749d5a8dd4f7481f13068b20685
2016-09-02 01:11:37 +00:00
Josh Gao 2c6ff3d2b5 adb: extract the adb-specific unique_fd out into its own header.
am: 924d35a8d5

Change-Id: Ib557fbafefe6c281230fdeaaea4db03f6cbd7df0
2016-09-02 01:08:41 +00:00
Josh Gao 36796df275 adb: add helper to get the ~/.android directory.
am: e0b7502c7f

Change-Id: I2859a6b3022a97d2b01d6850bcefe77307726904
2016-09-02 01:08:38 +00:00
Josh Gao 03da262702 Merge "libcutils: try all addresses in socket_network_client_timeout." am: f3d43032d2
am: b7011e0410

Change-Id: Iabdfba4a3546e7a6f335d3d8b7ad2bb75f47d972
2016-09-02 00:56:06 +00:00
Josh Gao b7011e0410 Merge "libcutils: try all addresses in socket_network_client_timeout."
am: f3d43032d2

Change-Id: I373ce6f43a7164754930c62c7fe249ed6530cfd0
2016-09-02 00:52:38 +00:00
Treehugger Robot f3d43032d2 Merge "libcutils: try all addresses in socket_network_client_timeout." 2016-09-02 00:46:36 +00:00
Josh Gao b9cd3c2213 Merge "init: create /dev/urandom, /dev/random in first stage." am: 9baf4e94fa
am: 344e2b307b

Change-Id: I45b306d232fd2e73eb9673b1997fb44fd1d20982
2016-09-01 23:05:34 +00:00
Josh Gao 344e2b307b Merge "init: create /dev/urandom, /dev/random in first stage."
am: 9baf4e94fa

Change-Id: I39a3b752e4f39411e754fd041f1f7f8fb878b98f
2016-09-01 23:02:31 +00:00
Treehugger Robot 9baf4e94fa Merge "init: create /dev/urandom, /dev/random in first stage." 2016-09-01 22:57:12 +00:00
Josh Gao 78cc20f007 libcutils: try all addresses in socket_network_client_timeout.
If a connection fails to an address that resolves to multiple
sockaddrs, attempt connecting to subsequent addresses if the initial
connection fails to a reason other than timeout. This is primarily
useful for localhost, which can resolve to both an IPv4 and and IPv6
address.

Also, add an adb test to verify that this behavior.

Bug: http://b/30313466
Change-Id: Ib2df706a66cf6ef8c1097fdfd7aedb69b8df2d6e
Test: python test_adb.py (+ the test fails before this patch)
2016-09-01 15:56:58 -07:00
Josh Gao 924d35a8d5 adb: extract the adb-specific unique_fd out into its own header.
Some POSIX-only files would like to use functions declared in
adb_utils.h without being forced to use the sysdeps stuff for open,
close, etc. Extract the adb-specific unique_fd into its own header so
those files can use adb_utils.h alongside the real unique_fd.

Change-Id: I10344ef26b7e72fce46bf7e3033f89aa54bd6118
Test: mm
2016-09-01 15:49:06 -07:00
Andreas Gampe 17ca61332f Merge "Base: assume and use C++11 in libbase" am: 43824e72c7
am: 347eae5ea9

Change-Id: Ie416f92d3927152dbd68c5b942e46c3ad291d946
2016-09-01 22:46:28 +00:00
Andreas Gampe 347eae5ea9 Merge "Base: assume and use C++11 in libbase"
am: 43824e72c7

Change-Id: I92d9e92aed253803ffb9255a96717947fc117c5b
2016-09-01 22:43:29 +00:00
Josh Gao e0b7502c7f adb: add helper to get the ~/.android directory.
Extract the logic for creating ~/.android out of get_user_key_path into
its own function. Also, fall back to getpwuid_r when $HOME isn't
defined.

Change-Id: I676a7c750cb364f89b544818ffda07903d14fb97
Test: ran adb with ~/.android missing
2016-09-01 15:43:22 -07:00
Treehugger Robot 43824e72c7 Merge "Base: assume and use C++11 in libbase" 2016-09-01 22:32:42 +00:00
Andreas Gampe 22847131da Base: assume and use C++11 in libbase
Assume C++11 support. logging.h already used constexpr before,
macros.h now also does no longer check the language level.

Use constexpr for the logging evaluator. This allows the usage
of CHECK and co in other constexpr expressions in C++14.

Test: m checkbuild (N9)
Change-Id: Ifdffa074271fff1f9949c48829a185800ec5e524
2016-09-01 13:38:12 -07:00
Josh Gao bad2e28bf7 Merge "base: use _NSGetExecutablePath in GetExecutablePath" am: 8e7ae1e381
am: d402932732

Change-Id: Ide9a5fb508594347f0c50523dab6507276292f74
2016-09-01 19:50:46 +00:00
Josh Gao d402932732 Merge "base: use _NSGetExecutablePath in GetExecutablePath"
am: 8e7ae1e381

Change-Id: I1616ffbc7824cf27d880ba110d7f000d59521e6c
2016-09-01 19:47:48 +00:00
Josh Gao 8e7ae1e381 Merge "base: use _NSGetExecutablePath in GetExecutablePath" 2016-09-01 19:37:12 +00:00
Josh Gao 7307f09457 base: use _NSGetExecutablePath in GetExecutablePath
Bug: http://b/31240820
Change-Id: I0dbf95d3667c7ce7b474ddbb3f8e3ed69476d13e
Test: mma && adb kill-server && adb devices
2016-09-01 12:32:35 -07:00
Josh Gao feb044f575 Merge "Add android::base::GetExecutablePath, switch adb and fastboot over." am: 945d1aaa32
am: 289240f0bf

Change-Id: I5a8ccc66a82b75db495c8461550339c2ec7e639e
2016-09-01 18:52:55 +00:00
Josh Gao 289240f0bf Merge "Add android::base::GetExecutablePath, switch adb and fastboot over."
am: 945d1aaa32

Change-Id: I978edcc27401c174a771ab22be1a8b9abcb55d5f
2016-09-01 18:50:01 +00:00
Josh Gao 945d1aaa32 Merge "Add android::base::GetExecutablePath, switch adb and fastboot over." 2016-09-01 18:38:12 +00:00
Elliott Hughes 82ff315bb0 Add android::base::GetExecutablePath, switch adb and fastboot over.
We'd long had two copies of this stuff, so rather than rewrite both
Linux versions to use android::base::Readlink, let's kill the duplication
too...

Bug: http://b/30988271
Change-Id: I4de58a94a22a4b1faf969a6fc70ca1560a4d5121
2016-09-01 09:24:24 -07:00
Andreas Gampe 297f1864e1 Merge "Base: add more thread annotations" am: 3f3ea50828
am: 551b5b7b1e

Change-Id: I235e44243027614c29fb1cfbc01d0e28e6dacaa0
2016-08-31 22:37:25 +00:00
Josh Gao ab4fbe1b4f init: create /dev/urandom, /dev/random in first stage.
Create /dev/random and /dev/urandom in the first stage, so that when we
reexec, arc4random is available for libc initialization.

Bug: http://b/29622562
Change-Id: I5b2071539a17eec609faac91dc28b08eba5ff89b
2016-08-31 15:36:37 -07:00
Andreas Gampe 551b5b7b1e Merge "Base: add more thread annotations"
am: 3f3ea50828

Change-Id: Id3f14cb0e909cf8215bbc8540d9986f036d65df3
2016-08-31 22:34:26 +00:00
Treehugger Robot 3f3ea50828 Merge "Base: add more thread annotations" 2016-08-31 22:23:00 +00:00
Jorge Lucangeli Obes ce44aa8487 Merge "Add description of 'namespace' option." am: 4588ed7b5f
am: 52807711fe

Change-Id: I6e770ca175fa6c4741d2d587e34086f2c084713c
2016-08-31 21:08:19 +00:00
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 3c91e09042 Merge "base: disallow close() on unique_fd." am: ca82aa7d1e
am: 8c23285a85

Change-Id: Ib0a048c6792e90b8a61f4b18a50eb868f0dd671f
2016-08-31 20:56:47 +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 9b1015d4ab Merge "sdcard: Fix bad merge" am: 6a5ed849e8
am: 16d32620e4

Change-Id: Idf8b3d44dc7ee3600f7476d38ff68fd28fd95274
2016-08-31 20:36:17 +00:00
Daniel Rosenberg 16d32620e4 Merge "sdcard: Fix bad merge"
am: 6a5ed849e8

Change-Id: I6f23ba29758ca48d4f925b5f3bd4cf6f6c3b5752
2016-08-31 20:33:18 +00:00
Andreas Gampe bc5a32e2ad Base: add more thread annotations
These are taken from ART and wrap more attributes.

Test: m
Change-Id: I545fc9ab88cf9d2db4de2cb8893e2a35f6365f51
2016-08-31 13:29:07 -07: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 7d6b8b728d Merge "Add android::base::Readlink." am: a7c4424ebc
am: 910799cf41

Change-Id: I243503dfb81bc21aa3b20ef87da7c55e1745e62b
2016-08-31 18:08:13 +00: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 3c86ebef67 Merge changes I0af0ad24,I942c92fd,Ibc8920dd,Icfce9c1e,I1c6cc616, ... am: 5b136369ca
am: a3dae40970

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

Change-Id: I2efba9bffd8a680c29dbbe192861a960faac4e55
2016-08-30 22:58:49 +00:00
Felipe Leme 95d2bfcabe DO NOT MERGE: Ignore bugreportz output when it's not supported. am: f33fcb6418 -s ours
am: a524bd336e  -s ours

Change-Id: If40f0abcb549bb2757b1a84e8cada6e0c481368e
2016-08-30 22:58:46 +00:00
Felipe Leme 06dd6a87ee DO NOT MERGE: Deprecated 'adb bugreport' with flat files. am: b3239728bb -s ours
am: 91375a8e4e  -s ours

Change-Id: Icecbe08a02becf853f28ad03085e11cdfc108cd6
2016-08-30 22:58:42 +00:00
Felipe Leme f48338b8b3 DO NOT MERGE: Minor improvements on bugreport generation. am: 6e2869680c -s ours
am: c5059e1acb  -s ours

Change-Id: If3af78ac8c25bacdb63daa4679348e79e13183a1
2016-08-30 22:58:39 +00:00