refactor fuse sideloading code

Split the adb-specific portions (fetching a block from the adb host
and closing the connections) out from the rest of the FUSE filesystem
code, so that we can reuse the fuse stuff for installing off sdcards
as well.

Change-Id: I0ba385fd35999c5f5cad27842bc82024a264dd14
diff --git a/Android.mk b/Android.mk
index 1165acb..f469182 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,6 +17,18 @@
 
 include $(CLEAR_VARS)
 
+LOCAL_SRC_FILES := fuse_sideload.c
+
+LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
+LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
+
+LOCAL_MODULE := libfusesideload
+
+LOCAL_STATIC_LIBRARIES := libcutils libc libmincrypt
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
 LOCAL_SRC_FILES := \
     recovery.cpp \
     bootloader.cpp \
@@ -49,6 +61,7 @@
     libmtdutils \
     libmincrypt \
     libminadbd \
+    libfusesideload \
     libminui \
     libpng \
     libfs_mgr \