Changing the package name

This commit is contained in:
ShirkNeko
2025-04-12 00:33:46 +08:00
parent b7056b5baa
commit 2266362e24
66 changed files with 275 additions and 283 deletions

View File

@@ -8,7 +8,7 @@ on:
- 'manager/**' - 'manager/**'
- 'kernel/**' - 'kernel/**'
- 'userspace/ksud/**' - 'userspace/ksud/**'
- 'userspace/zakomksd/**' - 'userspace/susfs/**'
- 'userspace/kpmmgr/**' - 'userspace/kpmmgr/**'
pull_request: pull_request:
branches: [ "main" ] branches: [ "main" ]
@@ -83,7 +83,7 @@ jobs:
with: with:
upload: ${{ needs.check-build-lkm.outputs.upload_lkm == 'true' }} upload: ${{ needs.check-build-lkm.outputs.upload_lkm == 'true' }}
secrets: inherit secrets: inherit
build-zakomksd: build-susfs:
if: ${{ always() }} if: ${{ always() }}
needs: [ check-build-lkm, build-lkm ] needs: [ check-build-lkm, build-lkm ]
strategy: strategy:
@@ -91,7 +91,7 @@ jobs:
include: include:
- target: aarch64-linux-android - target: aarch64-linux-android
os: ubuntu-latest os: ubuntu-latest
uses: ./.github/workflows/zakomksd.yml uses: ./.github/workflows/susfs.yml
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}
os: ${{ matrix.os }} os: ${{ matrix.os }}
@@ -174,10 +174,10 @@ jobs:
- name: Setup Android SDK - name: Setup Android SDK
uses: android-actions/setup-android@v3 uses: android-actions/setup-android@v3
- name: Download arm64 zakomksd - name: Download arm64 susfs
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: zakomksd-aarch64-linux-android name: susfs-aarch64-linux-android
path: . path: .
- name: Download arm64 kpmmgr - name: Download arm64 kpmmgr
@@ -202,18 +202,18 @@ jobs:
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 mkdir -p app/src/main/jniLibs/x86_64
cp -f ../aarch64-linux-android/release/zakomk ../manager/app/src/main/jniLibs/arm64-v8a/libzakomk.so cp -f ../aarch64-linux-android/release/zakozako ../manager/app/src/main/jniLibs/arm64-v8a/libzakozako.so
cp -f ../x86_64-linux-android/release/zakomk ../manager/app/src/main/jniLibs/x86_64/libzakomk.so cp -f ../x86_64-linux-android/release/zakozako ../manager/app/src/main/jniLibs/x86_64/libzakozako.so
- name: Copy kpmmgr to app jniLibs - name: Copy kpmmgr to app jniLibs
run: | run: |
mkdir -p app/src/main/jniLibs/arm64-v8a mkdir -p app/src/main/jniLibs/arm64-v8a
cp -f ../arm64-v8a/kpmmgr ../manager/app/src/main/jniLibs/arm64-v8a/libkpmmgr.so cp -f ../arm64-v8a/kpmmgr ../manager/app/src/main/jniLibs/arm64-v8a/libkpmmgr.so
- name: Copy zakomksd to app jniLibs - name: Copy susfs to app jniLibs
run: | run: |
mkdir -p app/src/main/jniLibs/arm64-v8a mkdir -p app/src/main/jniLibs/arm64-v8a
cp -f ../arm64-v8a/zakomksd ../manager/app/src/main/jniLibs/arm64-v8a/libzakomksd.so cp -f ../arm64-v8a/zakozakozako ../manager/app/src/main/jniLibs/arm64-v8a/libzakozakozako.so
- name: Build with Gradle - name: Build with Gradle
run: | run: |

View File

@@ -71,4 +71,4 @@ jobs:
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: ksud-${{ inputs.target }} name: ksud-${{ inputs.target }}
path: userspace/ksud/target/**/release/zakomk* path: userspace/ksud/target/**/release/zakozako*

View File

@@ -1,11 +1,11 @@
name: Build zakomksd name: Build susfs
on: on:
push: push:
branches: [ "mian" ] branches: [ "mian" ]
paths: paths:
- '.github/workflows/zakomksd.yml' - '.github/workflows/susfs.yml'
- 'userspace/zakomksd/**' - 'userspace/susfs/**'
workflow_dispatch: workflow_dispatch:
workflow_call: workflow_call:
inputs: inputs:
@@ -19,7 +19,7 @@ on:
jobs: jobs:
build-susfs: build-susfs:
name: Build userspace zakomksd name: Build userspace susfs
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -28,13 +28,13 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Build zakomksd - name: Build susfs
working-directory: ./userspace/zakomksd working-directory: ./userspace/susfs
run: | run: |
$ANDROID_NDK_HOME/ndk-build $ANDROID_NDK_HOME/ndk-build
- name: Upload a Build Artifact - name: Upload a Build Artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: zakomksd-aarch64-linux-android name: susfs-aarch64-linux-android
path: ./userspace/zakomksd/libs path: ./userspace/susfs/libs

View File

