Commit graph

16209 commits

Author SHA1 Message Date
Tom Cherry
087cd35b79 resolved conflicts for merge of 0070026c to mnc-dr-dev-plus-aosp
Change-Id: Ibc802572898b6913c1f5d94aaae19974bfc0eb85
2015-08-03 14:19:35 -07:00
Todd Kennedy
fd41e5e5d9 am 1f6204a8: am 6782ca0b: Merge "Add a trace constant for PackageManager"
* commit '1f6204a8856dd85dd3f83f692a4edf2c81c37cbd':
  Add a trace constant for PackageManager
2015-08-03 19:33:01 +00:00
Elliott Hughes
fc56cdb250 am d2984900: am 11ca81fc: Merge "Remove adb\'s unused get_my_path for Windows."
* commit 'd29849007a37daf45e20e6d0f9f3232c2ad4fc30':
  Remove adb's unused get_my_path for Windows.
2015-08-03 19:32:38 +00:00
Yabin Cui
4f38fea313 am 20e8b384: am c70ac57d: Merge "adb: poll for emulator connection."
* commit '20e8b384c6ad8718764e138cc9013623cad8f400':
  adb: poll for emulator connection.
2015-08-03 18:01:57 +00:00
Jorge Lucangeli Obes
5f64984809 am 45ca3d54: am a336cbcd: Merge "Reserve new UID range for OEM."
* commit '45ca3d54e0f6be4237efcef5ff121a263d81971d':
  Reserve new UID range for OEM.
2015-08-03 18:01:50 +00:00
Tom Cherry
0070026c1b am 4247ebfd: Merge "init: use std::vector<std::string> for argument passing"
* commit '4247ebfd2faefcfd7abf7a4cc4c85ce6c8b5125c':
  init: use std::vector<std::string> for argument passing
2015-08-03 17:59:46 +00:00
Elliott Hughes
1d0abeca09 am b8b71186: am 367fb503: Merge "adb: win32: Unicode path names, env vars, some console support"
* commit 'b8b7118614e8d6bd9a683ecd624915519f8933a9':
  adb: win32: Unicode path names, env vars, some console support
2015-08-03 17:56:42 +00:00
Yusuke Sato
adda8f7388 am 2f9e1db3: am b5d6ad81: Merge "Stop calling fsck on shutdown by default"
* commit '2f9e1db37416cdb580d870218b5fbfbed47a3758':
  Stop calling fsck on shutdown by default
2015-08-03 17:56:32 +00:00
Tom Cherry
4247ebfd2f Merge "init: use std::vector<std::string> for argument passing" 2015-08-03 17:51:39 +00:00
Todd Kennedy
1f6204a885 am 6782ca0b: Merge "Add a trace constant for PackageManager"
* commit '6782ca0b766c777ae285d2b7bcfcd8232ffe34d9':
  Add a trace constant for PackageManager
2015-08-03 17:50:14 +00:00
Todd Kennedy
6782ca0b76 Merge "Add a trace constant for PackageManager" 2015-08-03 17:44:46 +00:00
Todd Kennedy
da106ad28c Add a trace constant for PackageManager
Change-Id: Iff63b3d31ba9b997bd61c58c9df5afe2dfd7be7a
2015-08-03 09:58:01 -07:00
Elliott Hughes
d29849007a am 11ca81fc: Merge "Remove adb\'s unused get_my_path for Windows."
* commit '11ca81fc3cff887091b0dfa8cdaa246b444f6ea4':
  Remove adb's unused get_my_path for Windows.
2015-08-03 15:37:36 +00:00
Elliott Hughes
11ca81fc3c Merge "Remove adb's unused get_my_path for Windows." 2015-08-03 15:32:43 +00:00
Lee Campbell
2fb050b893 am 150c05fe: am 0f918878: Merge "init: Adding header guard to tokenizer"
* commit '150c05feeb482de2b4026fc35e392fc8c0ecd2df':
  init: Adding header guard to tokenizer
2015-08-01 15:48:39 +00:00
Elliott Hughes
564aa1e86d am 3d561748: am ec035950: Merge "Clean up -p handling slightly."
* commit '3d5617487c07f1fcbdf23755e0ca01559e3c5f3b':
  Clean up -p handling slightly.
2015-08-01 15:48:37 +00:00
Elliott Hughes
562fba9c64 am 6dca1987: am cf4dba5a: Merge "adb: win32: initial IPv6 support and improved Winsock error reporting"
* commit '6dca19875325a2ed25f9b55d736a9f6d17afeaad':
  adb: win32: initial IPv6 support and improved Winsock error reporting
2015-08-01 15:48:09 +00:00
Yabin Cui
709815cffe am a6fda917: am dc1fb361: Merge "Make clear of the data length sent by write_packet."
* commit 'a6fda917252ab9e47d89e181adbc22bccba1ca6c':
  Make clear of the data length sent by write_packet.
