越狱系统各种插件功能开发笔记

最近买了两个越狱机,发现了几个问题(比如无sim卡弹窗等,)网上搜了一圈,没搜到解决方案.所以写个插件解决下,以后搜不到的解决完的就汇总在这个帖子做个笔记,

0x01 屏蔽无sim卡弹窗

  • 没有安装sim卡的手机总是会弹框提示


%hook SBTelephonyManager

- (void)_setSIMStatus:(id)arg1{
    
    NSLog(@"================================打印sim卡状态 =============================================%@",arg1);
    %orig;
}
-(id)SIMStatus{
    
    %log;
    
    NSLog(@"yuzhouheike%@", %orig);
    
    return @"CTSIMSupportSIMStatusInserted";
}

%end

0x02


@interface SBUserNotificationAlert
- (id)performSelector:(SEL)aSelector;
- (id)performSelector:(SEL)aSelector withObject:(id)object;
- (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2;
@end

%hook SBUserNotificationAlert


- (void)willActivate
{

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{

        if([[self performSelector:@selector(defaultButtonTitle)] isEqualToString:@"允许"]){
          [self performSelector:@selector(dismissIfNecessaryWithResponse:) withObject:0];
        }

    });
    
}
%end
1 个赞

可以发deb吗谢谢楼主分享啊

可以的!! 不错!!

hook springBoard SBAlertItem类 解决手机桌面所有弹框

太強了…

1 个赞