Fix Bug With Install when youtube is not pre installed in system and added code check, and returns error message on install if there is one

This commit is contained in:
ostajic 2020-08-23 07:14:00 +02:00
parent b92959d0dd
commit 2ee7096106
1 changed files with 3 additions and 9 deletions

View File

@ -295,25 +295,19 @@ class RootSplitInstallerService: Service() {
{
try {
copy(apkinF,apkoutF)
Shell.su("chmod 644 $path").exec().isSuccess
return true
}
catch (e: IOException)
{
sendFailure(listOf("${e.message}").toMutableList(), applicationContext)
return false
}
}
else {
sendFailure(listOf("Input File Missing").toMutableList(), applicationContext)
return false
}
val resultmv = Shell.su("mv $apkFile $path").exec().isSuccess
return if(resultmv) {
Shell.su("chmod 644 $path").exec().isSuccess
} else {
sendFailure(listOf("Failed To Apply Mod").toMutableList(), applicationContext)
false
}
}
@Throws(IOException::class)