Android 5.0 is actually supported

This commit is contained in:
topjohnwu 2021-08-11 17:14:22 -07:00
parent a260e99090
commit 1ec33863bc
2 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ permitted_capabilities = Argument('permitted_capabilities', jlong)
effective_capabilities = Argument('effective_capabilities', jlong)
# Method definitions
fork_m = Method('m', [uid, gid, gids, runtime_flags, rlimits, mount_external,
fork_l = Method('l', [uid, gid, gids, runtime_flags, rlimits, mount_external,
se_info, nice_name, fds_to_close, instruction_set, app_data_dir])
fork_o = Method('o', [uid, gid, gids, runtime_flags, rlimits, mount_external,
@ -183,7 +183,7 @@ def gen_definitions(methods, base_name):
return decl
def gen_fork():
methods = [fork_m, fork_o, fork_p, fork_q_alt, fork_r, fork_samsung_m, fork_samsung_n, fork_samsung_o, fork_samsung_p]
methods = [fork_l, fork_o, fork_p, fork_q_alt, fork_r, fork_samsung_m, fork_samsung_n, fork_samsung_o, fork_samsung_p]
return gen_definitions(methods, 'nativeForkAndSpecialize')
def gen_spec():

View File

@ -1,11 +1,11 @@
// Generated by gen_jni_hooks.py
static jint nativeForkAndSpecialize_m(JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jstring nice_name, jintArray fds_to_close, jstring instruction_set, jstring app_data_dir) {
static jint nativeForkAndSpecialize_l(JNIEnv *env, jclass clazz, jint uid, jint gid, jintArray gids, jint runtime_flags, jobjectArray rlimits, jint mount_external, jstring se_info, jstring nice_name, jintArray fds_to_close, jstring instruction_set, jstring app_data_dir) {
HookContext ctx{};
SpecializeAppProcessArgs args(uid, gid, gids, runtime_flags, mount_external, se_info, nice_name, instruction_set, app_data_dir);
ctx.raw_args = &args;
nativeForkAndSpecialize_pre(&ctx, env, clazz);
reinterpret_cast<decltype(&nativeForkAndSpecialize_m)>(nativeForkAndSpecialize_orig)(
reinterpret_cast<decltype(&nativeForkAndSpecialize_l)>(nativeForkAndSpecialize_orig)(
env, clazz, uid, gid, gids, runtime_flags, rlimits, mount_external, se_info, nice_name, fds_to_close, instruction_set, app_data_dir
);
nativeForkAndSpecialize_post(&ctx, env, clazz);
@ -114,7 +114,7 @@ const JNINativeMethod nativeForkAndSpecialize_methods[] = {
{
"nativeForkAndSpecialize",
"(II[II[[IILjava/lang/String;Ljava/lang/String;[ILjava/lang/String;Ljava/lang/String;)I",
(void *) &nativeForkAndSpecialize_m
(void *) &nativeForkAndSpecialize_l
},
{
"nativeForkAndSpecialize",