fixed broken none root install, and changed back to mv command
This commit is contained in:
parent
8794f3cbd5
commit
bcf52d8173
|
@ -83,7 +83,7 @@ class VancedDownloadService: Service() {
|
||||||
override fun onDownloadComplete() {
|
override fun onDownloadComplete() {
|
||||||
when (type) {
|
when (type) {
|
||||||
"arch" -> downloadSplits("theme")
|
"arch" -> downloadSplits("theme")
|
||||||
"theme" -> downloadSplits("stock")
|
"theme" -> if(variant=="root") downloadSplits("stock") else downloadSplits("lang")
|
||||||
"stock" -> downloadSplits("dpi")
|
"stock" -> downloadSplits("dpi")
|
||||||
"dpi" -> downloadSplits("lang")
|
"dpi" -> downloadSplits("lang")
|
||||||
"lang" -> {
|
"lang" -> {
|
||||||
|
|
|
@ -299,6 +299,9 @@ class RootSplitInstallerService: Service() {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Shell.su("am force-stop $yPkg").exec()
|
Shell.su("am force-stop $yPkg").exec()
|
||||||
|
|
||||||
|
//Shell.su("rm -r SuFile.open(path).parent")
|
||||||
|
|
||||||
copy(apkinF,apkoutF)
|
copy(apkinF,apkoutF)
|
||||||
Shell.su("chmod 644 $path").exec().isSuccess
|
Shell.su("chmod 644 $path").exec().isSuccess
|
||||||
return if(Shell.su("chown system:system $path").exec().isSuccess) {
|
return if(Shell.su("chown system:system $path").exec().isSuccess) {
|
||||||
|
@ -324,6 +327,9 @@ class RootSplitInstallerService: Service() {
|
||||||
|
|
||||||
@Throws(IOException::class)
|
@Throws(IOException::class)
|
||||||
fun copy(src: File?, dst: File?) {
|
fun copy(src: File?, dst: File?) {
|
||||||
|
val cmd = Shell.su("mv ${src!!.absolutePath} ${dst!!.absolutePath}").exec().isSuccess
|
||||||
|
Log.d("ZLog", cmd.toString())
|
||||||
|
/*
|
||||||
var fis: InputStream? = null
|
var fis: InputStream? = null
|
||||||
var fos: OutputStream? = null
|
var fos: OutputStream? = null
|
||||||
try {
|
try {
|
||||||
|
@ -339,7 +345,7 @@ class RootSplitInstallerService: Service() {
|
||||||
fis?.close()
|
fis?.close()
|
||||||
fos?.close()
|
fos?.close()
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
private fun getVPath(): String? {
|
private fun getVPath(): String? {
|
||||||
return try {
|
return try {
|
||||||
|
|
Loading…
Reference in New Issue