2015-08-01 15:47:50 +00:00
Yabin Cui
20e8b384c6 am c70ac57d: Merge "adb: poll for emulator connection."
* commit 'c70ac57db0df9736f50a6b1fe29b151292b09e6b':
  adb: poll for emulator connection.
2015-08-01 00:57:27 +00:00
Elliott Hughes
16d79c7318 Remove adb's unused get_my_path for Windows.
Change-Id: I3cfb4677acaf6acaf512b3cdce6c11bdb2bd0578
2015-07-31 17:54:24 -07:00
Yabin Cui
c70ac57db0 Merge "adb: poll for emulator connection." 2015-08-01 00:50:39 +00:00
Jorge Lucangeli Obes
45ca3d54e0 am a336cbcd: Merge "Reserve new UID range for OEM."
* commit 'a336cbcd5c05e693d5c52951ce2ee49dd8c617fe':
  Reserve new UID range for OEM.
2015-08-01 00:47:59 +00:00
Jorge Lucangeli Obes
a336cbcd5c Merge "Reserve new UID range for OEM." 2015-08-01 00:40:37 +00:00
Elliott Hughes
b8b7118614 am 367fb503: Merge "adb: win32: Unicode path names, env vars, some console support"
* commit '367fb50333a449f14636f5dc7cd4bc1c81323f59':
  adb: win32: Unicode path names, env vars, some console support
2015-07-31 23:57:22 +00:00
Elliott Hughes
367fb50333 Merge "adb: win32: Unicode path names, env vars, some console support" 2015-07-31 23:50:52 +00:00
Yusuke Sato
2f9e1db374 am b5d6ad81: Merge "Stop calling fsck on shutdown by default"
* commit 'b5d6ad81cb963b6eceeb21c7f93bc433112c4b35':
  Stop calling fsck on shutdown by default
2015-07-31 23:20:48 +00:00
Yusuke Sato
b5d6ad81cb Merge "Stop calling fsck on shutdown by default" 2015-07-31 23:13:15 +00:00
Tom Cherry
96f67316a2 init: use std::vector<std::string> for argument passing
Change-Id: Ie7a64e65de3a20d0c7f7d8efc0f7c1ba121d07fe
2015-07-31 16:02:12 -07:00
Lee Campbell
150c05feeb am 0f918878: Merge "init: Adding header guard to tokenizer"
* commit '0f91887868e51de67bdf9aedc97fbcb044dc1969':
  init: Adding header guard to tokenizer
2015-07-31 21:52:47 +00:00
Lee Campbell
0f91887868 Merge "init: Adding header guard to tokenizer" 2015-07-31 21:47:13 +00:00
Yabin Cui
0e2c194659 adb: poll for emulator connection.
Bug: 19974213
Change-Id: I336f3ad6f428277c54479e5b8c45d5343c64f472
2015-07-31 14:25:19 -07:00
Jorge Lucangeli Obes
b93b9d4867 Reserve new UID range for OEM.
Brillo will need to run new native system services, so reserve
a reasonable UID range to accomodate them. Having 1000 UIDs will
allow us to sub-partition this range if needed.

The range can be used by any OEM, not just Brillo, so name it
accordingly.

Bug: 22555869
Change-Id: I752428ee5025bf064a35ecbe6da50c041d87b724
2015-07-31 14:13:49 -07:00
Elliott Hughes
3d5617487c am ec035950: Merge "Clean up -p handling slightly."
* commit 'ec035950e69badab883b5751c1059def2eea353d':
  Clean up -p handling slightly.
2015-07-31 21:09:03 +00:00
Elliott Hughes
ec035950e6 Merge "Clean up -p handling slightly." 2015-07-31 21:02:01 +00:00
Spencer Low
cf4ff64f2d adb: win32: Unicode path names, env vars, some console support
Initial support for Unicode file/dir names. Unicode paths can be passed
on the command line, directory enumeration can enumerate Unicode paths,
Unicode paths are used for file access, and Unicode paths can be output
on the console correctly.

Also Unicode environment variable access.

Initial support for Unicode output from adb shell (which uses
adb_fwrite()). This is partial because the corner case of an
adb_fwrite() call with an incomplete UTF-8 multi-byte sequence does not
output correctly, but this should be uncommon, is better than what we
had before (*always* incorrect UTF-8 multi-byte sequences) and can be
fixed in the future.

Calls to Windows APIs with char strings were changed to pass wchar_t
strings to the FooW() variants.

For more details, see the giant comment in sysdeps_win32.cpp.

https://code.google.com/p/android/issues/detail?id=8185

