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>
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
- 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
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
This will make fs_mgr look in the misc partition for the A/B suffix to
use if one of more fstab entries is using the slotselect option and the
bootloader doesn't specify the suffix.
Change-Id: I24233195f60dd352bf8e7ac32b0d95dcd3323156
Adds a new class ShellProtocol to help read and write data with
`adb shell`. This will allow splitting streams and sending out-of-band
data such as exit codes.
Nothing uses the new class yet except the unit tests.
This is the second attempt at this CL, the first is at
http://r.android.com/169600. The problems was using sighandler_t
which is not available on mac. sig_t is used instead which is available
due to _GNU_SOURCE being defined in Android.mk, which causes
_BSD_SOURCE -> __USE_BSD -> sig_t to be defined. Nothing else has been
changed from the original CL.
Bug: http://b/23030641
Change-Id: I7bd7f5a82ad811fbca7a3eee1236d2c55ae57c48
Visual Studio's 'jump to reference' feature couldn't parse
adb_commandline() because I used an #ifdef in the middle of an if
statement, so this refactors the code into a separate helper function. I
just copied the code and inverted the comparisons.
No need for sysdeps since this is pretty minor.
Change-Id: Ifd5c62b0b505080ada6db5cc19739c6f07b94de9
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
This CL broke the mac build. I'll revert for now and take a look at how to get it working next week.
This reverts commit 73096f2e1d.
Change-Id: Icb3e015250bcbbc69a45675a1358699ebe01e77b
`adb features` previously returned a list of host features which was
not terribly useful. This CL changes functionality to return the
transport features instead using the standard targeting args:
$ adb features # default target.
$ adb -e features
$ adb -s 123456 features
Also adds a "check-feature" service which is currently unused but will
allow the adb client to easily check for a specific feature.
Bug: http://b/23824036
Change-Id: Ibc0c420c75f73d363f3bba7705af616ba2059348
Adds a new class ShellProtocol to help read and write data with
`adb shell`. This will allow splitting streams and sending out-of-band
data such as exit codes.
Nothing uses the new class yet except the unit tests.
Bug: http://b/23030641
Change-Id: Ieb02e127095c6dda25b7cb188a2e599173fd97e6
Refactor shell_service.cpp to remove dependencies on service.cpp and
combine some common logic between PTY and raw subprocesses.
This will make it easier to add additional common code paths for
the upcoming shell protocol.
Change-Id: I497d30dd388de61b6e68d9086dce38f33dd92876
Upcoming changes to the shell will require significant additions to
the subprocess code, and it will be cleaner if it's in a separate file.
The only functional change here is a new debug tag specifically for
the shell service. Everything else has been copied exactly as-is in
order to make it easier to determine what's changing in upcoming CLs.
Change-Id: I13bd4294059051ee10e0d0c6a06affd8eca62967
With part deux we caused an apparent regression by not checking for
stale recorded iterators. This checking was on-purpose bypassesed
when leading prune entries were to be deleted without touching the
statistics engine due to an in-place merge.
Part deux had us leaving iterators we were not focussed on untouched
which in turn because they were left behind, had a much higher
likelihood of being deleted without touching the statistics engine.
Perform the check every delete.
Bug: 23789348
Change-Id: Idc6cc23d1f9e3b6cd9a083139a0de59479fbfe08
Move uncrypt from /init.rc to /system/etc/init/uncrypt.rc using the
LOCAL_INIT_RC mechanism
Bug 23186545
Change-Id: Ibd838dd1d250c0e6536e44b69f11fb5ed42ba10b
init.usb.rc and adbd.rc contain similar contents and belong in the same
file.
This file also belongs on the ramdisk as adbd is on the ramdisk, not the
system partition, therefore resolving to keep init.usb.rc in its current
location and combining the contents of adbd.rc is the best approach
Change-Id: I430f8fea58694679e7b8b7be69ce87daadd616f4
init.trace.rc will be renamed to atrace.rc and use the LOCAL_INIT_RC
mechanism to be included on /system appropriately.
Bug 23186545
Change-Id: I55c37d3ff98c9ac10e6c1a713fadc7eb37346195
If the signal handler doesn't fire in the given time when trying to unwind
a thread, put on a logging handler. This prevents crashes if the signal
does eventually fire.
Bug: 23783762
Change-Id: Ib7abb36b71d079a7043117697c41b535319586fd