首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >roothide Bootstrap:专为iOS 15-17打造的强大越狱引导程序

roothide Bootstrap:专为iOS 15-17打造的强大越狱引导程序

原创
作者头像
qife122
发布2026-01-14 06:23:16
发布2026-01-14 06:23:16
4070
举报

roothide Bootstrap

iOS 15-17

Chip Support

License

一个功能全面的iOS引导程序,支持iOS 15.0-17.0系统,兼容A8到A17Pro以及M1/M2芯片设备,基于roothide技术构建。

警告: 使用本软件意味着您将对自己使用该软件所产生的一切后果负全责。对设备进行的任何非官方修改都可能导致无法修复的损坏。

功能特性

  • 广泛的设备兼容性:全面支持iOS 15.0-17.0系统,覆盖从A8到A17Pro以及M1/M2芯片的设备
  • roothide技术集成:基于roothide技术构建,提供稳定的越狱环境
  • TrollStore安装:必须通过TrollStore安装,确保系统安全性
  • 完整的引导程序功能:包含基带文件、签名工具等核心组件
  • 开发者模式支持:支持在设备上启用开发者模式
  • 应用列表管理:可通过应用列表界面管理需要注入插件的应用程序
  • 动态签名重建:支持对二进制文件进行签名重建
  • 多语言本地化:支持界面文本的本地化显示

安装指南

系统要求

  • iOS 15.0-17.0系统
  • A8-A17Pro或M1/M2芯片设备
  • MacOS系统(用于编译构建)
  • Xcode(App Store版本,仅命令行工具不可用)
  • TrollStore 2.0.9或更高版本

构建步骤

  1. 安装Theos(带roothide支持)bash -c "$(curl -fsSL https://raw.githubusercontent.com/roothide/theos/master/bin/install-theos)"如果之前有Theos安装导致错误,请先完全移除旧版本。
  2. 克隆仓库并进入目录git clone https://github.com/roothide/Bootstrap/ && cd Bootstrap
  3. 构建Bootstrap.tipamake package
  4. 安装到设备
    • ./packages/目录获取Bootstrap.tipa文件
    • 通过TrollStore安装到iOS设备

GitHub Actions构建

如果没有MacOS系统,可以通过GitHub Actions进行构建(详细步骤参考项目FAQ)。

使用说明

基础使用

  1. 安装后首次运行:应用将通过TrollStore安装,确保使用版本2.0.9或更高以支持设备上的开发者模式启用。
  2. 插件兼容性:未编译或未转换为roothide格式的插件默认无法与roothide Bootstrap配合使用。请参考FAQ了解如何使用roothide Patcher工具。
  3. 应用注入管理:默认情况下,roothide不会向任何应用注入插件。如需为特定应用启用插件注入,请在Bootstrap应用中的"应用列表"界面进行设置。

命令行功能

Bootstrap应用支持多种命令行操作:

代码语言:objc
复制
// 引导操作
int bootstrap();
// 取消引导操作
int unbootstrap();
// 启用应用插件
int enableForApp(NSString* bundlePath);
// 禁用应用插件
int disableForApp(NSString* bundlePath);
// 重建图标缓存
int rebuildIconCache();
// 隐藏引导应用
int hideBootstrapApp(BOOL usreboot);
// 重启设备
void reboot(0);

应用列表管理

通过AppViewController类管理应用列表,支持搜索和过滤功能:

代码语言:objc
复制
// 获取共享实例
AppViewController *appVC = [AppViewController sharedInstance];

// 重新加载搜索
[appVC reloadSearch];

// 搜索栏文本变化处理
- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
    [self reloadSearch];
    [self.tableView reloadData];
}

核心代码

应用代理管理 (AppDelegate.m)

代码语言:objc
复制
#import "AppDelegate.h"
#include "common.h"
#include <MBProgressHUD/MBProgressHUD.h>

@implementation AppDelegate

// 显示提示消息
+(void)showHudMsg:(NSString*)msg
{
    dispatch_async(dispatch_get_main_queue(), ^{
        switchHud = [MBProgressHUD showHUDAddedTo:UIApplication.sharedApplication.keyWindow animated:YES];
        [switchHud showAnimated:YES];
        switchHud.label.text = msg;
    });
}

