mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b62347c73e | ||
|
|
ad08952999 | ||
|
|
91ab9a804d | ||
|
|
edfd827386 | ||
|
|
0404c0f362 | ||
|
|
f795cbd777 | ||
|
|
24e0904f5e | ||
|
|
57c5d7eaa3 | ||
|
|
eb5e7060cc | ||
|
|
28a434084c | ||
|
|
7f55babab1 | ||
|
|
ab94104366 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
name: No Template
|
||||
description: Create a standard issue, no template involved.
|
||||
labels: [palera1n]
|
||||
labels: [palera1n help]
|
||||
body:
|
||||
- type: textarea
|
||||
id: description
|
||||
|
||||
@@ -3,6 +3,3 @@ contact_links:
|
||||
- name: Mention us on X (formerly known as Twitter)
|
||||
url: https://twitter.com/palera1n
|
||||
about: Mention us about your issue if you're not comfortable with using Github issues.
|
||||
- name: Support Server
|
||||
url: https://dsc.gg/palera1n
|
||||
about: If you wanna ask support via Discord, thats an available option as well. Though, we recommend you do one of the previous options if possible.
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Feature Request
|
||||
description: Request a feature in palera1n!
|
||||
labels: [enhancement, palera1n]
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature-request
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
name: Create Issue
|
||||
description: Ask help for palera1n regarding support or generally how it works!
|
||||
labels: [palera1n]
|
||||
assignees:
|
||||
- khcrysalis
|
||||
- elliessurviving
|
||||
- hg13bs
|
||||
- afastaudir8
|
||||
labels: [palera1n help]
|
||||
body:
|
||||
- type: input
|
||||
id: device
|
||||
|
||||
+17
-17
@@ -26,7 +26,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies (packages)
|
||||
run: |
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
gnu_triple: aarch64-apple-darwin
|
||||
os: iphoneos
|
||||
minos: 7.0
|
||||
runs-on: macos-12
|
||||
runs-on: macos-15
|
||||
env:
|
||||
MBEDTLS_VERSION: 3.5.2
|
||||
READLINE_VERSION: 8.2
|
||||
@@ -84,14 +84,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies (packages)
|
||||
run: |
|
||||
sudo /usr/local/bin/pip3 install jsonschema jinja2
|
||||
brew install make autoconf automake pkg-config gnu-sed gettext
|
||||
brew install make autoconf automake pkg-config gnu-sed gettext libtool
|
||||
sudo rm -rf /usr/local/Frameworks/Python*
|
||||
curl -LO https://github.com/ProcursusTeam/ldid/releases/download/v2.1.5-procursus7/ldid_macosx_x86_64
|
||||
sudo install -m755 ldid_macosx_x86_64 /usr/local/bin/ldid
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
|
||||
- name: Select correct Xcode
|
||||
run: |
|
||||
sudo xcode-select -s /Applications/Xcode_14.2.app
|
||||
sudo xcode-select -s /Applications/Xcode_16.2.app
|
||||
|
||||
- name: Setup environment
|
||||
run: |
|
||||
@@ -114,9 +114,9 @@ jobs:
|
||||
echo "CC=$(xcrun --find cc)" >> $GITHUB_ENV
|
||||
echo "CXX=$(xcrun --find c++)" >> $GITHUB_ENV
|
||||
echo "CPP=$(xcrun --find cc) -E" >> $GITHUB_ENV
|
||||
echo "CFLAGS=-g -Os -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Os -g -flto=full -Wl,-object_path_lto,lto.o -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "CPPFLAGS=-g -Os -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Wno-error-implicit-function-declaration -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS=-stdlib=libc++ -g -Os -isysroot ${{ env.SDK }} -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isystem $(pwd)/sysroot/usr/local/include -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "CFLAGS=-g -Os -isystem ${{ env.SDK }}/usr/include/c++/v1 -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Os -g -flto=full -Wl,-object_path_lto,lto.o -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "CPPFLAGS=-g -Os -isystem ${{ env.SDK }}/usr/include/c++/v1 -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isysroot ${{ env.SDK }} -isystem $(pwd)/sysroot/usr/local/include -Wno-error-implicit-function-declaration -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS=-stdlib=libc++ -g -Os -isystem$(TARGET_SYSROOT)/usr/include/c++/v1 -isysroot ${{ env.SDK }} -arch ${{ matrix.arch }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -isystem $(pwd)/sysroot/usr/local/include -Os -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" >> $GITHUB_ENV
|
||||
echo "LDFLAGS=-g -Wl,-dead_strip -arch ${{ matrix.arch }} -isysroot ${{ env.SDK }} -m${{ matrix.os }}-version-min=${{ matrix.minos }} -L$(pwd)/sysroot/usr/local/lib" >> $GITHUB_ENV
|
||||
echo "CFLAGS_FOR_BUILD=-arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Os" >> $GITHUB_ENV
|
||||
echo "CXXFLAGS_FOR_BUILD=-stdlib=libc++ -arch $(uname -m) -isysroot $(xcrun -sdk macosx --show-sdk-path) -Os" >> $GITHUB_ENV
|
||||
@@ -349,7 +349,7 @@ jobs:
|
||||
|
||||
- name: Upload ${{ matrix.os }} thin ${{ matrix.arch }} build
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
path: palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
@@ -357,7 +357,7 @@ jobs:
|
||||
|
||||
- name: Upload ${{ matrix.os }} thin ${{ matrix.arch }} build (Development)
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: palera1n-${{ matrix.os }}-${{ matrix.arch }}.development
|
||||
path: palera1n-${{ matrix.os }}-${{ matrix.arch }}.development
|
||||
@@ -366,7 +366,7 @@ jobs:
|
||||
|
||||
- name: Upload ${{ matrix.os }} thin ${{ matrix.arch }} debug symbols
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: palera1n-${{ matrix.os }}-${{ matrix.arch }}.dSYM
|
||||
path: palera1n-${{ matrix.os }}-${{ matrix.arch }}.dSYM
|
||||
@@ -383,7 +383,7 @@ jobs:
|
||||
needs: build-darwin
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -395,7 +395,7 @@ jobs:
|
||||
mirror: 'https://apt.procurs.us/'
|
||||
|
||||
- name: Download all Darwin artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Prepare artifact
|
||||
run: |
|
||||
@@ -497,7 +497,7 @@ jobs:
|
||||
run: echo "$(git describe --dirty --tags --abbrev=7 | sed 's|-dirty||')" > build-tag.txt
|
||||
|
||||
- name: Upload build tag
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-tag
|
||||
path: build-tag.txt
|
||||
@@ -542,7 +542,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -883,14 +883,14 @@ jobs:
|
||||
needs: [build-docs, build-darwin, darwin-dist, build-Linux]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get branch name
|
||||
id: branch-name
|
||||
uses: tj-actions/branch-names@v7
|
||||
|
||||
- name: Download build tag
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-tag
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ DEP = $(SRC)/dep_root
|
||||
STRIP = strip
|
||||
CC ?= cc
|
||||
CFLAGS += -isystem $(DEP)/include -I$(SRC)/include -I$(SRC) -D_XOPEN_SOURCE=500
|
||||
CFLAGS += -Wall -Wextra -Wno-unused-parameter -DPALERAIN_VERSION=\"2.0.2\" -DHAVE_LIBIMOBILEDEVICE
|
||||
CFLAGS += -Wall -Wextra -Wno-unused-parameter -DPALERAIN_VERSION=\"2.1\" -DHAVE_LIBIMOBILEDEVICE
|
||||
CFLAGS += -Wno-unused-variable -I$(SRC)/src -std=c99 -pedantic-errors -D_C99_SOURCE -D_POSIX_C_SOURCE=200112L
|
||||
LIBS += $(DEP)/lib/libimobiledevice-1.0.a $(DEP)/lib/libirecovery-1.0.a $(DEP)/lib/libusbmuxd-2.0.a
|
||||
LIBS += $(DEP)/lib/libimobiledevice-glue-1.0.a $(DEP)/lib/libplist-2.0.a -pthread -lm
|
||||
|
||||
+18
-11
@@ -2,11 +2,11 @@
|
||||
.\" Copyright (c) 2024 Nick Chan
|
||||
.\" SPDX-License-Identifier: MIT
|
||||
.\"
|
||||
.Dd "24 July 2024"
|
||||
.Dd "23 December 2024"
|
||||
.Dt palera1n 1
|
||||
.Sh NAME
|
||||
.Nm palera1n
|
||||
.Nd arm64 iOS/iPadOS/tvOS 15.0-18.1, bridgeOS 5.0-9.1 jailbreaking tool
|
||||
.Nd arm64 iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.3 jailbreaking tool
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl cCdDEfhIlLnpRsSTvV
|
||||
@@ -20,19 +20,21 @@
|
||||
.Op Fl -force-revert
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
jailbreaks an arm64 (arm64e excluded) iOS/iPadOS/tvOS 15.0-18.0, bridgeOS 5.0-9.0 device,
|
||||
jailbreaks an arm64 (arm64e excluded) iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.2 device,
|
||||
utilizing the
|
||||
.Em checkm8
|
||||
bootROM exploit.
|
||||
.Pp
|
||||
.Nm
|
||||
provides rootful and rootless jailbreak modes.
|
||||
On iOS/iPadOS,
|
||||
On iOS/iPadOS 15.0 and later and on tvOS 18.3 or later,
|
||||
.Nm
|
||||
is able to jailbreak the device in fakefs-rootful mode, where /
|
||||
is writable, as well as rootless mode, where / cannot be written to.
|
||||
On tvOS and bridgeOS,
|
||||
only rootful is supported, and it uses the actual filesystem instead of a fakefs.
|
||||
only rootful is supported. On versions where fakefs-rootful is not
|
||||
applicable, palera1n modifies the actual root filesystem instead
|
||||
of making a fakefs
|
||||
.Pp
|
||||
Due to the nature of the
|
||||
.Em checkm8
|
||||
@@ -101,9 +103,7 @@ list of supported devicecs:
|
||||
.It Apple T2 MacBookPro15,3
|
||||
.It Apple T2 MacBookAir8,1
|
||||
.It Apple T2 MacBookPro15,4
|
||||
.It iBridge2,11 (Unknown Mac)
|
||||
.It Apple T2 MacBookAir8,2
|
||||
.It iBridge2,13 (Unknown Mac)
|
||||
.It Apple T2 MacBookPro16,1
|
||||
.It Apple T2 MacBookAir9,1
|
||||
.It Apple T2 MacBookPro16,2
|
||||
@@ -139,12 +139,14 @@ Like
|
||||
but the size of the created fakefs is smaller at the expense of having unwritable
|
||||
parts in rarely-written paths. When jailbreaking 16 GB devices, this option must be used
|
||||
when setting up fakefs for rootful, as they do not have enough storage for full fakefs.
|
||||
This flag is only supported on iOS/iPadOS.
|
||||
This flag is supported on iOS/iPadOS 15.0 or later and tvOS 18.3 or later, as they
|
||||
require fakefs for rootful.
|
||||
.It Fl c , -setup-fakefs
|
||||
When used with
|
||||
.Fl f , -fakefs ,
|
||||
creates the new APFS volume required for rootful. Will fail if one already exists.
|
||||
This flag is only supported on iOS/iPadOS.
|
||||
This flag is supported on iOS/iPadOS 15.0 or later and tvOS 18.3 or later, as they
|
||||
require fakefs for rootful.
|
||||
.It Fl C , -clean-fakefs
|
||||
This option is not currently supported and is a no-operation in this version of
|
||||
.Nm
|
||||
@@ -344,9 +346,14 @@ has been mounted.
|
||||
.El
|
||||
.Sh BUGS
|
||||
.Nm
|
||||
may crash if the machine it is running on:
|
||||
may crash if the machine it is running on has non-compliant USB devices plugged in.
|
||||
.Pp
|
||||
.Dl "- Has non-compliant USB devices plugged in"
|
||||
.Nm
|
||||
will fail to initialize on Linux when there are no USB devices plugged in.
|
||||
Usually this is not a problem on PCs since the built-in root hubs are also
|
||||
USB devices. However, on platforms such as Apple Silicon Macs in Linux, since
|
||||
there are no built-in USB hubs, at least one USB device needs to be manually
|
||||
plugged in for palera1n to be initialized.
|
||||
.Pp
|
||||
The exploit may also work less reliably on some hosts, like AMD desktops, or some MediaTek devices.
|
||||
.Pp
|
||||
|
||||
+1
-5
@@ -72,7 +72,7 @@ usb_ret_t USBBulkUpload(usb_device_handle_t handle, void *data, uint32_t len);
|
||||
#endif
|
||||
|
||||
#ifndef PALERAIN_VERSION
|
||||
#define PALERAIN_VERSION "2.0.2"
|
||||
#define PALERAIN_VERSION "2.1"
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
@@ -204,12 +204,9 @@ boyermoore_horspool_memmem(const unsigned char* haystack, size_t hlen,
|
||||
const unsigned char* needle, size_t nlen);
|
||||
|
||||
|
||||
extern void* pongo_usb_callback(stuff_t* arg);
|
||||
usb_ret_t USBControlTransfer(usb_device_handle_t handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint32_t wLength, void *data, uint32_t *wLenDone);
|
||||
const char *usb_strerror(usb_ret_t err);
|
||||
int wait_for_pongo(void);
|
||||
int upload_pongo_file(usb_device_handle_t, unsigned char*, unsigned int);
|
||||
int issue_pongo_command(usb_device_handle_t, char*);
|
||||
int tui(void);
|
||||
int optparse(int argc, char* argv[]);
|
||||
|
||||
@@ -221,7 +218,6 @@ bool set_found_pongo(bool val);
|
||||
uint64_t get_ecid_wait_for_dfu(void);
|
||||
uint64_t set_ecid_wait_for_dfu(uint64_t ecid);
|
||||
|
||||
void write_stdout(char *buf, uint32_t len);
|
||||
void io_start(stuff_t *stuff);
|
||||
void io_stop(stuff_t *stuff);
|
||||
|
||||
|
||||
@@ -102,12 +102,9 @@ void tui_draw_rectangle(int x1, int y1, int x2, int y2);
|
||||
#define TUI_VERSION "Unknown Version"
|
||||
#endif
|
||||
|
||||
extern int tui_state;
|
||||
extern int tui_x_offset;
|
||||
extern int tui_y_offset;
|
||||
|
||||
extern bool tui_can_start;
|
||||
|
||||
extern int tui_mouse_x;
|
||||
extern int tui_mouse_y;
|
||||
|
||||
@@ -167,8 +164,6 @@ struct tui_connected_device {
|
||||
|
||||
extern struct tui_connected_device *tui_connected_devices;
|
||||
|
||||
int tui_compare_versions(const char *firstVersion, const char *secondVersion);
|
||||
|
||||
void tui_jailbreak(void);
|
||||
extern bool tui_is_jailbreaking;
|
||||
extern int tui_jailbreak_stage;
|
||||
@@ -179,7 +174,6 @@ void tui_jailbreak_status_changed(void);
|
||||
extern bool tui_is_restarting;
|
||||
void tui_terminate(int sig);
|
||||
|
||||
extern bool tui_options_allow_untested;
|
||||
extern bool tui_options_safe_mode;
|
||||
extern bool tui_options_verbose_boot;
|
||||
extern bool tui_options_force_revert;
|
||||
|
||||
+27
-19
@@ -40,7 +40,7 @@
|
||||
|
||||
int dfuhelper_thr_running = false;
|
||||
|
||||
void step(int time, int time2, char *text, bool (*cond)(uint64_t), uint64_t cond_arg) {
|
||||
static void step(int time, int time2, char *text, bool (*cond)(uint64_t), uint64_t cond_arg) {
|
||||
for (int i = time2; i < time; i++) {
|
||||
printf(
|
||||
(palerain_flags & palerain_option_no_colors)
|
||||
@@ -59,7 +59,7 @@ void step(int time, int time2, char *text, bool (*cond)(uint64_t), uint64_t cond
|
||||
if (time2 == 0) puts("");
|
||||
}
|
||||
|
||||
int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
static int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
devinfo_t dev;
|
||||
int ret;
|
||||
ret = devinfo_cmd(&dev, usbmuxd_device->udid);
|
||||
@@ -73,7 +73,24 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
LOG(LOG_WARNING, "palera1n doesn't and never will work on A12+ (arm64e)");
|
||||
return -1;
|
||||
}
|
||||
if (!strncmp(dev.productType, "iPhone10,", strlen("iPhone10,"))) {
|
||||
|
||||
if ((palerain_flags & palerain_option_device_info)) {
|
||||
printf("Mode: normal\n");
|
||||
printf("ProductType: %s\n", dev.productType);
|
||||
printf("Architecture: %s\n", dev.CPUArchitecture);
|
||||
printf("Version: %s\n", dev.productVersion);
|
||||
printf("DisplayName: %s\n", dev.displayName);
|
||||
|
||||
device_has_booted = true;
|
||||
set_spin(0);
|
||||
unsubscribe_cmd();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* For Booting Linux etc */
|
||||
if (!getenv("PALERA1N_BYPASS_PASSCODE_CHECK") &&
|
||||
!strncmp(dev.productType, "iPhone10,", strlen("iPhone10,")
|
||||
)) {
|
||||
if (!(palerain_flags & palerain_option_device_info))
|
||||
LOG(LOG_VERBOSE2, "Product %s requires passcode to be disabled", dev.productType);
|
||||
unsigned char passcode_state = 0;
|
||||
@@ -91,19 +108,10 @@ int connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (getenv("PALERA1N_BYPASS_PASSCODE_CHECK"))
|
||||
LOG(LOG_WARNING, "Bypassed passcode check");
|
||||
|
||||
if ((palerain_flags & palerain_option_device_info)) {
|
||||
printf("Mode: normal\n");
|
||||
printf("ProductType: %s\n", dev.productType);
|
||||
printf("Architecture: %s\n", dev.CPUArchitecture);
|
||||
printf("Version: %s\n", dev.productVersion);
|
||||
printf("DisplayName: %s\n", dev.displayName);
|
||||
|
||||
device_has_booted = true;
|
||||
set_spin(0);
|
||||
unsubscribe_cmd();
|
||||
return 0;
|
||||
}
|
||||
if (verbose > 1) {
|
||||
/* (LOG_VERBOSE - 3) or below*/
|
||||
LOG(LOG_INFO, "Telling device with udid %s to enter recovery mode immediately", usbmuxd_device->udid);
|
||||
@@ -125,7 +133,7 @@ static bool conditional(uint64_t ecid) {
|
||||
return get_ecid_wait_for_dfu() != ecid;
|
||||
}
|
||||
|
||||
void* connected_recovery_mode(struct irecv_device_info* info) {
|
||||
static void* connected_recovery_mode(struct irecv_device_info* info) {
|
||||
int ret;
|
||||
uint64_t ecid;
|
||||
uint32_t cpid, bdid;
|
||||
@@ -215,7 +223,7 @@ void* connected_recovery_mode(struct irecv_device_info* info) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* connected_dfu_mode(struct irecv_device_info* info) {
|
||||
static void* connected_dfu_mode(struct irecv_device_info* info) {
|
||||
if (get_ecid_wait_for_dfu() == info->ecid) {
|
||||
set_ecid_wait_for_dfu(0);
|
||||
puts("");
|
||||
@@ -232,7 +240,7 @@ void* connected_dfu_mode(struct irecv_device_info* info) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void device_event_cb(const usbmuxd_event_t *event, void* userdata) {
|
||||
static void device_event_cb(const usbmuxd_event_t *event, void* userdata) {
|
||||
if (event->device.conn_type != CONNECTION_TYPE_USB) return;
|
||||
switch (event->event) {
|
||||
case UE_DEVICE_ADD:
|
||||
@@ -257,7 +265,7 @@ void device_event_cb(const usbmuxd_event_t *event, void* userdata) {
|
||||
}
|
||||
}
|
||||
|
||||
void irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
|
||||
static void irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
|
||||
pthread_t recovery_thread, dfu_thread;
|
||||
int ret;
|
||||
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ void thr_cleanup(void* ptr) {
|
||||
*(int*)ptr = 0;
|
||||
}
|
||||
|
||||
int build_checks(void) {
|
||||
static int build_checks(void) {
|
||||
#ifndef NO_CHECKRAIN
|
||||
#if defined(__APPLE__)
|
||||
struct mach_header_64* c1_header = (struct mach_header_64*)&checkra1n[0];
|
||||
@@ -96,7 +96,7 @@ int saved_argc;
|
||||
char** saved_argv;
|
||||
char** saved_envp;
|
||||
|
||||
int palera1n(int argc, char *argv[], char *envp[]) {
|
||||
static int palera1n(int argc, char *argv[], char *envp[]) {
|
||||
saved_argc = argc;
|
||||
saved_argv = argv;
|
||||
saved_envp = envp;
|
||||
|
||||
+1
-9
@@ -19,7 +19,6 @@
|
||||
#endif
|
||||
|
||||
uint64_t* palerain_flags_p = &palerain_flags;
|
||||
static bool force_use_verbose_boot = false;
|
||||
char* gOverrideLibcheckra1nHelper = NULL;
|
||||
|
||||
static struct option longopts[] = {
|
||||
@@ -78,7 +77,7 @@ static int usage(int e, char* prog_name)
|
||||
#endif
|
||||
"] [-e boot arguments] [-k Pongo image] [-o overlay file] [-r ramdisk file] [-K KPF file] [-i checkra1n file]\n"
|
||||
"Copyright (C) 2024, palera1n team, All Rights Reserved.\n\n"
|
||||
"iOS/iPadOS/tvOS 15.0-18.1, bridgeOS 5.0-9.1 arm64 jailbreaking tool\n\n"
|
||||
"iOS/iPadOS/tvOS 15.0-18.3, bridgeOS 5.0-9.3 arm64 jailbreaking tool\n\n"
|
||||
"\t--version\t\t\t\tPrint version\n"
|
||||
"\t--force-revert\t\t\t\tRemove jailbreak\n"
|
||||
#ifdef DEV_BUILD
|
||||
@@ -148,11 +147,9 @@ int optparse(int argc, char* argv[]) {
|
||||
case 'B':
|
||||
palerain_flags |= palerain_option_setup_partial_root;
|
||||
palerain_flags |= palerain_option_setup_rootful;
|
||||
palerain_flags |= palerain_option_verbose_boot;
|
||||
break;
|
||||
case 'c':
|
||||
palerain_flags |= palerain_option_setup_rootful;
|
||||
palerain_flags |= palerain_option_verbose_boot;
|
||||
break;
|
||||
case 'C':
|
||||
palerain_flags |= palerain_option_clean_fakefs;
|
||||
@@ -175,7 +172,6 @@ int optparse(int argc, char* argv[]) {
|
||||
break;
|
||||
case 'V':
|
||||
palerain_flags |= palerain_option_verbose_boot;
|
||||
force_use_verbose_boot = true;
|
||||
#ifdef TUI
|
||||
tui_options_verbose_boot = true;
|
||||
#endif
|
||||
@@ -364,10 +360,6 @@ int optparse(int argc, char* argv[]) {
|
||||
LOG(LOG_WARNING, "telnetd is enabled, this is a security hole");
|
||||
}
|
||||
|
||||
if ((strstr(xargs_cmd, "serial=") != NULL) && !force_use_verbose_boot && (palerain_flags & palerain_option_setup_rootful)) {
|
||||
palerain_flags &= ~palerain_option_verbose_boot;
|
||||
}
|
||||
|
||||
if ((palerain_flags & (palerain_option_tui)) && (palerain_flags & (palerain_option_cli))) {
|
||||
LOG(LOG_FATAL, "cannot specify both --tui and --cli");
|
||||
return -1;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
int override_file(override_file_t *finfo, niarelap_file_t** orig, unsigned int *orig_len, char *filename) {
|
||||
int ret = 0;
|
||||
int fd = open(filename, O_RDONLY);
|
||||
|
||||
+8
-4
@@ -21,6 +21,10 @@ int pongo_thr_running = 0;
|
||||
|
||||
#define ERR(...) LOG(LOG_VERBOSE, __VA_ARGS__)
|
||||
|
||||
static int issue_pongo_command(usb_device_handle_t, char*);
|
||||
static int upload_pongo_file(usb_device_handle_t, unsigned char*, unsigned int);
|
||||
static void write_stdout(char *buf, uint32_t len);
|
||||
|
||||
void* pongo_helper(void* ptr) {
|
||||
pongo_thr_running = 1;
|
||||
pthread_cleanup_push(thr_cleanup, &pongo_thr_running);
|
||||
@@ -32,7 +36,7 @@ void* pongo_helper(void* ptr) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void *pongo_usb_callback(stuff_t *arg) {
|
||||
static void *pongo_usb_callback(stuff_t *arg) {
|
||||
if (get_found_pongo())
|
||||
return NULL;
|
||||
set_found_pongo(1);
|
||||
@@ -145,7 +149,7 @@ done:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int issue_pongo_command(usb_device_handle_t handle, char *command)
|
||||
static int issue_pongo_command(usb_device_handle_t handle, char *command)
|
||||
{
|
||||
uint32_t outpos = 0;
|
||||
uint32_t outlen = 0;
|
||||
@@ -207,7 +211,7 @@ bad:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int upload_pongo_file(usb_device_handle_t handle, unsigned char *buf, unsigned int buf_len)
|
||||
static int upload_pongo_file(usb_device_handle_t handle, unsigned char *buf, unsigned int buf_len)
|
||||
{
|
||||
int ret = 0;
|
||||
ret = USBControlTransfer(handle, 0x21, 1, 0, 0, 4, &buf_len, NULL);
|
||||
@@ -263,7 +267,7 @@ void io_stop(stuff_t *stuff)
|
||||
#endif
|
||||
}
|
||||
|
||||
void write_stdout(char *buf, uint32_t len)
|
||||
static void write_stdout(char *buf, uint32_t len)
|
||||
{
|
||||
while(len > 0) {
|
||||
if (verbose >= 3) {
|
||||
|
||||
+9
-9
@@ -3,7 +3,7 @@
|
||||
#include <palerain.h>
|
||||
#include <tui.h>
|
||||
|
||||
irecv_device_t tui_get_recovery_device(uint64_t ecid) {
|
||||
static irecv_device_t tui_get_recovery_device(uint64_t ecid) {
|
||||
irecv_client_t client = NULL;
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
irecv_error_t err = irecv_open_with_ecid(&client, ecid);
|
||||
@@ -28,7 +28,7 @@ irecv_device_t tui_get_recovery_device(uint64_t ecid) {
|
||||
|
||||
struct tui_connected_device *tui_connected_devices = NULL;
|
||||
|
||||
void* tui_connected_recovery_mode(struct irecv_device_info* info) {
|
||||
static void* tui_connected_recovery_mode(struct irecv_device_info* info) {
|
||||
//printf("Recovery mode device %" PRIu64 " connected\n", info->ecid);
|
||||
tui_last_event = TUI_EVENT_CONNECTED_DEVICES_CHANGED;
|
||||
sem_post(tui_event_semaphore);
|
||||
@@ -36,7 +36,7 @@ void* tui_connected_recovery_mode(struct irecv_device_info* info) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* tui_disconnected_recovery_mode(struct irecv_device_info* info) {
|
||||
static void* tui_disconnected_recovery_mode(struct irecv_device_info* info) {
|
||||
//printf("Recovery mode device %" PRIu64 " disconnected\n", info->ecid);
|
||||
tui_last_event = TUI_EVENT_CONNECTED_DEVICES_CHANGED;
|
||||
sem_post(tui_event_semaphore);
|
||||
@@ -44,7 +44,7 @@ void* tui_disconnected_recovery_mode(struct irecv_device_info* info) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* tui_connected_dfu_mode(struct irecv_device_info* info) {
|
||||
static void* tui_connected_dfu_mode(struct irecv_device_info* info) {
|
||||
//printf("DFU mode device %" PRIu64 " connected\n", info->ecid);
|
||||
tui_last_event = TUI_EVENT_CONNECTED_DEVICES_CHANGED;
|
||||
sem_post(tui_event_semaphore);
|
||||
@@ -52,7 +52,7 @@ void* tui_connected_dfu_mode(struct irecv_device_info* info) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* tui_disconnected_dfu_mode(struct irecv_device_info* info) {
|
||||
static void* tui_disconnected_dfu_mode(struct irecv_device_info* info) {
|
||||
//printf("DFU mode device %" PRIu64 " disconnected\n", info->ecid);
|
||||
tui_last_event = TUI_EVENT_CONNECTED_DEVICES_CHANGED;
|
||||
sem_post(tui_event_semaphore);
|
||||
@@ -60,7 +60,7 @@ void* tui_disconnected_dfu_mode(struct irecv_device_info* info) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int tui_connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
static int tui_connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
struct tui_connected_device *tui_dev = malloc(sizeof(struct tui_connected_device));
|
||||
strcpy(tui_dev->udid, usbmuxd_device->udid);
|
||||
tui_dev->next = tui_connected_devices;
|
||||
@@ -105,7 +105,7 @@ int tui_connected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void tui_disconnected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
static void tui_disconnected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
struct tui_connected_device *cur = tui_connected_devices;
|
||||
struct tui_connected_device *prev = NULL;
|
||||
while (cur) {
|
||||
@@ -126,7 +126,7 @@ void tui_disconnected_normal_mode(const usbmuxd_device_info_t *usbmuxd_device) {
|
||||
sem_post(tui_event_semaphore);
|
||||
}
|
||||
|
||||
void tui_device_event_cb(const usbmuxd_event_t *event, void* userdata) {
|
||||
static void tui_device_event_cb(const usbmuxd_event_t *event, void* userdata) {
|
||||
if (event->device.conn_type != CONNECTION_TYPE_USB) return;
|
||||
switch (event->event) {
|
||||
case UE_DEVICE_ADD:
|
||||
@@ -140,7 +140,7 @@ void tui_device_event_cb(const usbmuxd_event_t *event, void* userdata) {
|
||||
}
|
||||
}
|
||||
|
||||
void tui_irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
|
||||
static void tui_irecv_device_event_cb(const irecv_device_event_t *event, void* userdata) {
|
||||
pthread_t recovery_thread, dfu_thread;
|
||||
int ret;
|
||||
|
||||
|
||||
+6
-5
@@ -28,13 +28,14 @@ int proc_pidpath(int pid, void * buffer, uint32_t buffersize);
|
||||
char random_sem_name[sizeof("palera1n.tui_event_semaphore") + 16 + 1];
|
||||
#endif
|
||||
|
||||
int tui_state = 0;
|
||||
static int tui_state = 0;
|
||||
|
||||
int tui_x_offset = 0;
|
||||
int tui_y_offset = 0;
|
||||
|
||||
bool supports_bright_colors = true;
|
||||
|
||||
struct termios saved_termios;
|
||||
static struct termios saved_termios;
|
||||
|
||||
int redraw_screen(void) {
|
||||
SETCOLOR(FG_BRIGHT_WHITE, BG_BLACK);
|
||||
@@ -83,7 +84,7 @@ int redraw_screen(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int destroy_window(void) {
|
||||
static int destroy_window(void) {
|
||||
if (!tui_started) return 0;
|
||||
tui_started = false;
|
||||
tcsetattr(STDIN_FILENO, 0, &saved_termios);
|
||||
@@ -97,7 +98,7 @@ int destroy_window(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int init_window(void) {
|
||||
static int init_window(void) {
|
||||
setlocale(LC_ALL, NULL);
|
||||
|
||||
tui_started = true;
|
||||
@@ -151,7 +152,7 @@ void tui_terminate(int sig) {
|
||||
}
|
||||
}
|
||||
|
||||
void resize_handler(int sig) {
|
||||
static void resize_handler(int sig) {
|
||||
redraw_screen();
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -28,9 +28,9 @@
|
||||
#include <palerain.h>
|
||||
#include <tui.h>
|
||||
|
||||
int tui_enter_dfu_nav_selection = 1;
|
||||
bool tui_device_is_entering_dfu = false;
|
||||
int tui_enter_dfu_status = 0;
|
||||
static int tui_enter_dfu_nav_selection = 1;
|
||||
static bool tui_device_is_entering_dfu = false;
|
||||
static int tui_enter_dfu_status = 0;
|
||||
|
||||
enum {
|
||||
DEVICE_TYPE_IPHONE_SE,
|
||||
@@ -41,7 +41,7 @@ enum {
|
||||
DEVICE_TYPE_IPOD_TOUCH
|
||||
} device_type;
|
||||
|
||||
int tui_product_type_to_device_type(char *product_type) {
|
||||
static int tui_product_type_to_device_type(char *product_type) {
|
||||
if (strcmp(product_type, "iPhone8,1") == 0 || strcmp(product_type, "iPhone8,2") == 0) {
|
||||
return DEVICE_TYPE_IPHONE_6S;
|
||||
}
|
||||
@@ -68,11 +68,11 @@ int tui_product_type_to_device_type(char *product_type) {
|
||||
return DEVICE_TYPE_IPHONE_SE;
|
||||
}
|
||||
|
||||
int tui_enter_dfu_device_type = DEVICE_TYPE_IPHONE_SE;
|
||||
static int tui_enter_dfu_device_type = DEVICE_TYPE_IPHONE_SE;
|
||||
|
||||
int tui_enter_dfu_loading_progress = 1;
|
||||
static int tui_enter_dfu_loading_progress = 1;
|
||||
|
||||
void tui_screen_enter_dfu_nav(void) {
|
||||
static void tui_screen_enter_dfu_nav(void) {
|
||||
MOVETOT(80 - 22, 23);
|
||||
printf("%s[ Cancel ]" COLOR(FG_WHITE, BG_BLACK) " %s[ %s ]" COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_device_is_entering_dfu || tui_enter_dfu_status == 1 ? (supports_bright_colors ? COLOR(FG_BRIGHT_BLACK, BG_BLACK) : COLOR(FG_BLUE, BG_BLACK)) : tui_enter_dfu_nav_selection == 0 ? "\033[30;107m" : (
|
||||
@@ -343,9 +343,9 @@ void tui_screen_enter_dfu_redraw(void) {
|
||||
}
|
||||
|
||||
// TODO: IMPLEMENT REAL ENTER RECOVERY
|
||||
int dfu_time = 0;
|
||||
static int dfu_time = 0;
|
||||
|
||||
tui_screen_t tui_enter_dfu(void) {
|
||||
static tui_screen_t tui_enter_dfu(void) {
|
||||
if (tui_connected_devices && !tui_connected_devices->next) {
|
||||
if (tui_connected_devices->mode == TUI_DEVICE_MODE_NORMAL) {
|
||||
tui_enter_dfu_status = 0;
|
||||
@@ -391,7 +391,7 @@ tui_screen_t tui_enter_dfu(void) {
|
||||
return JAILBREAK_SCREEN;
|
||||
}
|
||||
|
||||
int tui_enter_dfu_nav_mouse_select = -1;
|
||||
static int tui_enter_dfu_nav_mouse_select = -1;
|
||||
|
||||
tui_screen_t tui_screen_enter_dfu(void) {
|
||||
if (tui_connected_devices && !tui_connected_devices->next) {
|
||||
|
||||
@@ -18,7 +18,7 @@ int tui_enter_recovery_nav_selection = 1;
|
||||
bool tui_device_is_entering_recovery = false;
|
||||
bool tui_enter_recovery_mode_failed = false;
|
||||
|
||||
void tui_screen_enter_recovery_nav(void) {
|
||||
static void tui_screen_enter_recovery_nav(void) {
|
||||
MOVETOT(80 - 22, 23);
|
||||
printf("%s[ Back ]" COLOR(FG_WHITE, BG_BLACK) " %s[ Next ]" COLOR(FG_WHITE, BG_BLACK),
|
||||
tui_device_is_entering_recovery ? (supports_bright_colors ? COLOR(FG_BRIGHT_BLACK, BG_BLACK) : COLOR(FG_BLUE, BG_BLACK)) : tui_enter_recovery_nav_selection == 0 ? "\033[30;107m" : (
|
||||
@@ -34,7 +34,7 @@ void tui_screen_enter_recovery_nav(void) {
|
||||
);
|
||||
}
|
||||
|
||||
char enter_recovery_loading[9][8] = {
|
||||
static char enter_recovery_loading[9][8] = {
|
||||
"........",
|
||||
"|.......",
|
||||
".|......",
|
||||
@@ -46,7 +46,7 @@ char enter_recovery_loading[9][8] = {
|
||||
".......|"
|
||||
};
|
||||
|
||||
char enter_recovery_loading_troll[9][8] = {
|
||||
static char enter_recovery_loading_troll[9][8] = {
|
||||
".......",
|
||||
"t......",
|
||||
".r.....",
|
||||
@@ -57,10 +57,10 @@ char enter_recovery_loading_troll[9][8] = {
|
||||
"......d",
|
||||
};
|
||||
|
||||
bool is_troll;
|
||||
int tui_enter_recovery_loading_progress = 0;
|
||||
static bool is_troll;
|
||||
static int tui_enter_recovery_loading_progress = 0;
|
||||
|
||||
void tui_screen_enter_recovery_loading(void) {
|
||||
static void tui_screen_enter_recovery_loading(void) {
|
||||
SETCOLOR(FG_YELLOW, BG_BLACK);
|
||||
PRINTATT(3, 8, "Entering recovery mode ");
|
||||
printf("%.8s", is_troll ? enter_recovery_loading_troll[tui_enter_recovery_loading_progress] : enter_recovery_loading[tui_enter_recovery_loading_progress]);
|
||||
@@ -88,9 +88,9 @@ void tui_screen_enter_recovery_redraw(void) {
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
int recovery_time = 0;
|
||||
static int recovery_time = 0;
|
||||
|
||||
tui_screen_t tui_enter_recovery(void) {
|
||||
static tui_screen_t tui_enter_recovery(void) {
|
||||
enter_recovery_cmd(tui_connected_devices->udid);
|
||||
is_troll = false;
|
||||
if (rand() % 1000 == 0) {
|
||||
@@ -128,7 +128,7 @@ tui_screen_t tui_enter_recovery(void) {
|
||||
}
|
||||
}
|
||||
|
||||
int tui_enter_recovery_nav_mouse_select = -1;
|
||||
static int tui_enter_recovery_nav_mouse_select = -1;
|
||||
|
||||
tui_screen_t tui_screen_enter_recovery(void) {
|
||||
tui_device_is_entering_recovery = false;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
bool tui_is_jailbreaking = false;
|
||||
|
||||
void tui_screen_jailbreak_nav(void) {
|
||||
static void tui_screen_jailbreak_nav(void) {
|
||||
if (tui_is_jailbreaking) {
|
||||
if (supports_bright_colors) {
|
||||
SETCOLOR(FG_BRIGHT_BLACK, BG_BLACK);
|
||||
@@ -29,7 +29,8 @@ void tui_screen_jailbreak_nav(void) {
|
||||
SETCOLOR(FG_WHITE, BG_BLACK);
|
||||
}
|
||||
|
||||
pthread_t tui_jailbreak_thread_id;
|
||||
static pthread_t tui_jailbreak_thread_id;
|
||||
|
||||
int tui_jailbreak_stage = 0;
|
||||
char *tui_jailbreak_status = NULL;
|
||||
|
||||
@@ -38,7 +39,7 @@ void tui_jailbreak_status_changed(void) {
|
||||
sem_post(tui_event_semaphore);
|
||||
}
|
||||
|
||||
void *tui_jailbreak_thread(void *arg) {
|
||||
static void *tui_jailbreak_thread(void *arg) {
|
||||
tui_jailbreak_stage = 1;
|
||||
tui_jailbreak_status = "About to execute checkra1n";
|
||||
|
||||
@@ -121,7 +122,7 @@ void tui_screen_jailbreak_redraw(void) {
|
||||
tui_screen_jailbreak_nav();
|
||||
}
|
||||
|
||||
int tui_jailbreak_nav_mouse_select = -1;
|
||||
static int tui_jailbreak_nav_mouse_select = -1;
|
||||
|
||||
tui_screen_t tui_screen_jailbreak(void) {
|
||||
redraw_screen();
|
||||
|
||||
+12
-10
@@ -13,9 +13,11 @@
|
||||
#include <palerain.h>
|
||||
#include <tui.h>
|
||||
|
||||
bool showing_ecid = false;
|
||||
static int tui_compare_versions(const char *firstVersion, const char *secondVersion);
|
||||
|
||||
char palera1n_logo[17][16] = {
|
||||
static bool showing_ecid = false;
|
||||
|
||||
static char palera1n_logo[17][16] = {
|
||||
" ++ ",
|
||||
" #@@# ",
|
||||
" +@@@@+ ",
|
||||
@@ -34,7 +36,7 @@ char palera1n_logo[17][16] = {
|
||||
" :++: "
|
||||
};
|
||||
|
||||
char random_quotes[][150] = {
|
||||
static char random_quotes[][150] = {
|
||||
"panic(cpu 1 caller 0xfffffff0232bd958): SEP Panic",
|
||||
"Now with Apple TV support!",
|
||||
"checkra1n will open source in 2020",
|
||||
@@ -49,10 +51,10 @@ char random_quotes[][150] = {
|
||||
|
||||
#define PALERA1N_URL "https://palera.in"
|
||||
|
||||
int tui_main_nav_selection = 1;
|
||||
bool quick_mode_enabled = false;
|
||||
bool tui_can_start = false;
|
||||
int random_quote;
|
||||
static int tui_main_nav_selection = 1;
|
||||
static bool quick_mode_enabled = false;
|
||||
static bool tui_can_start = false;
|
||||
static int random_quote;
|
||||
|
||||
bool easter_egg = false;
|
||||
|
||||
@@ -206,7 +208,7 @@ void tui_screen_main_redraw(void) {
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
int tui_main_nav_mouse_select = -1;
|
||||
static int tui_main_nav_mouse_select = -1;
|
||||
|
||||
tui_screen_t tui_screen_main(void) {
|
||||
random_quote = ((unsigned int)((rand()+rand())/2)) % 8;
|
||||
@@ -329,7 +331,7 @@ tui_screen_t tui_screen_main(void) {
|
||||
return MAIN_SCREEN;
|
||||
}
|
||||
|
||||
int tui_version_extract_component(const char *version, int index) {
|
||||
static int tui_version_extract_component(const char *version, int index) {
|
||||
int component = 0;
|
||||
int componentIndex = 0;
|
||||
for (int i = 0; version[i] != '\0'; i++) {
|
||||
@@ -348,7 +350,7 @@ int tui_version_extract_component(const char *version, int index) {
|
||||
return component;
|
||||
}
|
||||
|
||||
int tui_compare_versions(const char *firstVersion, const char *secondVersion) {
|
||||
static int tui_compare_versions(const char *firstVersion, const char *secondVersion) {
|
||||
if (strcmp(firstVersion, secondVersion) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
#include <palerain.h>
|
||||
#include <tui.h>
|
||||
|
||||
int tui_options_nav_selection = 0;
|
||||
int tui_options_nav_mouse_select = 0;
|
||||
static int tui_options_nav_selection = 0;
|
||||
static int tui_options_nav_mouse_select = 0;
|
||||
|
||||
bool tui_options_allow_untested = false;
|
||||
static bool tui_options_allow_untested = false;
|
||||
bool tui_options_safe_mode = false;
|
||||
bool tui_options_verbose_boot = false;
|
||||
bool tui_options_force_revert = false;
|
||||
|
||||
Reference in new issue
Block a user