@@ -25,7 +25,7 @@ apksign {
} }
android { android {
namespace = "shirkneko.zako.sukisu" namespace = "zako.zako.zako"
buildTypes { buildTypes {
release { release {

View File

@@ -1,5 +1,4 @@
// IKsuInterface.aidl package zako.zako.zako;
package shirkneko.zako.sukisu;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import rikka.parcelablelist.ParcelableListSlice; import rikka.parcelablelist.ParcelableListSlice;

View File

@@ -12,7 +12,7 @@
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_becomeManager(JNIEnv *env, jobject, jstring pkg) { Java_zako_zako_zako_Natives_becomeManager(JNIEnv *env, jobject, jstring pkg) {
auto cpkg = env->GetStringUTFChars(pkg, nullptr); auto cpkg = env->GetStringUTFChars(pkg, nullptr);
auto result = become_manager(cpkg); auto result = become_manager(cpkg);
env->ReleaseStringUTFChars(pkg, cpkg); env->ReleaseStringUTFChars(pkg, cpkg);
@@ -21,13 +21,13 @@ Java_shirkneko_zako_sukisu_Natives_becomeManager(JNIEnv *env, jobject, jstring p
extern "C" extern "C"
JNIEXPORT jint JNICALL JNIEXPORT jint JNICALL
Java_shirkneko_zako_sukisu_Natives_getVersion(JNIEnv *env, jobject) { Java_zako_zako_zako_Natives_getVersion(JNIEnv *env, jobject) {
return get_version(); return get_version();
} }
extern "C" extern "C"
JNIEXPORT jintArray JNICALL JNIEXPORT jintArray JNICALL
Java_shirkneko_zako_sukisu_Natives_getAllowList(JNIEnv *env, jobject) { Java_zako_zako_zako_Natives_getAllowList(JNIEnv *env, jobject) {
int uids[1024]; int uids[1024];
int size = 0; int size = 0;
bool result = get_allow_list(uids, &size); bool result = get_allow_list(uids, &size);
@@ -42,13 +42,13 @@ Java_shirkneko_zako_sukisu_Natives_getAllowList(JNIEnv *env, jobject) {
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_isSafeMode(JNIEnv *env, jclass clazz) { Java_zako_zako_zako_Natives_isSafeMode(JNIEnv *env, jclass clazz) {
return is_safe_mode(); return is_safe_mode();
} }
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_isLkmMode(JNIEnv *env, jclass clazz) { Java_zako_zako_zako_Natives_isLkmMode(JNIEnv *env, jclass clazz) {
return is_lkm_mode(); return is_lkm_mode();
} }
@@ -111,7 +111,7 @@ static void fillArrayWithList(JNIEnv *env, jobject list, int *data, int count) {
extern "C" extern "C"
JNIEXPORT jobject JNICALL JNIEXPORT jobject JNICALL
Java_shirkneko_zako_sukisu_Natives_getAppProfile(JNIEnv *env, jobject, jstring pkg, jint uid) { Java_zako_zako_zako_Natives_getAppProfile(JNIEnv *env, jobject, jstring pkg, jint uid) {
if (env->GetStringLength(pkg) > KSU_MAX_PACKAGE_NAME) { if (env->GetStringLength(pkg) > KSU_MAX_PACKAGE_NAME) {
return nullptr; return nullptr;
} }
@@ -129,7 +129,7 @@ Java_shirkneko_zako_sukisu_Natives_getAppProfile(JNIEnv *env, jobject, jstring p
bool useDefaultProfile = !get_app_profile(key, &profile); bool useDefaultProfile = !get_app_profile(key, &profile);
auto cls = env->FindClass("shirkneko/zako/sukisu/Natives$Profile"); auto cls = env->FindClass("zako/zako/zako/Natives$Profile");
auto constructor = env->GetMethodID(cls, "<init>", "()V"); auto constructor = env->GetMethodID(cls, "<init>", "()V");
auto obj = env->NewObject(cls, constructor); auto obj = env->NewObject(cls, constructor);
auto keyField = env->GetFieldID(cls, "name", "Ljava/lang/String;"); auto keyField = env->GetFieldID(cls, "name", "Ljava/lang/String;");
@@ -207,8 +207,8 @@ Java_shirkneko_zako_sukisu_Natives_getAppProfile(JNIEnv *env, jobject, jstring p
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_setAppProfile(JNIEnv *env, jobject clazz, jobject profile) { Java_zako_zako_zako_Natives_setAppProfile(JNIEnv *env, jobject clazz, jobject profile) {
auto cls = env->FindClass("shirkneko/zako/sukisu/Natives$Profile"); auto cls = env->FindClass("zako/zako/zako/Natives$Profile");
auto keyField = env->GetFieldID(cls, "name", "Ljava/lang/String;"); auto keyField = env->GetFieldID(cls, "name", "Ljava/lang/String;");
auto currentUidField = env->GetFieldID(cls, "currentUid", "I"); auto currentUidField = env->GetFieldID(cls, "currentUid", "I");
@@ -293,16 +293,16 @@ Java_shirkneko_zako_sukisu_Natives_setAppProfile(JNIEnv *env, jobject clazz, job
} }
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_uidShouldUmount(JNIEnv *env, jobject thiz, jint uid) { Java_zako_zako_zako_Natives_uidShouldUmount(JNIEnv *env, jobject thiz, jint uid) {
return uid_should_umount(uid); return uid_should_umount(uid);
} }
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_isSuEnabled(JNIEnv *env, jobject thiz) { Java_zako_zako_zako_Natives_isSuEnabled(JNIEnv *env, jobject thiz) {
return is_su_enabled(); return is_su_enabled();
} }
extern "C" extern "C"
JNIEXPORT jboolean JNICALL JNIEXPORT jboolean JNICALL
Java_shirkneko_zako_sukisu_Natives_setSuEnabled(JNIEnv *env, jobject thiz, jboolean enabled) { Java_zako_zako_zako_Natives_setSuEnabled(JNIEnv *env, jobject thiz, jboolean enabled) {
return set_su_enabled(enabled); return set_su_enabled(enabled);
} }

View File

@@ -1,10 +1,8 @@
package io.sukisu.ultra; package io.zako.zako;
import com.topjohnwu.superuser.Shell;
import java.util.ArrayList; import java.util.ArrayList;
import shirkneko.zako.sukisu.ui.util.KsuCli; import zako.zako.zako.ui.util.KsuCli;
public class UltraShellHelper { public class UltraShellHelper {
public static String runCmd(String cmds) { public static String runCmd(String cmds) {

View File

@@ -1,7 +1,6 @@
package io.sukisu.ultra; package io.zako.zako;
import static shirkneko.zako.sukisu.ui.util.KsuCliKt.getKpmmgrPath; import static zako.zako.zako.ui.util.KsuCliKt.getKpmmgrPath;
import shirkneko.zako.sukisu.ui.util.KsuCli;
public class UltraToolInstall { public class UltraToolInstall {
private static final String OUTSIDE_KPMMGR_PATH = "/data/adb/ksu/bin/kpmmgr"; private static final String OUTSIDE_KPMMGR_PATH = "/data/adb/ksu/bin/kpmmgr";

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu package zako.zako.zako
import android.app.Application import android.app.Application
import coil.Coil import coil.Coil

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu package zako.zako.zako
import android.system.Os import android.system.Os

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu package zako.zako.zako
import android.os.Parcelable import android.os.Parcelable
import androidx.annotation.Keep import androidx.annotation.Keep

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.profile package zako.zako.zako.profile
/** /**
* @author weishu * @author weishu

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.profile package zako.zako.zako.profile
/** /**
* https://cs.android.com/android/platform/superproject/main/+/main:system/core/libcutils/include/private/android_filesystem_config.h * https://cs.android.com/android/platform/superproject/main/+/main:system/core/libcutils/include/private/android_filesystem_config.h

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui; package zako.zako.zako.ui;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
@@ -17,7 +17,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import shirkneko.zako.sukisu.IKsuInterface; import zako.zako.zako.IKsuInterface;
import rikka.parcelablelist.ParcelableListSlice; import rikka.parcelablelist.ParcelableListSlice;
/** /**

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui package zako.zako.zako.ui
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
@@ -30,8 +30,6 @@ import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.luminance
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.navigation.NavBackStackEntry import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavHostController import androidx.navigation.NavHostController
@@ -41,18 +39,18 @@ import com.ramcosta.composedestinations.animations.NavHostAnimatedDestinationSty
import com.ramcosta.composedestinations.generated.NavGraphs import com.ramcosta.composedestinations.generated.NavGraphs
import com.ramcosta.composedestinations.utils.isRouteOnBackStackAsState import com.ramcosta.composedestinations.utils.isRouteOnBackStackAsState
import com.ramcosta.composedestinations.utils.rememberDestinationsNavigator import com.ramcosta.composedestinations.utils.rememberDestinationsNavigator
import io.sukisu.ultra.UltraToolInstall import io.zako.zako.UltraToolInstall
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.ksuApp import zako.zako.zako.ksuApp
import shirkneko.zako.sukisu.ui.screen.BottomBarDestination import zako.zako.zako.ui.screen.BottomBarDestination
import shirkneko.zako.sukisu.ui.theme.CardConfig import zako.zako.zako.ui.theme.CardConfig
import shirkneko.zako.sukisu.ui.theme.KernelSUTheme import zako.zako.zako.ui.theme.KernelSUTheme
import shirkneko.zako.sukisu.ui.theme.loadCustomBackground import zako.zako.zako.ui.theme.loadCustomBackground
import shirkneko.zako.sukisu.ui.theme.loadThemeMode import zako.zako.zako.ui.theme.loadThemeMode
import shirkneko.zako.sukisu.ui.util.LocalSnackbarHost import zako.zako.zako.ui.util.LocalSnackbarHost
import shirkneko.zako.sukisu.ui.util.getKpmVersion import zako.zako.zako.ui.util.getKpmVersion
import shirkneko.zako.sukisu.ui.util.rootAvailable import zako.zako.zako.ui.util.rootAvailable
import shirkneko.zako.sukisu.ui.util.install import zako.zako.zako.ui.util.install
class MainActivity : ComponentActivity() { class MainActivity : ComponentActivity() {

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component package zako.zako.zako.ui.component
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
@@ -31,8 +31,8 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.Dialog
import shirkneko.zako.sukisu.BuildConfig import zako.zako.zako.BuildConfig
import shirkneko.zako.sukisu.R import zako.zako.zako.R
@Preview @Preview
@Composable @Composable
@@ -98,7 +98,7 @@ private fun AboutCardContent() {
val annotatedString = AnnotatedString.Companion.fromHtml( val annotatedString = AnnotatedString.Companion.fromHtml(
htmlString = stringResource( htmlString = stringResource(
id = R.string.about_source_code, id = R.string.about_source_code,
"<b><a href=\"https://github.com/ShirkNeko/SukiSU-Ultra\">GitHub</a></b>", "<b><a href=\"https://github.com/zako/SukiSU-Ultra\">GitHub</a></b>",
"<b><a href=\"https://t.me/SukiKSU\">Telegram</a></b>" "<b><a href=\"https://t.me/SukiKSU\">Telegram</a></b>"
), ),
linkStyles = TextLinkStyles( linkStyles = TextLinkStyles(

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component package zako.zako.zako.ui.component
import android.graphics.text.LineBreaker import android.graphics.text.LineBreaker
import android.os.Build import android.os.Build

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component package zako.zako.zako.ui.component
import androidx.compose.foundation.focusable import androidx.compose.foundation.focusable
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component package zako.zako.zako.ui.component
import android.util.Log import android.util.Log
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
@@ -42,7 +42,7 @@ import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.text.input.ImeAction import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import shirkneko.zako.sukisu.ui.theme.CardConfig import zako.zako.zako.ui.theme.CardConfig
private const val TAG = "SearchBar" private const val TAG = "SearchBar"

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component package zako.zako.zako.ui.component
import androidx.compose.foundation.LocalIndication import androidx.compose.foundation.LocalIndication
import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.MutableInteractionSource

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component package zako.zako.zako.ui.component
import androidx.compose.material3.Icon import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem import androidx.compose.material3.ListItem

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component.profile package zako.zako.zako.ui.component.profile
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.OutlinedTextField
@@ -11,9 +11,9 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.Preview
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.component.SwitchItem import zako.zako.zako.ui.component.SwitchItem
@Composable @Composable
fun AppProfileConfig( fun AppProfileConfig(

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component.profile package zako.zako.zako.ui.component.profile
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
@@ -42,12 +42,12 @@ import com.maxkeppeler.sheets.input.models.ValidationResult
import com.maxkeppeler.sheets.list.ListDialog import com.maxkeppeler.sheets.list.ListDialog
import com.maxkeppeler.sheets.list.models.ListOption import com.maxkeppeler.sheets.list.models.ListOption
import com.maxkeppeler.sheets.list.models.ListSelection import com.maxkeppeler.sheets.list.models.ListSelection
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.profile.Capabilities import zako.zako.zako.profile.Capabilities
import shirkneko.zako.sukisu.profile.Groups import zako.zako.zako.profile.Groups
import shirkneko.zako.sukisu.ui.component.rememberCustomDialog import zako.zako.zako.ui.component.rememberCustomDialog
import shirkneko.zako.sukisu.ui.util.isSepolicyValid import zako.zako.zako.ui.util.isSepolicyValid
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.component.profile package zako.zako.zako.ui.component.profile
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
@@ -23,11 +23,11 @@ import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.util.listAppProfileTemplates import zako.zako.zako.ui.util.listAppProfileTemplates
import shirkneko.zako.sukisu.ui.util.setSepolicy import zako.zako.zako.ui.util.setSepolicy
import shirkneko.zako.sukisu.ui.viewmodel.getTemplateInfoById import zako.zako.zako.ui.viewmodel.getTemplateInfoById
/** /**
* @author weishu * @author weishu

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.compose.animation.Crossfade import androidx.compose.animation.Crossfade
@@ -64,20 +64,20 @@ import com.ramcosta.composedestinations.generated.destinations.AppProfileTemplat
import com.ramcosta.composedestinations.generated.destinations.TemplateEditorScreenDestination import com.ramcosta.composedestinations.generated.destinations.TemplateEditorScreenDestination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.component.SwitchItem import zako.zako.zako.ui.component.SwitchItem
import shirkneko.zako.sukisu.ui.component.profile.AppProfileConfig import zako.zako.zako.ui.component.profile.AppProfileConfig
import shirkneko.zako.sukisu.ui.component.profile.RootProfileConfig import zako.zako.zako.ui.component.profile.RootProfileConfig
import shirkneko.zako.sukisu.ui.component.profile.TemplateConfig import zako.zako.zako.ui.component.profile.TemplateConfig
import shirkneko.zako.sukisu.ui.util.LocalSnackbarHost import zako.zako.zako.ui.util.LocalSnackbarHost
import shirkneko.zako.sukisu.ui.util.forceStopApp import zako.zako.zako.ui.util.forceStopApp
import shirkneko.zako.sukisu.ui.util.getSepolicy import zako.zako.zako.ui.util.getSepolicy
import shirkneko.zako.sukisu.ui.util.launchApp import zako.zako.zako.ui.util.launchApp
import shirkneko.zako.sukisu.ui.util.restartApp import zako.zako.zako.ui.util.restartApp
import shirkneko.zako.sukisu.ui.util.setSepolicy import zako.zako.zako.ui.util.setSepolicy
import shirkneko.zako.sukisu.ui.viewmodel.SuperUserViewModel import zako.zako.zako.ui.viewmodel.SuperUserViewModel
import shirkneko.zako.sukisu.ui.viewmodel.getTemplateInfoById import zako.zako.zako.ui.viewmodel.getTemplateInfoById
/** /**
* @author weishu * @author weishu

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
@@ -11,7 +11,7 @@ import com.ramcosta.composedestinations.generated.destinations.SuperUserScreenDe
import com.ramcosta.composedestinations.generated.destinations.SettingScreenDestination import com.ramcosta.composedestinations.generated.destinations.SettingScreenDestination
import com.ramcosta.composedestinations.generated.destinations.KpmScreenDestination import com.ramcosta.composedestinations.generated.destinations.KpmScreenDestination
import com.ramcosta.composedestinations.spec.DirectionDestinationSpec import com.ramcosta.composedestinations.spec.DirectionDestinationSpec
import shirkneko.zako.sukisu.R import zako.zako.zako.R
enum class BottomBarDestination( enum class BottomBarDestination(
val direction: DirectionDestinationSpec, val direction: DirectionDestinationSpec,

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.os.Environment import android.os.Environment
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
@@ -37,10 +37,10 @@ import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.component.KeyEventBlocker import zako.zako.zako.ui.component.KeyEventBlocker
import shirkneko.zako.sukisu.ui.util.LocalSnackbarHost import zako.zako.zako.ui.util.LocalSnackbarHost
import shirkneko.zako.sukisu.ui.util.runModuleAction import zako.zako.zako.ui.util.runModuleAction
import java.io.File import java.io.File
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.Date import java.util.Date

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.net.Uri import android.net.Uri
import android.os.Environment import android.os.Environment
@@ -30,9 +30,9 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import shirkneko.zako.sukisu.R import zako.zako.zako.ui.component.KeyEventBlocker
import shirkneko.zako.sukisu.ui.component.KeyEventBlocker import zako.zako.zako.ui.util.*
import shirkneko.zako.sukisu.ui.util.* import zako.zako.zako.R
import java.io.File import java.io.File
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.content.Context import android.content.Context
@@ -33,15 +33,15 @@ import com.ramcosta.composedestinations.generated.destinations.SettingScreenDest
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
import shirkneko.zako.sukisu.* import zako.zako.zako.*
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.component.rememberConfirmDialog import zako.zako.zako.ui.component.rememberConfirmDialog
import shirkneko.zako.sukisu.ui.util.* import zako.zako.zako.ui.util.*
import shirkneko.zako.sukisu.ui.util.module.LatestVersionInfo import zako.zako.zako.ui.util.module.LatestVersionInfo
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text import androidx.compose.material3.Text
import shirkneko.zako.sukisu.ui.theme.getCardColors import zako.zako.zako.ui.theme.getCardColors
import shirkneko.zako.sukisu.ui.theme.getCardElevation import zako.zako.zako.ui.theme.getCardElevation
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
@@ -49,11 +49,10 @@ import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeOut import androidx.compose.animation.fadeOut
import androidx.compose.animation.shrinkVertically import androidx.compose.animation.shrinkVertically
import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.saveable.rememberSaveable
import shirkneko.zako.sukisu.ui.theme.CardConfig import zako.zako.zako.ui.theme.CardConfig
import androidx.core.content.edit import androidx.core.content.edit
import java.io.BufferedReader import java.io.BufferedReader
import java.io.InputStreamReader import java.io.InputStreamReader
import java.util.Scanner
import java.util.zip.GZIPInputStream import java.util.zip.GZIPInputStream
import kotlin.random.Random import kotlin.random.Random
@@ -442,7 +441,7 @@ fun WarningCard(
@Composable @Composable
fun ContributionCard() { fun ContributionCard() {
val uriHandler = LocalUriHandler.current val uriHandler = LocalUriHandler.current
val links = listOf("https://github.com/ShirkNeko", "https://github.com/udochina") val links = listOf("https://github.com/zako", "https://github.com/udochina")
ElevatedCard( ElevatedCard(
colors = getCardColors(MaterialTheme.colorScheme.secondaryContainer), colors = getCardColors(MaterialTheme.colorScheme.secondaryContainer),
elevation = CardDefaults.cardElevation(defaultElevation = getCardElevation()) elevation = CardDefaults.cardElevation(defaultElevation = getCardElevation())

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
@@ -35,15 +35,15 @@ import com.ramcosta.composedestinations.annotation.RootGraph
import com.ramcosta.composedestinations.generated.destinations.FlashScreenDestination import com.ramcosta.composedestinations.generated.destinations.FlashScreenDestination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import shirkneko.zako.sukisu.R import zako.zako.zako.ui.component.DialogHandle
import shirkneko.zako.sukisu.ui.component.DialogHandle import zako.zako.zako.ui.component.rememberConfirmDialog
import shirkneko.zako.sukisu.ui.component.rememberConfirmDialog import zako.zako.zako.ui.component.rememberCustomDialog
import shirkneko.zako.sukisu.ui.component.rememberCustomDialog import zako.zako.zako.ui.theme.ThemeConfig
import shirkneko.zako.sukisu.ui.theme.ThemeConfig import zako.zako.zako.ui.theme.getCardColors
import shirkneko.zako.sukisu.ui.theme.getCardColors import zako.zako.zako.ui.theme.getCardElevation
import shirkneko.zako.sukisu.ui.theme.getCardElevation import zako.zako.zako.ui.util.*
import shirkneko.zako.sukisu.ui.util.* import zako.zako.zako.R
import shirkneko.zako.sukisu.utils.AssetsUtil import zako.zako.zako.utils.AssetsUtil
import java.io.File import java.io.File
import java.io.FileOutputStream import java.io.FileOutputStream
import java.io.IOException import java.io.IOException

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.app.Activity.* import android.app.Activity.*
import android.content.Context import android.content.Context
@@ -88,32 +88,32 @@ import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.ui.component.ConfirmResult
import shirkneko.zako.sukisu.ui.component.ConfirmResult import zako.zako.zako.ui.component.SearchAppBar
import shirkneko.zako.sukisu.ui.component.SearchAppBar import zako.zako.zako.ui.component.rememberConfirmDialog
import shirkneko.zako.sukisu.ui.component.rememberConfirmDialog import zako.zako.zako.ui.component.rememberLoadingDialog
import shirkneko.zako.sukisu.ui.component.rememberLoadingDialog import zako.zako.zako.ui.util.DownloadListener
import shirkneko.zako.sukisu.ui.util.DownloadListener import zako.zako.zako.ui.util.*
import shirkneko.zako.sukisu.ui.util.* import zako.zako.zako.ui.util.download
import shirkneko.zako.sukisu.ui.util.download import zako.zako.zako.ui.util.hasMagisk
import shirkneko.zako.sukisu.ui.util.hasMagisk import zako.zako.zako.ui.util.reboot
import shirkneko.zako.sukisu.ui.util.reboot import zako.zako.zako.ui.util.restoreModule
import shirkneko.zako.sukisu.ui.util.restoreModule import zako.zako.zako.ui.util.toggleModule
import shirkneko.zako.sukisu.ui.util.toggleModule import zako.zako.zako.ui.util.uninstallModule
import shirkneko.zako.sukisu.ui.util.uninstallModule import zako.zako.zako.ui.webui.WebUIActivity
import shirkneko.zako.sukisu.ui.webui.WebUIActivity
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import shirkneko.zako.sukisu.ui.util.ModuleModify import zako.zako.zako.ui.util.ModuleModify
import shirkneko.zako.sukisu.ui.theme.getCardColors import zako.zako.zako.ui.theme.getCardColors
import shirkneko.zako.sukisu.ui.theme.getCardElevation import zako.zako.zako.ui.theme.getCardElevation
import shirkneko.zako.sukisu.ui.viewmodel.ModuleViewModel import zako.zako.zako.ui.viewmodel.ModuleViewModel
import java.io.BufferedReader import java.io.BufferedReader
import java.io.InputStreamReader import java.io.InputStreamReader
import java.util.zip.ZipInputStream import java.util.zip.ZipInputStream
import androidx.core.content.edit import androidx.core.content.edit
import androidx.core.net.toUri import androidx.core.net.toUri
import shirkneko.zako.sukisu.ui.theme.ThemeConfig import zako.zako.zako.ui.theme.ThemeConfig
import zako.zako.zako.R
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import android.content.Context import android.content.Context
@@ -37,21 +37,21 @@ import com.topjohnwu.superuser.Shell
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.R import zako.zako.zako.ui.component.SwitchItem
import shirkneko.zako.sukisu.ui.component.SwitchItem import zako.zako.zako.ui.theme.CardConfig
import shirkneko.zako.sukisu.ui.theme.CardConfig import zako.zako.zako.ui.theme.ThemeColors
import shirkneko.zako.sukisu.ui.theme.ThemeColors import zako.zako.zako.ui.theme.ThemeConfig
import shirkneko.zako.sukisu.ui.theme.ThemeConfig import zako.zako.zako.ui.theme.saveCustomBackground
import shirkneko.zako.sukisu.ui.theme.saveCustomBackground import zako.zako.zako.ui.theme.saveThemeColors
import shirkneko.zako.sukisu.ui.theme.saveThemeColors import zako.zako.zako.ui.theme.saveThemeMode
import shirkneko.zako.sukisu.ui.theme.saveThemeMode import zako.zako.zako.ui.theme.saveDynamicColorState
import shirkneko.zako.sukisu.ui.theme.saveDynamicColorState import zako.zako.zako.ui.util.getSuSFS
import shirkneko.zako.sukisu.ui.util.getSuSFS import zako.zako.zako.ui.util.getSuSFSFeatures
import shirkneko.zako.sukisu.ui.util.getSuSFSFeatures import zako.zako.zako.ui.util.susfsSUS_SU_0
import shirkneko.zako.sukisu.ui.util.susfsSUS_SU_0 import zako.zako.zako.ui.util.susfsSUS_SU_2
import shirkneko.zako.sukisu.ui.util.susfsSUS_SU_2 import zako.zako.zako.ui.util.susfsSUS_SU_Mode
import shirkneko.zako.sukisu.ui.util.susfsSUS_SU_Mode
import androidx.core.content.edit import androidx.core.content.edit
import zako.zako.zako.R
fun saveCardConfig(context: Context) { fun saveCardConfig(context: Context) {

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
@@ -64,22 +64,22 @@ import com.ramcosta.composedestinations.navigation.EmptyDestinationsNavigator
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import shirkneko.zako.sukisu.BuildConfig import zako.zako.zako.BuildConfig
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.component.AboutDialog import zako.zako.zako.ui.component.AboutDialog
import shirkneko.zako.sukisu.ui.component.ConfirmResult import zako.zako.zako.ui.component.ConfirmResult
import shirkneko.zako.sukisu.ui.component.DialogHandle import zako.zako.zako.ui.component.DialogHandle
import shirkneko.zako.sukisu.ui.component.SwitchItem import zako.zako.zako.ui.component.SwitchItem
import shirkneko.zako.sukisu.ui.component.rememberConfirmDialog import zako.zako.zako.ui.component.rememberConfirmDialog
import shirkneko.zako.sukisu.ui.component.rememberCustomDialog import zako.zako.zako.ui.component.rememberCustomDialog
import shirkneko.zako.sukisu.ui.component.rememberLoadingDialog import zako.zako.zako.ui.component.rememberLoadingDialog
import shirkneko.zako.sukisu.ui.theme.CardConfig import zako.zako.zako.ui.theme.CardConfig
import shirkneko.zako.sukisu.ui.theme.ThemeConfig import zako.zako.zako.ui.theme.ThemeConfig
import shirkneko.zako.sukisu.ui.theme.getCardColors import zako.zako.zako.ui.theme.getCardColors
import shirkneko.zako.sukisu.ui.theme.getCardElevation import zako.zako.zako.ui.theme.getCardElevation
import shirkneko.zako.sukisu.ui.util.LocalSnackbarHost import zako.zako.zako.ui.util.LocalSnackbarHost
import shirkneko.zako.sukisu.ui.util.getBugreportFile import zako.zako.zako.ui.util.getBugreportFile
import java.time.LocalDateTime import java.time.LocalDateTime
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.gestures.detectTapGestures
@@ -24,6 +24,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.lifecycle.viewmodel.compose.viewModel import androidx.lifecycle.viewmodel.compose.viewModel
import zako.zako.zako.R
import coil.compose.AsyncImage import coil.compose.AsyncImage
import coil.request.ImageRequest import coil.request.ImageRequest
import com.ramcosta.composedestinations.annotation.Destination import com.ramcosta.composedestinations.annotation.Destination
@@ -31,11 +32,10 @@ import com.ramcosta.composedestinations.annotation.RootGraph
import com.ramcosta.composedestinations.generated.destinations.AppProfileScreenDestination import com.ramcosta.composedestinations.generated.destinations.AppProfileScreenDestination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.ui.component.SearchAppBar
import shirkneko.zako.sukisu.ui.component.SearchAppBar import zako.zako.zako.ui.util.ModuleModify
import shirkneko.zako.sukisu.ui.util.ModuleModify import zako.zako.zako.ui.viewmodel.SuperUserViewModel
import shirkneko.zako.sukisu.ui.viewmodel.SuperUserViewModel
@OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterialApi::class, ExperimentalMaterial3Api::class)
@Destination<RootGraph> @Destination<RootGraph>

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.widget.Toast import android.widget.Toast
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
@@ -59,9 +59,9 @@ import com.ramcosta.composedestinations.result.ResultRecipient
import com.ramcosta.composedestinations.result.getOr import com.ramcosta.composedestinations.result.getOr
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.theme.ThemeConfig import zako.zako.zako.ui.theme.ThemeConfig
import shirkneko.zako.sukisu.ui.viewmodel.TemplateViewModel import zako.zako.zako.ui.viewmodel.TemplateViewModel
/** /**
* @author weishu * @author weishu

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.widget.Toast import android.widget.Toast
import androidx.activity.compose.BackHandler import androidx.activity.compose.BackHandler
@@ -47,14 +47,14 @@ import androidx.compose.ui.text.input.KeyboardType
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.result.ResultBackNavigator import com.ramcosta.composedestinations.result.ResultBackNavigator
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import shirkneko.zako.sukisu.ui.component.profile.RootProfileConfig import zako.zako.zako.ui.component.profile.RootProfileConfig
import shirkneko.zako.sukisu.ui.util.deleteAppProfileTemplate import zako.zako.zako.ui.util.deleteAppProfileTemplate
import shirkneko.zako.sukisu.ui.util.getAppProfileTemplate import zako.zako.zako.ui.util.getAppProfileTemplate
import shirkneko.zako.sukisu.ui.util.setAppProfileTemplate import zako.zako.zako.ui.util.setAppProfileTemplate
import shirkneko.zako.sukisu.ui.viewmodel.TemplateViewModel import zako.zako.zako.ui.viewmodel.TemplateViewModel
import shirkneko.zako.sukisu.ui.viewmodel.toJSON import zako.zako.zako.ui.viewmodel.toJSON
import androidx.lifecycle.compose.dropUnlessResumed import androidx.lifecycle.compose.dropUnlessResumed
/** /**

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.screen package zako.zako.zako.ui.screen
import android.app.Activity.RESULT_OK import android.app.Activity.RESULT_OK
import android.content.Context import android.content.Context
@@ -25,27 +25,27 @@ import com.ramcosta.composedestinations.annotation.RootGraph
import com.ramcosta.composedestinations.navigation.DestinationsNavigator import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.R import zako.zako.zako.ui.component.ConfirmResult
import shirkneko.zako.sukisu.ui.component.ConfirmResult import zako.zako.zako.ui.component.SearchAppBar
import shirkneko.zako.sukisu.ui.component.SearchAppBar import zako.zako.zako.ui.component.rememberConfirmDialog
import shirkneko.zako.sukisu.ui.component.rememberConfirmDialog import zako.zako.zako.ui.theme.getCardColors
import shirkneko.zako.sukisu.ui.theme.getCardColors import zako.zako.zako.ui.theme.getCardElevation
import shirkneko.zako.sukisu.ui.theme.getCardElevation import zako.zako.zako.ui.viewmodel.KpmViewModel
import shirkneko.zako.sukisu.ui.viewmodel.KpmViewModel import zako.zako.zako.ui.util.loadKpmModule
import shirkneko.zako.sukisu.ui.util.loadKpmModule import zako.zako.zako.ui.util.unloadKpmModule
import shirkneko.zako.sukisu.ui.util.unloadKpmModule
import java.io.File import java.io.File
import androidx.core.content.edit import androidx.core.content.edit
import shirkneko.zako.sukisu.ui.theme.ThemeConfig import zako.zako.zako.ui.theme.ThemeConfig
import shirkneko.zako.sukisu.ui.component.rememberCustomDialog import zako.zako.zako.ui.component.rememberCustomDialog
import shirkneko.zako.sukisu.ui.component.ConfirmDialogHandle import zako.zako.zako.ui.component.ConfirmDialogHandle
import zako.zako.zako.R
import java.net.URLDecoder import java.net.URLDecoder
import java.net.URLEncoder import java.net.URLEncoder
/** /**
* KPM 管理界面 * KPM 管理界面
* 以下内核模块功能由KernelPatch开发经过修改后加入SukiSU Ultra的内核模块功能 * 以下内核模块功能由KernelPatch开发经过修改后加入SukiSU Ultra的内核模块功能
* 开发者Shirkneko, Liaokong * 开发者zako, Liaokong
*/ */
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Destination<RootGraph> @Destination<RootGraph>

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.theme package zako.zako.zako.ui.theme
import android.content.Context import android.content.Context
import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.theme package zako.zako.zako.ui.theme
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.theme package zako.zako.zako.ui.theme
import android.content.ContentResolver import android.content.ContentResolver
import android.content.Context import android.content.Context

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.theme package zako.zako.zako.ui.theme
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontFamily

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import androidx.compose.material3.SnackbarHostState import androidx.compose.material3.SnackbarHostState
import androidx.compose.runtime.compositionLocalOf import androidx.compose.runtime.compositionLocalOf

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.DownloadManager import android.app.DownloadManager
@@ -12,7 +12,7 @@ import android.util.Log
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.DisposableEffect
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import shirkneko.zako.sukisu.ui.util.module.LatestVersionInfo import zako.zako.zako.ui.util.module.LatestVersionInfo
/** /**
* @author weishu * @author weishu
@@ -64,7 +64,7 @@ fun download(
fun checkNewVersion(): LatestVersionInfo { fun checkNewVersion(): LatestVersionInfo {
// 改为新的 release 接口 // 改为新的 release 接口
val url = "https://api.github.com/repos/ShirkNeko/SukiSU-Ultra/releases/latest" val url = "https://api.github.com/repos/zako/SukiSU-Ultra/releases/latest"
val defaultValue = LatestVersionInfo() val defaultValue = LatestVersionInfo()
return runCatching { return runCatching {
okhttp3.OkHttpClient().newCall(okhttp3.Request.Builder().url(url).build()).execute() okhttp3.OkHttpClient().newCall(okhttp3.Request.Builder().url(url).build()).execute()

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util; package zako.zako.zako.ui.util;
/* /*
* Copyright (C) 2009 The Android Open Source Project * Copyright (C) 2009 The Android Open Source Project
* *

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.material3.MaterialTheme import androidx.compose.material3.MaterialTheme

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import android.content.ContentResolver import android.content.ContentResolver
import android.content.Context import android.content.Context
@@ -16,9 +16,9 @@ import com.topjohnwu.superuser.ShellUtils
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import shirkneko.zako.sukisu.BuildConfig import zako.zako.zako.BuildConfig
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.ksuApp import zako.zako.zako.ksuApp
import org.json.JSONArray import org.json.JSONArray
import java.io.File import java.io.File
@@ -30,7 +30,7 @@ import java.io.File
private const val TAG = "KsuCli" private const val TAG = "KsuCli"
private fun getKsuDaemonPath(): String { private fun getKsuDaemonPath(): String {
return ksuApp.applicationInfo.nativeLibraryDir + File.separator + "libzakomk.so" return ksuApp.applicationInfo.nativeLibraryDir + File.separator + "libzakozako.so"
} }
object KsuCli { object KsuCli {
@@ -437,7 +437,7 @@ fun restartApp(packageName: String) {
} }
private fun getSuSFSDaemonPath(): String { private fun getSuSFSDaemonPath(): String {
return ksuApp.applicationInfo.nativeLibraryDir + File.separator + "libzakomksd.so" return ksuApp.applicationInfo.nativeLibraryDir + File.separator + "libzakozakozako.so"
} }
fun getSuSFS(): String { fun getSuSFS(): String {

View File

@@ -1,11 +1,11 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import android.content.Context import android.content.Context
import android.os.Build import android.os.Build
import android.system.Os import android.system.Os
import com.topjohnwu.superuser.ShellUtils import com.topjohnwu.superuser.ShellUtils
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.ui.screen.getManagerVersion import zako.zako.zako.ui.screen.getManagerVersion
import java.io.File import java.io.File
import java.io.FileWriter import java.io.FileWriter
import java.io.PrintWriter import java.io.PrintWriter

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import android.app.AlertDialog import android.app.AlertDialog
import android.content.Context import android.content.Context
@@ -16,7 +16,7 @@ import kotlinx.coroutines.CompletableDeferred
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import shirkneko.zako.sukisu.R import zako.zako.zako.R
import java.io.BufferedReader import java.io.BufferedReader
import java.io.IOException import java.io.IOException
import java.io.InputStreamReader import java.io.InputStreamReader

View File

@@ -1,9 +1,9 @@
package shirkneko.zako.sukisu.ui.util package zako.zako.zako.ui.util
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import com.topjohnwu.superuser.Shell import com.topjohnwu.superuser.Shell
import shirkneko.zako.sukisu.R import zako.zako.zako.R
@Composable @Composable
fun getSELinuxStatus(): String { fun getSELinuxStatus(): String {

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.util.module package zako.zako.zako.ui.util.module
data class LatestVersionInfo( data class LatestVersionInfo(
val versionCode : Int = 0, val versionCode : Int = 0,

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.viewmodel package zako.zako.zako.ui.viewmodel
import android.util.Log import android.util.Log
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
@@ -9,7 +9,7 @@ import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import shirkneko.zako.sukisu.ui.util.* import zako.zako.zako.ui.util.*
class KpmViewModel : ViewModel() { class KpmViewModel : ViewModel() {
var moduleList by mutableStateOf(emptyList<ModuleInfo>()) var moduleList by mutableStateOf(emptyList<ModuleInfo>())

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.viewmodel package zako.zako.zako.ui.viewmodel
import android.os.SystemClock import android.os.SystemClock
import android.util.Log import android.util.Log
@@ -10,8 +10,8 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.ui.util.HanziToPinyin import zako.zako.zako.ui.util.HanziToPinyin
import shirkneko.zako.sukisu.ui.util.listModules import zako.zako.zako.ui.util.listModules
import org.json.JSONArray import org.json.JSONArray
import org.json.JSONObject import org.json.JSONObject
import java.text.Collator import java.text.Collator

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.viewmodel package zako.zako.zako.ui.viewmodel
import android.content.ComponentName import android.content.ComponentName
import android.content.Intent import android.content.Intent
@@ -18,12 +18,12 @@ import com.topjohnwu.superuser.Shell
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import shirkneko.zako.sukisu.IKsuInterface import zako.zako.zako.IKsuInterface
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.ksuApp import zako.zako.zako.ksuApp
import shirkneko.zako.sukisu.ui.KsuService import zako.zako.zako.ui.KsuService
import shirkneko.zako.sukisu.ui.util.HanziToPinyin import zako.zako.zako.ui.util.HanziToPinyin
import shirkneko.zako.sukisu.ui.util.KsuCli import zako.zako.zako.ui.util.KsuCli
import java.text.Collator import java.text.Collator
import java.util.* import java.util.*
import kotlin.coroutines.resume import kotlin.coroutines.resume

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.viewmodel package zako.zako.zako.ui.viewmodel
import android.os.Parcelable import android.os.Parcelable
import android.util.Log import android.util.Log
@@ -10,12 +10,12 @@ import androidx.lifecycle.ViewModel
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import kotlinx.parcelize.Parcelize import kotlinx.parcelize.Parcelize
import shirkneko.zako.sukisu.Natives import zako.zako.zako.Natives
import shirkneko.zako.sukisu.profile.Capabilities import zako.zako.zako.profile.Capabilities
import shirkneko.zako.sukisu.profile.Groups import zako.zako.zako.profile.Groups
import shirkneko.zako.sukisu.ui.util.getAppProfileTemplate import zako.zako.zako.ui.util.getAppProfileTemplate
import shirkneko.zako.sukisu.ui.util.listAppProfileTemplates import zako.zako.zako.ui.util.listAppProfileTemplates
import shirkneko.zako.sukisu.ui.util.setAppProfileTemplate import zako.zako.zako.ui.util.setAppProfileTemplate
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.Request import okhttp3.Request
import org.json.JSONArray import org.json.JSONArray

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package shirkneko.zako.sukisu.ui.webui; package zako.zako.zako.ui.webui;
import java.net.URLConnection; import java.net.URLConnection;

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.webui; package zako.zako.zako.ui.webui;
import android.content.Context; import android.content.Context;
import android.util.Log; import android.util.Log;

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.webui package zako.zako.zako.ui.webui
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.ActivityManager import android.app.ActivityManager
@@ -16,7 +16,7 @@ import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updateLayoutParams import androidx.core.view.updateLayoutParams
import androidx.webkit.WebViewAssetLoader import androidx.webkit.WebViewAssetLoader
import com.topjohnwu.superuser.Shell import com.topjohnwu.superuser.Shell
import shirkneko.zako.sukisu.ui.util.createRootShell import zako.zako.zako.ui.util.createRootShell
import java.io.File import java.io.File
@SuppressLint("SetJavaScriptEnabled") @SuppressLint("SetJavaScriptEnabled")

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.ui.webui package zako.zako.zako.ui.webui
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
@@ -14,14 +14,13 @@ import androidx.core.view.WindowInsetsControllerCompat
import com.topjohnwu.superuser.CallbackList import com.topjohnwu.superuser.CallbackList
import com.topjohnwu.superuser.ShellUtils import com.topjohnwu.superuser.ShellUtils
import com.topjohnwu.superuser.internal.UiThreadHandler import com.topjohnwu.superuser.internal.UiThreadHandler
import shirkneko.zako.sukisu.ui.util.createRootShell import zako.zako.zako.ui.util.createRootShell
import shirkneko.zako.sukisu.ui.util.listModules import zako.zako.zako.ui.util.listModules
import shirkneko.zako.sukisu.ui.util.withNewRootShell import zako.zako.zako.ui.util.withNewRootShell
import org.json.JSONArray import org.json.JSONArray
import org.json.JSONObject import org.json.JSONObject
import shirkneko.zako.sukisu.ui.util.KsuCli import zako.zako.zako.ui.util.controlKpmModule
import shirkneko.zako.sukisu.ui.util.controlKpmModule import zako.zako.zako.ui.util.listKpmModules
import shirkneko.zako.sukisu.ui.util.listKpmModules
import java.io.File import java.io.File
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture

View File

@@ -1,4 +1,4 @@
package shirkneko.zako.sukisu.utils package zako.zako.zako.utils
import android.content.Context import android.content.Context
import java.io.File import java.io.File

View File

@@ -1,3 +1,3 @@
libzakomk.so libzakozako.so
libzakomksd.so libzakozakozako.so
libkpmmgr.so libkpmmgr.so

View File

@@ -784,7 +784,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "zakomk" name = "zakozako"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"android-properties", "android-properties",

View File

@@ -1,5 +1,5 @@
[package] [package]
name = "zakomk" name = "zakozako"
version = "0.1.0" version = "0.1.0"
edition = "2024" edition = "2024"

View File

@@ -1,6 +1,6 @@
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := zakomksd LOCAL_MODULE := zakozakozako
LOCAL_SRC_FILES := zakomksd.c LOCAL_SRC_FILES := susfs.c
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)