diff --git a/Android.bp b/Android.bp
index c1a916a..99a446a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -58,6 +58,7 @@
 
     shared_libs: ["libext2_uuid"],
     static_libs: ["libgptf"],
+    recovery_available: true,
 }
 
 lib_common_srcs = [
@@ -81,6 +82,7 @@
     name: "libgptf",
     defaults: ["gptfdisk_default_flags"],
     host_supported: true,
+    recovery_available: true,
 
     export_include_dirs: ["."],
     srcs: lib_common_srcs + ["diskio-unix.cc"],
@@ -99,3 +101,20 @@
 
     shared_libs: ["libext2_uuid"],
 }
+
+cc_library {
+    name: "libsgdisk",
+    recovery_available: true,
+
+    defaults: ["gptfdisk_default_flags"],
+
+    srcs: [
+        "sgdisk.cc",
+    ],
+    cflags: [
+        "-Dmain=sgdisk_main",
+    ],
+
+    shared_libs: ["libext2_uuid"],
+    static_libs: ["libgptf"],
+}
diff --git a/basicmbr.h b/basicmbr.h
index 696f826..8db61cd 100644
--- a/basicmbr.h
+++ b/basicmbr.h
@@ -24,6 +24,7 @@
 
 // A 512-byte data structure into which the MBR can be loaded in one
 // go. Also used when loading logical partitions.
+#pragma pack(push)
 #pragma pack(1)
 struct TempMBR {
    uint8_t code[440];
@@ -149,4 +150,6 @@
    void ShowCommands(void);
 }; // class BasicMBRData
 
+#pragma pack(pop)
+
 #endif
diff --git a/bsd.h b/bsd.h
index e042b7b..b9d5374 100644
--- a/bsd.h
+++ b/bsd.h
@@ -54,6 +54,7 @@
 // Full data in tweaked BSD format
 // For some reason this has to be packed or MS Visual C++'s debugger complains
 // about memory errors whenever a BSDData variable is destroyed.
+#pragma pack(push)
 #pragma pack (8)
 class BSDData {
    protected:
@@ -88,4 +89,6 @@
 }; // struct MBRData
 #pragma pack ()
 
+#pragma pack(pop)
+
 #endif
diff --git a/gpt.h b/gpt.h
index 6e1e0bb..a1ff47f 100644
--- a/gpt.h
+++ b/gpt.h
@@ -37,6 +37,7 @@
 enum WhichToUse {use_gpt, use_mbr, use_bsd, use_new, use_abort};
 
 // Header (first 512 bytes) of GPT table
