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

This reverts commit 31a96f7fd9189dde01b362f64aceb1bc2097c094.

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