You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager: module migration on module system switch
This commit is contained in:
15
.github/workflows/build-manager.yml
vendored
15
.github/workflows/build-manager.yml
vendored
@@ -86,21 +86,22 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_overlayfs-aarch64-linux-android
|
||||
path: .
|
||||
|
||||
path: ksud_overlayfs
|
||||
|
||||
- name: Copy ksud_overlayfs to app jniLibs
|
||||
run: |
|
||||
cp -f ksud_overlayfs-aarch64-linux-android/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
||||
|
||||
cp -f ksud_overlayfs/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_overlayfs.so
|
||||
|
||||
- name: Download arm64 ksud_magic
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ksud_magic-aarch64-linux-android
|
||||
path: .
|
||||
|
||||
path: ksud_magic
|
||||
|
||||
- name: Copy ksud_magic to app jniLibs
|
||||
run: |
|
||||
cp -f ksud_magic-aarch64-linux-android/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_magic.so
|
||||
cp -f ksud_magic/aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud_magic.so
|
||||
|
||||
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
|
||||
@@ -179,6 +179,7 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
||||
prefs.edit().putBoolean("use_overlay_fs", it).apply()
|
||||
useOverlayFs = it
|
||||
showRestartDialog = true
|
||||
moduleMigration()
|
||||
}
|
||||
|
||||
if (showRestartDialog) {
|
||||
|
||||
@@ -427,6 +427,12 @@ fun getAppProfileTemplate(id: String): String {
|
||||
.to(ArrayList(), null).exec().out.joinToString("\n")
|
||||
}
|
||||
|
||||
fun moduleMigration(): Boolean {
|
||||
val shell = getRootShell()
|
||||
// mirgate modules for module system switch
|
||||
return ShellUtils.fastCmdResult(shell, "cp -r /data/adb/modules/* /data/adb/modules_update/")
|
||||
}
|
||||
|
||||
fun setAppProfileTemplate(id: String, template: String): Boolean {
|
||||
val shell = getRootShell()
|
||||
val escapedTemplate = template.replace("\"", "\\\"")
|
||||
|
||||
Reference in New Issue
Block a user