Commit Graph

17702 Commits

Author SHA1 Message Date
Elliott Hughes 9336ee389f Merge "Fix (Windows) build." 2015-09-11 23:18:48 +00:00
Elliott Hughes 2f577205fc Fix (Windows) build.
Change-Id: Ib9afd101d255d748ba6c15ed8075f3d10338c95c
2015-09-11 16:18:24 -07:00
Elliott Hughes a480aa1d67 am 0b60dae6: am ee46239c: Merge "adb: win32: make adb_getenv() case-insensitive"
* commit '0b60dae6d342d336a7e1c4ae86058d3099c643c5':
  adb: win32: make adb_getenv() case-insensitive
2015-09-11 23:14:04 +00:00
Elliott Hughes 0ad13cf298 Merge "fix adb_test Windows build" 2015-09-11 23:13:40 +00:00
Dan Albert fab754c271 am 8569a3b3: am 933f4fd4: Merge "Ensure that libbase and liblog can be built for Windows."
* commit '8569a3b3223b843e601a8e1f9c02214c59858574':
  Ensure that libbase and liblog can be built for Windows.
2015-09-11 23:05:45 +00:00
Elliott Hughes de75f35396 am 31254577: am 059544f6: Merge "Lose lsof to toybox."
* commit '3125457759c3f6d1c6c1f753367090dbb1b16756':
  Lose lsof to toybox.
2015-09-11 23:05:44 +00:00
David Pursell 8b39e2ff58 am 90ba84b2: am 31139af0: Merge "adb: create shell protocol class (take 2)."
* commit '90ba84b2868580ab357f8b5f049bc59df0a58d1f':
  adb: create shell protocol class (take 2).
2015-09-11 23:05:42 +00:00
Elliott Hughes e4cc205c1c am add42fdf: am b56bd000: Merge "Add ParseInt (and ParseUint)."
* commit 'add42fdf6371f4295ef268a251e0c20fe90d4193':
  Add ParseInt (and ParseUint).
2015-09-11 23:05:40 +00:00
James Hawkins 3aa3e6475c am 861edb62: am b02b6f41: Merge "metrics: Add an option to metrics_client to dump the logs cache."
* commit '861edb6261f8344ff428368dbead0a64da459b98':
  metrics: Add an option to metrics_client to dump the logs cache.
2015-09-11 23:05:39 +00:00
Elliott Hughes 0b60dae6d3 am ee46239c: Merge "adb: win32: make adb_getenv() case-insensitive"
* commit 'ee46239c358fac90813128fccbcb49292f8b04f3':
  adb: win32: make adb_getenv() case-insensitive
2015-09-11 23:05:02 +00:00
Elliott Hughes ee46239c35 Merge "adb: win32: make adb_getenv() case-insensitive" 2015-09-11 22:59:19 +00:00
Spencer Low e6ae573571 adb: win32: make adb_getenv() case-insensitive
adb_getenv() should be case-insensitive just like the real getenv() on
Windows.

Added a unittest for adb_getenv(). In the process, made adb_test link
with -municode so that the environment block is Unicode.

Move wmain() from main.cpp to sysdeps_win32.cpp so that adb_test could
also use it.

Because wmain() moved, it wasn't as easy to do the runtime check to
verify that -municode was used, so do that check in _ensure_env_setup()
since adb_getenv() is called early in adb anyway.

Added a utility ToLower() which is good enough for env vars whose keys
are probably always ASCII to begin with.

Change-Id: I082f7fdee9dfe2c7f76b878528d2f7863df6d8d1
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-11 15:53:08 -07:00
Spencer Low ebf770fd73 fix adb_test Windows build
adb/Android.mk: adb_test should build on Windows (and Darwin), so add to
the whitelist.

Change-Id: I778f6a7dff4caec92c48e0957591abf32f86ab1b
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-11 15:47:20 -07:00
Dan Albert 8569a3b322 am 933f4fd4: Merge "Ensure that libbase and liblog can be built for Windows."
* commit '933f4fd413f5a6c0e32c7963f1d0da580085df38':
  Ensure that libbase and liblog can be built for Windows.
2015-09-11 22:14:35 +00:00
Elliott Hughes 3125457759 am 059544f6: Merge "Lose lsof to toybox."
* commit '059544f6a8e809ec8c36a10c286be4bb012e2328':
  Lose lsof to toybox.
2015-09-11 22:14:33 +00:00
David Pursell 90ba84b286 am 31139af0: Merge "adb: create shell protocol class (take 2)."
* commit '31139af04f97c843db2a98c7fafc1d58d7f7c8ac':
  adb: create shell protocol class (take 2).
2015-09-11 22:14:17 +00:00
Elliott Hughes add42fdf63 am b56bd000: Merge "Add ParseInt (and ParseUint)."
* commit 'b56bd000460254aacaaa897a07e90191b05e7160':
  Add ParseInt (and ParseUint).
2015-09-11 22:14:15 +00:00
James Hawkins 861edb6261 am b02b6f41: Merge "metrics: Add an option to metrics_client to dump the logs cache."
* commit 'b02b6f410d5c92c7b016ed26895b5e21c16418a9':
  metrics: Add an option to metrics_client to dump the logs cache.
