Merge "adb: fix flakiness in PTY shell protocol." am: b27365510d

Change-Id: I41c65bed67ceb644cf9d115bbc70883e16933dd9