Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 9 Compatibility #8

Open
mr-gosh opened this issue Oct 29, 2015 · 7 comments
Open

iOS 9 Compatibility #8

mr-gosh opened this issue Oct 29, 2015 · 7 comments

Comments

@mr-gosh
Copy link

mr-gosh commented Oct 29, 2015

I can't get our Jailbroken iOS 9.0.2 Device to work with DiOS.
Any idea how complex the adjustments could be to get this fixed?

@awein
Copy link
Member

awein commented Oct 29, 2015

I'll have a look within the next few weeks.

@mr-gosh
Copy link
Author

mr-gosh commented Nov 16, 2015

in libimobildevice is a news that comments on some problems about iOS9:
http://www.libimobiledevice.org/

03.11.2015: Apple removed the ability to archive apps from an iOS device with iOS 9. Added Apple TV 4G and iPad Pro as supported devices.

@mr-gosh
Copy link
Author

mr-gosh commented Mar 7, 2016

is this dead? :(

@awein
Copy link
Member

awein commented Mar 7, 2016

@mr-gosh It isn't. But I stopped working on this until there is an other jailbreak for iOS 9.

Due to the removed archive option and the introduction of app thinning, DiOS for iOS 9 will probably not be able to archive apps anymore.

@mr-gosh
Copy link
Author

mr-gosh commented May 12, 2016

well there is still a way to archive the apps - but not through libimobiledevice...

@awein awein changed the title iOS 9.0.2 Compatibility? iOS 9 Compatibility Aug 8, 2016
@awein
Copy link
Member

awein commented Aug 8, 2016

Quick status update on iOS 9 support:

I did some first basic changes to support iOS 9. It's still work in progress but everyone who is brave enough can give it a try: https://github.com/DiOS-Analysis/Pilot/tree/ios9
Make sure to use the latest version of the Worker (DiOS-Analysis/Worker@619c119)

Please report any issues here and let me know how it goes.

@superaray
Copy link

I am currently testing the AAExecutor part on a jailbroken iOS 9.1 (iPhone 5S). However, the daemon throws an exception when checking if UIAutomation is enabled, despite the fact that I have enabled the UI Automation in the Settings - Developer options. I have extended the catch clause to output more information:

DDLogCInfo(@"starting ...");

// UIAutomation check
BOOL UIAutomationIsWorking = YES;

@try {
    DDLogCDebug(@"Accessing [UIATarget localTarget]");
    [UIATarget localTarget]; // <-- Throws exception
    DDLogCDebug(@"Checking if frontMostApp isVisible");
    [[UIATarget localTarget].frontMostApp isVisible];
    DDLogCDebug(@"Checking if PID not null");
    if (UIAutomationIsWorking &&
        [UIATarget localTarget].springboard.pid == nil) {
        UIAutomationIsWorking = NO;
    }
}
@catch (NSException *exception) {
    DDLogCDebug(@"NSException caught");
    DDLogCDebug(@"Name: %@", exception.name);
    DDLogCDebug(@"Reason: %@", exception.reason);
    DDLogCDebug(@"CallStackSymbols: %@", exception.callStackSymbols);
    DDLogCDebug(@"CallStackReturnAddresses: %@", exception.callStackReturnAddresses);
    DDLogCDebug(@"UserInfo: %@", exception.userInfo);
    UIAutomationIsWorking = NO;
}

if (!UIAutomationIsWorking) {
    DDLogCError(@"UIAutomation.framework is not working!!!");
    exit(1);
}

Here the output from idevicesyslog:

Feb 21 15:03:37 iPhone aaexecutord[4492] <Error>: starting ...
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: Accessing [UIATarget localTarget]
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: AXError: Could not auto-register for pid status change
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: Failed to enable accessiblity, kAXErrorAPIDisabled
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: NSException caught
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: Name: kUIAExeceptionNoAccessibility
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: Reason: Failed to enable accessiblity, kAXErrorAPIDisabled
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: CallStackSymbols: (
                0   CoreFoundation                      0x0000000185bfcf60 <redacted> + 148
                1   libobjc.A.dylib                     0x000000019a6bff80 objc_exception_throw + 56
                2   CoreFoundation                      0x0000000185bfce90 <redacted> + 0
                3   UIAutomation                        0x00000001000e9b20 +[UIAXElement initializeAccessibility] + 600
                4   UIAutomation                        0x00000001000ec994 +[UIAXElement uiaxSystemWideElement] + 36
                5   UIAutomation                        0x0000000100100f1c -[UIATarget init] + 396
                6   UIAutomation                        0x0000000100100d80 +[UIATarget localTarget] + 56
                7   aaexecutord                         0x0000000100042948 main + 384
                8   libdyld.dylib                       0x000000019af0e8b8 <redacted> + 4
        )
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: CallStackReturnAddresses: (0x185bfcf48 0x19a6bff80 0x185bfce90 0x1000e9b20 0x1000ec994 0x100100f1c 0x100100d80 0x100042948 0x19af0e8b8)
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: UserInfo: (null)
Feb 21 15:03:37 iPhone aaexecutord[4492] <Alert>: UIAutomation.framework is not working!!!

I have digged into the actual disassembly of UIAutomation, and have found out that AXDisableAccessibilityOnTermination returns -25211 which is the code for kAXErrorAPIDisabled. Thus, since it's not 0 (__text:0000000000001A80), an exception is thrown.

__text:0000000000001A78	loc_1A78				; CODE XREF: +[UIAXElement initializeAccessibility]+6Cj
__text:0000000000001A78			BL		_AXDisableAccessibilityOnTermination
__text:0000000000001A7C			MOV		X19, X0
__text:0000000000001A80			CBZ		W19, loc_1B20
__text:0000000000001A84			ADR		X0, cfstr_UiautomationFa ; "UIAutomation failed to load accessibility"
__text:0000000000001A88			NOP
__text:0000000000001A8C			BL		__UIATargetStackshot
__text:0000000000001A90			MOV		W0, #0
__text:0000000000001A94			BL		__AXSSetAutomationEnabled
__text:0000000000001A98			NOP
__text:0000000000001A9C			LDR		X20, =_OBJC_CLASS_$_UIAElement
__text:0000000000001AA0			ADRP		X25, #classRef_UIAXElement@PAGE
__text:0000000000001AA4			LDR		X0, [X25,#classRef_UIAXElement@PAGEOFF]
__text:0000000000001AA8			NOP
__text:0000000000001AAC			LDR		X21, =sel_stringForAXError_ ; "stringForAXError:"
__text:0000000000001AB0			MOV		X2, X19
__text:0000000000001AB4			MOV		X1, X21
__text:0000000000001AB8			BL		_objc_msgSend
__text:0000000000001ABC			NOP
__text:0000000000001AC0			LDR		X1, =sel__logVerbosity_format_ ; "_logVerbosity:format:"
__text:0000000000001AC4			STR		X0, [SP,#0x60+var_60]
__text:0000000000001AC8			ADR		X22, cfstr_FailedToEnable ; "Failed to enable accessiblity, %@"
__text:0000000000001ACC			NOP
__text:0000000000001AD0			MOV		W2, #0x1000
__text:0000000000001AD4			MOV		X0, X20
__text:0000000000001AD8			MOV		X3, X22
__text:0000000000001ADC			BL		_objc_msgSend
__text:0000000000001AE0			NOP
__text:0000000000001AE4			LDR		X20, =_OBJC_CLASS_$_NSException
__text:0000000000001AE8			ADR		X8, _kUIAExceptionNoAccessibility
__text:0000000000001AEC			NOP
__text:0000000000001AF0			LDR		X23, [X8] ; "kUIAExeceptionNoAccessibility"
__text:0000000000001AF4			LDR		X0, [X25,#classRef_UIAXElement@PAGEOFF]
__text:0000000000001AF8			MOV		X2, X19
__text:0000000000001AFC			MOV		X1, X21
__text:0000000000001B00			BL		_objc_msgSend
__text:0000000000001B04			NOP
__text:0000000000001B08			LDR		X1, =sel_raise_format_ ; "raise:format:"
__text:0000000000001B0C			STR		X0, [SP,#0x60+var_60]
__text:0000000000001B10			MOV		X0, X20
__text:0000000000001B14			MOV		X2, X23
__text:0000000000001B18			MOV		X3, X22
__text:0000000000001B1C			BL		_objc_msgSend
__text:0000000000001B20 <------ return address

I currently don't know why AXDisableAccessibilityOnTerminationis exactly failing, but it may have something to do with the entitlements, due to the backboardd log messages (22 = invalid argument/parameter):

Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: Accessing [UIATarget localTarget]
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone aaexecutord[4492] <Warning>: AXError: Could not auto-register for pid status change
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskLoadEntitlements failed error=22 cs_flags=6001004, task->pid_self=-1
Feb 21 15:03:37 iPhone backboardd[96] <Notice>: SecTaskCopyDebugDescription: aaexecutord[4492]

Does someone have any suggestions how to fix this? Or what the reason could be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants