Commit Graph

18796 Commits

Author SHA1 Message Date
Elliott Hughes 9f90368701 Merge "Don't send $TERM unless we're talking to a new adbd." 2015-11-18 20:55:40 +00:00
Elliott Hughes c2252df25a Don't send $TERM unless we're talking to a new adbd.
I put the conditional in the wrong place, not realizing that even the
old shell system allowed one 'argument'.

Bug: http://b/25765657
Change-Id: I2752fb838d6377bf24e5b4cf959462557a196c87
2015-11-18 12:45:48 -08:00
Casey Dahlin 47f25063af Merge "Introduce unique_fd"
am: 9a6b8eeb44

* commit '9a6b8eeb44a78064ffbe4c04928a3904b1be2ab3':
  Introduce unique_fd
2015-11-18 20:44:51 +00:00
Casey Dahlin 9a6b8eeb44 Merge "Introduce unique_fd" 2015-11-18 20:36:05 +00:00
Bertrand Simonnet b84b7c79a0 Merge "metricsd: Split into two daemons."
am: f3f2c63adb

* commit 'f3f2c63adbc8b123d3de6adfed3362fa9aabc9e3':
  metricsd: Split into two daemons.
2015-11-18 20:05:59 +00:00
Casey Dahlin 918b9e8dc6 Introduce unique_fd
unique_fds are wrappers for integer file descriptors that automatically
close when they go out of scope. They are movable but not copyable and
generally mimic the semantics of std::unique_ptr

Change-Id: I0657b848b6536d5ad9fc06686e240ea5c387b0ac
Test: Considerable exercise in new AIDL integration tests
Bug: None
Signed-off-by: Casey Dahlin <sadmac@google.com>
2015-11-18 12:01:24 -08:00
Bertrand Simonnet f3f2c63adb Merge "metricsd: Split into two daemons." 2015-11-18 19:53:44 +00:00
Mark Salyzyn 4ad82b5755 Merge "liblog: printable do not escape tabs"
am: 08251c3646

* commit '08251c3646ac8516ddc7a2ccd3fd35e74b10b088':
  liblog: printable do not escape tabs
2015-11-18 18:50:56 +00:00
Mark Salyzyn 08251c3646 Merge "liblog: printable do not escape tabs" 2015-11-18 18:42:55 +00:00
Mark Salyzyn 65d5ca2001 liblog: printable do not escape tabs
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 25755153
Change-Id: I99324e751db0e1ed1eb00820e82b176b6d789249
2015-11-18 09:59:12 -08:00
Bertrand SIMONNET 608e428006 metricsd: Split into two daemons.
This CL splits metrics_daemon into two independent daemons: metricsd and
metrics_collector.

* metricsd will be responsible for reading the metrics from disk and
  periodically uploading them to the server.
* metrics_collector will be responsible for gathering generic metrics
  from the system and managing the weave state for metrics.

This refactoring is necessary to prepare the migration of metricsd to
log over binder.

Bug: 25670908
Test: Unit tests.
Test: manual: both daemons run. Metrics are logged, uploaded and the
      weave interaction works.

Change-Id: Ib00e1772bb7eec87cbcdcd912c30b555d79d7074
2015-11-18 09:54:16 -08:00
Josh Gao 975c9a6863 Merge "adb: don\'t use adb_dirname in between getting and printing errno."
am: 44901f1147

* commit '44901f1147104f9f5726e250052e0bcb14823f5c':
  adb: don't use adb_dirname in between getting and printing errno.
2015-11-18 00:52:12 +00:00
Josh Gao 44901f1147 Merge "adb: don't use adb_dirname in between getting and printing errno." 2015-11-18 00:44:05 +00:00
Josh Gao e2773a3f8e Merge "debuggerd: remove some levels of indentation."
am: cdff80c446

* commit 'cdff80c4462ae582dbe490db96aca500454513de':
  debuggerd: remove some levels of indentation.
2015-11-18 00:37:39 +00:00
Josh Gao cdff80c446 Merge "debuggerd: remove some levels of indentation." 2015-11-18 00:16:01 +00:00
Josh Gao 8ab7fd4017 debuggerd: remove some levels of indentation.
Use ScopedFd and unique_ptr to manage resources, so that we can early
exit instead of having 9 levels of indentation.

Change-Id: Ia5fed76c7d959f1f198ea540c56c508f7e1585c4
2015-11-17 14:44:50 -08:00
Josh Gao f6e65e3f80 adb: don't use adb_dirname in between getting and printing errno.
adb_dirname might trample over the errno value we want to print. Move
the adb_dirname call out to a local to prevent this.

