diff --git a/apexd/Android.bp b/apexd/Android.bp
index 0494889..58822a8 100644
--- a/apexd/Android.bp
+++ b/apexd/Android.bp
@@ -91,6 +91,8 @@
         "libtinyxml2",
         "libverity_tree",
         "libvold_binder",
+        "libstatslog_apex",
+        "libstatssocket_lazy",
     ],
     whole_static_libs: ["libcom.android.sysprop.apex"],
 }
@@ -268,6 +270,7 @@
     srcs: [
         "apex_file.cpp",
         "apex_manifest.cpp",
+        "apex_sha.cpp",
         "apex_shim.cpp",
         "apexd_verity.cpp",
     ],
@@ -571,11 +574,13 @@
         "libapexd",
         "libfstab",
         "libgmock",
+        "libstatslog_apex",
     ],
     shared_libs: [
         "libbinder",
         "libfs_mgr",
         "libutils",
+        "libstatssocket",
     ],
     generated_sources: ["apex-info-list-tinyxml"],
     test_suites: ["device-tests"],
@@ -697,3 +702,38 @@
     tinyxml: true,
     root_elements: ["apex-info-list"],
 }
+
+cc_library_static {
+    name: "libstatslog_apex",
+    generated_sources: ["statslog_apex.cpp"],
+    generated_headers: ["statslog_apex.h"],
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    export_generated_headers: ["statslog_apex.h"],
+    static_libs: [
+        "libcutils",
+        "liblog",
+        "libstatssocket_lazy",
+        "libutils",
+    ],
+}
+
+genrule {
+    name: "statslog_apex.h",
+    tools: ["stats-log-api-gen"],
+    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_apex.h --module apex --namespace stats,apex",
+    out: [
+        "statslog_apex.h",
+    ],
+}
+
+genrule {
+    name: "statslog_apex.cpp",
+    tools: ["stats-log-api-gen"],
+    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_apex.cpp --module apex --namespace stats,apex --importHeader statslog_apex.h",
+    out: [
+        "statslog_apex.cpp",
+    ],
+}
diff --git a/apexd/apex_sha.cpp b/apexd/apex_sha.cpp
new file mode 100644
index 0000000..699126d
--- /dev/null
+++ b/apexd/apex_sha.cpp
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2024 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 "apex_sha.h"
+
+#include <android-base/logging.h>
+#include <openssl/sha.h>
+
+#include <fstream>
+#include <sstream>
+
+static constexpr const int kBufSize = 1024;
+
+using android::base::Error;
+using android::base::Result;
+
+namespace android {
+namespace apex {
+
+Result<std::string> CalculateSha512(const std::string& path) {
+  LOG(DEBUG) << "Calculating SHA512 of " << path;
+  SHA512_CTX ctx;
+  SHA512_Init(&ctx);
+  std::ifstream apex(path, std::ios::binary);
+  if (apex.bad()) {
+    return Error() << "Failed to open " << path;
+  }
+  char buf[kBufSize];
+  while (!apex.eof()) {
+    apex.read(buf, kBufSize);
+    if (apex.bad()) {
+      return Error() << "Failed to read " << path;
+    }
+    int bytes_read = apex.gcount();
+    SHA512_Update(&ctx, buf, bytes_read);
+  }
+  uint8_t hash[SHA512_DIGEST_LENGTH];
+  SHA512_Final(hash, &ctx);
+  std::stringstream ss;
+  ss << std::hex;
+  for (int i = 0; i < SHA512_DIGEST_LENGTH; i++) {
+    ss << std::setw(2) << std::setfill('0') << static_cast<int>(hash[i]);
+  }
+  return ss.str();
+}
+
+Result<std::string> CalculateSha256(const std::string& path) {
+  LOG(DEBUG) << "Calculating SHA256 of " << path;
+  SHA256_CTX ctx;
+  SHA256_Init(&ctx);
+  std::ifstream apex(path, std::ios::binary);
+  if (apex.bad()) {
+    return Error() << "Failed to open " << path;
+  }
+  char buf[kBufSize];
+  while (!apex.eof()) {
+    apex.read(buf, kBufSize);
+    if (apex.bad()) {
+      return Error() << "Failed to read " << path;
+    }
+    int bytes_read = apex.gcount();
+    SHA256_Update(&ctx, buf, bytes_read);
+  }
+  uint8_t hash[SHA256_DIGEST_LENGTH];
+  SHA256_Final(hash, &ctx);
+  std::stringstream ss;
+  ss << std::hex;
+  for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) {
+    ss << std::setw(2) << std::setfill('0') << static_cast<int>(hash[i]);
+  }
+  return ss.str();
+}
+
+}  // namespace apex
+}  // namespace android
diff --git a/apexd/apex_sha.h b/apexd/apex_sha.h
new file mode 100644
index 0000000..c509916
--- /dev/null
+++ b/apexd/apex_sha.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 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 <android-base/result.h>
+
+namespace android {
+namespace apex {
+
+android::base::Result<std::string> CalculateSha512(const std::string& path);
+android::base::Result<std::string> CalculateSha256(const std::string& path);
+
+}  // namespace apex
+}  // namespace android
diff --git a/apexd/apex_shim.cpp b/apexd/apex_shim.cpp
index ffbb556..e503013 100644
--- a/apexd/apex_shim.cpp
+++ b/apexd/apex_shim.cpp
@@ -21,6 +21,7 @@
 #include <android-base/stringprintf.h>
 #include <android-base/strings.h>
 #include <openssl/sha.h>
