看书到 找出第一个cell的UI函数处,按照书上的方式寻找一个cell的controller,因为手机没有通话模块就用设置中的WiFi来模拟利用cycript 找controller,目前找到‘APNetworksController’ 。
再通过 grep APNetworksController /Applications/Preferences.app/ 和 grep APNetworksController /System/Library/ 方式定位目标文件,
iPhone:~ root# grep -r APNetworksController /System/Library/ Binary file /System/Library/AccessibilityBundles/AirPortSettings.axbundle/AirPortSettings matches Binary file /System/Library/Caches/com.apple.dyld/dyldsharedcachearm64 matches Binary file /System/Library/Caches/com.apple.dyld/dyldsharedcachearmv7s matches grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGCorePDF.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGVolute.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGXType.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libCMaps.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libFontStreams.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libJBIG2.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libPDFRIP.dylib: No such file or directory grep: /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.dylib: No such file or directory grep: /System/Library/Frameworks/IOKit.framework/IOKit: No such file or directory grep: /System/Library/Frameworks/System.framework/System: No such file or directory grep: /System/Library/Frameworks/System.framework/Versions/Current: No such file or directory Binary file /System/Library/PreferenceBundles/BatteryUsageUI.bundle/BatteryUISuggestions.plist matches Binary file /System/Library/PrivateFrameworks/PreferencesUI.framework/Settings.plist matches
这里看到有三个地方引用了APNetworksController,分别为
Binary file /System/Library/AccessibilityBundles/AirPortSettings.axbundle/AirPortSettings matches
Binary file /System/Library/PreferenceBundles/BatteryUsageUI.bundle/BatteryUISuggestions.plist matches
Binary file /System/Library/PrivateFrameworks/PreferencesUI.framework/Settings.plist matches
我现在将这个三个地方的文件 class-dump出来并未发现APNetworksController.h文件
后面我又尝试 ‘nextResponder’ 找更上层controller 查找到 PSUIPrefsRootController 同样上面 grep 和class-dump方式 也并未找到 PSUIPrefsRootController.h 文件
接下来我用Hooper 分析了 Preferences.app 搜索了PSUIPrefsRootController是否有调用,找到PreferencesAppController 文件,在里面确实找到了@class EAAccessory, NSMutableSet, NSString, PSSplitViewController, PSUIPrefsRootController, UIWindow; 但是还是没有找到目标文件
我的问题
1、像这种情况,还有什么其他方式可以查找 cycript出来的controller?
2、这种情况是否正常?
3、在我的操作过程中有什么错误?
哪位指导下,感谢感谢!