Repository navigation
Expand file tree
/
Copy pathTweak.xm
More file actions
2421 lines (2215 loc) · 112 KB
/
Copy pathTweak.xm
File metadata and controls
2421 lines (2215 loc) · 112 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <objc/message.h>
#import <spawn.h>
#import <signal.h>
#import <dlfcn.h>
#import <sys/stat.h>
#import <substrate.h>
// Cross-jailbreak path resolution.
// Under roothide the prefix is randomized per-install (e.g.
// /var/containers/Bundle/Application/.jbroot-<rand16hex>/) so every
// hardcoded "/var/jb/..." literal MUST go through jbroot() at runtime.
// Under nathanlr (rootless) jbroot.h is absent and we fall back to the
// static "/var/jb" prefix.
#if __has_include(<roothide.h>)
# include <roothide.h>
# define WP11_JBROOT(p) jbroot(p)
#else
# define WP11_JBROOT(p) ("/var/jb" p)
#endif
/*
* WatchPair11 - watchOS 11.5 <-> iOS 16 (nathanlr)
*
* v4 bloquait l'unpair côté iPhone, mais la Watch reçoit la VRAIE
* version iOS (16.x) et se dé-jumèle de SON côté.
*
* v5+ ajoute le SPOOFING DE VERSION iOS:
* - Hook NSProcessInfo.operatingSystemVersion → 18.5.0
* - Hook valueForProperty: pour SystemVersion/MarketingVersion → "18.5"
* - Hook NRPairingCompatibilityVersionInfo.systemVersions
* - Intercepte la lecture de SystemVersion.plist → ProductVersion spoofé
* - Tout ce que v4 faisait déjà
*/
// Version iOS à spoofer (watchOS 11.5 attend iOS 18.x)
// Watch = watchOS 11.5 (22T572), Watch6,10 — requires iOS 18+
#define SPOOFED_IOS_MAJOR 18
#define SPOOFED_IOS_MINOR 5
#define SPOOFED_IOS_PATCH 0
#define SPOOFED_IOS_VERSION_STRING @"18.5"
#define MAX_COMPAT 99
#define MIN_COMPAT 1
// compatibilityState values (inversées depuis les headers NanoRegistry)
// 0 = compatible, 1+ = incompatible
#define COMPAT_STATE_COMPATIBLE 0
extern void CFPreferencesSetValue(CFStringRef key, CFPropertyListRef value,
CFStringRef appID, CFStringRef user, CFStringRef host);
extern Boolean CFPreferencesSynchronize(CFStringRef appID, CFStringRef user, CFStringRef host);
extern CFPropertyListRef CFPreferencesCopyAppValue(CFStringRef key, CFStringRef appID);
// =====================================================================
// LOGGING dans /var/mobile/Library/Preferences/wp11.log
// Lisible avec Filza
// =====================================================================
#define WP11_LOG_PATH @"/var/tmp/wp11.log"
static void wp11log(NSString *fmt, ...) {
va_list args;
va_start(args, fmt);
NSString *msg = [[NSString alloc] initWithFormat:fmt arguments:args];
va_end(args);
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"HH:mm:ss.SSS"];
NSString *ts = [df stringFromDate:[NSDate date]];
NSString *proc = [[NSProcessInfo processInfo] processName];
NSString *line = [NSString stringWithFormat:@"[%@][%@] %@\n", ts, proc, msg];
NSFileHandle *fh = [NSFileHandle fileHandleForWritingAtPath:WP11_LOG_PATH];
if (!fh) {
[[NSFileManager defaultManager] createFileAtPath:WP11_LOG_PATH contents:nil attributes:nil];
fh = [NSFileHandle fileHandleForWritingAtPath:WP11_LOG_PATH];
}
[fh seekToEndOfFile];
[fh writeData:[line dataUsingEncoding:NSUTF8StringEncoding]];
[fh closeFile];
}
static void setPref(CFStringRef appID, CFStringRef key, CFPropertyListRef val) {
CFPreferencesSetValue(key, val, appID, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
CFPreferencesSetValue(key, val, appID, kCFPreferencesAnyUser, kCFPreferencesCurrentHost);
}
// =====================================================================
// HOOKS: NRPairingCompatibilityVersionInfo (version checks)
// =====================================================================
static void hookNRVersionInfo(void) {
dlopen("/System/Library/PrivateFrameworks/NanoRegistry.framework/NanoRegistry", RTLD_LAZY);
Class cls = NSClassFromString(@"NRPairingCompatibilityVersionInfo");
if (!cls) return;
wp11log(@" Hook NRPairingCompatibilityVersionInfo");
NSArray *noArgSels = @[
@"maxPairingCompatibilityVersion",
@"minPairingCompatibilityVersion",
@"minPairingCompatibilityVersionWithChipID",
@"minQuickSwitchCompatibilityVersion",
@"pairingCompatibilityVersion"
];
for (NSString *selName in noArgSels) {
SEL sel = NSSelectorFromString(selName);
if (![cls instancesRespondToSelector:sel]) continue;
Method m = class_getInstanceMethod(cls, sel);
if (!m) continue;
BOOL isMax = [selName hasPrefix:@"max"] || [selName isEqualToString:@"pairingCompatibilityVersion"];
long long val = isMax ? MAX_COMPAT : MIN_COMPAT;
class_replaceMethod(cls, sel,
imp_implementationWithBlock(^long long(id self) { return val; }),
method_getTypeEncoding(m));
}
SEL s1 = NSSelectorFromString(@"minPairingCompatibilityVersionForChipID:name:defaultVersion:");
if ([cls instancesRespondToSelector:s1]) {
Method m = class_getInstanceMethod(cls, s1);
if (m) class_replaceMethod(cls, s1,
imp_implementationWithBlock(^long long(id s, long long c, NSString *n, long long d) { return MIN_COMPAT; }),
method_getTypeEncoding(m));
}
SEL s2 = NSSelectorFromString(@"minPairingCompatibilityVersionForChipID:");
if ([cls instancesRespondToSelector:s2]) {
Method m = class_getInstanceMethod(cls, s2);
if (m) class_replaceMethod(cls, s2,
imp_implementationWithBlock(^long long(id s, long long c) { return MIN_COMPAT; }),
method_getTypeEncoding(m));
}
SEL s3 = NSSelectorFromString(@"minQuickSwitchPairingCompatibilityVersionForChipID:");
if ([cls instancesRespondToSelector:s3]) {
Method m = class_getInstanceMethod(cls, s3);
if (m) class_replaceMethod(cls, s3,
imp_implementationWithBlock(^long long(id s, long long c) { return MIN_COMPAT; }),
method_getTypeEncoding(m));
}
SEL s4 = NSSelectorFromString(@"isOverrideActive");
if ([cls instancesRespondToSelector:s4]) {
Method m = class_getInstanceMethod(cls, s4);
if (m) class_replaceMethod(cls, s4,
imp_implementationWithBlock(^BOOL(id s) { return YES; }),
method_getTypeEncoding(m));
}
}
// =====================================================================
// HOOKS: IDSService - débloquer l'envoi de Messages depuis la Watch
// Le service IDS com.apple.madrid a un MinCompatibilityVersion check
// =====================================================================
static void hookIDSService(void) {
// Charger IDS.framework
dlopen("/System/Library/PrivateFrameworks/IDS.framework/IDS", RTLD_LAZY);
dlopen("/System/Library/PrivateFrameworks/IDSFoundation.framework/IDSFoundation", RTLD_LAZY);
// Hook IDSService initWithServiceDictionary: pour forcer MinCompatibilityVersion bas
Class idsServiceClass = NSClassFromString(@"IDSService");
if (idsServiceClass) {
SEL initDictSel = NSSelectorFromString(@"initWithServiceDictionary:");
if ([idsServiceClass instancesRespondToSelector:initDictSel]) {
Method m = class_getInstanceMethod(idsServiceClass, initDictSel);
if (m) {
IMP origIMP = method_getImplementation(m);
typedef id (*OrigInitFunc)(id, SEL, NSDictionary*);
class_replaceMethod(idsServiceClass, initDictSel,
imp_implementationWithBlock(^id(id self, NSDictionary *dict) {
NSMutableDictionary *patched = [dict mutableCopy];
// Forcer MinCompatibilityVersion à 1
if (patched[@"MinCompatibilityVersion"]) {
patched[@"MinCompatibilityVersion"] = @(1);
wp11log(@"IDSService patched MinCompatibilityVersion -> 1");
}
return ((OrigInitFunc)origIMP)(self, initDictSel, patched);
}),
method_getTypeEncoding(m));
wp11log(@"Hooked IDSService initWithServiceDictionary:");
}
}
// Hook IDSService initWithServiceIdentifier: (variante)
SEL initIdSel = NSSelectorFromString(@"initWithServiceIdentifier:");
if ([idsServiceClass instancesRespondToSelector:initIdSel]) {
Method m = class_getInstanceMethod(idsServiceClass, initIdSel);
if (m) {
IMP origIMP = method_getImplementation(m);
typedef id (*OrigFunc)(id, SEL, NSString*);
class_replaceMethod(idsServiceClass, initIdSel,
imp_implementationWithBlock(^id(id self, NSString *identifier) {
wp11log(@"IDSService init avec identifier: %@", identifier);
return ((OrigFunc)origIMP)(self, initIdSel, identifier);
}),
method_getTypeEncoding(m));
}
}
}
// Hook IDSServiceProperties pour supprimer les checks de version
Class idsPropsClass = NSClassFromString(@"IDSServiceProperties");
if (idsPropsClass) {
// minCompatibilityVersion -> 1
SEL minCompatSel = NSSelectorFromString(@"minCompatibilityVersion");
if ([idsPropsClass instancesRespondToSelector:minCompatSel]) {
Method m = class_getInstanceMethod(idsPropsClass, minCompatSel);
if (m) {
class_replaceMethod(idsPropsClass, minCompatSel,
imp_implementationWithBlock(^long long(id self) { return 1; }),
method_getTypeEncoding(m));
wp11log(@"Hooked IDSServiceProperties.minCompatibilityVersion -> 1");
}
}
}
// Hook IDSAccount - certains checks de compatibilité se font au niveau account
Class idsAccountClass = NSClassFromString(@"IDSAccount");
if (idsAccountClass) {
for (NSString *selName in @[@"isServiceAvailable", @"isActive", @"isEnabled"]) {
SEL sel = NSSelectorFromString(selName);
if ([idsAccountClass instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(idsAccountClass, sel);
if (m) {
class_replaceMethod(idsAccountClass, sel,
imp_implementationWithBlock(^BOOL(id self) { return YES; }),
method_getTypeEncoding(m));
}
}
}
wp11log(@"Hooked IDSAccount availability methods -> YES");
}
}
// =====================================================================
// HOOKS: Spoofing de la version iOS envoyée à la Watch
// =====================================================================
static void hookVersionSpoofing(void) {
// 1. Hook NSProcessInfo.operatingSystemVersion
// nanoregistryd utilise ça pour déterminer la version iOS
Class procInfoClass = [NSProcessInfo class];
SEL osVerSel = NSSelectorFromString(@"operatingSystemVersion");
if ([procInfoClass instancesRespondToSelector:osVerSel]) {
Method m = class_getInstanceMethod(procInfoClass, osVerSel);
if (m) {
class_replaceMethod(procInfoClass, osVerSel,
imp_implementationWithBlock(^NSOperatingSystemVersion(id self) {
NSOperatingSystemVersion v;
v.majorVersion = SPOOFED_IOS_MAJOR;
v.minorVersion = SPOOFED_IOS_MINOR;
v.patchVersion = SPOOFED_IOS_PATCH;
return v;
}),
method_getTypeEncoding(m));
wp11log(@" Hooked operatingSystemVersion -> %d.%d.%d",
SPOOFED_IOS_MAJOR, SPOOFED_IOS_MINOR, SPOOFED_IOS_PATCH);
}
}
// 2. Hook NSProcessInfo.operatingSystemVersionString
SEL osVerStrSel = NSSelectorFromString(@"operatingSystemVersionString");
if ([procInfoClass instancesRespondToSelector:osVerStrSel]) {
Method m = class_getInstanceMethod(procInfoClass, osVerStrSel);
if (m) {
class_replaceMethod(procInfoClass, osVerStrSel,
imp_implementationWithBlock(^NSString *(id self) {
return [NSString stringWithFormat:@"Version %d.%d (Build 22F770)",
SPOOFED_IOS_MAJOR, SPOOFED_IOS_MINOR];
}),
method_getTypeEncoding(m));
wp11log(@" Hooked operatingSystemVersionString");
}
}
// 3. Hook NSDictionary.dictionaryWithContentsOfFile: pour intercepter SystemVersion.plist
// Quand nanoregistryd lit /System/Library/CoreServices/SystemVersion.plist,
// on spoofe le ProductVersion
Method origDictMethod = class_getClassMethod([NSDictionary class],
@selector(dictionaryWithContentsOfFile:));
if (origDictMethod) {
IMP origIMP = method_getImplementation(origDictMethod);
typedef NSDictionary* (*OrigDictFunc)(id, SEL, NSString*);
class_replaceMethod(object_getClass([NSDictionary class]),
@selector(dictionaryWithContentsOfFile:),
imp_implementationWithBlock(^NSDictionary*(id self, NSString *path) {
NSDictionary *result = ((OrigDictFunc)origIMP)(self,
@selector(dictionaryWithContentsOfFile:), path);
if (path && [path containsString:@"SystemVersion.plist"]) {
NSMutableDictionary *spoofed = [result mutableCopy];
spoofed[@"ProductVersion"] = SPOOFED_IOS_VERSION_STRING;
spoofed[@"ProductBuildVersion"] = @"22F770";
wp11log(@" Spoofed SystemVersion.plist ProductVersion -> %@",
SPOOFED_IOS_VERSION_STRING);
return [spoofed copy];
}
return result;
}),
method_getTypeEncoding(origDictMethod));
wp11log(@" Hooked dictionaryWithContentsOfFile: (SystemVersion.plist spoof)");
}
}
// =====================================================================
// HOOKS: NRDevice / NRMutableDevice (post-pairing compatibility state)
// =====================================================================
static void hookNRDevice(void) {
// Hook NRDevice
Class deviceClass = NSClassFromString(@"NRDevice");
Class mutableClass = NSClassFromString(@"NRMutableDevice");
NSMutableArray *classes = [NSMutableArray array];
if (deviceClass) [classes addObject:deviceClass];
if (mutableClass) [classes addObject:mutableClass];
// Hook compatibilityState -> toujours 0 (compatible)
for (Class cls in classes) {
SEL compatSel = NSSelectorFromString(@"compatibilityState");
if ([cls instancesRespondToSelector:compatSel]) {
Method m = class_getInstanceMethod(cls, compatSel);
if (m) {
class_replaceMethod(cls, compatSel,
imp_implementationWithBlock(^long long(id self) {
return (long long)COMPAT_STATE_COMPATIBLE;
}),
method_getTypeEncoding(m));
wp11log(@" Hooked %@.compatibilityState -> COMPATIBLE", NSStringFromClass(cls));
}
}
// Hook isCompatible / isPairingCompatible si ça existe
for (NSString *selName in @[@"isCompatible", @"isPairingCompatible"]) {
SEL sel = NSSelectorFromString(selName);
if ([cls instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(cls, sel);
if (m) {
class_replaceMethod(cls, sel,
imp_implementationWithBlock(^BOOL(id self) { return YES; }),
method_getTypeEncoding(m));
wp11log(@" Hooked %@.%@ -> YES", NSStringFromClass(cls), selName);
}
}
}
}
// Hook NRPairedDeviceRegistry methods
Class regClass = NSClassFromString(@"NRPairedDeviceRegistry");
if (regClass) {
// canCommunicateOnRegularServicesWithDevice: -> YES
SEL canCommSel = NSSelectorFromString(@"canCommunicateOnRegularServicesWithDevice:");
if ([regClass instancesRespondToSelector:canCommSel]) {
Method m = class_getInstanceMethod(regClass, canCommSel);
if (m) {
class_replaceMethod(regClass, canCommSel,
imp_implementationWithBlock(^BOOL(id self, id device) { return YES; }),
method_getTypeEncoding(m));
wp11log(@" Hooked canCommunicateOnRegularServicesWithDevice: -> YES");
}
}
// canCommunicateOnRegularServicesWithActiveWatch -> YES
SEL canCommActiveSel = NSSelectorFromString(@"canCommunicateOnRegularServicesWithActiveWatch");
if ([regClass instancesRespondToSelector:canCommActiveSel]) {
Method m = class_getInstanceMethod(regClass, canCommActiveSel);
if (m) {
class_replaceMethod(regClass, canCommActiveSel,
imp_implementationWithBlock(^BOOL(id self) { return YES; }),
method_getTypeEncoding(m));
wp11log(@" Hooked canCommunicateOnRegularServicesWithActiveWatch -> YES");
}
}
}
// Hook valueForProperty: sur NRDevice pour intercepter CompatibilityState
if (deviceClass) {
SEL valPropSel = NSSelectorFromString(@"valueForProperty:");
if ([deviceClass instancesRespondToSelector:valPropSel]) {
Method m = class_getInstanceMethod(deviceClass, valPropSel);
if (m) {
IMP origIMP = method_getImplementation(m);
typedef id (*OrigFunc)(id, SEL, id);
class_replaceMethod(deviceClass, valPropSel,
imp_implementationWithBlock(^id(id self, id property) {
id result = ((OrigFunc)origIMP)(self, valPropSel, property);
// Si la propriété est CompatibilityState, retourner compatible
if ([property isKindOfClass:[NSString class]]) {
NSString *prop = (NSString *)property;
if ([prop containsString:@"ompatibilityState"] ||
[prop containsString:@"ompatibility"]) {
return @(COMPAT_STATE_COMPATIBLE);
}
// Spoofer la version iOS rapportée via les propriétés NRDevice
if ([prop containsString:@"SystemVersion"] ||
[prop containsString:@"MarketingVersion"]) {
wp11log(@" Spoofed NRDevice property %@ -> %@", prop, SPOOFED_IOS_VERSION_STRING);
return SPOOFED_IOS_VERSION_STRING;
}
if ([prop containsString:@"MaxPairingCompatibilityVersion"]) {
return @(MAX_COMPAT);
}
}
return result;
}),
method_getTypeEncoding(m));
wp11log(@" Hooked NRDevice.valueForProperty: (intercepte CompatibilityState)");
}
}
}
}
// v7.14: NARROW Watch productType spoof — runs ONLY in passd (Apple Pay preflight path)
// This avoids breaking SpringBoard/Bridge launch which other processes need
__attribute__((unused))
static void hookPassdModelSpoof(void) {
// Hook NRDevice.valueForProperty: ONLY in passd context
// Spoof ProductType to Watch6,14 (Series 8, native iOS 16 support)
Class NRDev = NSClassFromString(@"NRDevice");
if (!NRDev) {
wp11log(@" [passd-model] NRDevice not loaded");
return;
}
SEL valPropSel = NSSelectorFromString(@"valueForProperty:");
if (![NRDev instancesRespondToSelector:valPropSel]) return;
Method m = class_getInstanceMethod(NRDev, valPropSel);
IMP origIMP = method_getImplementation(m);
typedef id (*OrigFunc)(id, SEL, id);
class_replaceMethod(NRDev, valPropSel,
imp_implementationWithBlock(^id(id self, id property) {
id result = ((OrigFunc)origIMP)(self, valPropSel, property);
if ([property isKindOfClass:[NSString class]]) {
NSString *prop = (NSString *)property;
if ([prop containsString:@"ProductType"] || [prop isEqualToString:@"ProductType"]) {
if ([result isKindOfClass:[NSString class]] &&
[(NSString *)result hasPrefix:@"Watch"]) {
wp11log(@" [passd-model] Watch productType %@ → Watch6,14", result);
return @"Watch6,14";
}
}
}
return result;
}),
method_getTypeEncoding(m));
wp11log(@" [passd-model] Hooked NRDevice.valueForProperty: for productType spoof");
// v7.15: Hook the PRIMARY PassKit productType extractor used by all Apple Pay checks
void *pkc = dlopen("/System/Library/PrivateFrameworks/PassKitCore.framework/PassKitCore", RTLD_LAZY);
if (pkc) {
void *sym = dlsym(pkc, "PKProductTypeFromNRDevice");
wp11log(@" [passd-model] PKProductTypeFromNRDevice sym=%p", sym);
if (sym) {
static NSString *(*orig_tmp)(id) = NULL;
// Use block-style replacement via MSHookFunction
MSHookFunction(sym, (void *)(^NSString *(id dev) {
NSString *o = orig_tmp ? orig_tmp(dev) : nil;
if (o && [o hasPrefix:@"Watch"]) {
wp11log(@" [PK-model] PKProductTypeFromNRDevice %@ → Watch6,14", o);
return @"Watch6,14";
}
return o;
}), (void **)&orig_tmp);
wp11log(@" [passd-model] Hooked PKProductTypeFromNRDevice");
}
}
}
// =====================================================================
// HOOKS: Bloquer les notifications d'unpair forcé
// =====================================================================
static void hookUnpairPrevention(void) {
Class regClass = NSClassFromString(@"NRPairedDeviceRegistry");
if (!regClass) return;
// Hook retriggerUnpairInfoDialog -> NOP (C'EST ÇA qui cause le dé-jumelage)
for (NSString *selName in @[@"retriggerUnpairInfoDialog",
@"xpcRetriggerUnpairInfoDialogWithBlock:",
@"_triggerUnpairInfoDialog",
@"_retriggerUnpairInfoDialog",
@"triggerUnpairInfoDialogForDevice:",
@"showUnpairInfoDialog"]) {
SEL sel = NSSelectorFromString(selName);
if ([regClass instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(regClass, sel);
if (m) {
unsigned int argCount = method_getNumberOfArguments(m);
if (argCount == 2) {
class_replaceMethod(regClass, sel,
imp_implementationWithBlock(^(id self) {
wp11log(@" BLOQUÉ retriggerUnpairInfoDialog");
}),
method_getTypeEncoding(m));
} else if (argCount == 3) {
class_replaceMethod(regClass, sel,
imp_implementationWithBlock(^(id self, id arg1) {
wp11log(@" BLOQUÉ %@", selName);
}),
method_getTypeEncoding(m));
}
wp11log(@" Installé bloqueur: %@", selName);
}
}
}
// Hook unpairDevice: / unpairAllDevices / obliterateDevice: -> NOP
for (NSString *selName in @[@"unpairDevice:", @"unpairAllDevices",
@"obliterateDevice:", @"unpairDevice:withOptions:"]) {
SEL sel = NSSelectorFromString(selName);
if ([regClass instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(regClass, sel);
if (m) {
const char *encoding = method_getTypeEncoding(m);
// Compter les arguments pour savoir quelle block utiliser
unsigned int argCount = method_getNumberOfArguments(m);
if (argCount == 2) { // self + _cmd seulement
class_replaceMethod(regClass, sel,
imp_implementationWithBlock(^(id self) {
wp11log(@" BLOQUÉ: %@ (unpair empêché)", selName);
}),
encoding);
} else if (argCount == 3) { // self + _cmd + 1 arg
class_replaceMethod(regClass, sel,
imp_implementationWithBlock(^(id self, id arg1) {
wp11log(@" BLOQUÉ: %@ (unpair empêché)", selName);
}),
encoding);
} else if (argCount == 4) { // self + _cmd + 2 args
class_replaceMethod(regClass, sel,
imp_implementationWithBlock(^(id self, id arg1, id arg2) {
wp11log(@" BLOQUÉ: %@ (unpair empêché)", selName);
}),
encoding);
}
wp11log(@" Installé bloqueur unpair: %@", selName);
}
}
}
}
// =====================================================================
// HOOKS: PassKit / NanoPasses - Sync Apple Pay vers la Watch
// =====================================================================
static void hookPassKit(void) {
// Charger les frameworks PassKit
dlopen("/System/Library/PrivateFrameworks/PassKitCore.framework/PassKitCore", RTLD_LAZY);
dlopen("/System/Library/PrivateFrameworks/NanoPasses.framework/NanoPasses", RTLD_LAZY);
// === Hook PKDeviceCompatibility / PKPaymentDeviceCompatibility ===
// Ces classes vérifient la compatibilité du device pour Apple Pay
for (NSString *className in @[@"PKDeviceCompatibility",
@"PKPaymentDeviceCompatibility",
@"PKPaymentService"]) {
Class cls = NSClassFromString(className);
if (!cls) continue;
// Lister les méthodes qui contiennent "compatible", "supported", "available"
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(object_getClass(cls), &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"isCompatible"] ||
[selName containsString:@"isSupported"] ||
[selName containsString:@"canProvision"] ||
[selName containsString:@"supportsPasses"]) {
wp11log(@"PassKit class method: +[%@ %@]", className, selName);
}
}
if (methods) free(methods);
// Méthodes d'instance aussi
methods = class_copyMethodList(cls, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"isCompatible"] ||
[selName containsString:@"isSupported"] ||
[selName containsString:@"canProvision"] ||
[selName containsString:@"supportsPasses"]) {
wp11log(@"PassKit instance method: -[%@ %@]", className, selName);
}
}
if (methods) free(methods);
}
// === Hook PKRemotePaymentPassManager ===
// Gère le provisioning des cartes sur les devices distants (Watch)
Class remotePassMgr = NSClassFromString(@"PKRemotePaymentPassManager");
if (remotePassMgr) {
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(remotePassMgr, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
// Log toutes les méthodes pour diagnostic
if ([selName containsString:@"compat"] ||
[selName containsString:@"version"] ||
[selName containsString:@"provision"] ||
[selName containsString:@"verify"] ||
[selName containsString:@"activate"] ||
[selName containsString:@"eligible"]) {
wp11log(@"PKRemotePaymentPassManager: %@", selName);
}
}
if (methods) free(methods);
}
// === Hook PKPassLibrary - vérifications de compatibilité Watch ===
Class passLibClass = NSClassFromString(@"PKPassLibrary");
if (passLibClass) {
// canAddPaymentPassForSecureElementIdentifier:... checks si on peut ajouter
// sur un SE distant (Watch). Force YES.
for (NSString *selName in @[@"canAddPaymentPassForSecureElementIdentifier:",
@"remoteSecureElementAvailable",
@"isPaymentPassActivationAvailable",
@"remotePaymentPassesAvailable",
@"remoteSecureElementIdentifiers"]) {
SEL sel = NSSelectorFromString(selName);
if ([passLibClass instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(passLibClass, sel);
if (m) {
// Vérifier le type de retour
const char *retType = method_copyReturnType(m);
if (retType && retType[0] == 'B') { // BOOL
class_replaceMethod(passLibClass, sel,
imp_implementationWithBlock(^BOOL(id self) {
wp11log(@"PKPassLibrary.%@ -> YES (forced)", selName);
return YES;
}),
method_getTypeEncoding(m));
wp11log(@"Hooked PKPassLibrary.%@ -> YES", selName);
}
free((void*)retType);
}
}
}
}
// === Hook NPKCompanionAgentConnection / NanoPasses sync ===
// C'est le pont principal pour sync les passes vers la Watch
for (NSString *className in @[@"NPKCompanionAgentConnection",
@"NPKPassLibrary",
@"NPKCompanionPassManager"]) {
Class cls = NSClassFromString(className);
if (!cls) continue;
wp11log(@"NanoPasses: trouvé %@", className);
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(cls, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"compat"] ||
[selName containsString:@"version"] ||
[selName containsString:@"supported"] ||
[selName containsString:@"available"] ||
[selName containsString:@"eligible"] ||
[selName containsString:@"provision"] ||
[selName containsString:@"verify"] ||
[selName containsString:@"activate"]) {
wp11log(@"NanoPasses method: -[%@ %@]", className, selName);
}
}
if (methods) free(methods);
}
// === Hook PKPaymentWebServiceContext / PKPaymentVerificationController ===
// Gère la vérification des cartes et la propagation du statut
Class verifyCtrl = NSClassFromString(@"PKPaymentVerificationController");
if (verifyCtrl) {
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(verifyCtrl, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"complet"] ||
[selName containsString:@"verif"] ||
[selName containsString:@"pass"] ||
[selName containsString:@"device"]) {
wp11log(@"PKPaymentVerificationController: %@", selName);
}
}
if (methods) free(methods);
}
// === Hook PKSecureElementPass - statut d'activation ===
Class sePassClass = NSClassFromString(@"PKSecureElementPass");
if (sePassClass) {
// deviceAccountNumberSuffix, primaryAccountNumberSuffix existent
// On s'intéresse aux méthodes de provisioning state
for (NSString *selName in @[@"isProvisionedOnRemoteDevice",
@"provisioningState",
@"activationState"]) {
SEL sel = NSSelectorFromString(selName);
if ([sePassClass instancesRespondToSelector:sel]) {
wp11log(@"PKSecureElementPass has: %@", selName);
}
}
}
wp11log(@"PassKit hooks initialized");
}
// ----- Top-level replacements for NPK C functions (for MSHookFunction) -----
static BOOL (*orig_NPKAddToWatch)(id) = NULL;
static BOOL (*orig_NPKSEProv)(id) = NULL;
static BOOL (*orig_NPKGlory)(id) = NULL;
static BOOL (*orig_NPKConnectedFromService)(id) = NULL;
static BOOL (*orig_NPKCurrentlyPairing)(void) = NULL;
static BOOL repl_NPKAddToWatch(id pass) {
wp11log(@" [passd] NPKIsAddToWatchSupported → YES (forced)");
return YES;
}
static BOOL repl_NPKSEProv(id dev) {
wp11log(@" [passd] CanProvisionSecureElementPasses → YES (forced)");
return YES;
}
static BOOL repl_NPKGlory(id dev) {
wp11log(@" [passd] IsPairedDeviceGloryOrLater → YES (forced)");
return YES;
}
// CRITICAL: v7.8 — master quick-check gate. When this returns NO, NanoPassKit UI
// fires GIZMO_UNREACHABLE alert in <1s without any server call.
static BOOL repl_NPKConnectedFromService(id service) {
wp11log(@" [passd] NPKIsConnectedToPairedOrPairingDeviceFromService → YES (forced)");
return YES;
}
static BOOL repl_NPKCurrentlyPairing(void) {
// Say we're NOT currently pairing (so flow doesn't get blocked by "in-progress" state)
return NO;
}
// =====================================================================
// HOOKS: passd — Apple Pay provisioning bypass (v7.7)
// Strategy discovered via NanoPassKit.tbd + PassKitCore.tbd RE :
// • Apple EXPOSES native override keys (PKDeveloperSettingsEnabled,
// PKDeviceInformationOverrideProductType, PKClientHTTPHeaderOSPartOverride,
// PKClientHTTPHeaderHardwarePlatformOverride, PKBypassCertValidation)
// • NanoPassKit has Tinker/Demo/Simulated modes → relaxes validation
// • PKPaymentDeviceRegistrationData._productType is settable iVar
// • NPKPaymentPreflighter iVars expose all pre-flight flags
// =====================================================================
static void hookPassd(void) {
wp11log(@" [passd] === Apple Pay bypass v7.9 (truly surgical) starting ===");
// v7.9: MINIMAL scope - don't break Wallet UI
// Learnings from v7.7/v7.8:
// - NSUserDefaults global writes → broke Wallet
// - NPKBluetoothConnectivityCoordinator, NPKCompanionAgentConnection blanket hooks → broke Wallet
// - connectionAvailableActions → 0xFFFFFFFF → NSInvalidArgumentException
// - NPKPaymentPreflighter _needs*/_checked* blanket → breaks Wallet library sync
//
// v7.9 keeps ONLY:
// 1. The 5 NPKIs* C function hooks (only fire on Add Card quick-check)
// 2. One specific XPC responder method:
// -[NPDCompanionPassLibrary canAddSecureElementPassWithConfiguration:completion:]
// This is the exact XPC server method Bridge calls for Add Card.
dlopen("/System/Library/PrivateFrameworks/NanoPassKit.framework/NanoPassKit", RTLD_LAZY);
// ---- Step 1: 5 C function gates ----
void *npk = dlopen("/System/Library/PrivateFrameworks/NanoPassKit.framework/NanoPassKit", RTLD_LAZY);
if (npk) {
void *addrMaster = dlsym(npk, "NPKIsConnectedToPairedOrPairingDeviceFromService");
void *addrPairing = dlsym(npk, "NPKIsCurrentlyPairing");
void *addrAddToWatch = dlsym(npk, "NPKIsAddToWatchSupportedForCompanionPaymentPass");
void *addrSEProv = dlsym(npk, "NPKPairedOrPairingDeviceCanProvisionSecureElementPasses");
void *addrGloryOrLater = dlsym(npk, "NPKIsPairedDeviceGloryOrLater");
if (addrMaster) MSHookFunction((void *)addrMaster, (void *)repl_NPKConnectedFromService, (void **)&orig_NPKConnectedFromService);
if (addrPairing) MSHookFunction((void *)addrPairing, (void *)repl_NPKCurrentlyPairing, (void **)&orig_NPKCurrentlyPairing);
if (addrAddToWatch) MSHookFunction((void *)addrAddToWatch, (void *)repl_NPKAddToWatch, (void **)&orig_NPKAddToWatch);
if (addrSEProv) MSHookFunction((void *)addrSEProv, (void *)repl_NPKSEProv, (void **)&orig_NPKSEProv);
if (addrGloryOrLater) MSHookFunction((void *)addrGloryOrLater, (void *)repl_NPKGlory, (void **)&orig_NPKGlory);
wp11log(@" [passd] 5 NPK C gates hooked");
}
// ---- Step 2: THE XPC server method that Bridge hits during Add Card ----
Class passLib = NSClassFromString(@"NPDCompanionPassLibrary");
if (passLib) {
SEL sel = NSSelectorFromString(@"canAddSecureElementPassWithConfiguration:completion:");
if ([passLib instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(passLib, sel);
class_replaceMethod(passLib, sel,
imp_implementationWithBlock(^void(id self, id cfg, void(^completion)(BOOL, NSError *)){
wp11log(@" [NPDCompanionPassLibrary] canAddSecureElementPass → (YES, nil) (forced)");
if (completion) completion(YES, nil);
}),
method_getTypeEncoding(m));
wp11log(@" [passd] Hooked -[NPDCompanionPassLibrary canAddSecureElementPassWithConfiguration:completion:]");
}
} else {
wp11log(@" [passd] NPDCompanionPassLibrary NOT found (will be in NPKCompanionAgent)");
}
wp11log(@" [passd] === v7.9 surgical bypass installed ===");
}
// v7.8 — posix_spawn hook in SpringBoard to force DYLD_INSERT_LIBRARIES
// into Bridge.app when it spawns. No snprintf/format strings (logos bug).
static int (*orig_posix_spawn)(pid_t *pid, const char *path,
const posix_spawn_file_actions_t *file_actions,
const posix_spawnattr_t *attrp,
char *const argv[],
char *const envp[]) = NULL;
// v7.10: Hook in xpcproxy (where app spawns happen).
// Catch Bridge.app path (which nathanlr xpcproxyhook skips since not in allowed prefixes)
// Inject DYLD_INSERT_LIBRARIES=generalhook.dylib so generalhook loads WatchPair11 via TweakInject.
static int repl_posix_spawn(pid_t *pid, const char *path,
const posix_spawn_file_actions_t *file_actions,
const posix_spawnattr_t *attrp,
char *const argv[],
char *const envp[]) {
// Intercept Bridge.app launch from xpcproxy
BOOL isBridge = path && (strstr(path, "/Bridge.app/Bridge") != NULL);
BOOL isVarContainers = path && (strstr(path, "/var/containers/Bundle/Application/") != NULL ||
strstr(path, "/private/var/containers/Bundle/Application/") != NULL);
if (isBridge && isVarContainers) {
wp11log(@" [xpcproxy] Bridge intercepted, injecting generalhook+WatchPair11");
// Inject generalhook (which auto-loads TweakLoader + all TweakInject filters)
// Path is resolved at runtime under roothide because the jbroot prefix is randomized.
char injectLibBuf[1024];
snprintf(injectLibBuf, sizeof(injectLibBuf), "%s:%s",
WP11_JBROOT("/usr/lib/hooks/generalhook.dylib"),
WP11_JBROOT("/Library/MobileSubstrate/DynamicLibraries/WatchPair11.dylib"));
const char *injectLib = injectLibBuf;
int nenv = 0;
if (envp) for (char *const *e = envp; *e; e++) nenv++;
char **newenv = (char **)calloc(nenv + 2, sizeof(char *));
int ni = 0;
BOOL foundDyld = NO;
// Build "DYLD_INSERT_LIBRARIES=<lib>" manually (no format string)
size_t dlibLen = strlen(injectLib);
char *dyldBuf = (char *)malloc(dlibLen + 32);
strcpy(dyldBuf, "DYLD_INSERT_LIBRARIES=");
strcat(dyldBuf, injectLib);
if (envp) {
for (char *const *e = envp; *e; e++) {
if (strncmp(*e, "DYLD_INSERT_LIBRARIES=", 22) == 0) {
size_t exLen = strlen(*e);
char *mixed = (char *)malloc(dlibLen + exLen + 32);
strcpy(mixed, "DYLD_INSERT_LIBRARIES=");
strcat(mixed, injectLib);
strcat(mixed, ":");
strcat(mixed, (*e) + 22);
newenv[ni++] = mixed;
foundDyld = YES;
} else {
newenv[ni++] = *e;
}
}
}
if (!foundDyld) {
newenv[ni++] = dyldBuf;
} else {
free(dyldBuf);
}
newenv[ni] = NULL;
int result = orig_posix_spawn(pid, path, file_actions, attrp, argv, newenv);
wp11log(@" [xpcproxy] Bridge spawned pid=%d result=%d", pid ? *pid : -1, result);
return result;
}
return orig_posix_spawn(pid, path, file_actions, attrp, argv, envp);
}
static void hookBridgeSpawn(void) {
wp11log(@" [xpcproxy] Installing posix_spawn hook");
MSHookFunction((void *)posix_spawn, (void *)repl_posix_spawn, (void **)&orig_posix_spawn);
}
// =====================================================================
// HOOKS: Message Relay - Envoi de messages depuis la Watch
// Le Watch envoie via IDS → imagent doit relayer (iMessage/SMS)
// imagent refuse car il voit iOS 16 = "device incompatible"
// =====================================================================
static void hookMessageRelay(void) {
// Charger les frameworks iMessage
dlopen("/System/Library/PrivateFrameworks/IMFoundation.framework/IMFoundation", RTLD_LAZY);
dlopen("/System/Library/PrivateFrameworks/IMCore.framework/IMCore", RTLD_LAZY);
dlopen("/System/Library/PrivateFrameworks/IMDPersistence.framework/IMDPersistence", RTLD_LAZY);
dlopen("/System/Library/PrivateFrameworks/IMDaemonCore.framework/IMDaemonCore", RTLD_LAZY);
dlopen("/System/Library/PrivateFrameworks/IMTransferServices.framework/IMTransferServices", RTLD_LAZY);
// === 1. Hook IMService — le service iMessage/SMS vérifie la compatibilité ===
Class imServiceClass = NSClassFromString(@"IMService");
if (imServiceClass) {
// Scanner les méthodes pertinentes
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(imServiceClass, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"relay"] ||
[selName containsString:@"Relay"] ||
[selName containsString:@"canSend"] ||
[selName containsString:@"companion"] ||
[selName containsString:@"Companion"] ||
[selName containsString:@"remote"] ||
[selName containsString:@"Remote"] ||
[selName containsString:@"forward"] ||
[selName containsString:@"Forward"] ||
[selName containsString:@"compat"] ||
[selName containsString:@"supported"] ||
[selName containsString:@"available"] ||
[selName containsString:@"enabled"]) {
wp11log(@"IMService method: %@", selName);
}
}
if (methods) free(methods);
}
// === 2. Hook IMDService (daemon-side) ===
Class imdServiceClass = NSClassFromString(@"IMDService");
if (imdServiceClass) {
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(imdServiceClass, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"relay"] ||
[selName containsString:@"Relay"] ||
[selName containsString:@"canSend"] ||
[selName containsString:@"forward"] ||
[selName containsString:@"compat"] ||
[selName containsString:@"remote"] ||
[selName containsString:@"companion"]) {
wp11log(@"IMDService method: %@", selName);
}
}
if (methods) free(methods);
}
// === 3. Hook IMAccount — le compte iMessage/SMS vérifie si le relay est autorisé ===
Class imAccountClass = NSClassFromString(@"IMAccount");
if (imAccountClass) {
// Force les méthodes de relay/capabilities → YES
for (NSString *selName in @[@"allowsSMSRelay",
@"isSMSRelayCapable",
@"isSMSRelayEnabled",
@"allowsRelaying",
@"isRelayingEnabled",
@"isRelaySMSEnabled",
@"canRelaySMS",
@"supportsRemoteMessages",
@"isActive",
@"isEnabled",
@"isConnected",
@"isOperational"]) {
SEL sel = NSSelectorFromString(selName);
if ([imAccountClass instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(imAccountClass, sel);
if (m) {
class_replaceMethod(imAccountClass, sel,
imp_implementationWithBlock(^BOOL(id self) {
wp11log(@"IMAccount.%@ -> YES (forced)", selName);
return YES;
}),
method_getTypeEncoding(m));
wp11log(@"Hooked IMAccount.%@ -> YES", selName);
}
}
}
// Scanner d'autres méthodes relay
unsigned int methodCount = 0;
Method *methods = class_copyMethodList(imAccountClass, &methodCount);
for (unsigned int i = 0; i < methodCount; i++) {
NSString *selName = NSStringFromSelector(method_getName(methods[i]));
if ([selName containsString:@"relay"] ||
[selName containsString:@"Relay"]) {
wp11log(@"IMAccount relay method: %@", selName);
}
}
if (methods) free(methods);
}
// === 4. Hook IMDAccount (daemon-side account) ===
Class imdAccountClass = NSClassFromString(@"IMDAccount");
if (imdAccountClass) {
for (NSString *selName in @[@"allowsSMSRelay",
@"isSMSRelayCapable",
@"isSMSRelayEnabled",
@"allowsRelaying",
@"isRelayingEnabled",
@"canRelaySMS",
@"isActive",
@"isEnabled",
@"isConnected",
@"isOperational"]) {
SEL sel = NSSelectorFromString(selName);
if ([imdAccountClass instancesRespondToSelector:sel]) {
Method m = class_getInstanceMethod(imdAccountClass, sel);
if (m) {
class_replaceMethod(imdAccountClass, sel,
imp_implementationWithBlock(^BOOL(id self) {
wp11log(@"IMDAccount.%@ -> YES (forced)", selName);