Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ jobs:
with:
version: 1.12.1

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Setup ccache
uses: actions/cache@v4
with:
Expand Down
52 changes: 1 addition & 51 deletions magisk-loader/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -112,46 +112,6 @@ val zipAll = task("zipAll") {
group = "LSPosed"
}

val generateWebRoot = tasks.register<Copy>("generateWebRoot") {
group = "LSPosed"
val webroottmp = File("$projectDir/build/intermediates/generateWebRoot")
val webrootsrc = File(webroottmp, "src")

onlyIf {
val os = org.gradle.internal.os.OperatingSystem.current()
if (os.isWindows) {
exec {
commandLine("cmd", "/c", "where", "pnpm")
isIgnoreExitValue = true
}.exitValue == 0
} else {
exec {
commandLine("which", "pnpm")
isIgnoreExitValue = true
}.exitValue == 0
}
}

doFirst {
webroottmp.mkdirs()
webrootsrc.mkdirs()
}

from("$projectDir/src/webroot")
into(webrootsrc)

doLast {
exec {
workingDir = webroottmp
commandLine("pnpm", "add", "-D", "parcel", "kernelsu")
}
exec {
workingDir = webroottmp
commandLine("./node_modules/.bin/parcel", "build", "src/index.html")
}
}
}

fun afterEval() = android.applicationVariants.forEach { variant ->
val variantCapped = variant.name.replaceFirstChar { it.uppercase() }
val variantLowered = variant.name.lowercase()
Expand All @@ -171,8 +131,7 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
"assemble$variantCapped",
":app:package$buildTypeCapped",
":daemon:package$buildTypeCapped",
":dex2oat:externalNativeBuild${buildTypeCapped}",
generateWebRoot
":dex2oat:externalNativeBuild${buildTypeCapped}"
)
into(magiskDir)
from("${rootProject.projectDir}/README.md")
Expand Down Expand Up @@ -232,15 +191,6 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
from(dexOutPath)
rename("classes.dex", "lspd.dex")
}
into("webroot") {
if (flavorLowered.startsWith("zygisk")) {
from("$projectDir/build/intermediates/generateWebRoot/dist") {
include("**/*.js")
include("**/*.html")
}
}
}

val injected = objects.newInstance<Injected>(magiskDir.get().asFile.path)
doLast {
injected.factory.fileTree().from(injected.magiskDir).visit {
Expand Down
10 changes: 0 additions & 10 deletions magisk-loader/magisk_module/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ rm -f /data/adb/lspd/manager.apk
extract "$ZIPFILE" 'manager.apk' "$MODPATH"

if [ "$FLAVOR" == "zygisk" ]; then
# extract for KernelSU and APatch
if [ "$KSU" ] || [ "$APATCH" ]; then
# webroot only for zygisk
mkdir -p "$MODPATH/webroot"
extract "$ZIPFILE" "webroot/index.html" "$MODPATH/webroot" true
# evaluate if use awk or tr -s ' ' | cut -d' ' -f5
SRCJS=$(unzip -l "$ZIPFILE" | grep "webroot/generate" | grep -v sha256 | awk '{print $4}')
extract "$ZIPFILE" "$SRCJS" "$MODPATH/webroot" true
fi

mkdir -p "$MODPATH/zygisk"

if [ "$ARCH" = "arm" ] || [ "$ARCH" = "arm64" ]; then
Expand Down
9 changes: 0 additions & 9 deletions magisk-loader/src/webroot/index.html

This file was deleted.

12 changes: 0 additions & 12 deletions magisk-loader/src/webroot/index.js

This file was deleted.