Change-Id: I7ebf6713bb635638b986ccee97b354428837c9c5
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-07-31 13:30:41 -07:00
Elliott Hughes
048b27c066 Clean up -p handling slightly.
Change-Id: I8a5cd4a7adb0dde9d09e0cbb620874b1bca35e43
2015-07-31 13:18:22 -07:00
Elliott Hughes
6dca198753 am cf4dba5a: Merge "adb: win32: initial IPv6 support and improved Winsock error reporting"
* commit 'cf4dba5ab315493531fff5a4867698a3659b0526':
  adb: win32: initial IPv6 support and improved Winsock error reporting
2015-07-31 18:18:32 +00:00
Elliott Hughes
cf4dba5ab3 Merge "adb: win32: initial IPv6 support and improved Winsock error reporting" 2015-07-31 18:11:45 +00:00
Yabin Cui
a6fda91725 am dc1fb361: Merge "Make clear of the data length sent by write_packet."
* commit 'dc1fb361f3aeee2cfb2791bd5fc42e4f2bc2dfb9':
  Make clear of the data length sent by write_packet.
2015-07-31 16:55:03 +00:00
Yabin Cui
dc1fb361f3 Merge "Make clear of the data length sent by write_packet." 2015-07-31 16:48:25 +00:00
Spencer Low
5200c6670f adb: win32: initial IPv6 support and improved Winsock error reporting
Call getaddrinfo() for connecting to IPv6 destinations.

Winsock APIs do not set errno. WSAGetLastError() returns Winsock errors
that are more numerous than BSD sockets, so it really doesn't make sense
to map those to BSD socket errors. Plus, even if we did that, the
Windows C Runtime (that mingw binaries use) has a strerror() that does
not recognize BSD socket error codes.

The solution is to wrap the various libcutils socket_* APIs with
sysdeps.h network_* APIs. For POSIX, the network_* APIs just call
strerror(). For Windows, they call SystemErrorCodeToString() (adapted
from Chromium).

Also in this change:

 - Various other code was modified to return errors in a std::string*
   argument, to be able to surface the error string to the end-user.

 - Improved error checking and use of D() to log Winsock errors for
   improved debuggability.

 - For sysdeps_win32.cpp, added unique_fh class that works like
   std::unique_ptr, for calling _fh_close().

 - Fix win32 adb_socketpair() setting of errno in error case.

 - Improve _socket_set_errno() D() logging to reduce confusion. Map
   a few extra error codes.

 - Move adb_shutdown() lower in sysdeps_win32.cpp so it can call
   _socket_set_errno().

 - Move network_connect() from adb_utils.cpp to sysdeps.h.

 - Merge socket_loopback_server() and socket_inaddr_any_server() into
   _network_server() since most of the code was identical.

Change-Id: I945f36870f320578b3a11ba093852ba6f7b93400
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-07-30 23:07:55 -07:00
Elliott Hughes
8f218426ff resolved conflicts for merge of 4e90b0ae to mnc-dr-dev-plus-aosp
Change-Id: Ib82bd1143c852905d40968896b5bcf41e0dab340
2015-07-30 20:09:15 -07:00
Yabin Cui
6264129434 Make clear of the data length sent by write_packet.
Change-Id: If51b4feaa19a710874999ad7e6131ff2e56a9f8a
2015-07-30 20:01:10 -07:00
Lee Campbell
06584400dd init: Adding header guard to tokenizer
Fixing missing header guard

BUG: 22843198
Change-Id: Ice5d29d343ffe093aae46d4ac3fd72de628fb12e
2015-07-30 18:48:50 -07:00
Elliott Hughes
4e90b0ae59 am 7b98bfcc: Merge "More adb cleanup."
* commit '7b98bfcc9fa8678d32a729a41036dea864f262ab':
  More adb cleanup.
2015-07-31 01:09:34 +00:00
Elliott Hughes
7b98bfcc9f Merge "More adb cleanup." 2015-07-31 01:01:20 +00:00
Elliott Hughes
5c74270f95 More adb cleanup.
This removes adb_dirstart and adb_dirstop. It also fixes a couple of memory
leaks by switching to std::string. This also fixes the bug in the previous
change --- mkdirs is given input like "/system/bin/sh" and only expected to
create "/system/bin". In a later change, we should remove mkdirs and only
expose the intended "unlink && mkdirs && create" functionality.

Change-Id: I30289dc1b3dff575cc1b158d993652178f587552
2015-07-30 17:46:58 -07:00
Elliott Hughes
d260be38c6 resolved conflicts for merge of 486645ee to mnc-dr-dev-plus-aosp
Change-Id: Ia7fbfc56f01b683e4e4870b3952fe2af32962123
2015-07-30 16:32:10 -07:00
Elliott Hughes
486645ee43 am 0cf93dc3: Merge "Write mkdirs in more idiomatic C++ style."
* commit '0cf93dc345cd5e8131009146a3b2767b1c60f77b':
  Write mkdirs in more idiomatic C++ style.
2015-07-30 23:00:45 +00:00
Elliott Hughes
0cf93dc345 Merge "Write mkdirs in more idiomatic C++ style." 2015-07-30 22:56:01 +00:00