Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1305c159 authored by Yi-Yo Chiang's avatar Yi-Yo Chiang
Browse files

set-verity-state: Start a threadpool to service waitForService() CB

Bug: 241688845
Bug: 241739850
Test: adb disable-verity / adb enable-verity
Change-Id: I5871e0e0f3014b2f4beb786fef4dc4f75af3fbf5
parent 2db51770
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9,9 +9,11 @@ cc_binary {
    srcs: ["set-verity-state.cpp"],
    shared_libs: [
        "libbase",
        "libbinder",
        "libcrypto",
        "libcrypto_utils",
        "libfs_mgr_binder",
        "libutils",
    ],
    static_libs: [
        "libavb_user",
+4 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <binder/ProcessState.h>
#include <fs_mgr_overlayfs.h>
#include <libavb_user/libavb_user.h>

@@ -153,6 +154,9 @@ int main(int argc, char* argv[]) {
    return 1;
  }

  // Start a threadpool to service waitForService() callbacks as
  // fs_mgr_overlayfs_* might call waitForService() to get the image service.
  android::ProcessState::self()->startThreadPool();
  bool any_changed = set_avb_verity_enabled_state(ops.get(), enable);
  any_changed |= overlayfs_setup(enable);