@@ -49,8 +49,9 @@ onRegisterZygote(const char *className, const JNINativeMethod *methods, int numM
49
49
jni::zygote::nativeForkAndSpecialize = new JNINativeMethod{method.name ,
50
50
method.signature ,
51
51
method.fnPtr };
52
-
53
- if (strcmp (nativeForkAndSpecialize_r_sig, method.signature ) == 0 )
52
+ if (strcmp (nativeForkAndSpecialize_u_sig, method.signature ) == 0 )
53
+ newMethods[i].fnPtr = (void *) nativeForkAndSpecialize_u;
54
+ else if (strcmp (nativeForkAndSpecialize_r_sig, method.signature ) == 0 )
54
55
newMethods[i].fnPtr = (void *) nativeForkAndSpecialize_r;
55
56
else if (strcmp (nativeForkAndSpecialize_p_sig, method.signature ) == 0 )
56
57
newMethods[i].fnPtr = (void *) nativeForkAndSpecialize_p;
@@ -87,8 +88,9 @@ onRegisterZygote(const char *className, const JNINativeMethod *methods, int numM
87
88
jni::zygote::nativeSpecializeAppProcess = new JNINativeMethod{method.name ,
88
89
method.signature ,
89
90
method.fnPtr };
90
-
91
- if (strcmp (nativeSpecializeAppProcess_r_sig, method.signature ) == 0 )
91
+ if (strcmp (nativeSpecializeAppProcess_u_sig, method.signature ) == 0 )
92
+ newMethods[i].fnPtr = (void *) nativeSpecializeAppProcess_u;
93
+ else if (strcmp (nativeSpecializeAppProcess_r_sig, method.signature ) == 0 )
92
94
newMethods[i].fnPtr = (void *) nativeSpecializeAppProcess_r;
93
95
else if (strcmp (nativeSpecializeAppProcess_q_sig, method.signature ) == 0 )
94
96
newMethods[i].fnPtr = (void *) nativeSpecializeAppProcess_q;
@@ -605,6 +607,32 @@ jint nativeForkAndSpecialize_r_dp2(
605
607
return res;
606
608
}
607
609
610
+ [[clang::no_stack_protector]]
611
+ jint nativeForkAndSpecialize_u (
612
+ JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags,
613
+ jobjectArray rlimits, jint mount_external, jstring se_info, jstring nice_name,
614
+ jintArray fdsToClose, jintArray fdsToIgnore, jboolean is_child_zygote,
615
+ jstring instructionSet, jstring appDataDir, jboolean isTopApp,
616
+ jobjectArray pkgDataInfoList, jobjectArray whitelistedDataInfoList,
617
+ jboolean bindMountAppDataDirs, jboolean bindMountAppStorageDirs,
618
+ jboolean mountSyspropOverrides) {
619
+
620
+ nativeForkAndSpecialize_pre (env, clazz, uid, gid, gids, runtime_flags, rlimits, mount_external,
621
+ se_info, se_name, fdsToClose, fdsToIgnore, is_child_zygote,
622
+ instructionSet, appDataDir, isTopApp, pkgDataInfoList,
623
+ whitelistedDataInfoList,
624
+ bindMountAppDataDirs, bindMountAppStorageDirs);
625
+
626
+ jint res = ((nativeForkAndSpecialize_u_t *) jni::zygote::nativeForkAndSpecialize->fnPtr )(
627
+ env, clazz, uid, gid, gids, runtime_flags, rlimits, mount_external, se_info, se_name,
628
+ fdsToClose, fdsToIgnore, is_child_zygote, instructionSet, appDataDir, isTopApp,
629
+ pkgDataInfoList, whitelistedDataInfoList, bindMountAppDataDirs,
630
+ bindMountAppStorageDirs, mountSyspropOverrides);
631
+
632
+ nativeForkAndSpecialize_post (env, clazz, uid, is_child_zygote, res);
633
+ return res;
634
+ }
635
+
608
636
[[clang::no_stack_protector]]
609
637
jint nativeForkAndSpecialize_samsung_p (
610
638
JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags,
@@ -834,6 +862,27 @@ void nativeSpecializeAppProcess_r_dp2(
834
862
nativeSpecializeAppProcess_post (env, clazz, uid, startChildZygote);
835
863
}
836
864
865
+ [[clang::no_stack_protector]]
866
+ void nativeSpecializeAppProcess_u (
867
+ JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtimeFlags,
868
+ jobjectArray rlimits, jint mountExternal, jstring seInfo, jstring niceName,
869
+ jboolean startChildZygote, jstring instructionSet, jstring appDataDir,
870
+ jboolean isTopApp, jobjectArray pkgDataInfoList,
871
+ jobjectArray whitelistedDataInfoList, jboolean bindMountAppDataDirs,
872
+ jboolean bindMountAppDataDirs, jboolean mountSyspropOverrides) {
873
+ nativeSpecializeAppProcess_pre (
874
+ env, clazz, uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName,
875
+ startChildZygote, instructionSet, appDataDir, isTopApp, pkgDataInfoList,
876
+ whitelistedDataInfoList, bindMountAppDataDirs, bindMountAppStorageDirs);
877
+
878
+ ((nativeSpecializeAppProcess_u_t *) jni::zygote::nativeSpecializeAppProcess->fnPtr )(
879
+ env, clazz, uid, gid, gids, runtimeFlags, rlimits, mountExternal, seInfo, niceName,
880
+ startChildZygote, instructionSet, appDataDir, isTopApp, pkgDataInfoList,
881
+ whitelistedDataInfoList, bindMountAppDataDirs, bindMountAppStorageDirs, mountSyspropOverrides);
882
+
883
+ nativeSpecializeAppProcess_post (env, clazz, uid, startChildZygote);
884
+ }
885
+
837
886
[[clang::no_stack_protector]]
838
887
void nativeSpecializeAppProcess_samsung_q (
839
888
JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtimeFlags,
0 commit comments