Change-Id: I8a62cb2e1be8704225a9c3b72dd01259c7eaaae4
2015-11-17 14:41:57 -08:00
Josh Gao 167b4bed93 Merge "Revert "libcutils: don\'t build for Windows.""
am: 39a1b77381

* commit '39a1b773817aafc98e20910d2dd6dd790ea08bf3':
  Revert "libcutils: don't build for Windows."
2015-11-17 22:36:54 +00:00
Josh Gao 39a1b77381 Merge "Revert "libcutils: don't build for Windows."" 2015-11-17 22:31:13 +00:00
Josh Gao b4362070fc Merge "debuggerd: add .clang-format."
am: c5a85f71ab

* commit 'c5a85f71ab2ff21bdb06dfbb0e7ff3fded8a133c':
  debuggerd: add .clang-format.
2015-11-17 22:29:46 +00:00
Josh Gao cab716f101 Revert "libcutils: don't build for Windows."
This reverts commit bb3f9ce0aa.
2015-11-17 14:28:33 -08:00
Josh Gao 053eba0bc1 Merge changes Ice07f892,Ie1f082a0
am: 74a33fbcef

* commit '74a33fbcef65d8964d5dfe1d6bd2f4b8d8e154b2':
  libcutils: don't build for Windows.
  adb: don't link against libcutils on Windows.
2015-11-17 22:28:06 +00:00
Bertrand Simonnet f826969e10 Merge "metricsd: Don\'t upload if product id is empty."
am: 0ba2606444

* commit '0ba260644440f51cd5e1d8db10bebf4c041ec7e7':
  metricsd: Don't upload if product id is empty.
2015-11-17 22:22:39 +00:00
Josh Gao c5a85f71ab Merge "debuggerd: add .clang-format." 2015-11-17 22:21:29 +00:00
Josh Gao 74a33fbcef Merge changes Ice07f892,Ie1f082a0
* changes:
  libcutils: don't build for Windows.
  adb: don't link against libcutils on Windows.
2015-11-17 22:16:09 +00:00
Bertrand Simonnet 0ba2606444 Merge "metricsd: Don't upload if product id is empty." 2015-11-17 21:51:21 +00:00
Bertrand SIMONNET 1d15d46e17 metricsd: Don't upload if product id is empty.
If the product id is not set, the product_id file might exist but be
empty. In this case, to try to update the metrics.

Bug: 25745391
Change-Id: I3942afaf38921b44ddb7e5a29d5d0e4fb6d48d94
Test: Unit tests.
2015-11-17 13:22:30 -08:00
Junichi Uekawa ef7197eefa Merge "Fix non-vendor.img configuration."
am: 1337349ea1

* commit '1337349ea11a6bb5c44ba5c5bb064c750bd626c5':
  Fix non-vendor.img configuration.
2015-11-17 03:36:23 +00:00
Junichi Uekawa 1337349ea1 Merge "Fix non-vendor.img configuration." 2015-11-17 03:29:37 +00:00
Junichi Uekawa 07b69961f2 Fix non-vendor.img configuration.
If / is not write-able and system.img contains system/vendor, symlink
for `/vendor/ -> /system/vendor/` that is otherwise done in init.rc
should be done at build time.

BUG=b:25512724

Change-Id: Iaa63d6440373a4fd754a933c9f1960b3787a6d98
2015-11-17 11:20:21 +09:00
Josh Gao d918eedf29 debuggerd: add .clang-format.
Change-Id: I3584c170aadc3707638e407c7a8ca502f3670058
2015-11-16 17:26:22 -08:00
Josh Gao bb3f9ce0aa libcutils: don't build for Windows.
Change-Id: Ice07f892a346bbba2ed6bfdcddf7222799e76f9d
2015-11-16 16:21:22 -08:00
Josh Gao a629e2e578 adb: don't link against libcutils on Windows.
Bug: http://b/25693157
Change-Id: Ie1f082a094371124b4d66c87c7ab1a0706271b9d
2015-11-16 16:17:16 -08:00
Elliott Hughes 1fd0ea9e0e Merge "Pass screen to the device."
am: c40f213b67

* commit 'c40f213b67cb12a8771845ec2c609e060d9c19b0':
  Pass $TERM to the device.
