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
8 changes: 8 additions & 0 deletions module/customize.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MODDIR="/data/adb/modules/KPatch-Next"

# Conflict with APatch
if [ "$APATCH" ]; then
abort "! APatch is unsupported"
Expand All @@ -19,3 +21,9 @@ fi

# backup module.prop
cp "$MODPATH/module.prop" "$MODPATH/module.prop.bak"

# Hot update webui, patch scripts and binaries
rm -rf "$MODDIR/webroot"/* "$MODDIR/bin"/* "$MODDIR/patch"/*
cp -Lrf "$MODPATH/webroot"/* "$MODDIR/webroot"
cp -Lrf "$MODPATH/bin"/* "$MODDIR/bin"
cp -Lrf "$MODPATH/patch"/* "$MODDIR/patch"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions webui/page/patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async function extractAndParseBootimg() {
});

// get slot and device
const result = spawn('busybox', ['sh', `${modDir}/boot_extract.sh`], {
const result = spawn('busybox', ['sh', `${modDir}/patch/boot_extract.sh`], {
env: { PATH: `${modDir}/bin:/data/adb/ksu/bin:/data/adb/magisk:$PATH`, ASH_STANDALONE: '1' }
});

Expand Down Expand Up @@ -346,7 +346,7 @@ function patch(type) {
let args = ['sh'];
if (type === "patch") {
args.push(
`${modDir}/boot_patch.sh`,
`${modDir}/patch/boot_patch.sh`,
bootDev,
'true'
);
Expand All @@ -368,7 +368,7 @@ function patch(type) {
});
} else {
// Unpatch logic
args.push(`${modDir}/boot_unpatch.sh`, bootDev);
args.push(`${modDir}/patch/boot_unpatch.sh`, bootDev);
}

const process = spawn(
Expand Down