Skip to content

Commit

Permalink
fix push file daemon.apk and libdaemon
Browse files Browse the repository at this point in the history
  • Loading branch information
mywalkb committed Mar 29, 2022
1 parent 1e39ee2 commit 493ebf7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions magisk-loader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ val pushDaemon = task<Exec>("pushDaemon") {
workingDir("${project(":daemon").buildDir}/$apkDir/apk/debug")
commandLine(adb, "push", "daemon-debug.apk", "/data/local/tmp/daemon.apk")
}
val mvDaemon = task<Exec>("mvDaemon") {
dependsOn(pushDaemon)
commandLine(adb, "shell", "su", "-c", "mv -f /data/local/tmp/daemon.apk /data/adb/modules/*_lsposed/")
}
val pushDaemonNative = task<Exec>("pushDaemonNative") {
dependsOn(":daemon:assembleDebug")
doFirst {
Expand All @@ -276,12 +280,16 @@ val pushDaemonNative = task<Exec>("pushDaemonNative") {
}
outputStream.toString().trim()
}
workingDir("${project(":daemon").buildDir}/intermediates/ndkBuild/debug/obj/local/$abi")
workingDir("${project(":daemon").buildDir}/intermediates/cmake/debug/obj/$abi")
}
commandLine(adb, "push", "libdaemon.so", "/data/local/tmp/libdaemon.so")
}
val mvDaemonNative = task<Exec>("mvDaemonNative") {
dependsOn(pushDaemonNative)
commandLine(adb, "shell", "su", "-c", "mv -f /data/local/tmp/libdaemon.so /data/adb/modules/*_lsposed/")
}
val reRunDaemon = task<Exec>("reRunDaemon") {
dependsOn(pushDaemon, pushDaemonNative, killLspd)
dependsOn(mvDaemon, mvDaemonNative, killLspd)
// tricky to pass a minus number to avoid the injection warning
commandLine(
adb,
Expand Down

0 comments on commit 493ebf7

Please sign in to comment.