+
 #include <filesystem>
 #include <fstream>
 #include <sstream>
@@ -28,6 +29,7 @@
 
 #include "apex_constants.h"
 #include "apex_file.h"
+#include "apex_sha.h"
 #include "string_log.h"
 
 using android::base::ErrnoError;
@@ -45,7 +47,6 @@
 
 static constexpr const char* kApexCtsShimPackage = "com.android.apex.cts.shim";
 static constexpr const char* kHashFilePath = "etc/hash.txt";
-static constexpr const int kBufSize = 1024;
 static constexpr const fs::perms kForbiddenFilePermissions =
     fs::perms::owner_exec | fs::perms::group_exec | fs::perms::others_exec;
 static constexpr const char* kExpectedCtsShimFiles[] = {
@@ -78,33 +79,6 @@
     "priv-app/CtsShimPriv@MASTER/CtsShimPriv.apk",
 };
 
-Result<std::string> CalculateSha512(const std::string& path) {
-  LOG(DEBUG) << "Calculating SHA512 of " << path;
-  SHA512_CTX ctx;
-  SHA512_Init(&ctx);
-  std::ifstream apex(path, std::ios::binary);
-  if (apex.bad()) {
-    return Error() << "Failed to open " << path;
-  }
-  char buf[kBufSize];
-  while (!apex.eof()) {
-    apex.read(buf, kBufSize);
-    if (apex.bad()) {
-      return Error() << "Failed to read " << path;
-    }
-    int bytes_read = apex.gcount();
-    SHA512_Update(&ctx, buf, bytes_read);
-  }
-  uint8_t hash[SHA512_DIGEST_LENGTH];
-  SHA512_Final(hash, &ctx);
-  std::stringstream ss;
-  ss << std::hex;
-  for (int i = 0; i < SHA512_DIGEST_LENGTH; i++) {
-    ss << std::setw(2) << std::setfill('0') << static_cast<int>(hash[i]);
-  }
-  return ss.str();
-}
-
 Result<std::vector<std::string>> GetAllowedHashes(const std::string& path) {
   using android::base::ReadFileToString;
   using android::base::StringPrintf;
diff --git a/apexd/apexd.cpp b/apexd/apexd.cpp
index d22cebc..4c169fe 100644
--- a/apexd/apexd.cpp
+++ b/apexd/apexd.cpp
@@ -76,6 +76,7 @@
 #include "apex_file.h"
 #include "apex_file_repository.h"
 #include "apex_manifest.h"
+#include "apex_sha.h"
 #include "apex_shim.h"
 #include "apexd_checkpoint.h"
 #include "apexd_lifecycle.h"
@@ -87,6 +88,7 @@
 #include "apexd_vendor_apex.h"
 #include "apexd_verity.h"
 #include "com_android_apex.h"
+#include "statslog_apex.h"
 
 using android::base::boot_clock;
 using android::base::ConsumePrefix;
@@ -714,6 +716,56 @@
   return {};
 }
 
