adb: use oom_score_adj instead of oom_adj
(cherry picked from commit 07ce7cab72d9b3e5c701491daf8fd457d035eec8)
Change-Id: I1730d1df34039a5502200002ac813ce96a3eaa1a
diff --git a/adb/services.c b/adb/services.c
index d1e8939..e48e460 100644
--- a/adb/services.c
+++ b/adb/services.c
@@ -189,13 +189,13 @@
{
setsid();
- // Set OOM adjustment to prevent killing
- int fd = adb_open("/proc/self/oom_adj", O_WRONLY);
+ // Set OOM score adjustment to prevent killing
+ int fd = adb_open("/proc/self/oom_score_adj", O_WRONLY);
if (fd >= 0) {
adb_write(fd, "0", 1);
adb_close(fd);
} else {
- D("adb: unable to update oom_adj\n");
+ D("adb: unable to update oom_score_adj\n");
}
}