diff --git a/debuggerd/Android.bp b/debuggerd/Android.bp index 3257a2c50..0e62ceb8f 100644 --- a/debuggerd/Android.bp +++ b/debuggerd/Android.bp @@ -505,6 +505,7 @@ cc_binary { "libbase", "libdebuggerd_client", "liblog", + "libprocessgroup", "libprocinfo", ], diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp index 0d4b91f75..7a2500c60 100644 --- a/debuggerd/debuggerd.cpp +++ b/debuggerd/debuggerd.cpp @@ -23,11 +23,11 @@ #include #include -#include #include #include #include #include +#include #include #include "util.h" @@ -92,13 +92,8 @@ int main(int argc, char* argv[]) { } // unfreeze if pid is frozen. - const std::string freeze_file = android::base::StringPrintf( - "/sys/fs/cgroup/uid_%d/pid_%d/cgroup.freeze", proc_info.uid, proc_info.pid); - if (std::string freeze_status; - android::base::ReadFileToString(freeze_file, &freeze_status) && freeze_status[0] == '1') { - android::base::WriteStringToFile("0", freeze_file); - // we don't restore the frozen state as this is considered a benign change. - } + SetProcessProfiles(proc_info.uid, proc_info.pid, {"Unfrozen"}); + // we don't restore the frozen state as this is considered a benign change. unique_fd output_fd(fcntl(STDOUT_FILENO, F_DUPFD_CLOEXEC, 0)); if (output_fd.get() == -1) {