Commit graph

18447 commits

Author SHA1 Message Date
Bertrand Simonnet
f3f2c63adb Merge "metricsd: Split into two daemons." 2015-11-18 19:53:44 +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
44901f1147 Merge "adb: don't use adb_dirname in between getting and printing errno." 2015-11-18 00:44:05 +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
39a1b77381 Merge "Revert "libcutils: don't build for Windows."" 2015-11-17 22:31:13 +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
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
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
c40f213b67 Merge "Pass $TERM to the device." 2015-11-16 23:42:52 +00:00
David Pursell
7a75f4e3a5 Merge "fastboot: create Transport object (take 2)." 2015-11-16 22:41:48 +00:00
Bertrand Simonnet
695da48944 Merge "metricsd: Remove dead code." 2015-11-16 21:17:58 +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
942f8ea84f Merge "Don't create profiles directory under dalvik-cache." 2015-11-16 11:08:46 +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
44c58471e4 Merge "Revert "fastboot: create Transport object."" 2015-11-14 00:18:43 +00:00
David Pursell
c0504e1873 Revert "fastboot: create Transport object."
This broke some stuff, will look into it Monday.

This reverts commit 6f233a7799.

Change-Id: I155bc85d21fda3b0ba1e5e17839059797fb15509
2015-11-14 00:15:57 +00:00
Josh Gao
29843cf141 Merge "adb: don't pull symlinks." 2015-11-13 23:22:47 +00:00
Josh Gao
f96dc73b9f adb: don't pull symlinks.
Pulling symlinks was broken for directories, and it doesn't seem like
there's a good way to make it not broken, given that the protocol doesn't
have readlink (and we don't want to create symlinks on Windows, anyway).
The behavior for files doesn't seem to be especially useful, either.

Bug: http://b/25601283
Change-Id: Ie1d27e93dd09cbc0c178623b390041d1cb11f726
2015-11-13 15:17:02 -08:00
Bertrand SIMONNET
ad6ab580b2 metricsd: Remove dead code.
We don't report the cpu frequency, we can remove that part of the code.

Bug: 25693224
Test: unit tests.

Change-Id: I510654a74261dbd66b7183ea54eef1e1eadc4d91
2015-11-13 15:12:49 -08:00
David Pursell
f131772a79 Merge "fastboot: create Transport object." 2015-11-13 22:49:08 +00:00
Daniel Rosenberg
ce24abe261 Merge "Fix fastboot to not add '-' before suffix" 2015-11-13 21:24:39 +00:00
Daniel Rosenberg
996ecd8b7d Fix fastboot to not add '-' before suffix
Change-Id: I9351b385412151498f47ab46a2620f21b9ac38b8
2015-11-13 12:56:19 -08:00
Elliott Hughes
82a2b2441c Merge "Improve adb help text and adb backup error reporting." 2015-11-13 20:25:11 +00:00
Elliott Hughes
4386b890a7 Merge "Improve top(1) compatibility and interactive usefulness." 2015-11-13 19:28:57 +00:00
Mark Salyzyn
c6f3b96bd8 Merge "logd: klogd: parse error" 2015-11-13 19:22:10 +00:00
David Pursell
6f233a7799 fastboot: create Transport object.
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: I68641af0da7d13db4647f5e20a18d04d67f0b327
2015-11-13 11:08:17 -08:00
Elliott Hughes
56e6813e27 Improve adb help text and adb backup error reporting.
Bug: https://code.google.com/p/android/issues/detail?id=188220
Bug: http://b/25677893
Change-Id: If174049e86d65d95db93a6e071c089dcd1d7cd4f
2015-11-13 11:04:10 -08:00
Ruchi Kandoi
ab75edb4ad Merge "healthd: Support new PD and USB Type C types" 2015-11-13 17:36:07 +00:00
Elliott Hughes
76aefd5f9b Merge "adb: win32: Unicode USB device names" 2015-11-13 16:41:31 +00:00
Elliott Hughes
d7bd5759d2 Improve top(1) compatibility and interactive usefulness.
The toolbox -t option is really the standard -H option. Add -H so
I can switch dumpstate over.

We should also flush after each run so we don't arbitrarily truncate
at the stdio buffer size. (I'm pretty sure no one uses toolbox top
interactively, but it annoyed me while testing -H.)

Change-Id: Ib87cb541d1b21c48468614b2ef60b0cc62694c95
2015-11-13 08:30:12 -08:00
Mark Salyzyn
eb29808615 logd: klogd: parse error
Resolve three areas missing taglen checking. Add some additional
limit-checking paranoia. Problem started when p was allowed to
go beyond the size of the incoming buffer in some blind
p = cp + 1 fragments, placed the check for that after them all
before harm could be done, rather than in each location.

Bug: 25620123
Change-Id: Ib5687fd30ef0cd3ba3bc0df310b436ad675ccabc
2015-11-13 07:58:05 -08:00
Mark Salyzyn
5559f1d6e8 Merge "liblog: resolve deadlocks" 2015-11-13 15:16:49 +00:00
Spencer Low
bb2900098a adb: win32: Unicode USB device names
Cleanup TODO and instead of (poorly) converting the device name from
wchar_t to char, just retrieve and store it as wchar_t, simplifying the
code.

This probably isn't necessary since device names are probably always
ASCII, but this cleans things up.

Change-Id: Ib780dcdc1e0e06b97b61e25d29a23874b35d7800
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-11-12 20:13:21 -08:00
Elliott Hughes
61a560aeb1 Merge "adb: win32: remove widen()/narrow() in favor of UTF8ToWide()/WideToUTF8()" 2015-11-13 03:05:02 +00:00
Benson Leung
8a4eef60e1 healthd: Support new PD and USB Type C types
See the new types added here :
https://chromium-review.googlesource.com/304660
Add support for these.

Signed-off-by: Benson Leung <bleung@google.com>

Change-Id: I12c51e0611692a763a7f1cda57c77ad83d7aa7ea
2015-11-12 18:12:43 -08:00