Move Root Commands directly to the util class
diff --git a/app/src/main/java/masquerade/substratum/util/ReadOverlaysFile.java b/app/src/main/java/masquerade/substratum/util/ReadOverlaysFile.java
index 39a7178..c201ec8 100644
--- a/app/src/main/java/masquerade/substratum/util/ReadOverlaysFile.java
+++ b/app/src/main/java/masquerade/substratum/util/ReadOverlaysFile.java
@@ -1,5 +1,7 @@
 package masquerade.substratum.util;
 
+import android.os.Environment;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
@@ -15,6 +17,19 @@
 
     public static List<String> main(String argv[]) {
 
+        File current_overlays = new File(Environment
+                .getExternalStorageDirectory().getAbsolutePath() +
+                "/.substratum/current_overlays.xml");
+        if (current_overlays.exists()) {
+            Root.runCommand("rm " + Environment
+                    .getExternalStorageDirectory().getAbsolutePath() +
+                    "/.substratum/current_overlays.xml");
+        }
+        Root.runCommand("cp /data/system/overlays.xml " +
+                Environment
+                        .getExternalStorageDirectory().getAbsolutePath() +
+                "/.substratum/current_overlays.xml");
+
         File file = new File(argv[0]);
         int state_count = Integer.parseInt(argv[1]);
 
diff --git a/app/src/main/java/masquerade/substratum/util/Uninstaller.java b/app/src/main/java/masquerade/substratum/util/Uninstaller.java
index b75482e..95cfc3c 100644
--- a/app/src/main/java/masquerade/substratum/util/Uninstaller.java
+++ b/app/src/main/java/masquerade/substratum/util/Uninstaller.java
@@ -46,17 +46,6 @@
 
                 ArrayList<String> packages_to_uninstall =
                         new ArrayList<>(intent.getStringArrayListExtra(inheritor));
-                File current_overlays = new File(Environment
-                        .getExternalStorageDirectory().getAbsolutePath() +
-                        "/.substratum/current_overlays.xml");
-                if (current_overlays.exists()) {
-                    Root.runCommand("rm " + Environment
-                            .getExternalStorageDirectory().getAbsolutePath() +
-                            "/.substratum/current_overlays.xml");
-                }
-                Root.runCommand("cp /data/system/overlays.xml " +
-                        Environment.getExternalStorageDirectory().getAbsolutePath() +
-                        "/.substratum/current_overlays.xml");
                 String[] state5initial = {Environment.getExternalStorageDirectory()
                         .getAbsolutePath() +
                         "/.substratum/current_overlays.xml", "5"};