fastboot driver: RunAndReadBuffer don't allocate too much mem
Instead of allocating the buffer for the whole
upload (which can be arbitrary number of bytes as
the device determines), read 1 MiB at a time.
Test: pass
Bug: 173654501
Change-Id: Ib601b0341b10b7dccbb429cd21aad86a2d3bfda8
diff --git a/fastboot/Android.bp b/fastboot/Android.bp
index 8e98e9f..720810d 100644
--- a/fastboot/Android.bp
+++ b/fastboot/Android.bp
@@ -76,6 +76,7 @@
header_libs: [
"bootimg_headers",
+ "libstorage_literals_headers",
],
export_header_lib_headers: [
@@ -275,6 +276,9 @@
// Only version the final binaries
use_version_lib: false,
static_libs: ["libbuildversion"],
+ header_libs: [
+ "libstorage_literals_headers",
+ ],
generated_headers: ["platform_tools_version"],