<feed xmlns='http://www.w3.org/2005/Atom'>
<title>replicant/core/adb/shell_service_test.cpp, branch master</title>
<subtitle>Patches not merged yet, used for building and testing them
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/'/>
<entry>
<title>adb: delete vestigial SHELL_EXIT_NOTIFY_FD.</title>
<updated>2018-03-29T06:36:32+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2018-03-20T20:10:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=cc9414eda4221a2404fdd6b21cab465024193003'/>
<id>cc9414eda4221a2404fdd6b21cab465024193003</id>
<content type='text'>
There exists no path through which a value other than -1 can be written
to the SHELL_EXIT_NOTIFY_FD.

Bug: http://b/74616284
Test: adb_test
Test: adbd_test
Test: python test_device.py
Change-Id: I0630c302ba06bc76917f0445aea75d2dbe1dc865
(cherry picked from commit dcc055af644ce87f1590ab82680f3e0ca4cee54c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There exists no path through which a value other than -1 can be written
to the SHELL_EXIT_NOTIFY_FD.

Bug: http://b/74616284
Test: adb_test
Test: adbd_test
Test: python test_device.py
Change-Id: I0630c302ba06bc76917f0445aea75d2dbe1dc865
(cherry picked from commit dcc055af644ce87f1590ab82680f3e0ca4cee54c)
</pre>
</div>
</content>
</entry>
<entry>
<title>adb: fix subprocess termination for legacy shell.</title>
<updated>2016-01-28T01:13:41+00:00</updated>
<author>
<name>David Pursell</name>
<email>dpursell@google.com</email>
</author>
<published>2016-01-28T00:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=57dd5ae1e3004daec664263e24dc4dcf4475bb02'/>
<id>57dd5ae1e3004daec664263e24dc4dcf4475bb02</id>
<content type='text'>
http://r.android.com/166419 changed `adb shell` behavior to not
allocate a remote PTY for non-interactive commands, but adbd relied on
having a PTY to properly terminate the subprocess.

One impact of this is that when using older versions of adb or passing
the -x flag, `adb screenrecord` wasn't properly terminating and closing
out the video file.

This CL restores the old behavior for legacy shell connections: always
use a PTY, but put it in raw mode if the client is doing local PTY
input/output processing itself.

Bug: http://b/26742824
Change-Id: I9ee630c0ff0d2d6a0db367387af7123deea79676
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
http://r.android.com/166419 changed `adb shell` behavior to not
allocate a remote PTY for non-interactive commands, but adbd relied on
having a PTY to properly terminate the subprocess.

One impact of this is that when using older versions of adb or passing
the -x flag, `adb screenrecord` wasn't properly terminating and closing
out the video file.

This CL restores the old behavior for legacy shell connections: always
use a PTY, but put it in raw mode if the client is doing local PTY
input/output processing itself.

Bug: http://b/26742824
Change-Id: I9ee630c0ff0d2d6a0db367387af7123deea79676
</pre>
</div>
</content>
</entry>
<entry>
<title>Track rename of base/ to android-base/.</title>
<updated>2015-12-05T06:00:26+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2015-12-05T06:00:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=4f71319df011d796a60a43fc1bc68e16fbf7d321'/>
<id>4f71319df011d796a60a43fc1bc68e16fbf7d321</id>
<content type='text'>
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
</pre>
</div>
</content>
</entry>
<entry>
<title>Pass $TERM to the device.</title>
<updated>2015-11-16T18:55:34+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2015-11-16T18:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=18ddf5c6a233bd56d20548fd834c0ecbf8216410'/>
<id>18ddf5c6a233bd56d20548fd834c0ecbf8216410</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>adb: non-interactive shell stdin.</title>
<updated>2015-10-15T16:44:54+00:00</updated>
<author>
<name>David Pursell</name>
<email>dpursell@google.com</email>
</author>
<published>2015-10-06T22:30:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=1ed57f0dc333c0bc0800e222c569cca8a71deb89'/>
<id>1ed57f0dc333c0bc0800e222c569cca8a71deb89</id>
<content type='text'>
Non-interactive `adb shell` previously only read from the remote shell,
but we want it to write as well so interactive and non-interactive
shells can both send data. With this CL, we can now do:
  $ echo foo | adb shell cat
  foo

This is primarily usable with newer devices that support the shell_v2
features. Older devices will receive stdin but the shell will still
hang after all input has been sent, requiring user Ctrl+C. This seems
better than closing communication altogether which could potentially
miss an unpredictable amount of return data by closing too early.

Known issue: non-interactive stdin to a PTY shell isn't reliable.
However I don't think this is a common case as ssh doesn't seem to
handle it properly either. Examples:
  * echo 'echo foo' | adb shell
  * echo 'foo' | adb shell -t cat

Bug: http://b/24565284
Change-Id: I5b017fd12d8478765bb6e8400ea76d535c24ce42
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Non-interactive `adb shell` previously only read from the remote shell,
but we want it to write as well so interactive and non-interactive
shells can both send data. With this CL, we can now do:
  $ echo foo | adb shell cat
  foo

This is primarily usable with newer devices that support the shell_v2
features. Older devices will receive stdin but the shell will still
hang after all input has been sent, requiring user Ctrl+C. This seems
better than closing communication altogether which could potentially
miss an unpredictable amount of return data by closing too early.

Known issue: non-interactive stdin to a PTY shell isn't reliable.
However I don't think this is a common case as ssh doesn't seem to
handle it properly either. Examples:
  * echo 'echo foo' | adb shell
  * echo 'foo' | adb shell -t cat

Bug: http://b/24565284
Change-Id: I5b017fd12d8478765bb6e8400ea76d535c24ce42
</pre>
</div>
</content>
</entry>
<entry>
<title>adb: implement shell protocol.</title>
<updated>2015-09-11T18:27:50+00:00</updated>
<author>
<name>David Pursell</name>
<email>dpursell@google.com</email>
</author>
<published>2015-08-31T17:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/contrib/GNUtoo/replicant/core/commit/?id=0955c66b226db7a7f34613f834f7b0a145fd407d'/>
<id>0955c66b226db7a7f34613f834f7b0a145fd407d</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
</feed>
