新手请大神指点 IOS15.4.1 Dopamine 越狱 Theos编译插件不生效

环境 IOS15.4.1 Dopamine
Xcode 13.4.1
以下代码编译完打包deb后跑在在12 mini的机器上,在mac的控制台上查找不到 log输 Filter: com.apple.camera 也没有错 hook的class代码也无效 出请大神们帮忙看看指点下

Tweak.xm

#import <CameraUI/CAMZoomControl.h>
#import <CameraUI/CAMFullscreenViewfinder.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

%hook CAMZoomControl
-(void)viewDidAppear
{
  %orig;
  [self _setZoomFactor:0.5 interactionType:0 shouldNotifyDelegate:true];
  NSLog(@"hook start");
}
%end

%hook CAMFullscreenViewfinder
-(id)initWithFrame:(CGRect)frame
{
 id i=%orig(frame);
 self.hidden=true;
  NSLog(@"hook start");
  return i;
}

- (void)didMoveToSuperview
{
   %orig;
  self.hidden=true;
  NSLog(@"hook start");
}

- (void)didMoveToWindow
{
   %orig;
  self.hidden=true;
  NSLog(@"hook start");
}
%end
%ctor
{
   NSLog(@"hook start");
}

用最新版的theos

加一下下面代码

ROOTLESS = 1

ifeq ($(ROOTLESS),1)
THEOS_PACKAGE_SCHEME=rootless
endif

ifeq ($(THEOS_PACKAGE_SCHEME), rootless)
TARGET = iphone:clang:latest:15.0
else
TARGET = iphone:clang:latest:12.0
endif

现在都去高版本卷了吗

感谢,Makefile加入以下代码编译还是一样,theos版本是最新的支持rootless了。

这不对吧,写了那么多,其实就等价于 TARGET = iphone:clang:latest:15.0

兄弟问题解决了么,我也遇到了

兄弟解决了吗,我这用roothide环境转换后就可以,单多巴胺一直没效果

你解决了吗?我一直都解决不了。怎么转换呢?

指定下THEOS_PACKAGE_SCHEME就行

我也按照你说的。也不行
环境是多巴胺rootless环境 iPhoneXR iOS 15.6
下面是Tweak 的设置

Package: com.nuoens.tweakdemo5
Name: TweakDemo5
Version: 0.0.1
Architecture: iphoneos-arm64
Description: An awesome MobileSubstrate tweak!
Maintainer: lxb
Section: Tweaks
Depends: firmware (>= 5.0)
Conflicts:
Replaces:
Priority: optional
Author: lxb
dev:
Homepage:
Depiction:
Icon:

THEOS_DEVICE_IP = 192.168.3.20
export ARCHS = arm64
TARGET := iphone:clang:latest:7.0
THEOS_PACKAGE_SCHEME=rootless
INSTALL_TARGET_PROCESSES = SpringBoard

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = TweakDemo5

TweakDemo5_FILES = Tweak.x
TweakDemo5_CFLAGS = -fobjc-arc
TweakDemo5_LIBRARIES = substrate
TweakDemo5_INSTALL_PATH = /var/jb/usr/lib

TweakDemo5_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <UIKit/UIAlertView.h>

%hook SpringBoard

  • (void)applicationDidFinishLaunching:(id)application
    {
    NSLog(@“SpringBoard::applicationDidFinishLaunching”);
    %orig;
    }
    %end

static attribute((constructor)) void LocalInit() {
NSLog(@“LocalInit”);
}

export ARCHS = arm64 arm64e

添加了也是不起作用

THEOS_DEVICE_IP = 192.168.3.20
export ARCHS = arm64 arm64e
TARGET := iphone:clang:latest:7.0
THEOS_PACKAGE_SCHEME=rootless
INSTALL_TARGET_PROCESSES = SpringBoard

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = TweakDemo5

TweakDemo5_FILES = Tweak.x
TweakDemo5_CFLAGS = -fobjc-arc
TweakDemo5_LIBRARIES = substrate
TweakDemo5_INSTALL_PATH = /var/jb/usr/lib

TweakDemo5_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk

配置文件p.list
Bundles

com.apple.springboard
com.apple.UIKit

编译和安装log
> Making all for tweak TweakDemo5…

==> Preprocessing Tweak.x…

==> Compiling Tweak.x (arm64)…

==> Linking tweak TweakDemo5 (arm64)…

ld: warning: embedded dylibs/frameworks only run on iOS 8 or later

==> Generating debug symbols for TweakDemo5…

==> Preprocessing Tweak.x…

==> Compiling Tweak.x (arm64e)…

==> Linking tweak TweakDemo5 (arm64e)…

==> Generating debug symbols for TweakDemo5…

==> Merging tweak TweakDemo5…

==> Signing TweakDemo5…

> Making stage for tweak TweakDemo5…

dm.pl: building package com.nuoens.tweakdemo5:iphoneos-arm64' in ./packages/com.nuoens.tweakdemo5_0.0.1-20+debug_iphoneos-arm64.deb’

==> Installing…

Password for root@iPhone17:

(Reading database … 6683 files and directories currently installed.)

Preparing to unpack /tmp/_theos_install.deb …

Unpacking com.nuoens.tweakdemo5 (0.0.1-20+debug) over (0.0.1-19+debug) …

Setting up com.nuoens.tweakdemo5 (0.0.1-20+debug) …

==> Unloading SpringBoard…

Password for root@iPhone17:

lxb@lxbdeMBP TweakDemo5 %

把你的工程打包私信发给我我帮你看下

没有看到。被你删除了

删掉

谢谢,可是还是不行。我是用爱思助手越狱的Dopamine的越狱,也安装afc可以查到越狱的系统

也安装完插件了

就是不起效果。
你能告诉我你的越狱环境吗?用什么越狱的

你把你编译好的deb 发给我。我手动安装一下。看看是不是编译的环境

你按照评论里说的把多余的删掉就行.

为啥我不删?你只是加了打印,难道要什么效果?上月球还是进黑洞?