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

Change-Id: I41c65bed67ceb644cf9d115bbc70883e16933dd9