diff --git a/README.md b/README.md index 5ff8ad0..d4f0f2d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ you can open an issue to request a feature :D !! also see my [recommended flags] - remove watch app - change the app icon - fakesign the output ipa/tipa/app +- merge a plist into the app's existing Info.plist - add custom entitlements to the main executable - thin all binaries to arm64, it can LARGELY reduce app size sometimes! - remove all app extensions (or just encrypted ones!) diff --git a/cgen/__main__.py b/cgen/__main__.py index fe07f51..96a80f0 100644 --- a/cgen/__main__.py +++ b/cgen/__main__.py @@ -42,6 +42,14 @@ def main() -> None: "-k", metavar="icon", help="modify the app's icon" ) + parser.add_argument( + "-l", metavar="plist", + help="a plist to merge with the app's Info.plist" + ) + parser.add_argument( + "-x", metavar="entitlements", + help="add or modify entitlements to the main binary" + ) parser.add_argument( "-u", "--remove-supported-devices", action="store_true", @@ -83,6 +91,10 @@ def generate_cyan(parser: argparse.ArgumentParser) -> None: parser.error(f"invalid minimum OS version: {args.m}") if args.k is not None and not os.path.isfile(args.k): parser.error(f"{args.k} does not exist") + if args.l is not None and not os.path.isfile(args.l): + parser.error(f"{args.l} does not exist") + if args.x is not None and not os.path.isfile(args.x): + parser.error(f"{args.x} does not exist") if args.f is not None: fake = [f for f in args.f if not os.path.exists(f)] @@ -107,7 +119,7 @@ def generate_cyan(parser: argparse.ArgumentParser) -> None: real_args = {k: v for k, v in dict(vars(args)).items() if v} del real_args["output"] - for key in "fk": # these need files + for key in "fkxl": # these need files if key in real_args: real_args[key] = True @@ -136,6 +148,12 @@ def generate_cyan(parser: argparse.ArgumentParser) -> None: if args.k is not None: zf.write(args.k, "icon.idk") + if args.l: + zf.write(args.l, "merge.plist") + + if args.x: + zf.write(args.x, "new.entitlements") + if __name__ == "__main__": main() diff --git a/cyan/tbhutils.py b/cyan/tbhutils.py index 9d62630..90524ba 100644 --- a/cyan/tbhutils.py +++ b/cyan/tbhutils.py @@ -253,6 +253,12 @@ def parse_cyan(args: dict[str, Any], tmpdir: str) -> None: if "k" in config: args["k"] = zf.extract("icon.idk", DOT_PATH) del config["k"] + if "l" in config: + args["l"] = zf.extract("merge.plist", DOT_PATH) + del config["l"] + if "x" in config: + args["x"] = zf.extract("new.entitlements", DOT_PATH) + del config["x"] for k, v in config.items(): args[k] = v diff --git a/nogamemode.cyan b/nogamemode.cyan new file mode 100644 index 0000000..67298f5 Binary files /dev/null and b/nogamemode.cyan differ