Skip to content

Commit

Permalink
manager: Unofficial magic mount build
Browse files Browse the repository at this point in the history
  • Loading branch information
changhuapeng committed Dec 15, 2024
1 parent 7dcb647 commit 524f4e3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions manager/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ android {
applicationVariants.all {
outputs.forEach {
val output = it as BaseVariantOutputImpl
output.outputFileName = "KernelSU_${managerVersionName}_${managerVersionCode}-$name.apk"
output.outputFileName = "KernelSU_${managerVersionName}_${managerVersionCode}-magic-$name.apk"
}
kotlin.sourceSets {
getByName(name) {
Expand Down Expand Up @@ -133,4 +133,4 @@ dependencies {
implementation(libs.androidx.webkit)

implementation(libs.lsposed.cxx)
}
}
14 changes: 11 additions & 3 deletions manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,17 @@ private fun InfoCard() {
val uname = Os.uname()

@Composable
fun InfoCardItem(label: String, content: String) {
contents.appendLine(label).appendLine(content).appendLine()
fun InfoCardItem(label: String, content: String, extraInfo: String? = null) {
contents.appendLine(label).appendLine(content)
extraInfo?.let {
contents.appendLine(it)
}
contents.appendLine()
Text(text = label, style = MaterialTheme.typography.bodyLarge)
Text(text = content, style = MaterialTheme.typography.bodyMedium)
extraInfo?.let {
Text(text = it, style = MaterialTheme.typography.bodySmall)
}
}

InfoCardItem(stringResource(R.string.home_kernel), uname.release)
Expand All @@ -420,7 +427,8 @@ private fun InfoCard() {
val managerVersion = getManagerVersion(context)
InfoCardItem(
stringResource(R.string.home_manager_version),
"${managerVersion.first} (${managerVersion.second})"
"${managerVersion.first} (${managerVersion.second})",
stringResource(R.string.home_manager_version_unofficial)
)

Spacer(Modifier.height(16.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fun download(
}

fun checkNewVersion(): LatestVersionInfo {
val url = "https://api.github.com/repos/tiann/KernelSU/releases/latest"
val url = "https://api.github.com/repos/changhuapeng/KernelSU/releases/latest"
// default null value if failed
val defaultValue = LatestVersionInfo()
runCatching {
Expand Down
3 changes: 2 additions & 1 deletion manager/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<string name="home_unsupported_reason">KernelSU only supports GKI kernels now</string>
<string name="home_kernel">Kernel</string>
<string name="home_manager_version">Manager version</string>
<string name="home_manager_version_unofficial" translatable="false">🪄 Unofficial build for non-GKI kernel</string>
<string name="home_fingerprint">Fingerprint</string>
<string name="home_selinux_status">SELinux status</string>
<string name="selinux_status_disabled">Disabled</string>
Expand Down Expand Up @@ -132,4 +133,4 @@
<string name="selected_lkm">Selected LKM: %s</string>
<string name="save_log">Save logs</string>
<string name="log_saved">Logs saved</string>
</resources>
</resources>

0 comments on commit 524f4e3

Please sign in to comment.