diff --git a/Makefile b/Makefile index 7190fcf..0c535e3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -NAME = The Beginning of the End +NAME = Tumbleweed SRC = $(shell pwd) DEP = $(SRC)/dep_root @@ -51,12 +51,18 @@ CFLAGS += -DBAKERAIN_DEVELOPE_R="\"$(BAKERAIN_DEVELOPE_R)\"" endif BUILD_DATE := $(shell LANG=C date) +BUILD_NUMBER := $(shell git rev-list --count HEAD) BUILD_TAG := $(shell git describe --dirty --tags --abbrev=7) BUILD_WHOAMI := $(shell whoami) +BUILD_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +BUILD_COMMIT := $(shell git rev-parse HEAD) -CFLAGS += -DBUILD_STYLE="\"$(BUILD_STYLE)\"" -DBUILD_DATE="\"$(BUILD_DATE)\"" -DBUILD_WHOAMI=\"$(BUILD_WHOAMI)\" -DBUILD_TAG=\"$(BUILD_TAG)\" +CFLAGS += -DBUILD_STYLE="\"$(BUILD_STYLE)\"" -DBUILD_DATE="\"$(BUILD_DATE)\"" +CFLAGS += -DBUILD_WHOAMI="\"$(BUILD_WHOAMI)\"" -DBUILD_TAG="\"$(BUILD_TAG)\"" +CFLAGS += -DBUILD_NUMBER="\"$(BUILD_NUMBER)\"" -DBUILD_BRANCH="\"$(BUILD_BRANCH)\"" +CFLAGS += -DBUILD_COMMIT="\"$(BUILD_COMMIT)\"" -export SRC DEP CC CFLAGS LDFLAGS LIBS TARGET_OS DEV_BUILD BUILD_DATE BUILD_TAG BUILD_WHOAMI BUILD_STYLE +export SRC DEP CC CFLAGS LDFLAGS LIBS TARGET_OS DEV_BUILD BUILD_DATE BUILD_TAG BUILD_WHOAMI BUILD_STYLE BUILD_NUMBER BUILD_BRANCH all: palera1n diff --git a/docs/palera1n.1 b/docs/palera1n.1 index d6a6d26..14d052d 100644 --- a/docs/palera1n.1 +++ b/docs/palera1n.1 @@ -9,7 +9,7 @@ .Nd iOS 15.0-16.3.1 arm64 iOS/iPadOS jailbreaking tool .Sh SYNOPSIS .Nm -.Op Fl cCdDEfhIlLnOpRsSvV +.Op Fl cCdDEfhIlLnpRsSvV .Op Fl e Ar Boot arguments .Op Fl k Ar Pongo image .Op Fl o Ar overlay file @@ -164,8 +164,6 @@ at the root of it, as well as a dmg named .Em loader.dmg at the root of it. Otherwise, the device will not boot. It is also expected that it contains a shell, a ssh server, and various command line utilities. -.It Fl O , -disable-ohio -Disable analytics, which would otherwise be sent to a server named "Ohio". .It Fl p , -pongo-shell Exit after booting into a clean PongoOS shell .It Fl P , -pongo-full diff --git a/include/kerninfo.h b/include/kerninfo.h index b688c3d..9a7d28d 100644 --- a/include/kerninfo.h +++ b/include/kerninfo.h @@ -75,7 +75,7 @@ #define host_option_res1 (1 << 2) /* reserved */ #endif #define host_option_demote (1 << 3) /* Demote effective production fuse status */ -#define host_option_no_ohio (1 << 4) /* Disable Ohio (Analytics) */ +// (1 << 4) is removed #define host_option_pongo_full (1 << 5) /* Boot to pongo with default images and options */ #define host_option_palerain_version (1 << 6) /* Print version */ #define host_option_exit_recovery (1 << 7) /* Exit recovery mode */ diff --git a/src/main.c b/src/main.c index 688e972..4e8da16 100644 --- a/src/main.c +++ b/src/main.c @@ -105,6 +105,7 @@ void log_cb(libusb_context *ctx, enum libusb_log_level level, const char *str) { #endif int palera1n(int argc, char *argv[]) { + print_credits(); int ret = 0; pthread_mutex_init(&log_mutex, NULL); pthread_mutex_init(&spin_mutex, NULL); @@ -113,7 +114,6 @@ int palera1n(int argc, char *argv[]) { if ((ret = build_checks())) return ret; if ((ret = optparse(argc, argv))) goto cleanup; if (!checkrain_option_enabled(host_flags, host_option_device_info)) - print_credits(); if (checkrain_option_enabled(host_flags, host_option_palerain_version)) goto normal_exit; #ifdef DEV_BUILD if (checkrain_option_enabled(host_flags, host_option_tui)) { @@ -166,27 +166,6 @@ int palera1n(int argc, char *argv[]) { sleep(1); } normal_exit: - if (access("/usr/bin/curl", F_OK) == 0 && !checkrain_option_enabled(host_flags, host_option_no_ohio)) { - LOG(LOG_VERBOSE4, "Ohio"); - char* ohio_argv[] = { - "/usr/bin/curl", - "-sX", - "POST", - "-d", - "{\"app_name\": \"palera1n_c-rewrite\"}", - "-H", - "Content-Type: application/json", - "-H", - "User-Agent: python-requests/99 palera1n-c-rewrite/0", - "-o", - "/dev/null", - "https://ohio.itsnebula.net/hit", - NULL - }; - pid_t pid; - posix_spawn(&pid, ohio_argv[0], NULL, NULL, ohio_argv, environ); - } - cleanup: if (override_kpf.magic == OVERRIDE_MAGIC) { munmap(override_kpf.ptr, (size_t)override_kpf.len); diff --git a/src/optparse.c b/src/optparse.c index b2734a7..b24f7d3 100644 --- a/src/optparse.c +++ b/src/optparse.c @@ -39,7 +39,6 @@ static struct option longopts[] = { {"override-overlay", required_argument, NULL, 'o'}, {"override-ramdisk", required_argument, NULL, 'r'}, {"override-kpf", required_argument, NULL, 'K'}, - {"disable-ohio", no_argument, NULL, 'O'}, {"override-checkra1n", required_argument, NULL, 'i'}, {"reboot-device", no_argument, NULL, 'R'}, {"exit-recovery", no_argument, NULL, 'n'}, @@ -86,7 +85,6 @@ static int usage(int e, char* prog_name) "\t-n, --exit-recovery\t\t\tExit recovery mode\n" "\t-I, --device-info\t\t\tPrint info about the connected device\n" "\t-o, --override-overlay \t\tOverride overlay\n" - "\t-O, --disable-ohio\t\t\tDisable Ohio\n" "\t-p, --pongo-shell\t\t\tBoots to PongoOS shell\n" "\t-P, --pongo-full\t\t\tBoots to a PongoOS shell with default images already uploaded\n" "\t-r, --override-ramdisk \t\tOverride ramdisk\n" @@ -112,9 +110,9 @@ int optparse(int argc, char* argv[]) { int index; while ((opt = getopt_long(argc, argv, #ifdef DEV_BUILD - "12BcDEhpvVldsSOLftRnPIe:o:r:K:k:i:", + "12BcDEhpvVldsSLftRnPIe:o:r:K:k:i:", #else - "BcDEhpvVldsSOLfRnPIe:o:r:K:k:i:", + "BcDEhpvVldsSLfRnPIe:o:r:K:k:i:", #endif longopts, NULL)) != -1) { @@ -254,9 +252,6 @@ int optparse(int argc, char* argv[]) { case 'n': host_flags |= host_option_exit_recovery; break; - case 'O': - host_flags |= host_option_no_ohio; - break; case 'I': host_flags |= host_option_device_info; break; @@ -286,7 +281,19 @@ int optparse(int argc, char* argv[]) { } } if (checkrain_option_enabled(host_flags, host_option_palerain_version)) { - printf("palera1n version " PALERAIN_VERSION ": " BUILD_DATE "; " BUILD_WHOAMI ":" BUILD_TAG "/" BUILD_STYLE "\n"); + printf( + "palera1n " PALERAIN_VERSION "\n" + BUILD_COMMIT " " BUILD_NUMBER " (" BUILD_BRANCH ")\n\n" + "Build date: " BUILD_DATE "\n" + "Build style: " BUILD_STYLE "\n" + "Build tag: " BUILD_TAG "\n" + "Built by: " BUILD_WHOAMI "\n" +#ifdef USE_LIBUSB + "USB backend: libusb\n" +#else + "USB backend: IOKit\n" +#endif + ); return 0; }