diff --git a/gpt-utils/Android.bp b/gpt-utils/Android.bp
index 57c29d8..6e2a47b 100644
--- a/gpt-utils/Android.bp
+++ b/gpt-utils/Android.bp
@@ -30,6 +30,7 @@
     ],
     srcs: [
         "gpt-utils.cpp",
+        "recovery-ufs-bsg.cpp",
     ],
     owner: "qti",
     header_libs: [
diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp
index 1e8c9a2..58fc93a 100644
--- a/gpt-utils/gpt-utils.cpp
+++ b/gpt-utils/gpt-utils.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013,2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013,2016,2020 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -37,10 +37,6 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#ifndef _GENERIC_KERNEL_HEADERS
-#include <scsi/ufs/ioctl.h>
-#include <scsi/ufs/ufs.h>
-#endif
 #include <unistd.h>
 #include <linux/fs.h>
 #include <limits.h>
@@ -76,8 +72,6 @@
 #define XBL_AB_SECONDARY    "/dev/block/bootdevice/by-name/xbl_b"
 /* GPT defines */
 #define MAX_LUNS                    26
-//Size of the buffer that needs to be passed to the UFS ioctl
-#define UFS_ATTR_DATA_SIZE          32
 //This will allow us to get the root lun path from the path to the partition.
 //i.e: from /dev/block/sdaXXX get /dev/block/sda. The assumption here is that
 //the boot critical luns lie between sda to sdz which is acceptable because
@@ -129,6 +123,7 @@
      uint32_t num_valid_entries;
 };
 
+int32_t set_boot_lun(char *sg_dev,uint8_t boot_lun_id);
 /******************************************************************************
  * FUNCTIONS
  ******************************************************************************/
@@ -612,53 +607,7 @@
         return -1;
 }
 
-int set_boot_lun(char *sg_dev, uint8_t boot_lun_id)
-{
-#ifndef _GENERIC_KERNEL_HEADERS
-        int fd = -1;
-        int rc;
-        struct ufs_ioctl_query_data *data = NULL;
-        size_t ioctl_data_size = sizeof(struct ufs_ioctl_query_data) + UFS_ATTR_DATA_SIZE;
 
-        data = (struct ufs_ioctl_query_data*)malloc(ioctl_data_size);
-        if (!data) {
-                fprintf(stderr, "%s: Failed to alloc query data struct\n",
-                                __func__);
-                goto error;
-        }
-        memset(data, 0, ioctl_data_size);
-        data->opcode = UPIU_QUERY_OPCODE_WRITE_ATTR;
-        data->idn = QUERY_ATTR_IDN_BOOT_LU_EN;
-        data->buf_size = UFS_ATTR_DATA_SIZE;
-        data->buffer[0] = boot_lun_id;
-        fd = open(sg_dev, O_RDWR);
-        if (fd < 0) {
-                fprintf(stderr, "%s: Failed to open %s(%s)\n",
-                                __func__,
-                                sg_dev,
-                                strerror(errno));
-                goto error;
-        }
-        rc = ioctl(fd, UFS_IOCTL_QUERY, data);
-        if (rc) {
-                fprintf(stderr, "%s: UFS query ioctl failed(%s)\n",
-                                __func__,
-                                strerror(errno));
-                goto error;
-        }
-        close(fd);
-        free(data);
-        return 0;
-error:
-        if (fd >= 0)
-                close(fd);
-        if (data)
-                free(data);
-        return -1;
-#else
-	return 0;
-#endif
-}
 
 //Swtich betwieen using either the primary or the backup
 //boot LUN for boot. This is required since UFS boot partitions
@@ -732,6 +681,7 @@
                                 __func__);
                 goto error;
         }