// 显示带详细信息的提示
+(void)showHudMsg:(NSString*)msg detail:(NSString*)info
{
    dispatch_async(dispatch_get_main_queue(), ^{
        switchHud = [MBProgressHUD showHUDAddedTo:UIApplication.sharedApplication.keyWindow animated:YES];
        [switchHud showAnimated:YES];
        switchHud.label.text = msg;
        switchHud.detailsLabel.text = info;
    });
}

// 显示警告对话框
+ (void)showAlert:(UIAlertController*)alert {
    static dispatch_queue_t alertQueue = nil;
    static dispatch_once_t oncetoken;
    dispatch_once(&oncetoken, ^{
        alertQueue = dispatch_queue_create("alertQueue", DISPATCH_QUEUE_SERIAL);
    });
    
    dispatch_async(alertQueue, ^{
        // 等待当前对话框关闭后再显示新对话框
        __block BOOL presenting = NO;
        __block BOOL presented = NO;
        while(!presenting) {
            dispatch_sync(dispatch_get_main_queue(), ^{
                UIViewController* vc = UIApplication.sharedApplication.keyWindow.rootViewController;
                while(vc.presentedViewController){
                    vc = vc.presentedViewController;
                    if(vc.isBeingDismissed) {
                        return;
                    }
                }
                presenting = YES;
                [vc presentViewController:alert animated:YES completion:^{ presented=YES; }];
            });
            if(!presenting) usleep(1000*100);
        }
        while(!presented) usleep(100*1000);
    });
}
@end

引导程序核心 (bootstrap.h)

代码语言:objc
复制
#ifndef bootstrap_h
#define bootstrap_h

#define BOOTSTRAP_VERSION   (5)

#import <Foundation/Foundation.h>

// 重建签名
void rebuildSignature(NSString *directoryPath);

// 执行引导
int bootstrap();

// 取消引导
int unbootstrap();

// 检查引导是否已安装
bool isBootstrapInstalled();

// 检查系统是否已引导
bool isSystemBootstrapped();

// 检查引导版本
bool checkBootstrapVersion();

#endif /* bootstrap_h */

工具函数 (utils.h)

代码语言:objc
复制
#ifndef utils_h
#define utils_h

#import <Foundation/Foundation.h>
#include "commlib.h"

// 生成随机品牌标识
uint64_t jbrand();
uint64_t jbrand_new();

// 查找jbroot目录
NSString* find_jbroot(BOOL force);

// 检查是否为jbroot名称
int is_jbroot_name(const char* name);

// 获取jbroot路径
const char* jbroot(const char* path);
NSString* __attribute__((overloadable)) jbroot(NSString *path);

// 获取根文件系统前缀
NSString* rootfsPrefix(NSString* path);

// 获取启动会话
NSString* getBootSession();

// 从二进制文件获取团队ID
NSString* getTeamIDFromBinaryAtPath(NSString *binaryPath);

// 应用代理相关接口
@interface LSApplicationProxy : LSBundleProxy
+ (id)applicationProxyForIdentifier:(id)arg1;
- (id)localizedNameForContext:(id)arg1;
- (_LSApplicationState *)appState;
- (NSString *)vendorName;
- (NSString *)teamID;
- (NSString *)applicationType;
- (NSSet *)claimedURLSchemes;
- (BOOL)isDeletable;
- (NSDictionary*)environmentVariables;
@property (nonatomic,readonly) NSDictionary *groupContainerURLs;
@property (nonatomic,readonly) NSArray<LSPlugInKitProxy *> *plugInKitPlugins;
@end

#endif /* utils_h */

构建脚本 (build.sh)

代码语言:bash
复制
#!/bin/sh
set -e

PREV_DIR=$(pwd)
WORK_DIR=$(dirname -- "$0")
cd "$WORK_DIR"

cd basebin
./build.sh
cd -

rm -rf Bootstrap/basebin
cp -a basebin/.build Bootstrap/basebin

make clean
make package

cd "$PREV_DIR"

Yyu6EekmuPFgFxbc20JRuNGiLT9cAoIcHMFySQXhwtk=

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • roothide Bootstrap
    • 功能特性
    • 安装指南
      • 系统要求
      • 构建步骤
      • GitHub Actions构建
    • 使用说明
      • 基础使用
      • 命令行功能
      • 应用列表管理
    • 核心代码
      • 应用代理管理 (AppDelegate.m)
      • 引导程序核心 (bootstrap.h)
      • 工具函数 (utils.h)
      • 构建脚本 (build.sh)
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档