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
37 changes: 33 additions & 4 deletions .github/workflows/build-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ jobs:
pack_ksuinit: true

build-manager:
needs: [generate-key]
if: always() && needs.generate-key.result == 'success'
needs: [generate-key, build-ksud]
if: always() && needs.generate-key.result == 'success' && needs.build-ksud.result == 'success'
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -190,14 +190,43 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v4

- name: Download ARM64 ksud for JNI packaging
uses: actions/download-artifact@v8
with:
name: ksud-aarch64-linux-android
path: manager/app/src/main/jniLibs/arm64-v8a

- name: Download x86_64 ksud for JNI packaging
uses: actions/download-artifact@v8
with:
name: ksud-x86_64-linux-android
path: manager/app/src/main/jniLibs/x86_64

- name: Prepare required JNI binaries
run: |
mv app/src/main/jniLibs/arm64-v8a/ksud app/src/main/jniLibs/arm64-v8a/libksud.so
mv app/src/main/jniLibs/x86_64/ksud app/src/main/jniLibs/x86_64/libksud.so
test -s app/src/main/jniLibs/arm64-v8a/libksud.so
test -s app/src/main/jniLibs/x86_64/libksud.so

- name: Build with Gradle
run: |
if [ "${{ github.event_name }}" = "pull_request" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
./gradlew clean assembleRelease -PIS_PR_BUILD=true
./gradlew clean assembleRelease testDebugUnitTest -PIS_PR_BUILD=true
else
./gradlew clean assembleRelease
./gradlew clean assembleRelease testDebugUnitTest
fi

- name: Upload Manager unit test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: manager-unit-tests
path: |
manager/app/build/test-results/testDebugUnitTest/
manager/app/build/reports/tests/testDebugUnitTest/
if-no-files-found: warn

- name: Upload build artifact
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || (github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')) || github.ref_type == 'tag' }}
uses: actions/upload-artifact@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ksud-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
userspace/ksud/src/lkm_image_bootstrap.S

- name: Build ksud
run: CROSS_NO_WARNINGS=0 cross build --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
run: CROSS_NO_WARNINGS=0 cross build --locked --target ${{ inputs.target }} --release --manifest-path ./userspace/ksud/Cargo.toml

- name: Upload ksud artifact
uses: actions/upload-artifact@v7
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/ksud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ jobs:
with:
ndk-version: r29

- name: Install Android check tool
if: inputs.target == 'aarch64-linux-android'
run: cargo install cargo-ndk --version 4.1.2 --locked

- name: Check Android compilation, lints and format
if: inputs.target == 'aarch64-linux-android'
working-directory: userspace/ksud
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
source ../../.github/scripts/setup-rust-build.sh aarch64-linux-android 26
cargo ndk -t arm64-v8a --platform 26 check --locked
cargo ndk -t arm64-v8a --platform 26 clippy --locked -- -D warnings
cargo fmt
git diff --exit-code -- '*.rs'

- name: Build ksud
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
Expand All @@ -72,7 +88,7 @@ jobs:
fi
echo "KSU_PACKAGE_NAME=${KSU_PACKAGE_NAME:-default}"
source .github/scripts/setup-rust-build.sh ${{ inputs.target }} 26
cargo build --target $TRIPLE --release --manifest-path ./userspace/ksud/Cargo.toml
cargo build --locked --target $TRIPLE --release --manifest-path ./userspace/ksud/Cargo.toml

- name: Upload ksud artifact
uses: actions/upload-artifact@v7
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/ksuinit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
BUILTINS="$($CLANG_PATH --print-resource-dir)/lib/linux/libclang_rt.builtins-aarch64-android.a"
test -f "$BUILTINS"
export RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-Wl,-z,max-page-size=16384 -C link-arg=-Wno-unused-command-line-argument -C link-arg=$BUILTINS"
cargo build --package ksuinit --target=aarch64-linux-android --release
cargo build --locked --package ksuinit --target=aarch64-linux-android --release

- name: Upload ksuinit artifact
uses: actions/upload-artifact@v7
Expand All @@ -54,7 +54,10 @@ jobs:
BUILTINS="$($CLANG_PATH --print-resource-dir)/lib/linux/libclang_rt.builtins-x86_64-android.a"
test -f "$BUILTINS"
export RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-Wl,-z,max-page-size=16384 -C link-arg=-Wno-unused-command-line-argument -C link-arg=$BUILTINS"
cargo build --package ksuinit --target=x86_64-linux-android --release
cargo build --locked --package ksuinit --target=x86_64-linux-android --release

- name: Run loader and contract host regressions
run: cargo test --locked --package ksuinit --package ksu-contracts --lib

- name: Upload x64 ksuinit artifact
uses: actions/upload-artifact@v7
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 83 additions & 0 deletions docs/superpowers/plans/2026-10-14-manager-expressive-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Manager Expressive review

User direction: audit Material 3 Expressive, prefer native components; GKI is
not a mandatory eligibility label. Preserve exact target/module validation.

## Implementation plan

- [x] Remove kernel-version-based GKI gating from home/install/environment UI;
report absent/unrecognized KernelSU without claiming unsupported hardware.
- [x] Use native Expressive theme defaults, paired color roles, accessible native
toggle semantics and labelled search actions; retain native navigation/sheets.
- [ ] Check changed behavior with focused tests and required Manager build.
- [ ] Record findings, validation outcomes and physical visual-review limits.
- [ ] Restore unreachable Rust dependency sources with unchanged commit pins;
complete the full CI chain before producing the APK, as selected by the user.

## Findings and validation

Corrected: non-GKI version heuristic incorrectly produced an unsupported hero,
failed environment verdict and hidden direct install; native working mode was
suppressed. Missing KernelSU/Manager access now remains unknown; Built-in and
LKM describe actual mode. Direct install availability follows root availability;
the patcher's exact image/module contracts still decide compatibility.

Corrected: Switch rows lacked switch semantics; preset rows had independent
row and radio click actions. Native toggleable/selectable roles now provide one
logical action per row; radio groups expose group semantics. Search close/clear
actions have localized descriptions. Native Expressive typography defaults
replace the theme override; theme colors no longer animate through arbitrary
global spring values. The update card uses its matching on-container color.
Module preview identity text uses remaining width and wraps at larger fonts.

Existing native scaffold/app bars, navigation, search, dialogs, segmented controls,
text fields and ModalBottomSheet are retained; no replacement control library,
dependency upgrade, public API, IOCTL, kernel/loader code or policy bypass added.

Local checks: git diff --check passes; edited English/Chinese resources parse
and have no duplicate string names. Manager Gradle 9.7.0 downloaded successfully,
but clean assembleRelease testDebugUnitTest stopped during configuration because
Android SDK is absent. No local compilation/test success is claimed.
User requested GitHub Actions. Existing Build Manager now waits for ksud and
places both JNI binaries before Gradle, runs existing unit tests, and uploads
test reports. PR workflow builds use a separate test package/signer and do not
prove production Manager authorization on the installed Canary candidate.

Visual limits: captured installed-app frame was partly covered by a user video
overlay and does not represent the modified build. No full visual/font/TalkBack/
rotation/reduced-motion acceptance is claimed. Device evidence stays local.

## Rust build-chain repair

First PR CI run 38460711816 failed before Manager compilation: the fixed
Kernel-SU/adb_client source was unreachable. All four Kernel-SU dependency
repositories return 404 through authenticated API reads. User chose to repair
the full build chain rather than use an old daemon merely for UI compilation.

Recovered the exact existing commit objects from public repositories:

| Dependency | Reachable source | Unchanged commit |
| --- | --- | --- |
| adb_client | 5ec1cff/adb_client | d97a966435bebaa55017834869dec08150826aa7 |
| java-properties | MySU-org/java-properties | 42a4aa941b70ded2dd3be9e9f892471023e70229 |
| prop-rs / prop-rs-android | MySU-org/ksu_props | 6f5723105d8d4cacad31d83d343defbf032c7b33 |
| ksuinit rustix | MySU-org/rustix | 4a53fbc7cb7a07cabe87125cc21dbc27db316259 |

Only source URLs and explicit full rev selectors change in manifests/lockfile;
crate versions, checksums, features and dependency edges are preserved. Source
commit objects were found by exact SHA, not selected from a moving default branch.
CI Rust builds now use --locked, ARM64 checks run cargo ndk check, clippy and fmt
in sequence, and loader/contract host regressions run before publishing artifacts.

Local cargo ndk check/clippy were attempted but cargo-ndk and NDK are absent;
cargo fmt succeeded outside the sandbox after access denial inside it. Android
compilation/lint evidence must come from the full CI run, not plain host checks.

Context7 is unavailable in this session. Primary references inspected:
https://developer.android.com/develop/ui/compose/designsystems/material3
https://developer.android.com/develop/ui/compose/accessibility/api-defaults
https://developer.android.com/jetpack/androidx/releases/compose-material3
https://m3.material.io/blog/building-with-m3-expressive (JS-only response).
Keep Material 3 1.5.0-alpha26 pinned. Native components already in use include
LargeFlexibleTopAppBar, ShortNavigationBar, WideNavigationRail, SearchBar,
SegmentedListItem, Switch, OutlinedTextField, AlertDialog and ModalBottomSheet.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ Manager code and local build/tests completed, physical-device acceptance pending
Scope: Android phone/tablet Manager, including experimental-loader settings and
operation screens. Wear OS components are not used for this application.

2026-10-14 review: GKI is not a mandatory UI eligibility condition. A kernel
version heuristic must not label the device unsupported, hide installation
choices or suppress the actual working mode. Missing Manager access is an
unknown installation/authorization state. Integrated mode is labelled Built-in;
LKM remains LKM. Selected image/module identity, page size, API, ABI, signature
and recovery requirements retain their own validation; this UI policy does not
claim support for arbitrary non-GKI targets.

This is the authoritative visual direction, superseding the restrained iOS-style
presentation in the earlier Manager plan and the custom-helper-first policy in
the older Expressive UI system. Repository and loader verification requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import me.weishu.kernelsu.Natives
import me.weishu.kernelsu.R
import me.weishu.kernelsu.getKernelVersion
import me.weishu.kernelsu.data.model.EnvCheckGroup
import me.weishu.kernelsu.data.model.EnvCheckItem
import me.weishu.kernelsu.data.model.EnvCheckReport
Expand Down Expand Up @@ -49,7 +48,6 @@ class EnvCheckRepositoryImpl(

private fun rootItems(): List<EnvCheckItem> {
val ksuVersion = runCatching { Natives.version }.getOrNull()?.takeIf { it > 0 }
val kernel = getKernelVersion()
val ksuTitle = str(R.string.env_check_item_kernelsu)
return buildList {
when {
Expand All @@ -63,22 +61,13 @@ class EnvCheckRepositoryImpl(
raw = ksuVersion.toString(),
)
)
kernel.isGKI() -> add(
item(
id = "root_not_installed",
group = EnvCheckGroup.Root,
title = ksuTitle,
detail = str(R.string.env_check_root_not_installed),
severity = EnvCheckSeverity.Fail,
)
)
else -> add(
item(
id = "root_unsupported",
id = "root_not_detected",
group = EnvCheckGroup.Root,
title = ksuTitle,
detail = str(R.string.env_check_root_unsupported),
severity = EnvCheckSeverity.Fail,
detail = str(R.string.home_not_detected_summary),
severity = EnvCheckSeverity.Unknown,
)
)
}
Expand All @@ -91,10 +80,10 @@ class EnvCheckRepositoryImpl(
title = str(R.string.env_check_item_working_mode),
detail = when (lkm) {
true -> str(R.string.env_check_mode_lkm)
false -> str(R.string.env_check_mode_gki)
false -> str(R.string.working_mode_builtin)
null -> str(R.string.env_check_unknown)
},
severity = if (lkm == false) EnvCheckSeverity.Warn else EnvCheckSeverity.Pass,
severity = if (lkm == null) EnvCheckSeverity.Unknown else EnvCheckSeverity.Pass,
raw = lkm?.toString().orEmpty(),
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp

Expand Down Expand Up @@ -67,8 +66,7 @@ fun ExpressiveHeroCard(
}
Text(
text = title,
style = MaterialTheme.typography.headlineSmall,
fontWeight = FontWeight.Medium,
style = MaterialTheme.typography.headlineSmallEmphasized,
)
if (tags != null) {
Spacer(Modifier.height(8.dp))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.stringResource
import me.weishu.kernelsu.R
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import kotlinx.coroutines.flow.distinctUntilChanged
Expand Down Expand Up @@ -160,7 +162,7 @@ fun SearchAppBar(
contentColor = MaterialTheme.colorScheme.onSurfaceVariant,
),
) {
Icon(Icons.AutoMirrored.Rounded.ArrowBack, null)
Icon(Icons.AutoMirrored.Rounded.ArrowBack, stringResource(R.string.search_close))
}
} else {
Icon(Icons.Filled.Search, null)
Expand All @@ -170,7 +172,7 @@ fun SearchAppBar(
if (isSearchExpanded && currentQuery.isNotEmpty()) {
IconButton(
onClick = { clearSearchText() },
content = { Icon(Icons.Filled.Close, null) }
content = { Icon(Icons.Filled.Close, stringResource(R.string.search_clear)) }
)
}
},
Expand Down
Loading
Loading