新人求助帖

各位大佬,我是根据这个

安装的 cycript,可是对某 wx程序调试的时候无法调试
终端代码:Ceshi-iphone:~ root# cycript -p 7425
反馈: [7447] DarwinInjector.cpp[263]: _krncall(mach_vm_read_overwrite) =10000003

*** _assert(status == 0):…/Inject.cpp(143):InjectLibrary

mac:10.14.5
iphone:12.3.1

是我用的工具不对啊,还是使用方法不当,我用最上面链接里的方法cyrun -n SpringBoard -e -d -f只能重启SpringBoard,并只对SpringBoard调试,不能对其他程序调试,不晓得对其他程序调试的方法

我用UIApp.keyWindow.recursiveDescription().toString() 调试

看到是下面
<CALayer: 0x282734f40>>
| | | <_SBOrientationTransformedContentView: 0x1031cd1c0; content: portrait (1); frame = (0 0; 375 667); layer = <CALayer: 0x282734f60>>
| | | | <UIView: 0x1031cf7c0; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x282735960>>
| | | | | <SBAppSwitcherScrollView: 0x1040f4e00; baseClass = UIScrollView; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x2828f4e10>; layer = <CALayer: 0x282735980>; contentOffset: {2498, 0}; contentSize: {3000, 667}; adjustedContentInset: {0, 0, 0, 0}>
| | | | | <UIView: 0x1031cfeb0; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x2828ef870>; layer = <CALayer: 0x282735a00>>
| | | | | | <SBReusableSnapshotItemContainer: 0x11106f680; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x28290d560>; layer = <CALayer: 0x2826aa7a0>>< AppLayout: <SBAppLayout: 0x282729d40>>

我看着像SpringBoard

请问怎么调试其他 app,或者是我哪有问题

“SpringBoard”这个改成你想要调试的APP名称

%E5%9B%BE%E7%89%87

我试试看看

脑子直来直去的,不晓得变通,只知道对cycript -p 4536改进程号,却没有想到cyrun -n SpringBoard -e -d -f改个名字,你的问号把我都逗笑了:joy:

https://github.com/tateu/cyrun

我看到这么个警告:
WARNING - Cycript is active but it looks like the bundleIdentifier you are trying to enable it for does not match!

Cycript调试也需要BID 之类的么

我看到了 Dobin 的回复,原来如此
,感谢

感谢,原来是这么的用

请各位看看,我这个是调试代码不对吗
Ceshi-iphone:~ root# cyrun -b com.tencent.xin -e -d -f
applicationName: WeChat is running (7490)
executableName: WeChat
bundleIdentifier: com.tencent.xin
Cycript is active: com.apple.springboard
Device is not passcode locked
Tweak Mode
WARNING - Cycript is active but it looks like the bundleIdentifier you are trying to enable it for does not match!
You cannot enable Cycript in a new Process while it is still running in old one
Do you want to connect to the current Process (y or n)? y
Success, You may now run
cycript -r 127.0.0.1:8556
cy# UIApp.keyWindow.recursiveDescription().toString()
`<SBMainSwitcherWindow: 0x1031ca820; SBMainSwitcherViewController-0x1031ca820-3; baseClass = UIWindow; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x2828ead00>; layer = <UIWindowLayer: 0x282734640>>
| <UIView: 0x1031ccbe0; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x282734e80>>
| | <SBOrientationTransformWrapperView: 0x1031ccdc0; container: portrait (1); frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x282734f40>>
| | | <_SBOrientationTransformedContentView: 0x1031cd1c0; content: portrait (1); frame = (0 0; 375 667); layer = <CALayer: 0x282734f60>>
| | | | <UIView: 0x1031cf7c0; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x282735960>>
| | | | | <SBAppSwitcherScrollView: 0x1040f4e00; baseClass = UIScrollView; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x2828f4e10>; layer = <CALayer: 0x282735980>; contentOffset: {2873, 0}; contentSize: {3375, 667}; adjustedContentInset: {0, 0, 0, 0}>
| | | | | <UIView: 0x1031cfeb0; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x2828ef870>; layer = <CALayer: 0x282735a00>>
| | | | | | <SBReusableSnapshotItemContainer: 0x11106f680; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x28290d560>; layer = <CALayer: 0x2826aa7a0>>< AppLayout: <SBAppLayout: 0x282729d40>>
| | | | | | | <UIScrollView: 0x104379e00; frame = (0 -333.5; 375 1000.5); gestureRecognizers = <NSArray: 0x28290d4a0>; layer = <CALayer: 0x2826abd40>; contentOffset: {0, 0}; contentSize: {375, 2374.52}; adjustedContentInset: {0, 0, 0, 0}>
| | | | | | | | <SBAppSwitcherPageView:

UIApp.keyWindow.recursiveDescription().toString() 这句是不是用错了,我怎么感觉还是在调试SpringBoard

这句话没有错,你要正确退出cycript,然后会自动unload SpringBoard,然后执行cyrun -b xxx -e -d -f就可以了

真的万分感谢,我总是自欺欺人把 mac 终端关了,原来我才明白这个插件在手机上,我一直在调试SpringBoard,我说呢,我这不太明白原理,如果不是你这么指点,我估计今天要在这卡一天,真是太感谢了,包括楼上几位高人的指点,现在终于进到对应程序里看到各个类名和控件了.