kernel: Modified dynamic signature All files have been renamed to the correct names: Dynamic Manager

This commit is contained in:
ShirkNeko
2025-08-24 11:00:17 +08:00
parent 35ae324df5
commit da164ebeed
24 changed files with 317 additions and 317 deletions

View File

@@ -29,7 +29,7 @@ object Natives {
const val MINIMAL_SUPPORTED_KPM = 12800
const val MINIMAL_SUPPORTED_DYNAMIC_SIGN = 13215
const val MINIMAL_SUPPORTED_DYNAMIC_MANAGER = 13215
const val ROOT_UID = 0
const val ROOT_GID = 0
@@ -107,28 +107,28 @@ object Natives {
external fun getSusfsFeatureStatus(): SusfsFeatureStatus?
/**
* Set dynamic signature configuration
* Set dynamic managerature configuration
* @param size APK signature size
* @param hash APK signature hash (64 character hex string)
* @return true if successful, false otherwise
*/
external fun setDynamicSign(size: Int, hash: String): Boolean
external fun setDynamicManager(size: Int, hash: String): Boolean
/**
* Get current dynamic signature configuration
* @return DynamicSignConfig object containing current configuration, or null if not set
* Get current dynamic managerature configuration
* @return DynamicManagerConfig object containing current configuration, or null if not set
*/
external fun getDynamicSign(): DynamicSignConfig?
external fun getDynamicManager(): DynamicManagerConfig?
/**
* Clear dynamic signature configuration
* Clear dynamic managerature configuration
* @return true if successful, false otherwise
*/
external fun clearDynamicSign(): Boolean
external fun clearDynamicManager(): Boolean
/**
* Get active managers list when dynamic sign is enabled
* Get active managers list when dynamic manager is enabled
* @return ManagersList object containing active managers, or null if failed or not enabled
*/
external fun getManagersList(): ManagersList?
@@ -185,7 +185,7 @@ object Natives {
@Immutable
@Parcelize
@Keep
data class DynamicSignConfig(
data class DynamicManagerConfig(
val size: Int = 0,
val hash: String = ""
) : Parcelable {

View File

@@ -747,7 +747,7 @@ private fun InfoCard(
append(
when (signatureIndex) {
0 -> "(${stringResource(R.string.default_signature)})"
1 -> "(${stringResource(R.string.dynamic_signature)})"
1 -> "(${stringResource(R.string.dynamic_managerature)})"
else -> if (signatureIndex >= 2) "(${
stringResource(
R.string.signature_index,

View File

@@ -431,18 +431,18 @@ class HomeViewModel : ViewModel() {
}
}
// 获取动态签名状态和管理器列表
// 获取动态管理器状态和管理器列表
val dynamicSignConfig = try {
Natives.getDynamicSign()
Natives.getDynamicManager()
} catch (e: Exception) {
Log.w(TAG, "Failed to get dynamic sign config", e)
Log.w(TAG, "Failed to get dynamic manager config", e)
null
}
val isDynamicSignEnabled = try {
dynamicSignConfig?.isValid() == true
} catch (e: Exception) {
Log.w(TAG, "Failed to check dynamic sign validity", e)
Log.w(TAG, "Failed to check dynamic manager validity", e)
false
}