diff --git a/gps/dump/Android.bp b/gps/dump/Android.bp
new file mode 100644
index 0000000..1f66882
--- /dev/null
+++ b/gps/dump/Android.bp
@@ -0,0 +1,20 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_binary {
+    name: "dump_gps",
+    srcs: ["dump_gps.cpp"],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+    ],
+    shared_libs: [
+        "libbase",
+	"libdump",
+	"liblog",
+    ],
+    vendor: true,
+    relative_install_path: "dump",
+}
diff --git a/gps/dump/dump_gps.cpp b/gps/dump/dump_gps.cpp
new file mode 100644
index 0000000..d7ece62
--- /dev/null
+++ b/gps/dump/dump_gps.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022 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.
+ */
+#include <dump/pixel_dump.h>
+#include <android-base/properties.h>
+#include <android-base/file.h>
+
+#define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num"
+#define GPS_LOG_DIRECTORY "/data/vendor/gps/logs"
+#define GPS_TMP_LOG_DIRECTORY "/data/vendor/gps/logs/.tmp"
+#define GPS_LOG_PREFIX "gl-"
+#define GPS_MCU_LOG_PREFIX "esw-"
+
+int main() {
+    if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) {
+        printf("vendor.gps.aol.enabled is false. gps logging is not running.\n");
+        return 0;
+    }
+    int maxFileNum = ::android::base::GetIntProperty(GPS_LOG_NUMBER_PROPERTY, 20);
+    std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "gps");
+    if (mkdir(outputDir.c_str(), 0777) == -1) {
+        printf("Unable to create folder: %s\n", outputDir.c_str());
+        return 0;
+    }
+
+    dumpLogs(GPS_TMP_LOG_DIRECTORY, outputDir.c_str(), 1, GPS_LOG_PREFIX);
+    dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 3, GPS_MCU_LOG_PREFIX);
+    dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_LOG_PREFIX);
+    return 0;
+}
+
diff --git a/gps/dump/log.mk b/gps/dump/log.mk
new file mode 100644
index 0000000..d977cb2
--- /dev/null
+++ b/gps/dump/log.mk
@@ -0,0 +1,4 @@
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/gps/dump/sepolicy/
+
+PRODUCT_PACKAGES_DEBUG += dump_gps
+
diff --git a/gps/dump/sepolicy/dump_gps.te b/gps/dump/sepolicy/dump_gps.te
new file mode 100644
index 0000000..b60a251
--- /dev/null
+++ b/gps/dump/sepolicy/dump_gps.te
@@ -0,0 +1,10 @@
+pixel_bugreport(dump_gps)
+
+userdebug_or_eng(`
+  allow dump_gps radio_vendor_data_file:dir create_dir_perms;
+  allow dump_gps radio_vendor_data_file:file create_file_perms;
+  allow dump_gps vendor_gps_file:dir r_dir_perms;
+  allow dump_gps vendor_gps_file:file r_file_perms;
+
+  get_prop(dump_gps, vendor_gps_prop)
+')
diff --git a/gps/dump/sepolicy/file_contexts b/gps/dump/sepolicy/file_contexts
new file mode 100644
index 0000000..a35e59c
--- /dev/null
+++ b/gps/dump/sepolicy/file_contexts
@@ -0,0 +1,2 @@
+/vendor/bin/dump/dump_gps           u:object_r:dump_gps_exec:s0
+
diff --git a/insmod/include/dump/pixel_dump.h b/insmod/include/dump/pixel_dump.h
index 1d661be..bf74efa 100644
--- a/insmod/include/dump/pixel_dump.h
+++ b/insmod/include/dump/pixel_dump.h
@@ -1,7 +1,14 @@
 #ifndef DEVICE_GOOGLE_GS_COMMON_INSMOD_INCLUDE_DUMP_PIXEL_DUMP_H_
 #define DEVICE_GOOGLE_GS_COMMON_INSMOD_INCLUDE_DUMP_PIXEL_DUMP_H_
 
+#include <string>
+
+#define BUGREPORT_PACKING_DIR "/data/vendor/radio/logs/always-on/all_logs"
+#define MODEM_LOG_DIRECTORY "/data/vendor/radio/logs/always-on"
+
 void dumpFileContent(const char* title, const char* file_path);
 void runCommand(const char* title, const char* cmd);
+std::string concatenatePath(const char* folder, const char* file);
+void dumpLogs(const char* SrcDir, const char* DestDir, int limit, const char* prefix);
 
 #endif  // DEVICE_GOOGLE_GS_COMMON_INSMOD_INCLUDE_DUMP_PIXEL_DUMP_H_
diff --git a/insmod/pixel_dump.cpp b/insmod/pixel_dump.cpp
index 5926dfc..db7fe3b 100644
--- a/insmod/pixel_dump.cpp
+++ b/insmod/pixel_dump.cpp
@@ -16,6 +16,8 @@
 #include <stdio.h>
 #include <string>
 #include <android-base/file.h>
+#include <fstream>
+#include <dump/pixel_dump.h>
 
 // Format title and content output.
 void dumpFileContent(const char* title, const char* file_path) {
@@ -35,3 +37,62 @@
     system(cmd);
     return;
 }
+
+std::string concatenatePath(const char* folder, const char* file){
+    std::string path = folder;
+    if(folder[strlen(folder)-1] == '/'){
+        path = path + file;
+    } else {
+        path = path + "/" + file;
+    }
+
+    printf("folder:%s, result:%s\n", folder, path.c_str());
+    return path;
+}
+
+// Copy stored log from individual folder to our dumpstate folder for
+// compressing.
+void dumpLogs(const char* SrcDir, const char* DestDir, int limit, const char* prefix) {
+
+    struct dirent **dirent_list = NULL;
+    int num_entries = scandir(SrcDir, &dirent_list, 0, (int (*)(const struct dirent **, const struct dirent **)) alphasort);
+    if (!dirent_list) {
+        printf("Unable to scan dir: %s.\n", SrcDir);
+        return;
+    } else if (num_entries <= 0) {
+        printf("No file is found.\n");
+        return;
+    }
+
+    if (access(DestDir, R_OK)) {
+        printf("Unable to find folder: %s\n", DestDir);
+        return;
+    }
+
+    int copiedFiles = 0;
+
+    for (int i = num_entries - 1; i >= 0; i--) {
+
+        if (0 != strncmp(dirent_list[i]->d_name, prefix, strlen(prefix))) {
+            continue;
+        }
+
+        if ((copiedFiles >= limit) && (limit != -1)) {
+            printf("Skipped %s\n", dirent_list[i]->d_name);
+            continue;
+        }
+
+        copiedFiles++;
+
+        std::ifstream src(concatenatePath(SrcDir, dirent_list[i]->d_name).c_str(), std::ios::binary);
+        std::ofstream dst(concatenatePath(DestDir, dirent_list[i]->d_name).c_str(), std::ios::binary);
+        dst << src.rdbuf();
+    }
+
+    while (num_entries--) {
+        free(dirent_list[num_entries]);
+    }
+
+    free(dirent_list);
+    return;
+}