2015-11-16 23:47:58 +00:00
Elliott Hughes c40f213b67 Merge "Pass $TERM to the device." 2015-11-16 23:42:52 +00:00
David Pursell 9c4f9392e1 Merge "fastboot: create Transport object (take 2)."
am: 7a75f4e3a5

* commit '7a75f4e3a5456fe1a44c551b0b75d2bf9130407c':
  fastboot: create Transport object (take 2).
2015-11-16 22:46:56 +00:00
David Pursell 7a75f4e3a5 Merge "fastboot: create Transport object (take 2)." 2015-11-16 22:41:48 +00:00
Bertrand Simonnet a3e097c9ca Merge "metricsd: Remove dead code."
am: 695da48944

* commit '695da489440335ef41649eece4dc4ca5eca3b28a':
  metricsd: Remove dead code.
2015-11-16 21:22:24 +00:00
Bertrand Simonnet 695da48944 Merge "metricsd: Remove dead code." 2015-11-16 21:17:58 +00:00
Mark Salyzyn 52b9f02076 Merge "Revert "liblog: resolve deadlocks""
am: e6cf1c6372

* commit 'e6cf1c63726bee6b7ca69d68775f79e16f756ba6':
  Revert "liblog: resolve deadlocks"
2015-11-16 19:11:39 +00:00
Mark Salyzyn e6cf1c6372 Merge "Revert "liblog: resolve deadlocks"" 2015-11-16 19:07:47 +00:00
Mark Salyzyn c2e7d4965f Revert "liblog: resolve deadlocks"
This reverts commit 7a2a307192.

Bug: 25693940
Change-Id: I9a7c926289e972f80c03c92e33535e1dedaa7381
2015-11-16 19:00:41 +00:00
Elliott Hughes 18ddf5c6a2 Pass $TERM to the device.
Unfortunately, this isn't backwards-compatible with the current shell
protocol because we made unknown shell: arguments errors. We could try
to commit the change to make them just warnings first, but how would
we know when everyone was running adbd with that change? Bumping the
protocol version doesn't help because that only affects the code running
on the host. And although we could add another feature to the reported
features, since shell_v2 is still in development, that doesn't seem
worthwhile.

Bug: http://b/25601436
Change-Id: I12b81aa656cd25b91d14ef691dcbd2b7dab49535
2015-11-16 10:55:34 -08:00
David Pursell 0b15663830 fastboot: create Transport object (take 2).
(Second upload of this CL; original upload had the wrong version of
usb_windows.cpp that caused a compilation error. Fixed error and
re-tested.)

This CL creates a Transport object to provide a generic interface for
various transports. Specifically this is designed to be able to add UDP
support to fastboot in an upcoming CL without changing the main program
logic.

Also includes some minor code style fixes and replaces malloc/free
in the USB implementation files with smart pointers and std::string.

Bug: http://b/22029765
Change-Id: I1175bbce08690fbd15f51e68166be9b3e9973ea0
2015-11-16 09:31:07 -08:00
Calin Juravle 2a095e186b Merge "Don\'t create profiles directory under dalvik-cache."
am: 942f8ea84f

* commit '942f8ea84f3f96c2e2556fe90ebba0ec76730553':
  Don't create profiles directory under dalvik-cache.
2015-11-16 11:21:48 +00:00
Calin Juravle 942f8ea84f Merge "Don't create profiles directory under dalvik-cache." 2015-11-16 11:08:46 +00:00
Gilad Arnold 8468b26e73 Merge "Fix permissions for /data/nativetest{,64}/tests.txt."
am: e32cb1b14c

* commit 'e32cb1b14cb2cfc434ade4b4ec80fc51b49c6762':
  Fix permissions for /data/nativetest{,64}/tests.txt.
2015-11-15 06:23:20 +00:00
Gilad Arnold e32cb1b14c Merge "Fix permissions for /data/nativetest{,64}/tests.txt." 2015-11-15 06:20:09 +00:00
Gilad Arnold 1bc7888104 Fix permissions for /data/nativetest{,64}/tests.txt.
This is not an executable so we have to specifically set its permissions
accordingly.

Bug: 25668833
Change-Id: I502f69bad75b4da4fdc29eb3ebaa42a19ae04d27
2015-11-14 18:25:31 -08:00
David Pursell 0146f2feb6 Merge "Revert "fastboot: create Transport object.""
am: 44c58471e4

* commit '44c58471e4c0bf8de8c98980d268e9f5f827e253':
  Revert "fastboot: create Transport object."
2015-11-14 00:30:39 +00:00