From f0246c763d5b6aa27009e50b85e9125d45decab5 Mon Sep 17 00:00:00 2001 From: weishu Date: Sat, 16 Sep 2023 12:56:59 +0800 Subject: [PATCH] Disable image dex2oat on ART as it is extremely slow once triggered on some ROMs --- .../com/topjohnwu/superuser/internal/RootServiceManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceManager.java b/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceManager.java index 9b21af1..c57be39 100644 --- a/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceManager.java +++ b/service/src/main/java/com/topjohnwu/superuser/internal/RootServiceManager.java @@ -200,6 +200,10 @@ public class RootServiceManager implements Handler.Callback { } } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + params += " -Xnoimage-dex2oat"; + } + final String niceNameCmd; switch (action) { case CMDLINE_START_SERVICE: