diff --git a/README.md b/README.md new file mode 100644 index 0000000..048bae8 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# RootTools +RootTools Library diff --git a/RootShell/RootShell.aar b/RootShell/RootShell.aar deleted file mode 100644 index 186af06..0000000 Binary files a/RootShell/RootShell.aar and /dev/null differ diff --git a/RootShell/build.gradle b/RootShell/build.gradle deleted file mode 100644 index 68a8ce8..0000000 --- a/RootShell/build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -configurations.create("default") -artifacts.add("default", file('RootShell.aar')) diff --git a/build.gradle b/build.gradle index ba91646..f3dd92d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ buildscript { repositories { + google() jcenter() } @@ -8,20 +9,21 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:2.3.2' + classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } repositories { + google() jcenter() + maven { url "https://jitpack.io" } } apply plugin: 'com.android.library' android { compileSdkVersion 25 - buildToolsVersion "25.0.3" defaultConfig { minSdkVersion 11 @@ -36,7 +38,7 @@ android { } dependencies { - compile project(':RootShell') - testCompile 'junit:junit:4.12' - compile 'com.android.support:appcompat-v7:25.3.1' + testImplementation 'junit:junit:4.12' + implementation 'com.android.support:appcompat-v7:25.3.1' + implementation 'com.github.Stericson:RootShell:1.6' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 72a29e3..c8bf3a8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 02 15:22:41 SGT 2017 +#Wed Jul 04 17:42:21 CEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip diff --git a/settings.gradle b/settings.gradle index b55d96b..6d4ae4f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ rootProject.name = 'RootTools' -include ':demo', ':RootShell' +include ':demo' diff --git a/src/main/java/com/stericson/RootTools/Constants.java b/src/main/java/com/stericson/RootTools/Constants.java index d1432af..985bfba 100644 --- a/src/main/java/com/stericson/RootTools/Constants.java +++ b/src/main/java/com/stericson/RootTools/Constants.java @@ -2,7 +2,7 @@ public class Constants { - public static final String TAG = "RootTools v5.0"; + public static final String TAG = "RootTools v5.1"; public static final int FPS = 1; public static final int BBA = 3; public static final int BBV = 4; diff --git a/src/main/java/com/stericson/RootTools/internal/RootToolsInternalMethods.java b/src/main/java/com/stericson/RootTools/internal/RootToolsInternalMethods.java index 16b7c7c..c3e7bd3 100644 --- a/src/main/java/com/stericson/RootTools/internal/RootToolsInternalMethods.java +++ b/src/main/java/com/stericson/RootTools/internal/RootToolsInternalMethods.java @@ -741,11 +741,14 @@ public void commandOutput(int id, String line) { RootTools.log(line); String[] fields = line.split(" "); - InternalVariables.mounts.add(new Mount(new File(fields[0]), // device - new File(fields[1]), // mountPoint - fields[2], // fstype - fields[3] // flags - )); + + if(fields.length > 3) { + InternalVariables.mounts.add(new Mount(new File(fields[0]), // device + new File(fields[1]), // mountPoint + fields[2], // fstype + fields[3] // flags + )); + } } super.commandOutput(id, line); @@ -1156,7 +1159,7 @@ public boolean isProcessRunning(final String processName) { InternalVariables.processRunning = false; try { - Command command = new Command(0, false, "ps") { + Command command = new Command(0, false, "ps | grep " + processName) { @Override public void commandOutput(int id, String line) { if (line.contains(processName)) {