Remove WebUI integration (#345)

Having a WebUI simply duplicating the current function of the Action button is unnecessary.

Since most users are migrated to root implementations which realize the Action button feature, we revert commit f8409ad34b to remove the WebUI integration of LSPosed.
This commit is contained in:
Qing_Feng 2025-07-21 13:37:52 +08:00 committed by GitHub
parent 2293acbe27
commit 108149b6b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1 additions and 87 deletions

View File

@ -67,11 +67,6 @@ jobs:
with: with:
version: 1.12.1 version: 1.12.1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Setup ccache - name: Setup ccache
uses: actions/cache@v4 uses: actions/cache@v4
with: with:

View File

@ -112,46 +112,6 @@ val zipAll = task("zipAll") {
group = "LSPosed" 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 -> fun afterEval() = android.applicationVariants.forEach { variant ->
val variantCapped = variant.name.replaceFirstChar { it.uppercase() } val variantCapped = variant.name.replaceFirstChar { it.uppercase() }
val variantLowered = variant.name.lowercase() val variantLowered = variant.name.lowercase()
@ -171,8 +131,7 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
"assemble$variantCapped", "assemble$variantCapped",
":app:package$buildTypeCapped", ":app:package$buildTypeCapped",
":daemon:package$buildTypeCapped", ":daemon:package$buildTypeCapped",
":dex2oat:externalNativeBuild${buildTypeCapped}", ":dex2oat:externalNativeBuild${buildTypeCapped}"
generateWebRoot
) )
into(magiskDir) into(magiskDir)
from("${rootProject.projectDir}/README.md") from("${rootProject.projectDir}/README.md")
@ -232,15 +191,6 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
from(dexOutPath) from(dexOutPath)
rename("classes.dex", "lspd.dex") 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) val injected = objects.newInstance<Injected>(magiskDir.get().asFile.path)
doLast { doLast {
injected.factory.fileTree().from(injected.magiskDir).visit { injected.factory.fileTree().from(injected.magiskDir).visit {

View File

@ -84,16 +84,6 @@ rm -f /data/adb/lspd/manager.apk
extract "$ZIPFILE" 'manager.apk' "$MODPATH" extract "$ZIPFILE" 'manager.apk' "$MODPATH"
if [ "$FLAVOR" == "zygisk" ]; then 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" mkdir -p "$MODPATH/zygisk"
if [ "$ARCH" = "arm" ] || [ "$ARCH" = "arm64" ]; then if [ "$ARCH" = "arm" ] || [ "$ARCH" = "arm64" ]; then

View File

@ -1,9 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>JingMatrix/LSPosed</title>
<script type="module" src="index.js"></script>
</head>
<body></body>
</html>

View File

@ -1,12 +0,0 @@
import { exec } from "kernelsu";
import { toast } from "kernelsu";
async function open_manager() {
toast("LSPosed Manager starting...");
const { errno, stdout, stderr } = await exec(
"am start -c org.lsposed.manager.LAUNCH_MANAGER com.android.shell/.BugreportWarningActivity",
{ cwd: "/system" }
);
}
open_manager();