adb: add libusb implementation for Linux/Darwin.
Add a libusb-based implementation alongside the existing native
implementations, controlled by the ADB_LIBUSB environment variable.
Windows will need more work for the usb driver.
Bug: http://b/31321337
Test: python test_device.py on linux/darwin, with ADB_LIBUSB=0 and 1
Change-Id: Ib68fb2c6c05475eae3ff4cc19f55802a6f489bb7
diff --git a/adb/adb.cpp b/adb/adb.cpp
index 3cd50ba..ece143c 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -40,6 +40,7 @@
#include <android-base/logging.h>
#include <android-base/macros.h>
#include <android-base/parsenetaddress.h>
+#include <android-base/quick_exit.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
@@ -1047,7 +1048,7 @@
// may not read the OKAY sent above.
adb_shutdown(reply_fd);
- exit(0);
+ android::base::quick_exit(0);
}
#if ADB_HOST