Revert "Revert "adb: extend sync protocol's stat support.""

This reverts commit afa4b5d6eb45bbee8671a1bb93ea70506fb326e3.

Add functions to translate errno to and from the linux asm-generic
values, since mips has different values.

Bug: http://b/33058958
Test: python test_device.py with both old and new adbd
Change-Id: I1a122235f3e793ed10b3bf3ad293388015134150
9 files changed