2015-09-11 22:14:03 +00:00
Dan Albert 933f4fd413 Merge "Ensure that libbase and liblog can be built for Windows." 2015-09-11 20:47:07 +00:00
Elliott Hughes 059544f6a8 Merge "Lose lsof to toybox." 2015-09-11 20:44:48 +00:00
David Pursell 606835ae5c adb: add client side shell protocol and enable.
Adds the shell protocol functionality to the client side and enables it
if the transport supports the feature.

Bug:http://b/23031026
Change-Id: I9abe1c8b1d39f8dd09666321b1c761ad708a8854
2015-09-11 13:02:17 -07:00
Stephen Hines b0e4f08226 Ensure that libbase and liblog can be built for Windows.
Change-Id: If4adf1e2bd7ec36a7f02ae2e263d2db5187c6e7b
2015-09-11 11:39:16 -07:00
David Pursell 0955c66b22 adb: implement shell protocol.
Adds functionality for handling stdin/stdout/stderr streams and exit
codes using the shell protocol.

This CL just contains implementation for adbd which will not yet be
enabled. Once we have the ability to query transport features from the
adb client, another CL will add the implementation for the client side
and update the feature list to turn this on.

Note: this CL must be submitted together with a minadbd CL to update
the service_to_fd() function signature.

Bug: http://b/23030641

Change-Id: Ibed55e9c1946d8a35190696163ff63e8fb880238
2015-09-11 11:27:50 -07:00
David Pursell 31139af04f Merge "adb: create shell protocol class (take 2)." 2015-09-11 18:17:55 +00:00
Elliott Hughes b56bd00046 Merge "Add ParseInt (and ParseUint)." 2015-09-11 18:00:20 +00:00
Elliott Hughes 42325f073c Lose lsof to toybox.
Change-Id: I4b5e0c8c33f5b2dfd3db85628d9a657940978a10
2015-09-11 10:58:21 -07:00
David Zeuthen bd0231c96b fs_mgr: Error out if unable to determine slot_suffix
Instead of falling back to suffix _a, we now error out if neither the
kernel commandline nor the misc partition specifies the suffix. It's
cleaner this way.

Change-Id: I3f58928a664433504ebdf8d0ee05a319be5097cf
2015-09-11 12:53:18 -04:00
Mark Salyzyn eacb745e76 am 33eb1ca3: am 805ef688: logd: klogd and Mediatek
* commit '33eb1ca3b401aabcd4ce17bab98d8620cb2a628a':
  logd: klogd and Mediatek
2015-09-11 16:45:16 +00:00
James Hawkins b02b6f410d Merge "metrics: Add an option to metrics_client to dump the logs cache." 2015-09-11 16:39:19 +00:00
Mark Salyzyn 33eb1ca3b4 am 805ef688: logd: klogd and Mediatek
* commit '805ef688af4035ac45e79428a1b6328bd0b465d2':
  logd: klogd and Mediatek
2015-09-11 16:35:35 +00:00
Mark Salyzyn 805ef688af logd: klogd and Mediatek
(cherry pick from commit 46d159d462)

