fix: building process; add: web UI JavaScript code

This commit both fixes the building process to include the webroot folder and adds the web UI JS code to allow it to fetch the values.
This commit is contained in:
ThePedroo
2024-06-22 04:54:58 -03:00
parent 10bdf6f080
commit bdf12dcf44
4 changed files with 115 additions and 29 deletions
+9
View File
@@ -86,6 +86,9 @@ androidComponents.onVariants { variant ->
into("lib") {
from(project(":loader").layout.buildDirectory.file("intermediates/stripped_native_libs/$variantLowered/out/lib"))
}
into("webroot") {
from("${rootProject.projectDir}/webroot")
}
val root = moduleDir.get()
@@ -159,6 +162,12 @@ androidComponents.onVariants { variant ->
root.file("bin/$abi64/zygiskd").asFile
)
)
set.add(
Pair(
root.file("webroot/index.html").asFile,
null
)
)
sig.initSign(privKey)
set.forEach { it.first.sha(it.second) }
val signFile = root.file(name).asFile
+8
View File
@@ -110,6 +110,14 @@ mv "$TMPDIR/sepolicy.rule" "$MODPATH"
mkdir "$MODPATH/bin"
mkdir "$MODPATH/lib"
mkdir "$MODPATH/lib64"
mkdir "$MODPATH/webroot"
ui_print "- Extracting webroot"
extract "$ZIPFILE" 'webroot/index.html' "$MODPATH/webroot" true
extract "$ZIPFILE" 'webroot/assets/tick.svg' "$MODPATH/webroot/assets" true
extract "$ZIPFILE" 'webroot/css/index.css' "$MODPATH/webroot/css" true
extract "$ZIPFILE" 'webroot/js/main.js' "$MODPATH/webroot/js" true
extract "$ZIPFILE" 'webroot/js/kernelsu.js' "$MODPATH/webroot/js" true
if [ "$ARCH" = "x86" ] || [ "$ARCH" = "x64" ]; then
ui_print "- Extracting x86 libraries"