+        /* set boot lun using /dev/sg or /dev/ufs-bsg* */
         if (set_boot_lun(sg_dev_node, boot_lun_id)) {
                 fprintf(stderr, "%s: Failed to set xblbak as boot partition\n",
                                 __func__);
diff --git a/gpt-utils/gpt-utils.h b/gpt-utils/gpt-utils.h
index 58b40be..5a5ef88 100644
--- a/gpt-utils/gpt-utils.h
+++ b/gpt-utils/gpt-utils.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013,2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013,2016,2020 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -80,7 +80,7 @@
 #define AB_SLOT_B_SUFFIX                "_b"
 #define PTN_XBL                         "xbl"
 #define PTN_XBL_CFG                     "xbl_config"
-#define PTN_SWAP_LIST                   PTN_XBL, PTN_XBL_CFG, "sbl1", "rpm", "tz", "aboot", "abl", "hyp", "lksecapp", "keymaster", "cmnlib", "cmnlib32", "cmnlib64", "pmic", "apdp", "devcfg", "hosd", "keystore", "msadp", "mdtp", "mdtpsecapp", "dsp", "aop", "qupfw", "vbmeta", "dtbo", "imagefv", "ImageFv", "multiimgoem", "multiimgqti", "uefisecapp"
+#define PTN_SWAP_LIST                   PTN_XBL, PTN_XBL_CFG, "sbl1", "rpm", "tz", "aboot", "abl", "hyp", "lksecapp", "keymaster", "cmnlib", "cmnlib32", "cmnlib64", "pmic", "apdp", "devcfg", "hosd", "keystore", "msadp", "mdtp", "mdtpsecapp", "dsp", "aop", "qupfw", "vbmeta", "dtbo", "imagefv", "ImageFv", "multiimgoem", "multiimgqti", "vm-bootsys", "shrm", "cpucp"
 #define AB_PTN_LIST PTN_SWAP_LIST, "boot", "system", "vendor", "odm", "modem", "bluetooth"
 #define BOOT_DEV_DIR    "/dev/block/bootdevice/by-name"
 
diff --git a/gpt-utils/recovery-ufs-bsg.cpp b/gpt-utils/recovery-ufs-bsg.cpp
new file mode 100644
index 0000000..84b0b2a
--- /dev/null
+++ b/gpt-utils/recovery-ufs-bsg.cpp
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#define LOG_TAG "recovery_ufs"
+
+#include "recovery-ufs-bsg.h"
+
+static int get_ufs_bsg_dev(void)
+{
+    DIR *dir;
+    struct dirent *ent;
+    int ret = -ENODEV;
+
+    if ((dir = opendir ("/dev")) != NULL) {
+        /* read all the files and directories within directory */
+        while ((ent = readdir(dir)) != NULL) {
+            if (!strcmp(ent->d_name, "ufs-bsg") ||
+                    !strcmp(ent->d_name, "ufs-bsg0")) {
+                snprintf(ufs_bsg_dev, FNAME_SZ, "/dev/%s", ent->d_name);
+                ret = 0;
+                break;
+            }
+        }
+        if (ret)
+            ALOGE("could not find the ufs-bsg dev\n");
+        closedir (dir);
+    } else {
+        /* could not open directory */
+        ALOGE("could not open /dev (error no: %d)\n", errno);
+        ret = -EINVAL;
+    }
+
+    return ret;
+}
+
+int ufs_bsg_dev_open(void)
+{
+    int ret;
+    if (!fd_ufs_bsg) {
+        fd_ufs_bsg = open(ufs_bsg_dev, O_RDWR);
+        ret = errno;
+        if (fd_ufs_bsg < 0) {
+            ALOGE("Unable to open %s (error no: %d)",
+                    ufs_bsg_dev, errno);
+            fd_ufs_bsg = 0;
+            return ret;
+        }
+    }
+    return 0;
+}
+
+void ufs_bsg_dev_close(void)
+{
+    if (fd_ufs_bsg) {
+        close(fd_ufs_bsg);
+        fd_ufs_bsg = 0;
+    }
+}
+
+static int ufs_bsg_ioctl(int fd, struct ufs_bsg_request *req,
+        struct ufs_bsg_reply *rsp, __u8 *buf, __u32 buf_len,
+        enum bsg_ioctl_dir dir)
+{
+    int ret;
+    struct sg_io_v4 sg_io = {0};
+
+    sg_io.guard = 'Q';
+    sg_io.protocol = BSG_PROTOCOL_SCSI;
+    sg_io.subprotocol = BSG_SUB_PROTOCOL_SCSI_TRANSPORT;
+    sg_io.request_len = sizeof(*req);
+    sg_io.request = (__u64)req;
+    sg_io.response = (__u64)rsp;
+    sg_io.max_response_len = sizeof(*rsp);
+    if (dir == BSG_IOCTL_DIR_FROM_DEV) {
+        sg_io.din_xfer_len = buf_len;
+        sg_io.din_xferp = (__u64)(buf);
+    } else {
+        sg_io.dout_xfer_len = buf_len;
+        sg_io.dout_xferp = (__u64)(buf);
+    }
+
+    ret = ioctl(fd, SG_IO, &sg_io);
+    if (ret)
+        ALOGE("%s: Error from sg_io ioctl (return value: %d, error no: %d, reply result from LLD: %d\n)",
+                __func__, ret, errno, rsp->result);
+
+    if (sg_io.info || rsp->result) {
+        ALOGE("%s: Error from sg_io info (check sg info: device_status: 0x%x, transport_status: 0x%x, driver_status: 0x%x, reply result from LLD: %d\n)",
+                __func__, sg_io.device_status, sg_io.transport_status,
+                sg_io.driver_status, rsp->result);
+        ret = -EAGAIN;
+    }
+
+    return ret;
+}
+
+static void compose_ufs_bsg_query_req(struct ufs_bsg_request *req, __u8 func,
+        __u8 opcode, __u8 idn, __u8 index, __u8 sel,
+        __u16 length)
+{
+    struct utp_upiu_header *hdr = &req->upiu_req.header;
+    struct utp_upiu_query *qr = &req->upiu_req.qr;
+
+    req->msgcode = UTP_UPIU_QUERY_REQ;
+    hdr->dword_0 = DWORD(UTP_UPIU_QUERY_REQ, 0, 0, 0);
+    hdr->dword_1 = DWORD(0, func, 0, 0);
+    hdr->dword_2 = DWORD(0, 0, length >> 8, (__u8)length);
+    qr->opcode = opcode;
+    qr->idn = idn;
+    qr->index = index;
+    qr->selector = sel;
+    qr->length = htobe16(length);
+}
+
+
+static int ufs_query_attr(int fd, __u32 value,
+        __u8 func, __u8 opcode, __u8 idn,
+        __u8 index, __u8 sel)
+{
+    struct ufs_bsg_request req = {0};
+    struct ufs_bsg_reply rsp = {0};
+    enum bsg_ioctl_dir dir = BSG_IOCTL_DIR_FROM_DEV;
+    int ret = 0;
+
+    if (opcode == QUERY_REQ_OP_WRITE_DESC || opcode == QUERY_REQ_OP_WRITE_ATTR)
+        dir = BSG_IOCTL_DIR_TO_DEV;
+
+    req.upiu_req.qr.value = htobe32(value);
+
+    compose_ufs_bsg_query_req(&req, func, opcode, idn, index, sel, 0);
+
+    ret = ufs_bsg_ioctl(fd, &req, &rsp, 0, 0, dir);
+    if (ret)
+        ALOGE("%s: Error from ufs_bsg_ioctl (return value: %d, error no: %d\n)",
+                __func__, ret, errno);
+
+    return ret;
+}
+
+int32_t set_boot_lun(char *sg_dev,uint8_t lun_id)
+{
+    int32_t ret;
+    __u32 boot_lun_id  = lun_id;
+
+    ret = get_ufs_bsg_dev();
+    if (ret)
+        return ret;
+    ALOGV("Found the ufs bsg dev: %s\n", ufs_bsg_dev);
+
+    ret = ufs_bsg_dev_open();
+    if (ret)
+        return ret;
+    ALOGV("Opened ufs bsg dev: %s\n", ufs_bsg_dev);
+
+    ret = ufs_query_attr(fd_ufs_bsg, boot_lun_id, QUERY_REQ_FUNC_STD_WRITE,
+            QUERY_REQ_OP_WRITE_ATTR, QUERY_ATTR_IDN_BOOT_LU_EN, 0, 0);
+    if (ret) {
+        ALOGE("Error requesting ufs attr idn %d via query ioctl (return value: %d, error no: %d)",
+                QUERY_ATTR_IDN_BOOT_LU_EN, ret, errno);
+        goto out;
+    }
+out:
+    ufs_bsg_dev_close();
+    return ret;
+}
diff --git a/gpt-utils/recovery-ufs-bsg.h b/gpt-utils/recovery-ufs-bsg.h
new file mode 100644
index 0000000..5a2561c
--- /dev/null
+++ b/gpt-utils/recovery-ufs-bsg.h
@@ -0,0 +1,129 @@
+#ifndef __RECOVERY_UFS_BSG_H__
+#define __RECOVERY_UFS_BSG_H__
+
+/*
+ * Copyright (c) 2020 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimer in the documentation and/or other materials provided
+ *       with the distribution.
+ *     * Neither the name of The Linux Foundation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+#include <linux/bsg.h>
+#include <scsi/scsi_bsg_ufs.h>
+#include <endian.h>
+#include <dirent.h>
+#include <string.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#ifdef ANDROID
+#include "cutils/log.h"
+#endif
+
+#ifdef OE
+#include <syslog.h>
+#define LOGI(...) syslog(LOG_NOTICE, "INFO:" __VA_ARGS__)
+#define LOGV(...) syslog(LOG_NOTICE,"VERB:" __VA_ARGS__)
+#define LOGD(...) syslog(LOG_DEBUG,"DBG:" __VA_ARGS__)
+#define LOGE(...) syslog(LOG_ERR,"ERR:" __VA_ARGS__)
+#define LOGW(...) syslog(LOG_WARNING,"WRN:" __VA_ARGS__)
+#define strlcat(d,s,l) snprintf(d+strlen(d),l,"%s",s)
+#endif
+
+
+
+#define FNAME_SZ 64
+
+#define SG_IO  0x2285
+
+#define DWORD(b3, b2, b1, b0) htobe32((b3 << 24) | (b2 << 16) |\
+        (b1 << 8) | b0)
+
+/* UFS BSG device nodes */
+char ufs_bsg_dev[FNAME_SZ] = "/dev/ufs-bsg";
+
+int fd_ufs_bsg;
+
+int32_t set_ufs_lun(uint8_t lun_id);
+
+/* UPIU Transaction Codes */
+enum {
+    UTP_UPIU_NOP_OUT    = 0x00,
+    UTP_UPIU_COMMAND    = 0x01,
+    UTP_UPIU_DATA_OUT   = 0x02,
+    UTP_UPIU_TASK_REQ   = 0x04,
+    UTP_UPIU_QUERY_REQ  = 0x16,
+};
+
+/* UPIU Query Function field */
+enum {
+    QUERY_REQ_FUNC_STD_READ    = 0x01,
+    QUERY_REQ_FUNC_STD_WRITE   = 0x81,
+};
+
+enum query_req_opcode {
+    QUERY_REQ_OP_READ_DESC    = 0x1,
+    QUERY_REQ_OP_WRITE_DESC   = 0x2,
+    QUERY_REQ_OP_READ_ATTR    = 0x3,
+    QUERY_REQ_OP_WRITE_ATTR   = 0x4,
+    QUERY_REQ_OP_READ_FLAG    = 0x5,
+    QUERY_REQ_OP_SET_FLAG     = 0x6,
+    QUERY_REQ_OP_CLEAR_FLAG   = 0x7,
+    QUERY_REQ_OP_TOGGLE_FLAG  = 0x8,
+};
+
+enum query_desc_idn {
+    QUERY_DESC_IDN_DEVICE    = 0x0,
+    QUERY_DESC_IDN_UNIT      = 0x2,
+    QUERY_DESC_IDN_GEOMETRY  = 0x7,
+};
+
+enum query_desc_size {
+    QUERY_DESC_SIZE_DEVICE    = 0x40,
+    QUERY_DESC_SIZE_GEOMETRY  = 0x48,
+    QUERY_DESC_SIZE_UNIT      = 0x23,
+};
+
+enum bsg_ioctl_dir {
+    BSG_IOCTL_DIR_TO_DEV,
+    BSG_IOCTL_DIR_FROM_DEV,
+};
+
+enum query_attr_idn {
+    QUERY_ATTR_IDN_BOOT_LU_EN        = 0x00,
+    QUERY_ATTR_IDN_RESERVED          = 0x01,
+    QUERY_ATTR_IDN_POWER_MODE        = 0x02,
+    QUERY_ATTR_IDN_ACTIVE_ICC_LVL    = 0x03,
+};
+
+#endif /* __RECOVERY_UFS_BSG_H__ */
diff --git a/gpt-utils/sparse_crc32.cpp b/gpt-utils/sparse_crc32.cpp
deleted file mode 100644
index 267322c..0000000
--- a/gpt-utils/sparse_crc32.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-
- *  COPYRIGHT (C) 1986 Gary S. Brown.  You may use this program, or
- *  code or tables extracted from it, as desired without restriction.
- */
-
-/*
- *  First, the polynomial itself and its table of feedback terms.  The
- *  polynomial is
- *  X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0
- *
- *  Note that we take it "backwards" and put the highest-order term in
- *  the lowest-order bit.  The X^32 term is "implied"; the LSB is the
- *  X^31 term, etc.  The X^0 term (usually shown as "+1") results in
- *  the MSB being 1
- *
- *  Note that the usual hardware shift register implementation, which
- *  is what we're using (we're merely optimizing it by doing eight-bit
- *  chunks at a time) shifts bits into the lowest-order term.  In our
- *  implementation, that means shifting towards the right.  Why do we
- *  do it this way?  Because the calculated CRC must be transmitted in
- *  order from highest-order term to lowest-order term.  UARTs transmit
- *  characters in order from LSB to MSB.  By storing the CRC this way
- *  we hand it to the UART in the order low-byte to high-byte; the UART
- *  sends each low-bit to hight-bit; and the result is transmission bit
- *  by bit from highest- to lowest-order term without requiring any bit
- *  shuffling on our part.  Reception works similarly
- *
- *  The feedback terms table consists of 256, 32-bit entries.  Notes
- *
- *      The table can be generated at runtime if desired; code to do so
- *      is shown later.  It might not be obvious, but the feedback
- *      terms simply represent the results of eight shift/xor opera
- *      tions for all combinations of data and CRC register values
- *
- *      The values must be right-shifted by eight bits by the "updcrc
- *      logic; the shift must be unsigned (bring in zeroes).  On some
- *      hardware you could probably optimize the shift in assembler by
- *      using byte-swap instructions
- *      polynomial $edb88320
- *
- *
- * CRC32 code derived from work by Gary S. Brown.
- */
-
-/* Code taken from FreeBSD 8 */
-#include <stdint.h>
-#include <stdio.h>
-
-static uint32_t crc32_tab[] = {
-    0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
-    0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
-    0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
-    0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
-    0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
-    0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
-    0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
-    0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
-    0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
-    0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
-    0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
-    0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
-    0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
-    0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
-    0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
-    0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
-    0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
-    0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
-    0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
-    0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
-    0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
-    0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
-    0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
-    0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
-    0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
-    0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
-    0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
-    0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
-    0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
-    0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
-    0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
-    0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d};
-
-/*
- * A function that calculates the CRC-32 based on the table above is
- * given below for documentation purposes. An equivalent implementation
- * of this function that's actually used in the kernel can be found
- * in sys/libkern.h, where it can be inlined.
- */
-
-uint32_t sparse_crc32(uint32_t crc_in, const void* buf, size_t size) {
-  const uint8_t* p = reinterpret_cast<const uint8_t*>(buf);
-  uint32_t crc;
-
-  crc = crc_in ^ ~0U;
-  while (size--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
-  return crc ^ ~0U;
-}
diff --git a/gpt-utils/sparse_crc32.h b/gpt-utils/sparse_crc32.h
deleted file mode 100644
index 2702c4f..0000000
--- a/gpt-utils/sparse_crc32.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source 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 _LIBSPARSE_SPARSE_CRC32_H_
-#define _LIBSPARSE_SPARSE_CRC32_H_
-
-#include <stdint.h>
-
-uint32_t sparse_crc32(uint32_t crc, const void* buf, size_t size);
-
-#endif
