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

Change-Id: I0f7abb9f0b2cc7a4c18129ac62ce5235c10d36fe