diff --git a/build.gradle b/build.gradle index c5352f7..c7635f3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'c' apply plugin: 'java' + apply plugin: 'groovy' import java.io.FileInputStream; @@ -43,8 +44,8 @@ project.ext.rootWorkDir = new File(workdir).getAbsolutePath() def defaultRootDir = workdir + "/root" def sdkVersion = 7; boolean gDebug=true -String activeImg = null -String activePath = null +String activeImg = "boot.img" +String activePath = "/boot" if (new File("boot.img").exists()) { activeImg = "boot.img"; activePath = "/boot" @@ -409,5 +410,5 @@ void verifyClearImages(String... inFiles) { } task wrapper(type: Wrapper) { - gradleVersion = '4.0' + gradleVersion = '4.4' } diff --git a/debug.kts b/debug.kts index 987e677..ca845f3 100644 --- a/debug.kts +++ b/debug.kts @@ -59,3 +59,11 @@ initrcFiles.forEach { it -> Files.deleteIfExists(File(binTgt).toPath()) File(bin).copyTo(File(binTgt), true) } + +fun enableShell() { + val bin = "src/resources/console.rc" + val binTgt = workdir + "/root/system/etc/init/" + "console.rc" + Files.deleteIfExists(File(binTgt).toPath()) + File(bin).copyTo(File(binTgt), true) +} +enableShell() diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a0d58b4..01b8bf6 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8d9bf49..933b647 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Jul 26 13:02:15 CST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip diff --git a/src/resources/console.rc b/src/resources/console.rc new file mode 100644 index 0000000..d9e3936 --- /dev/null +++ b/src/resources/console.rc @@ -0,0 +1,12 @@ +service console /system/bin/sh + console + disabled + user root + group root shell log readproc + seclabel u:r:shell:s0 + +on property:ro.debuggable=* + # Give writes to anyone for the trace folder on debug builds. + # The folder is used to store method traces. + chmod 0773 /data/misc/trace + start console