diff --git a/app/build.gradle b/app/build.gradle index ae66e3d7a..a7350f429 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -73,7 +73,6 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.core:core:1.0.1' implementation project(':net') - fullImplementation project(':utils') fullImplementation project(':core') fullImplementation 'androidx.appcompat:appcompat:1.0.2' fullImplementation "androidx.preference:preference:${rootProject.ext.androidXVersion}" @@ -83,12 +82,10 @@ dependencies { fullImplementation 'android.arch.work:work-runtime:1.0.0-beta01' fullImplementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' fullImplementation 'androidx.room:room-runtime:2.0.0' - fullImplementation 'com.github.topjohnwu:libsu:2.1.2' - fullImplementation 'org.kamranzafar:jtar:2.3' fullImplementation 'ru.noties:markwon:2.0.1' fullImplementation 'com.caverock:androidsvg-aar:1.3' - def butterKnifeVersion = '9.0.0-rc3' + def butterKnifeVersion = '10.0.0' if (properties.containsKey('android.injected.invoked.from.ide')) { fullImplementation "com.jakewharton:butterknife-reflect:${butterKnifeVersion}" } else { diff --git a/app/src/full/res/xml/keep.xml b/app/src/full/res/xml/keep.xml deleted file mode 100644 index f7ad1103c..000000000 --- a/app/src/full/res/xml/keep.xml +++ /dev/null @@ -1,4 +0,0 @@ - - \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle index e0ac986e7..43a1c182c 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -26,8 +26,11 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation project(':net') - implementation project(':utils') - implementation 'com.github.topjohnwu:libsu:2.1.2' - implementation 'org.kamranzafar:jtar:2.3' + api project(':net') + api project(':utils') + api 'org.kamranzafar:jtar:2.3' + + def libsuVersion = '2.2.0' + api "com.github.topjohnwu.libsu:core:${libsuVersion}" + api "com.github.topjohnwu.libsu:io:${libsuVersion}" } diff --git a/core/src/main/java/com/topjohnwu/core/App.java b/core/src/main/java/com/topjohnwu/core/App.java index a07d7274e..5943e5911 100644 --- a/core/src/main/java/com/topjohnwu/core/App.java +++ b/core/src/main/java/com/topjohnwu/core/App.java @@ -29,20 +29,19 @@ public class App extends ContainerApp { private Resources mResource; - public App() { - self = this; + static { + Shell.Config.setFlags(Shell.FLAG_MOUNT_MASTER | Shell.FLAG_USE_MAGISK_BUSYBOX); + Shell.Config.verboseLogging(BuildConfig.DEBUG); + Shell.Config.addInitializers(RootUtils.class); + Shell.Config.setTimeout(2); } @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); + self = this; mResource = base.getResources(); - Shell.Config.setFlags(Shell.FLAG_MOUNT_MASTER); - Shell.Config.verboseLogging(BuildConfig.DEBUG); - Shell.Config.setInitializer(RootUtils.class); - Shell.Config.setTimeout(2); - prefs = PreferenceManager.getDefaultSharedPreferences(this); mDB = new MagiskDB(this); repoDB = new RepoDatabaseHelper(this); diff --git a/core/src/main/java/com/topjohnwu/core/utils/RootUtils.java b/core/src/main/java/com/topjohnwu/core/utils/RootUtils.java index bf31f0814..155b29451 100644 --- a/core/src/main/java/com/topjohnwu/core/utils/RootUtils.java +++ b/core/src/main/java/com/topjohnwu/core/utils/RootUtils.java @@ -5,7 +5,6 @@ import android.content.Context; import com.topjohnwu.core.Const; import com.topjohnwu.core.Data; import com.topjohnwu.core.R; -import com.topjohnwu.superuser.BusyBox; import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.ShellUtils; import com.topjohnwu.superuser.io.SuFile; @@ -17,10 +16,6 @@ import androidx.annotation.NonNull; public class RootUtils extends Shell.Initializer { - static { - BusyBox.BB_PATH = new File(Const.BUSYBOX_PATH); - } - public static void rmAndLaunch(String rm, String launch) { Shell.su(Utils.fmt("(rm_launch %d %s %s)&", Const.USER_ID, rm, launch)).exec(); }