mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-03-12 21:23:02 -07:00
Add nativeSpecializeAppProcess signature for XR devices running 14
Build fingerprint: google/gms_sdk_xr64_x86_64/emulator64_x86_64:14/UP1A.231005.007.A1/13953962:userdebug/test-keys
This commit is contained in:
@@ -159,6 +159,9 @@ is_child_zygote = Argument("is_child_zygote", jboolean, True)
|
||||
# q_alt
|
||||
is_top_app = Argument("is_top_app", jboolean, True)
|
||||
|
||||
# q running on xr
|
||||
is_perception_app = Argument("is_perception_app", jboolean, False)
|
||||
|
||||
# r
|
||||
pkg_data_info_list = Argument("pkg_data_info_list", JArray(jstring), True)
|
||||
whitelisted_data_info_list = Argument(
|
||||
@@ -167,10 +170,10 @@ whitelisted_data_info_list = Argument(
|
||||
mount_data_dirs = Argument("mount_data_dirs", jboolean, True)
|
||||
mount_storage_dirs = Argument("mount_storage_dirs", jboolean, True)
|
||||
|
||||
# u
|
||||
# u qpr2
|
||||
mount_sysprop_overrides = Argument("mount_sysprop_overrides", jboolean, True)
|
||||
|
||||
# b
|
||||
# b qpr2
|
||||
use_fifo_ui = Argument("use_fifo_ui", jboolean, False)
|
||||
|
||||
# server
|
||||
@@ -487,6 +490,29 @@ spec_u = SpecializeApp(
|
||||
],
|
||||
)
|
||||
|
||||
spec_xr_u = SpecializeApp(
|
||||
"xr_u",
|
||||
[
|
||||
uid,
|
||||
gid,
|
||||
gids,
|
||||
runtime_flags,
|
||||
rlimits,
|
||||
mount_external,
|
||||
se_info,
|
||||
nice_name,
|
||||
is_child_zygote,
|
||||
instruction_set,
|
||||
app_data_dir,
|
||||
is_top_app,
|
||||
is_perception_app,
|
||||
pkg_data_info_list,
|
||||
whitelisted_data_info_list,
|
||||
mount_data_dirs,
|
||||
mount_storage_dirs,
|
||||
],
|
||||
)
|
||||
|
||||
spec_samsung_q = SpecializeApp(
|
||||
"samsung_q",
|
||||
[
|
||||
@@ -582,7 +608,7 @@ with open("jni_hooks.hpp", "w") as f:
|
||||
f.write(
|
||||
gen_jni_def(
|
||||
"specialize_app_methods",
|
||||
[spec_q, spec_q_alt, spec_r, spec_u, spec_samsung_q],
|
||||
[spec_q, spec_q_alt, spec_r, spec_u, spec_xr_u, spec_samsung_q],
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ std::array<JNINativeMethod, 11> fork_app_methods = {{
|
||||
},
|
||||
}};
|
||||
|
||||
std::array<JNINativeMethod, 5> specialize_app_methods = {{
|
||||
std::array<JNINativeMethod, 6> specialize_app_methods = {{
|
||||
// nativeSpecializeAppProcess_q
|
||||
{
|
||||
"nativeSpecializeAppProcess",
|
||||
@@ -279,6 +279,26 @@ std::array<JNINativeMethod, 5> specialize_app_methods = {{
|
||||
ctx.nativeSpecializeAppProcess_post();
|
||||
}
|
||||
},
|
||||
// nativeSpecializeAppProcess_xr_u
|
||||
{
|
||||
"nativeSpecializeAppProcess",
|
||||
"(II[II[[IILjava/lang/String;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;ZZ[Ljava/lang/String;[Ljava/lang/String;ZZ)V",
|
||||
(void *) +[] [[clang::no_stack_protector]] (JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jstring nice_name, jboolean is_child_zygote, jstring instruction_set, jstring app_data_dir, jboolean is_top_app, jboolean is_perception_app, jobjectArray pkg_data_info_list, jobjectArray whitelisted_data_info_list, jboolean mount_data_dirs, jboolean mount_storage_dirs) static -> void {
|
||||
AppSpecializeArgs_v5 args(uid, gid, gids, runtime_flags, rlimits, mount_external, se_info, nice_name, instruction_set, app_data_dir);
|
||||
args.is_child_zygote = &is_child_zygote;
|
||||
args.is_top_app = &is_top_app;
|
||||
args.pkg_data_info_list = &pkg_data_info_list;
|
||||
args.whitelisted_data_info_list = &whitelisted_data_info_list;
|
||||
args.mount_data_dirs = &mount_data_dirs;
|
||||
args.mount_storage_dirs = &mount_storage_dirs;
|
||||
ZygiskContext ctx(env, &args);
|
||||
ctx.nativeSpecializeAppProcess_pre();
|
||||
reinterpret_cast<void(*)(JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jstring nice_name, jboolean is_child_zygote, jstring instruction_set, jstring app_data_dir, jboolean is_top_app, jboolean is_perception_app, jobjectArray pkg_data_info_list, jobjectArray whitelisted_data_info_list, jboolean mount_data_dirs, jboolean mount_storage_dirs)>(get_defs()->specialize_app_methods[4].fnPtr)(
|
||||
env, clazz, uid, gid, gids, runtime_flags, rlimits, mount_external, se_info, nice_name, is_child_zygote, instruction_set, app_data_dir, is_top_app, is_perception_app, pkg_data_info_list, whitelisted_data_info_list, mount_data_dirs, mount_storage_dirs
|
||||
);
|
||||
ctx.nativeSpecializeAppProcess_post();
|
||||
}
|
||||
},
|
||||
// nativeSpecializeAppProcess_samsung_q
|
||||
{
|
||||
"nativeSpecializeAppProcess",
|
||||
@@ -288,7 +308,7 @@ std::array<JNINativeMethod, 5> specialize_app_methods = {{
|
||||
args.is_child_zygote = &is_child_zygote;
|
||||
ZygiskContext ctx(env, &args);
|
||||
ctx.nativeSpecializeAppProcess_pre();
|
||||
reinterpret_cast<void(*)(JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jint _9, jint _10, jstring nice_name, jboolean is_child_zygote, jstring instruction_set, jstring app_data_dir)>(get_defs()->specialize_app_methods[4].fnPtr)(
|
||||
reinterpret_cast<void(*)(JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jint _9, jint _10, jstring nice_name, jboolean is_child_zygote, jstring instruction_set, jstring app_data_dir)>(get_defs()->specialize_app_methods[5].fnPtr)(
|
||||
env, clazz, uid, gid, gids, runtime_flags, rlimits, mount_external, se_info, _9, _10, nice_name, is_child_zygote, instruction_set, app_data_dir
|
||||
);
|
||||
ctx.nativeSpecializeAppProcess_post();
|
||||
|
||||
Reference in New Issue
Block a user