+#pragma pack(push)
 #pragma pack(1)
 struct GPTHeader {
    uint64_t signature;
@@ -212,4 +213,6 @@
 // Function prototypes....
 int SizesOK(void);
 
+#pragma pack(pop)
+
 #endif
diff --git a/mbrpart.h b/mbrpart.h
index 6c7b21a..b889f3d 100644
--- a/mbrpart.h
+++ b/mbrpart.h
@@ -39,6 +39,7 @@
 // On read of logical entries, it's relative to the EBR record for that
 // partition. When writing EBR records, it's relative to the extended
 // partition's start.
+#pragma pack(push)
 #pragma pack(1)
 struct MBRRecord {
    uint8_t status;
@@ -108,4 +109,6 @@
     void ShowData(int isGpt);
 }; // MBRPart
 
+#pragma pack(pop)
+
 #endif // MBRPART_H
diff --git a/sgdisk.cc b/sgdisk.cc
index 1892e2d..d3524c5 100644
--- a/sgdisk.cc
+++ b/sgdisk.cc
@@ -16,29 +16,26 @@
 #include <iostream>
 #include <sstream>
 #include <errno.h>
-#include "gptcl.h"
 #include <fcntl.h>
 #include <unistd.h>
 
+#include "sgdisk.h"
+#include "gptcl.h"
+
 using namespace std;
 
 #define MAX_OPTIONS 50
 
-/*
- * Dump partition details in a machine readable format:
- *
- * DISK [mbr|gpt] [guid]
- * PART [n] [type] [guid]
- */
-static int android_dump(char* device) {
+int sgdisk_read(const char* device, sgdisk_partition_table& ptbl,
+                vector<sgdisk_partition>& partitions) {
     BasicMBRData mbrData;
     GPTData gptData;
     GPTPart partData;
     int numParts = 0;
-    stringstream res;
 
     /* Silence noisy underlying library */
-    int stdout = dup(STDOUT_FILENO);
+    int stdout_fd = dup(STDOUT_FILENO);
+    int stderr_fd = dup(STDERR_FILENO);
     int silence = open("/dev/null", 0);
     dup2(silence, STDOUT_FILENO);
     dup2(silence, STDERR_FILENO);
@@ -50,14 +47,20 @@
 
     switch (mbrData.GetValidity()) {
     case mbr:
-        res << "DISK mbr" << endl;
-        for (int i = 0; i < MAX_MBR_PARTS; i++) {
+        ptbl.type = MBR;
+        ptbl.guid.clear();
+        for (size_t i = 0; i < MAX_MBR_PARTS; i++) {
             if (mbrData.GetLength(i) > 0) {
-                res << "PART " << (i + 1) << " " << hex
-                        << (int) mbrData.GetType(i) << dec << endl;
+                char typebuf[2+8+1];
+                sprintf(typebuf, "%x", (unsigned int)mbrData.GetType(i));
+                sgdisk_partition part;
+                part.num = i + 1;
+                part.type = typebuf;
+                partitions.push_back(part);
             }
         }
         break;
+    case hybrid:
     case gpt:
         gptData.JustLooking();
         if (!gptData.LoadPartitions((string) device)) {
@@ -65,14 +68,17 @@
             return 9;
         }
 
-        res << "DISK gpt " << gptData.GetDiskGUID() << endl;
-        numParts = gptData.GetNumParts();
-        for (int i = 0; i < numParts; i++) {
+        ptbl.type = GPT;
+        ptbl.guid = gptData.GetDiskGUID().AsString();
+        for (size_t i = 0; i < gptData.GetNumParts(); i++) {
             partData = gptData[i];
             if (partData.GetFirstLBA() > 0) {
-                res << "PART " << (i + 1) << " " << partData.GetType() << " "
-                        << partData.GetUniqueGUID() << " "
-                        << partData.GetDescription() << endl;
+                sgdisk_partition part;
+                part.num = i + 1;
+                part.type = partData.GetType().AsString();
+                part.guid = partData.GetUniqueGUID().AsString();
+                part.name = partData.GetDescription();
+                partitions.push_back(part);
             }
         }
         break;
@@ -81,13 +87,51 @@
         return 10;
     }
 
-    /* Write our actual output */
-    string resString = res.str();
-    write(stdout, resString.c_str(), resString.length());
+    fflush(stdout);
+    fflush(stderr);
+    dup2(stdout_fd, STDOUT_FILENO);
+    dup2(stderr_fd, STDERR_FILENO);
+    close(silence);
+
     return 0;
 }
 
-int main(int argc, char *argv[]) {
+/*
+ * Dump partition details in a machine readable format:
+ *
+ * DISK [mbr|gpt] [guid]
+ * PART [n] [type] [guid]
+ */
+static int android_dump(const char* device) {
+    sgdisk_partition_table ptbl;
+    vector<sgdisk_partition> partitions;
+    int rc = sgdisk_read(device, ptbl, partitions);
+    if (rc == 0) {
+        stringstream res;
+        switch (ptbl.type) {
+        case MBR:
+            res << "DISK mbr" << endl;
+            for (auto& part : partitions) {
+                res << "PART " << part.num << " " << part.type << endl;
+            }
+            break;
+        case GPT:
+            res << "DISK gpt " << ptbl.guid << endl;
+            for (auto& part : partitions) {
+                res << "PART " << part.num << " " << part.type << " "
+                    << part.guid << " " << part.name << endl;
+            }
+            break;
+        default:
+            return 10;
+        }
+        string partStr = res.str();
+        write(STDOUT_FILENO, partStr.c_str(), partStr.length());
+    }
+    return rc;
+}
+
+extern "C" int main(int argc, char *argv[]) {
     for (int i = 0; i < argc; i++) {
         if (!strcmp("--android-dump", argv[i])) {
             return android_dump(argv[i + 1]);
diff --git a/sgdisk.h b/sgdisk.h
new file mode 100644
index 0000000..d98ee2d
--- /dev/null
+++ b/sgdisk.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2008 The Lineage Android Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __SGDISK
+#define __SGDISK
+
+#include <string>
+#include <vector>
+
+enum ptbl_type {
+    MBR,
+    GPT
+};
+
+struct sgdisk_partition_table {
+    ptbl_type   type;
+    std::string guid;
+};
+
+struct sgdisk_partition {
+    int         num;
+    std::string type;
+    std::string guid;
+    std::string name;
+};
+
+int sgdisk_read(const char* device, sgdisk_partition_table& ptbl,
+                std::vector<sgdisk_partition>& partitions);
+
+#endif
