manager: add support for setting default non root profile.

This commit is contained in:
weishu
2023-06-03 23:54:08 +08:00
parent 32538c9833
commit b55c229038
7 changed files with 67 additions and 8 deletions

View File

@@ -87,6 +87,8 @@ Java_me_weishu_kernelsu_Natives_getAppProfile(JNIEnv *env, jobject, jstring pkg,
env->ReleaseStringUTFChars(pkg, cpkg);
app_profile profile = {};
profile.version = KSU_APP_PROFILE_VER;
strcpy(profile.key, key);
profile.current_uid = uid;
@@ -197,8 +199,9 @@ Java_me_weishu_kernelsu_Natives_setAppProfile(JNIEnv *env, jobject clazz, jobjec
auto umountModules = env->GetBooleanField(profile, umountModulesField);
app_profile p = {};
strcpy(p.key, p_key);
p.version = KSU_APP_PROFILE_VER;
strcpy(p.key, p_key);
p.allow_su = allowSu;
p.current_uid = currentUid;