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: disabled KMI/LKM installation
manager: check if overlayfs is available to allow mount system switching ksud: disabled KMI/LKM commands ci: disabled LKM build workflow ksud: removed ksuinit
This commit is contained in:
8
.github/workflows/build-manager-ci.yml
vendored
8
.github/workflows/build-manager-ci.yml
vendored
@@ -19,12 +19,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-lkm:
|
# build-lkm:
|
||||||
uses: ./.github/workflows/build-lkm.yml
|
# uses: ./.github/workflows/build-lkm.yml
|
||||||
secrets: inherit
|
# secrets: inherit
|
||||||
|
|
||||||
build-susfsd:
|
build-susfsd:
|
||||||
needs: build-lkm
|
# needs: build-lkm // DISBAND LKM MODE
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|||||||
8
.github/workflows/build-manager.yml
vendored
8
.github/workflows/build-manager.yml
vendored
@@ -19,12 +19,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-lkm:
|
# build-lkm:
|
||||||
uses: ./.github/workflows/build-lkm.yml
|
# uses: ./.github/workflows/build-lkm.yml
|
||||||
secrets: inherit
|
# secrets: inherit // DISBAND LKM MODE
|
||||||
|
|
||||||
build-susfsd:
|
build-susfsd:
|
||||||
needs: build-lkm
|
# needs: build-lkm
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.core.content.pm.PackageInfoCompat
|
import androidx.core.content.pm.PackageInfoCompat
|
||||||
import com.ramcosta.composedestinations.annotation.Destination
|
import com.ramcosta.composedestinations.annotation.Destination
|
||||||
import com.ramcosta.composedestinations.annotation.RootGraph
|
import com.ramcosta.composedestinations.annotation.RootGraph
|
||||||
import com.ramcosta.composedestinations.generated.destinations.InstallScreenDestination
|
// import com.ramcosta.composedestinations.generated.destinations.InstallScreenDestination // DISBAND LKM MODE
|
||||||
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
|
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
@@ -60,9 +60,9 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||||||
TopBar(
|
TopBar(
|
||||||
kernelVersion,
|
kernelVersion,
|
||||||
ksuVersion,
|
ksuVersion,
|
||||||
onInstallClick = {
|
// onInstallClick = {
|
||||||
navigator.navigate(InstallScreenDestination)
|
// navigator.navigate(InstallScreenDestination)
|
||||||
},
|
// }, // DISBAND LKM MODE
|
||||||
scrollBehavior = scrollBehavior
|
scrollBehavior = scrollBehavior
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -81,7 +81,7 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
StatusCard(kernelVersion, ksuVersion, lkmMode) {
|
StatusCard(kernelVersion, ksuVersion, lkmMode) {
|
||||||
navigator.navigate(InstallScreenDestination)
|
// navigator.navigate(InstallScreenDestination) // DISBAND LKM MODE
|
||||||
}
|
}
|
||||||
if (isManager && Natives.requireNewKernel()) {
|
if (isManager && Natives.requireNewKernel()) {
|
||||||
WarningCard(
|
WarningCard(
|
||||||
@@ -167,20 +167,20 @@ fun RebootDropdownItem(@StringRes id: Int, reason: String = "") {
|
|||||||
private fun TopBar(
|
private fun TopBar(
|
||||||
kernelVersion: KernelVersion,
|
kernelVersion: KernelVersion,
|
||||||
ksuVersion: Int?,
|
ksuVersion: Int?,
|
||||||
onInstallClick: () -> Unit,
|
// onInstallClick: () -> Unit, // DISBAND LKM MODE
|
||||||
scrollBehavior: TopAppBarScrollBehavior? = null
|
scrollBehavior: TopAppBarScrollBehavior? = null
|
||||||
) {
|
) {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
title = { Text(stringResource(R.string.app_name)) },
|
title = { Text(stringResource(R.string.app_name)) },
|
||||||
actions = {
|
actions = {
|
||||||
if (kernelVersion.isGKI()) {
|
// if (kernelVersion.isGKI()) {
|
||||||
IconButton(onClick = onInstallClick) {
|
// IconButton(onClick = onInstallClick) {
|
||||||
Icon(
|
// Icon(
|
||||||
imageVector = Icons.Filled.Archive,
|
// imageVector = Icons.Filled.Archive,
|
||||||
contentDescription = stringResource(id = R.string.install)
|
// contentDescription = stringResource(id = R.string.install)
|
||||||
)
|
// )
|
||||||
}
|
// }
|
||||||
}
|
// } // DISBAND LKM MODE
|
||||||
|
|
||||||
if (ksuVersion != null) {
|
if (ksuVersion != null) {
|
||||||
var showDropdown by remember { mutableStateOf(false) }
|
var showDropdown by remember { mutableStateOf(false) }
|
||||||
|
|||||||
@@ -228,7 +228,9 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
|
|
||||||
var showRebootDialog by remember { mutableStateOf(false) }
|
var showRebootDialog by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
if (ksuVersion != null) {
|
val isOverlayAvailable = overlayFsAvailable()
|
||||||
|
|
||||||
|
if (ksuVersion != null && isOverlayAvailable) {
|
||||||
SwitchItem(
|
SwitchItem(
|
||||||
icon = Icons.Filled.Build,
|
icon = Icons.Filled.Build,
|
||||||
title = stringResource(id = R.string.use_overlay_fs),
|
title = stringResource(id = R.string.use_overlay_fs),
|
||||||
@@ -336,23 +338,7 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ksuVersion != null) {
|
if (isOverlayAvailable && useOverlayFs) {
|
||||||
val backupRestore = stringResource(id = R.string.backup_restore)
|
|
||||||
ListItem(
|
|
||||||
leadingContent = {
|
|
||||||
Icon(
|
|
||||||
Icons.Filled.Backup,
|
|
||||||
backupRestore
|
|
||||||
)
|
|
||||||
},
|
|
||||||
headlineContent = { Text(backupRestore) },
|
|
||||||
modifier = Modifier.clickable {
|
|
||||||
navigator.navigate(BackupRestoreScreenDestination)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useOverlayFs) {
|
|
||||||
val shrink = stringResource(id = R.string.shrink_sparse_image)
|
val shrink = stringResource(id = R.string.shrink_sparse_image)
|
||||||
val shrinkMessage = stringResource(id = R.string.shrink_sparse_image_message)
|
val shrinkMessage = stringResource(id = R.string.shrink_sparse_image_message)
|
||||||
ListItem(
|
ListItem(
|
||||||
@@ -376,6 +362,21 @@ fun SettingScreen(navigator: DestinationsNavigator) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ksuVersion != null) {
|
||||||
|
val backupRestore = stringResource(id = R.string.backup_restore)
|
||||||
|
ListItem(
|
||||||
|
leadingContent = {
|
||||||
|
Icon(
|
||||||
|
Icons.Filled.Backup,
|
||||||
|
backupRestore
|
||||||
|
)
|
||||||
|
},
|
||||||
|
headlineContent = { Text(backupRestore) },
|
||||||
|
modifier = Modifier.clickable {
|
||||||
|
navigator.navigate(BackupRestoreScreenDestination)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
val lkmMode = Natives.version >= Natives.MINIMAL_SUPPORTED_KERNEL_LKM && Natives.isLkmMode
|
val lkmMode = Natives.version >= Natives.MINIMAL_SUPPORTED_KERNEL_LKM && Natives.isLkmMode
|
||||||
if (lkmMode) {
|
if (lkmMode) {
|
||||||
|
|||||||
0
manager/gradlew
vendored
Normal file → Executable file
0
manager/gradlew
vendored
Normal file → Executable file
Binary file not shown.
@@ -38,11 +38,11 @@ enum Commands {
|
|||||||
/// Trigger `boot-complete` event
|
/// Trigger `boot-complete` event
|
||||||
BootCompleted,
|
BootCompleted,
|
||||||
|
|
||||||
/// Install KernelSU Next userspace component to system
|
// /// Install KernelSU Next userspace component to system
|
||||||
Install {
|
// Install {
|
||||||
#[arg(long, default_value = None)]
|
// #[arg(long, default_value = None)]
|
||||||
magiskboot: Option<PathBuf>,
|
// magiskboot: Option<PathBuf>,
|
||||||
},
|
// }, // DISBAND LKM MODE
|
||||||
|
|
||||||
/// Uninstall KernelSU Next modules and itself(LKM Only)
|
/// Uninstall KernelSU Next modules and itself(LKM Only)
|
||||||
Uninstall {
|
Uninstall {
|
||||||
@@ -63,44 +63,44 @@ enum Commands {
|
|||||||
command: Profile,
|
command: Profile,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Patch boot or init_boot images to apply KernelSU Next
|
// /// Patch boot or init_boot images to apply KernelSU Next
|
||||||
BootPatch {
|
// BootPatch {
|
||||||
/// boot image path, if not specified, will try to find the boot image automatically
|
// /// boot image path, if not specified, will try to find the boot image automatically
|
||||||
#[arg(short, long)]
|
// #[arg(short, long)]
|
||||||
boot: Option<PathBuf>,
|
// boot: Option<PathBuf>,
|
||||||
|
|
||||||
/// kernel image path to replace
|
// /// kernel image path to replace
|
||||||
#[arg(short, long)]
|
// #[arg(short, long)]
|
||||||
kernel: Option<PathBuf>,
|
// kernel: Option<PathBuf>,
|
||||||
|
|
||||||
/// LKM module path to replace, if not specified, will use the builtin one
|
// /// LKM module path to replace, if not specified, will use the builtin one
|
||||||
#[arg(short, long)]
|
// #[arg(short, long)]
|
||||||
module: Option<PathBuf>,
|
// module: Option<PathBuf>,
|
||||||
|
|
||||||
/// init to be replaced
|
// /// init to be replaced
|
||||||
#[arg(short, long, requires("module"))]
|
// #[arg(short, long, requires("module"))]
|
||||||
init: Option<PathBuf>,
|
// init: Option<PathBuf>,
|
||||||
|
|
||||||
/// will use another slot when boot image is not specified
|
// /// will use another slot when boot image is not specified
|
||||||
#[arg(short = 'u', long, default_value = "false")]
|
// #[arg(short = 'u', long, default_value = "false")]
|
||||||
ota: bool,
|
// ota: bool,
|
||||||
|
|
||||||
/// Flash it to boot partition after patch
|
// /// Flash it to boot partition after patch
|
||||||
#[arg(short, long, default_value = "false")]
|
// #[arg(short, long, default_value = "false")]
|
||||||
flash: bool,
|
// flash: bool,
|
||||||
|
|
||||||
/// output path, if not specified, will use current directory
|
// /// output path, if not specified, will use current directory
|
||||||
#[arg(short, long, default_value = None)]
|
// #[arg(short, long, default_value = None)]
|
||||||
out: Option<PathBuf>,
|
// out: Option<PathBuf>,
|
||||||
|
|
||||||
/// magiskboot path, if not specified, will search from $PATH
|
// /// magiskboot path, if not specified, will search from $PATH
|
||||||
#[arg(long, default_value = None)]
|
// #[arg(long, default_value = None)]
|
||||||
magiskboot: Option<PathBuf>,
|
// magiskboot: Option<PathBuf>,
|
||||||
|
|
||||||
/// KMI version, if specified, will use the specified KMI
|
// /// KMI version, if specified, will use the specified KMI
|
||||||
#[arg(long, default_value = None)]
|
// #[arg(long, default_value = None)]
|
||||||
kmi: Option<String>,
|
// kmi: Option<String>,
|
||||||
},
|
// },
|
||||||
|
|
||||||
/// Restore boot or init_boot images patched by KernelSU Next
|
/// Restore boot or init_boot images patched by KernelSU Next
|
||||||
BootRestore {
|
BootRestore {
|
||||||
@@ -320,7 +320,7 @@ pub fn run() -> Result<()> {
|
|||||||
Module::List => module::list_modules(),
|
Module::List => module::list_modules(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Commands::Install { magiskboot } => utils::install(magiskboot),
|
// Commands::Install { magiskboot } => utils::install(magiskboot), // DISBAND LKM MODE
|
||||||
Commands::Uninstall { magiskboot } => utils::uninstall(magiskboot),
|
Commands::Uninstall { magiskboot } => utils::uninstall(magiskboot),
|
||||||
Commands::Sepolicy { command } => match command {
|
Commands::Sepolicy { command } => match command {
|
||||||
Sepolicy::Patch { sepolicy } => crate::sepolicy::live_patch(&sepolicy),
|
Sepolicy::Patch { sepolicy } => crate::sepolicy::live_patch(&sepolicy),
|
||||||
@@ -355,17 +355,17 @@ pub fn run() -> Result<()> {
|
|||||||
Debug::Test => assets::ensure_binaries(false),
|
Debug::Test => assets::ensure_binaries(false),
|
||||||
},
|
},
|
||||||
|
|
||||||
Commands::BootPatch {
|
// Commands::BootPatch {
|
||||||
boot,
|
// boot,
|
||||||
init,
|
// init,
|
||||||
kernel,
|
// kernel,
|
||||||
module,
|
// module,
|
||||||
ota,
|
// ota,
|
||||||
flash,
|
// flash,
|
||||||
out,
|
// out,
|
||||||
magiskboot,
|
// magiskboot,
|
||||||
kmi,
|
// kmi,
|
||||||
} => crate::boot_patch::patch(boot, kernel, module, init, ota, flash, out, magiskboot, kmi),
|
// } => crate::boot_patch::patch(boot, kernel, module, init, ota, flash, out, magiskboot, kmi), // DISBAND LKM MODE
|
||||||
|
|
||||||
Commands::BootInfo { command } => match command {
|
Commands::BootInfo { command } => match command {
|
||||||
BootInfo::CurrentKmi => {
|
BootInfo::CurrentKmi => {
|
||||||
|
|||||||
Binary file not shown.
@@ -34,11 +34,11 @@ enum Commands {
|
|||||||
/// Trigger `boot-complete` event
|
/// Trigger `boot-complete` event
|
||||||
BootCompleted,
|
BootCompleted,
|
||||||
|
|
||||||
/// Install KernelSU Next userspace component to system
|
// /// Install KernelSU Next userspace component to system
|
||||||
Install {
|
// Install {
|
||||||
#[arg(long, default_value = None)]
|
// #[arg(long, default_value = None)]
|
||||||
magiskboot: Option<PathBuf>,
|
// magiskboot: Option<PathBuf>,
|
||||||
},
|
// }, // DISBAND LKM MODE
|
||||||
|
|
||||||
/// Uninstall KernelSU Next modules and itself(LKM Only)
|
/// Uninstall KernelSU Next modules and itself(LKM Only)
|
||||||
Uninstall {
|
Uninstall {
|
||||||
@@ -59,44 +59,44 @@ enum Commands {
|
|||||||
command: Profile,
|
command: Profile,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Patch boot or init_boot images to apply KernelSU Next
|
// /// Patch boot or init_boot images to apply KernelSU Next
|
||||||
BootPatch {
|
// BootPatch {
|
||||||
/// boot image path, if not specified, will try to find the boot image automatically
|
// /// boot image path, if not specified, will try to find the boot image automatically
|
||||||
#[arg(short, long)]
|
// #[arg(short, long)]
|
||||||
boot: Option<PathBuf>,
|
// boot: Option<PathBuf>,
|
||||||
|
|
||||||
/// kernel image path to replace
|
// /// kernel image path to replace
|
||||||
#[arg(short, long)]
|
// #[arg(short, long)]
|
||||||
kernel: Option<PathBuf>,
|
// kernel: Option<PathBuf>,
|
||||||
|
|
||||||
/// LKM module path to replace, if not specified, will use the builtin one
|
// /// LKM module path to replace, if not specified, will use the builtin one
|
||||||
#[arg(short, long)]
|
// #[arg(short, long)]
|
||||||
module: Option<PathBuf>,
|
// module: Option<PathBuf>,
|
||||||
|
|
||||||
/// init to be replaced
|
// /// init to be replaced
|
||||||
#[arg(short, long, requires("module"))]
|
// #[arg(short, long, requires("module"))]
|
||||||
init: Option<PathBuf>,
|
// init: Option<PathBuf>,
|
||||||
|
|
||||||
/// will use another slot when boot image is not specified
|
// /// will use another slot when boot image is not specified
|
||||||
#[arg(short = 'u', long, default_value = "false")]
|
// #[arg(short = 'u', long, default_value = "false")]
|
||||||
ota: bool,
|
// ota: bool,
|
||||||
|
|
||||||
/// Flash it to boot partition after patch
|
// /// Flash it to boot partition after patch
|
||||||
#[arg(short, long, default_value = "false")]
|
// #[arg(short, long, default_value = "false")]
|
||||||
flash: bool,
|
// flash: bool,
|
||||||
|
|
||||||
/// output path, if not specified, will use current directory
|
// /// output path, if not specified, will use current directory
|
||||||
#[arg(short, long, default_value = None)]
|
// #[arg(short, long, default_value = None)]
|
||||||
out: Option<PathBuf>,
|
// out: Option<PathBuf>,
|
||||||
|
|
||||||
/// magiskboot path, if not specified, will search from $PATH
|
// /// magiskboot path, if not specified, will search from $PATH
|
||||||
#[arg(long, default_value = None)]
|
// #[arg(long, default_value = None)]
|
||||||
magiskboot: Option<PathBuf>,
|
// magiskboot: Option<PathBuf>,
|
||||||
|
|
||||||
/// KMI version, if specified, will use the specified KMI
|
// /// KMI version, if specified, will use the specified KMI
|
||||||
#[arg(long, default_value = None)]
|
// #[arg(long, default_value = None)]
|
||||||
kmi: Option<String>,
|
// kmi: Option<String>,
|
||||||
},
|
// }, // DISBAND LKM MODE
|
||||||
|
|
||||||
/// Restore boot or init_boot images patched by KernelSU Next
|
/// Restore boot or init_boot images patched by KernelSU Next
|
||||||
BootRestore {
|
BootRestore {
|
||||||
@@ -327,7 +327,7 @@ pub fn run() -> Result<()> {
|
|||||||
Module::Shrink => module::shrink_ksu_images(),
|
Module::Shrink => module::shrink_ksu_images(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Commands::Install { magiskboot } => utils::install(magiskboot),
|
// Commands::Install { magiskboot } => utils::install(magiskboot), // DISBAND LKM MODE
|
||||||
Commands::Uninstall { magiskboot } => utils::uninstall(magiskboot),
|
Commands::Uninstall { magiskboot } => utils::uninstall(magiskboot),
|
||||||
Commands::Sepolicy { command } => match command {
|
Commands::Sepolicy { command } => match command {
|
||||||
Sepolicy::Patch { sepolicy } => crate::sepolicy::live_patch(&sepolicy),
|
Sepolicy::Patch { sepolicy } => crate::sepolicy::live_patch(&sepolicy),
|
||||||
@@ -370,17 +370,17 @@ pub fn run() -> Result<()> {
|
|||||||
Debug::Test => assets::ensure_binaries(false),
|
Debug::Test => assets::ensure_binaries(false),
|
||||||
},
|
},
|
||||||
|
|
||||||
Commands::BootPatch {
|
// Commands::BootPatch {
|
||||||
boot,
|
// boot,
|
||||||
init,
|
// init,
|
||||||
kernel,
|
// kernel,
|
||||||
module,
|
// module,
|
||||||
ota,
|
// ota,
|
||||||
flash,
|
// flash,
|
||||||
out,
|
// out,
|
||||||
magiskboot,
|
// magiskboot,
|
||||||
kmi,
|
// kmi,
|
||||||
} => crate::boot_patch::patch(boot, kernel, module, init, ota, flash, out, magiskboot, kmi),
|
// } => crate::boot_patch::patch(boot, kernel, module, init, ota, flash, out, magiskboot, kmi), // DISBAND LKM MODE
|
||||||
|
|
||||||
Commands::BootInfo { command } => match command {
|
Commands::BootInfo { command } => match command {
|
||||||
BootInfo::CurrentKmi => {
|
BootInfo::CurrentKmi => {
|
||||||
|
|||||||
Reference in New Issue
Block a user