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: Next modifications, ksud: 16GB sparse image
This commit is contained in:
76
.github/workflows/build-manager.yml
vendored
76
.github/workflows/build-manager.yml
vendored
@@ -2,46 +2,33 @@ name: Build Manager
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main", "ci" ]
|
branches: [ "main", "next" ]
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/build-manager.yml'
|
- '.github/workflows/build-manager.yml'
|
||||||
- 'manager/**'
|
- 'manager/**'
|
||||||
- 'kernel/**'
|
- 'kernel/**'
|
||||||
- 'userspace/ksud/**'
|
- 'userspace/ksud/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: [ "main", "next" ]
|
||||||
paths:
|
paths:
|
||||||
- 'manager/**'
|
- 'manager/**'
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-lkm:
|
|
||||||
uses: ./.github/workflows/build-lkm.yml
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
build-ksud:
|
build-ksud:
|
||||||
needs: build-lkm
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: aarch64-linux-android
|
- target: aarch64-linux-android
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: x86_64-linux-android
|
- target: x86_64-unknown-linux-musl # x86 Linux, keeping this so i can ksud in muh pc
|
||||||
os: ubuntu-latest
|
|
||||||
- target: x86_64-pc-windows-gnu # windows pc
|
|
||||||
os: ubuntu-latest
|
|
||||||
- target: x86_64-apple-darwin # Intel mac
|
|
||||||
os: macos-latest
|
|
||||||
- target: aarch64-apple-darwin # M chip mac
|
|
||||||
os: macos-latest
|
|
||||||
- target: aarch64-unknown-linux-musl # arm64 Linux
|
|
||||||
os: ubuntu-latest
|
|
||||||
- target: x86_64-unknown-linux-musl # x86 Linux
|
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
uses: ./.github/workflows/ksud.yml
|
uses: ./.github/workflows/ksud.yml
|
||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
os: ${{ matrix.os }}
|
os: ${{ matrix.os }}
|
||||||
|
pack_lkm: false
|
||||||
|
|
||||||
build-manager:
|
build-manager:
|
||||||
needs: build-ksud
|
needs: build-ksud
|
||||||
@@ -56,27 +43,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup need_upload
|
|
||||||
id: need_upload
|
|
||||||
run: |
|
|
||||||
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
|
|
||||||
echo "UPLOAD=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "UPLOAD=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Write key
|
- name: Write key
|
||||||
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
|
|
||||||
run: |
|
run: |
|
||||||
if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
|
|
||||||
{
|
{
|
||||||
echo KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}'
|
echo KEYSTORE_PASSWORD='${{ secrets.KEYSTORE_PASSWORD }}'
|
||||||
echo KEY_ALIAS='${{ secrets.KEY_ALIAS }}'
|
echo KEY_ALIAS='${{ secrets.KEY_ALIAS }}'
|
||||||
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}'
|
echo KEY_PASSWORD='${{ secrets.KEY_PASSWORD }}'
|
||||||
echo KEYSTORE_FILE='key.jks'
|
echo KEYSTORE_FILE='next.keystore'
|
||||||
} >> gradle.properties
|
} >> gradle.properties
|
||||||
echo ${{ secrets.KEYSTORE }} | base64 -d > key.jks
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
@@ -96,18 +70,10 @@ jobs:
|
|||||||
name: ksud-aarch64-linux-android
|
name: ksud-aarch64-linux-android
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
- name: Download x86_64 ksud
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ksud-x86_64-linux-android
|
|
||||||
path: .
|
|
||||||
|
|
||||||
- name: Copy ksud to app jniLibs
|
- name: Copy ksud to app jniLibs
|
||||||
run: |
|
run: |
|
||||||
mkdir -p app/src/main/jniLibs/arm64-v8a
|
mkdir -p app/src/main/jniLibs/arm64-v8a
|
||||||
mkdir -p app/src/main/jniLibs/x86_64
|
|
||||||
cp -f ../aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud.so
|
cp -f ../aarch64-linux-android/release/ksud ../manager/app/src/main/jniLibs/arm64-v8a/libksud.so
|
||||||
cp -f ../x86_64-linux-android/release/ksud ../manager/app/src/main/jniLibs/x86_64/libksud.so
|
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
@@ -122,40 +88,12 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
|
|
||||||
with:
|
with:
|
||||||
name: manager
|
name: manager
|
||||||
path: manager/app/build/outputs/apk/release/*.apk
|
path: manager/app/build/outputs/apk/release/*.apk
|
||||||
|
|
||||||
- name: Upload mappings
|
- name: Upload mappings
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }}
|
|
||||||
with:
|
with:
|
||||||
name: "mappings"
|
name: "mappings"
|
||||||
path: "manager/app/build/outputs/mapping/release/"
|
path: "manager/app/build/outputs/mapping/release/"
|
||||||
|
|
||||||
- name: Bot session cache
|
|
||||||
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
|
|
||||||
id: bot_session_cache
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: scripts/ksubot.session
|
|
||||||
key: ${{ runner.os }}-bot-session
|
|
||||||
|
|
||||||
- name: Upload to telegram
|
|
||||||
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
|
|
||||||
env:
|
|
||||||
CHAT_ID: ${{ secrets.CHAT_ID }}
|
|
||||||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
||||||
MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }}
|
|
||||||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
|
||||||
COMMIT_URL: ${{ github.event.head_commit.url }}
|
|
||||||
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
||||||
TITLE: Manager
|
|
||||||
run: |
|
|
||||||
if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then
|
|
||||||
export VERSION=$(git rev-list --count HEAD)
|
|
||||||
APK=$(find ./app/build/outputs/apk/release -name "*.apk")
|
|
||||||
pip3 install telethon
|
|
||||||
python3 $GITHUB_WORKSPACE/scripts/ksubot.py $APK
|
|
||||||
fi
|
|
||||||
@@ -68,7 +68,7 @@ android {
|
|||||||
applicationVariants.all {
|
applicationVariants.all {
|
||||||
outputs.forEach {
|
outputs.forEach {
|
||||||
val output = it as BaseVariantOutputImpl
|
val output = it as BaseVariantOutputImpl
|
||||||
output.outputFileName = "KernelSU_${managerVersionName}_${managerVersionCode}-$name.apk"
|
output.outputFileName = "KernelSU_${managerVersionName}_${managerVersionCode}-next-$name.apk"
|
||||||
}
|
}
|
||||||
kotlin.sourceSets {
|
kotlin.sourceSets {
|
||||||
getByName(name) {
|
getByName(name) {
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ fun HomeScreen(navigator: DestinationsNavigator) {
|
|||||||
if (checkUpdate) {
|
if (checkUpdate) {
|
||||||
UpdateCard()
|
UpdateCard()
|
||||||
}
|
}
|
||||||
|
Next()
|
||||||
InfoCard()
|
InfoCard()
|
||||||
DonateCard()
|
DonateCard()
|
||||||
LearnMoreCard()
|
LearnMoreCard()
|
||||||
@@ -299,15 +300,15 @@ private fun StatusCard(
|
|||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
Icon(Icons.Outlined.Block, stringResource(R.string.home_unsupported))
|
Icon(Icons.Outlined.Block, stringResource(R.string.home_failure))
|
||||||
Column(Modifier.padding(start = 20.dp)) {
|
Column(Modifier.padding(start = 20.dp)) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.home_unsupported),
|
text = stringResource(R.string.home_failure),
|
||||||
style = MaterialTheme.typography.titleMedium
|
style = MaterialTheme.typography.titleMedium
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(4.dp))
|
Spacer(Modifier.height(4.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.home_unsupported_reason),
|
text = stringResource(R.string.home_failure_reason),
|
||||||
style = MaterialTheme.typography.bodyMedium
|
style = MaterialTheme.typography.bodyMedium
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -420,7 +421,7 @@ private fun InfoCard() {
|
|||||||
val managerVersion = getManagerVersion(context)
|
val managerVersion = getManagerVersion(context)
|
||||||
InfoCardItem(
|
InfoCardItem(
|
||||||
stringResource(R.string.home_manager_version),
|
stringResource(R.string.home_manager_version),
|
||||||
"${managerVersion.first} (${managerVersion.second})"
|
"${managerVersion.first}-next (${managerVersion.second})"
|
||||||
)
|
)
|
||||||
|
|
||||||
Spacer(Modifier.height(16.dp))
|
Spacer(Modifier.height(16.dp))
|
||||||
@@ -432,6 +433,34 @@ private fun InfoCard() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun Next() {
|
||||||
|
val uriHandler = LocalUriHandler.current
|
||||||
|
val url = stringResource(R.string.home_next_kernelsu_announce)
|
||||||
|
|
||||||
|
ElevatedCard {
|
||||||
|
|
||||||
|
Row(modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickable {
|
||||||
|
uriHandler.openUri(url)
|
||||||
|
}
|
||||||
|
.padding(24.dp), verticalAlignment = Alignment.CenterVertically) {
|
||||||
|
Column {
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.home_next_kernelsu),
|
||||||
|
style = MaterialTheme.typography.titleSmall
|
||||||
|
)
|
||||||
|
Spacer(Modifier.height(4.dp))
|
||||||
|
Text(
|
||||||
|
text = stringResource(R.string.home_next_kernelsu_body),
|
||||||
|
style = MaterialTheme.typography.bodyMedium
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun getManagerVersion(context: Context): Pair<String, Long> {
|
fun getManagerVersion(context: Context): Pair<String, Long> {
|
||||||
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)!!
|
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)!!
|
||||||
val versionCode = PackageInfoCompat.getLongVersionCode(packageInfo)
|
val versionCode = PackageInfoCompat.getLongVersionCode(packageInfo)
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ fun download(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun checkNewVersion(): LatestVersionInfo {
|
fun checkNewVersion(): LatestVersionInfo {
|
||||||
val url = "https://api.github.com/repos/tiann/KernelSU/releases/latest"
|
// Next updates
|
||||||
|
val url = "https://api.github.com/repos/rifsxd/KernelSU/releases/latest"
|
||||||
// default null value if failed
|
// default null value if failed
|
||||||
val defaultValue = LatestVersionInfo()
|
val defaultValue = LatestVersionInfo()
|
||||||
runCatching {
|
runCatching {
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
<string name="home_module_count">Modules: %d</string>
|
<string name="home_module_count">Modules: %d</string>
|
||||||
<string name="home_unsupported">Unsupported</string>
|
<string name="home_unsupported">Unsupported</string>
|
||||||
<string name="home_unsupported_reason">KernelSU only supports GKI kernels now</string>
|
<string name="home_unsupported_reason">KernelSU only supports GKI kernels now</string>
|
||||||
|
<string name="home_failure">!kenrelsu || != size/hash</string>
|
||||||
|
<string name="home_failure_reason">Failure! Next size/hash required.</string>
|
||||||
<string name="home_kernel">Kernel</string>
|
<string name="home_kernel">Kernel</string>
|
||||||
<string name="home_manager_version">Manager version</string>
|
<string name="home_manager_version">Manager version</string>
|
||||||
<string name="home_fingerprint">Fingerprint</string>
|
<string name="home_fingerprint">Fingerprint</string>
|
||||||
@@ -47,6 +49,9 @@
|
|||||||
<string name="safe_mode">Safe mode</string>
|
<string name="safe_mode">Safe mode</string>
|
||||||
<string name="reboot_to_apply">Reboot to take effect</string>
|
<string name="reboot_to_apply">Reboot to take effect</string>
|
||||||
<string name="module_magisk_conflict">Modules are unavailable due to a conflict with Magisk!</string>
|
<string name="module_magisk_conflict">Modules are unavailable due to a conflict with Magisk!</string>
|
||||||
|
<string name="home_next_kernelsu">🔥 Next Build</string>
|
||||||
|
<string name="home_next_kernelsu_announce">https://github.com/rifsxd/KernelSU</string>
|
||||||
|
<string name="home_next_kernelsu_body">Next modifications branch; Check out the repo!</string>
|
||||||
<string name="home_learn_kernelsu">Learn KernelSU</string>
|
<string name="home_learn_kernelsu">Learn KernelSU</string>
|
||||||
<string name="home_learn_kernelsu_url">https://kernelsu.org/guide/what-is-kernelsu.html</string>
|
<string name="home_learn_kernelsu_url">https://kernelsu.org/guide/what-is-kernelsu.html</string>
|
||||||
<string name="home_click_to_learn_kernelsu">Learn how to install KernelSU and use modules</string>
|
<string name="home_click_to_learn_kernelsu">Learn how to install KernelSU and use modules</string>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ cmaker {
|
|||||||
"-DANDROID_STL=none",
|
"-DANDROID_STL=none",
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
abiFilters("arm64-v8a", "x86_64", "riscv64")
|
abiFilters("arm64-v8a")
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
if (it.name == "release") {
|
if (it.name == "release") {
|
||||||
@@ -80,7 +80,7 @@ subprojects {
|
|||||||
versionName = managerVersionName
|
versionName = managerVersionName
|
||||||
}
|
}
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters += listOf("arm64-v8a", "x86_64", "riscv64")
|
abiFilters += listOf("arm64-v8a")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
manager/next.keystore
Normal file
BIN
manager/next.keystore
Normal file
Binary file not shown.
@@ -362,7 +362,7 @@ fn _install_module(zip: &str) -> Result<()> {
|
|||||||
humansize::format_size(zip_uncompressed_size, humansize::DECIMAL)
|
humansize::format_size(zip_uncompressed_size, humansize::DECIMAL)
|
||||||
);
|
);
|
||||||
|
|
||||||
let sparse_image_size = 1 << 40; // 1T
|
let sparse_image_size = 1 << 34; // 16G
|
||||||
let journal_size = 8; // 8M
|
let journal_size = 8; // 8M
|
||||||
if !modules_img_exist && !modules_update_img_exist {
|
if !modules_img_exist && !modules_update_img_exist {
|
||||||
// if no modules and modules_update, it is brand new installation, we should create a new img
|
// if no modules and modules_update, it is brand new installation, we should create a new img
|
||||||
|
|||||||
Reference in New Issue
Block a user