diff --git a/docs/palera1n.1 b/docs/palera1n.1 index 5895661..a4264c5 100644 --- a/docs/palera1n.1 +++ b/docs/palera1n.1 @@ -11,7 +11,7 @@ .Nd iOS 15+ arm64 iOS/iPadOS jailbreaking tool .Sh SYNOPSIS .Nm -.Op Fl cCdDEfhlnLOpRsvV +.Op Fl BcdDEfhlnLOpRsvV .Op Fl e Ar Boot arguments .Op Fl k Ar Pongo image .Op Fl o Ar overlay file @@ -99,16 +99,15 @@ files. As a result, using the loader app to install the jailbreak environment is not supported when this option is used together with .Fl f , -fakefs \[char46] +.It Fl B , -setup-fakefs-partial +Like +.Fl c , -setup-fakefs +but the size of the created fakefs is smaller at the expense of having unwritable +parts in rarely-written paths. (good for 16 GB devices) .It Fl c , -setup-fakefs When used with .Fl f , -fakefs , Create the new APFS volume required for rootful. Will fail if one already exists. -.It Fl C , -setup-fakefs-forced -When used with -.Fl f , -fakefs , -behaves like -.Fl c , -setup-fakefs , -but existing fakefs, if exists, will be overwritten instead. .It Fl d , -demote Set the effective production fuse to 0, so as to enable hardware debugging features. .It Fl D , -dfuhelper-only diff --git a/include/kerninfo.h b/include/kerninfo.h index 1f6f0c9..4d3ba09 100644 --- a/include/kerninfo.h +++ b/include/kerninfo.h @@ -58,6 +58,7 @@ #define palerain_option_jbinit_log_to_file (1 << 1) /* log to /cores/jbinit.log */ #define palerain_option_setup_rootful (1 << 2) /* create fakefs */ #define palerain_option_setup_rootful_forced (1 << 3) /* create fakefs over an existing one */ +#define palerain_option_setup_partial_root (1 << 4) /* fakefs creating should be partial */ #ifdef DEV_BUILD #define palerain_option_test1 (1 << 29) diff --git a/src/optparse.c b/src/optparse.c index 65f8e4d..90eb760 100644 --- a/src/optparse.c +++ b/src/optparse.c @@ -16,8 +16,8 @@ checkrain_option_t host_flags = 0; checkrain_option_p host_flags_p = &host_flags; static struct option longopts[] = { + {"setup-partial-fakefs", no_argument, NULL, 'B'}, {"setup-fakefs", no_argument, NULL, 'c'}, - {"setup-fakefs-forced", no_argument, NULL, 'C'}, {"dfuhelper", no_argument, NULL, 'D'}, {"help", no_argument, NULL, 'h'}, {"pongo-shell", no_argument, NULL, 'p'}, @@ -66,8 +66,8 @@ static int usage(int e, char* prog_name) "\t-1, --test1\t\t\t\tSet palerain_option_test1\n" "\t-2, --test2\t\t\t\tSet palerain_option_test2\n" #endif + "\t-B, --setup-partial-fakefs\t\tSetup partial fakefs\n" "\t-c, --setup-fakefs\t\t\tSetup fakefs\n" - "\t-C, --setup-fakefs-forced\t\tSetup fakefs and overwrite any existing ones\n" "\t-d, --demote\t\t\t\tDemote\n" "\t-D, --dfuhelper-only\t\t\tExit after entering DFU\n" "\t-e, --boot-args \tXNU boot arguments\n" @@ -106,20 +106,20 @@ int optparse(int argc, char* argv[]) { int index; while ((opt = getopt_long(argc, argv, #ifdef DEV_BUILD - "12cCDEhpvVldsOLftRnPe:o:r:K:k:i:", + "12BcDEhpvVldsOLftRnPe:o:r:K:k:i:", #else - "cCDEhpvVldsOLfRnPe:o:r:K:k:i:", + "BcDEhpvVldsOLfRnPe:o:r:K:k:i:", #endif longopts, NULL)) != -1) { switch (opt) { - case 'c': + case 'B': + palerain_flags |= palerain_option_setup_partial_root; palerain_flags |= palerain_option_setup_rootful; kpf_flags |= checkrain_option_verbose_boot; break; - case 'C': - palerain_flags |= palerain_option_setup_rootful; - palerain_flags |= palerain_option_setup_rootful_forced; + case 'c': + palerain_flags |= palerain_option_setup_rootful; kpf_flags |= checkrain_option_verbose_boot; break; case 'p': @@ -249,10 +249,6 @@ int optparse(int argc, char* argv[]) { return 0; } - if (checkrain_option_enabled(checkrain_flags, checkrain_option_force_revert) && checkrain_option_enabled(palerain_flags, palerain_option_setup_rootful)) { - LOG(LOG_WARNING, "force revert and setup rootful requested at the same time, behaviour here is undefined"); - } - snprintf(checkrain_flags_cmd, 0x20, "checkra1n_flags 0x%x", checkrain_flags); snprintf(palerain_flags_cmd, 0x20, "palera1n_flags 0x%x", palerain_flags); snprintf(kpf_flags_cmd, 0x20, "kpf_flags 0x%x", kpf_flags);