+void SendApexInstallationRequestedAtom(const std::string& package_path,
+                                       const bool is_rollback,
+                                       const unsigned int install_type) {
+  auto apex_file = ApexFile::Open(package_path);
+  if (!apex_file.ok()) {
+    LOG(WARNING) << "Unable to send Apex Atom; Failed to open ApexFile "
+                 << package_path << ": " << apex_file.error();
+    return;
+  }
+  const std::string& module_name = apex_file->GetManifest().name();
+  struct stat stat_buf;
+  intmax_t apex_file_size;
+  if (stat(package_path.c_str(), &stat_buf) == 0) {
+    apex_file_size = stat_buf.st_size;
+  } else {
+    PLOG(WARNING) << "Failed to stat " << package_path;
+    apex_file_size = 0;
+  }
+  Result<std::string> apex_file_sha256_str = CalculateSha256(package_path);
+  if (!apex_file_sha256_str.ok()) {
+    LOG(WARNING) << "Unable to get sha256 of ApexFile: "
+                 << apex_file_sha256_str.error();
+  }
+  const std::vector<const char*> hal_cstr_list;
+  int ret = stats::apex::stats_write(
+      stats::apex::APEX_INSTALLATION_REQUESTED, module_name.c_str(),
+      apex_file->GetManifest().version(), apex_file_size,
+      apex_file_sha256_str->c_str(), GetPreinstallPartitionEnum(*apex_file),
+      install_type, is_rollback,
+      apex_file->GetManifest().providesharedapexlibs(), hal_cstr_list);
+  if (ret < 0) {
+    LOG(WARNING) << "Failed to report apex_installation_requested stats";
+  }
+}
+
+void SendApexInstallationEndedAtom(const std::string apex_package_path,
+                                   int install_result) {
+  Result<std::string> apex_file_sha256_str = CalculateSha256(apex_package_path);
+  if (!apex_file_sha256_str.ok()) {
+    LOG(WARNING) << "Unable to get sha256 of ApexFile: "
+                 << apex_file_sha256_str.error();
+  }
+  int ret =
+      stats::apex::stats_write(stats::apex::APEX_INSTALLATION_ENDED,
+                               apex_file_sha256_str->c_str(), install_result);
+  if (ret < 0) {
+    LOG(WARNING) << "Failed to report apex_installation_ended stats";
+  }
+}
+
 namespace {
 
 template <typename VerifyFn>
@@ -3845,6 +3897,23 @@
 
 Result<ApexFile> InstallPackage(const std::string& package_path, bool force) {
   LOG(INFO) << "Installing " << package_path;
+  SendApexInstallationRequestedAtom(
+      package_path, /* is_rollback */ false,
+      stats::apex::APEX_INSTALLATION_REQUESTED__INSTALLATION_TYPE__REBOOTLESS);
+  // TODO: Add error-enums
+  Result<ApexFile> ret = InstallPackageImpl(package_path, force);
+  SendApexInstallationEndedAtom(
+      package_path,
+      ret.ok()
+          ? stats::apex::
+                APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_SUCCESSFUL
+          : stats::apex::
+                APEX_INSTALLATION_ENDED__INSTALLATION_RESULT__INSTALL_FAILURE_APEX_INSTALLATION);
+  return ret;
+}
+
+Result<ApexFile> InstallPackageImpl(const std::string& package_path,
+                                    bool force) {
   auto temp_apex = ApexFile::Open(package_path);
   if (!temp_apex.ok()) {
     return temp_apex.error();
diff --git a/apexd/apexd.h b/apexd/apexd.h
index 409b0e7..90489cf 100644
--- a/apexd/apexd.h
+++ b/apexd/apexd.h
@@ -217,6 +217,10 @@
 
 // Performs a non-staged install of an APEX specified by |package_path|.
 // TODO(ioffe): add more documentation.
+android::base::Result<ApexFile> InstallPackageImpl(
+    const std::string& package_path, bool force);
+// Wrapper of InstallPackageImpl, which sends statsd atoms about the start and
+// result
 android::base::Result<ApexFile> InstallPackage(const std::string& package_path,
                                                bool force);
 
diff --git a/apexd/apexd_vendor_apex.cpp b/apexd/apexd_vendor_apex.cpp
index 68a439f..00dde33 100644
--- a/apexd/apexd_vendor_apex.cpp
+++ b/apexd/apexd_vendor_apex.cpp
@@ -23,6 +23,7 @@
 
 #include "apex_file_repository.h"
 #include "apexd_private.h"
+#include "statslog_apex.h"
 
 using android::base::Error;
 using android::base::StartsWith;
@@ -87,5 +88,39 @@
   return {};
 }
 
+// GetPreinstallPartitionEnum returns the enumeration value of the preinstall-
+//    partition of the passed apex_file
+int GetPreinstallPartitionEnum(const ApexFile& apex_file) {
+  const auto& instance = ApexFileRepository::GetInstance();
+  // We must test if this apex has a pre-installed version before calling
+  // GetPreInstalledApex() - throws an exception if apex doesn't have one
+  if (!instance.IsPreInstalledApex(apex_file)) {
+    return stats::apex::
+        APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_OTHER;
+  }
+  const auto& preinstalled =
+      instance.GetPreInstalledApex(apex_file.GetManifest().name());
+  const auto& preinstalled_path = preinstalled.get().GetPath();
+  if (StartsWith(preinstalled_path, "/vendor/") ||
+      StartsWith(preinstalled_path, "/system/vendor/")) {
+    return stats::apex::
+        APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_VENDOR;
+  }
+  if (StartsWith(preinstalled_path, "/system_ext/")) {
+    return stats::apex::
+        APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_SYSTEM_EXT;
+  }
+  if (StartsWith(preinstalled_path, "/system/")) {
+    return stats::apex::
+        APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_SYSTEM;
+  }
+  if (StartsWith(preinstalled_path, "/product/")) {
+    return stats::apex::
+        APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_PRODUCT;
+  }
+  return stats::apex::
+      APEX_INSTALLATION_REQUESTED__APEX_PREINSTALL_PARTITION__PARTITION_OTHER;
+}
+
 }  // namespace apex
 }  // namespace android
diff --git a/apexd/apexd_vendor_apex.h b/apexd/apexd_vendor_apex.h
index 4901b02..5b0d912 100644
--- a/apexd/apexd_vendor_apex.h
+++ b/apexd/apexd_vendor_apex.h
@@ -36,6 +36,10 @@
 Result<void> CheckVendorApexUpdate(const ApexFile& apex_file,
                                    const std::string& apex_mount_point);
 
+// GetPreinstallPartitionEnum returns an enumeration value of the
+//   preinstall partition of the passed apex_file
+int GetPreinstallPartitionEnum(const ApexFile& apex_file);
+
 }  // namespace apex
 }  // namespace android
 