- sniff for PID in kernel log messages if available
- properly deal with klogd watermark in face of modified output
- deal more stringently with priority tag, must have [ following
- suppress process-name stutter in tag that can happen
- do not use : to demark tag if within [ ]

Mediatek-special change that adds <printk_state>(<cpu>)[<pid>:<comm>]
as a prefix to the printk messages. Along the lines of (simplified
for entertainment purposes, YMMV):

    char tbuf[50]; /* printk prefix */
    int this_cpu = smp_processor_id();
    char state = __raw_get_cpu_var(printk_state);
    unsigned tlen = snprintf(tbuf, sizeof(tbuf), "%c(%x)[%d:%s]",
               state, this_cpu, current->pid, current->comm);

Bug: 23517551
Change-Id: I568e25c5aa6d8474835454a0e83b19c2921b7985
2015-09-11 14:51:41 +00:00
Steve Fung c361f449a8 am 520a3349: am a2e5b7cb: Merge "crash_reporter: Fix crash_sender"
* commit '520a3349b2b60624cc4f408df2c0f804246f83b3':
  crash_reporter: Fix crash_sender
2015-09-11 06:42:49 +00:00
Steve Fung 520a3349b2 am a2e5b7cb: Merge "crash_reporter: Fix crash_sender"
* commit 'a2e5b7cb625169ec857fccd73003f912752b985c':
  crash_reporter: Fix crash_sender
2015-09-11 06:34:18 +00:00
Steve Fung a2e5b7cb62 Merge "crash_reporter: Fix crash_sender" 2015-09-11 06:29:28 +00:00
Mark Salyzyn 5e3d4e36b1 am e66f84d7: am 784a69f8: Merge "logd: worst uid record watermark part five"
* commit 'e66f84d7e6278db6352b38d869a4ee9b8585b129':
  logd: worst uid record watermark part five
2015-09-10 20:54:22 +00:00
Mark Salyzyn 04827ab02a logd: worst uid record watermark part five
(cherry pick from commit 5bb2972dce)

A regression that resulted in increased memory consumption for some
logging patterns because we rarely did merge or leading checks, and
age-out checking. On the last prune cycle, we reset for a full scan.

Add some comments describing the pruning processes.

Bug: 23327476
Bug: 23681639
Bug: 23685592
Change-Id: I22b0f339c9269b006831fda9cefe295a263ebb92
2015-09-10 09:38:07 -07:00
Mark Salyzyn e66f84d7e6 am 784a69f8: Merge "logd: worst uid record watermark part five"
* commit '784a69f8650068980bcc692584b515ab2372ab5b':
  logd: worst uid record watermark part five
2015-09-10 16:30:36 +00:00
Mark Salyzyn 784a69f865 Merge "logd: worst uid record watermark part five" 2015-09-10 16:24:25 +00:00
Mark Salyzyn 5bb2972dce logd: worst uid record watermark part five
A regression that resulted in increased memory consumption for some
logging patterns because we rarely did merge or leading checks, and
age-out checking. On the last prune cycle, we reset for a full scan.

Add some comments describing the pruning processes.

Bug: 23327476
Bug: 23681639
Bug: 23685592
Change-Id: I22b0f339c9269b006831fda9cefe295a263ebb92
2015-09-10 08:43:03 -07:00
Badhri Jagan Sridharan 4c96af5e5a am c939c61c: am a6c377b2: init: usb: Add configfs commands for USB gadget
* commit 'c939c61c71559271cbbd2c046e35e8a97b501b07':
  init: usb: Add configfs commands for USB gadget
2015-09-10 00:50:43 +00:00
Badhri Jagan Sridharan c939c61c71 am a6c377b2: init: usb: Add configfs commands for USB gadget
* commit 'a6c377b2f62175d6d5268c63885de3d882edbe2b':
  init: usb: Add configfs commands for USB gadget
2015-09-10 00:42:43 +00:00
Steve Fung 0e8746d895 crash_reporter: Fix crash_sender
- Remove all the ChromeOS specific logic.
- Fix paths to correct Android paths.
- Add periodic_scheduler, and add crash_sender to init.

Bug: 23231196
Bug: 23233267

Change-Id: I12de28bfbe5d5b08831eda9b28c6d7a669c22290
2015-09-09 17:06:33 -07:00
David Zeuthen b992e97923 am 80364b94: am 6ca11db7: Merge "fs_mgr: Fix ENOMEM behavior when dealing with slotselect."
* commit '80364b94bc2f017f0d8e47c0fdb0d208fd33ff09':
  fs_mgr: Fix ENOMEM behavior when dealing with slotselect.
2015-09-09 23:44:39 +00:00
David Zeuthen 80364b94bc am 6ca11db7: Merge "fs_mgr: Fix ENOMEM behavior when dealing with slotselect."
* commit '6ca11db7b7dc5e141c767b38328c3838a3b90b60':
  fs_mgr: Fix ENOMEM behavior when dealing with slotselect.
2015-09-09 22:52:32 +00:00
David Zeuthen 6ca11db7b7 Merge "fs_mgr: Fix ENOMEM behavior when dealing with slotselect." 2015-09-09 22:45:24 +00:00
James Hawkins 5f6460081c metrics: Add an option to metrics_client to dump the logs cache.
The format of the metrics dump is rudimentary just yet. Here is an example:

  Metrics from /data/misc/metrics/uma-events

  name: hello     type: USER_ACTION
  name: world     type: USER_ACTION

This required the following changes:
* Added -d option to metrics_client
* Refactored file handling in SerializationUtils
 - Factored out file opening and log parsing into helper methods
 - Added ReadMetricsFromFile which is read-only so does not truncate the file

Change-Id: I6032d74242c79c678ec42a14e78fccc54e7af455
2015-09-09 15:23:24 -07:00
David Zeuthen 744a8f87d9 fs_mgr: Fix ENOMEM behavior when dealing with slotselect.
Change-Id: I5460a8d31baa0d4817ff5fcbd9aac272071937f4
2015-09-09 18:03:13 -04:00
Daniel Erat be43a39ff5 Add libbinderwrapper.
Add a library that wraps libbinder to make it possible to
write tests for native code that communicates via binder.

Bug: 23791723
Change-Id: I3c842413e0f07dc252040c042d664031b0354353
2015-09-09 14:21:28 -06:00
Dan Willemsen 2f6d1e5486 am a376c046: am aaf4fcf4: Merge "Remove HOST_OS==windows check"
* commit 'a376c046bf7f5f86b53190d1f8dab309dd80a58b':
  Remove HOST_OS==windows check
2015-09-09 18:31:10 +00:00
Dan Willemsen a376c046bf am aaf4fcf4: Merge "Remove HOST_OS==windows check"
* commit 'aaf4fcf482d427459c70e10a22fef5ea9c7bca1a':
  Remove HOST_OS==windows check
2015-09-09 18:19:15 +00:00