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

after app installed, xcode stop running the app. #15

Closed
iOSleep opened this issue Mar 22, 2017 · 11 comments
Closed

after app installed, xcode stop running the app. #15

iOSleep opened this issue Mar 22, 2017 · 11 comments

Comments

@iOSleep
Copy link

iOSleep commented Mar 22, 2017

安装app后可以直接在手机打开app, 弹出默认添加的alert, reveal的framework也可以这场使用.
但是xcode里的应用已经退出了, 不像demo中的youtube, 还可以运行.
after app installed, xcode stop running the app, but i can run the app in my phone with method in IPAPatchEntry available.

xcode: 8.2.1
osx: 10.12.3
iOS: 10.2.1
app: https://pan.baidu.com/s/1jH8jJwU password: s43i

@Naituw
Copy link
Owner

Naituw commented Mar 23, 2017

This app is using some anti-debugger technique, prevents lldb to attach.

I just disabled it with b2efc00

Please pull and try again :)

@Naituw Naituw closed this as completed Mar 23, 2017
@wang9262
Copy link
Contributor

wang9262 commented Mar 23, 2017

After your fixing, Xcode becomes frozen when launches the app, and the app keeps showing the launch screen. It works very well when I head to the commit before b2efc00.

Any ideas about this?

Tested on iPhone 6 iOS 10.2 WeChat 6.5.5

@wang9262
Copy link
Contributor

FYI.
When I comment the disable_sysctl_debugger_checking() line in IPAPatchBypassAntiDebugging.m, It works again.

+ (void)load
{
    disable_pt_deny_attach();
//    disable_sysctl_debugger_checking();

#if TESTS_BYPASS
    test_aniti_debugger();
#endif
}

@Naituw Naituw reopened this Mar 24, 2017
@Naituw
Copy link
Owner

Naituw commented Mar 24, 2017

@wang9262 Thank you for reporting this! I corrected the implementation with ccb2b4d, and it seems work as expected now. please pull and try again

@Naituw Naituw closed this as completed Mar 24, 2017
@wang9262
Copy link
Contributor

uhh...It keeps freezing in my situation after pulling the newest master.And commenting the line metioned above,It works again.Do you need more info? If so,I will push my repo to reproduce this freezing case.

@Naituw
Copy link
Owner

Naituw commented Mar 27, 2017

@wang9262 Sorry for delayed reply. Would you push your repo please? I can't reproduce this issue since ccb2b4d

@Naituw Naituw reopened this Mar 27, 2017
@wang9262
Copy link
Contributor

wang9262 commented Mar 28, 2017

Because some network problems, the .ipa file and .framework upload so SLOWLY.I will upload them to some net disk Tonight.Sorry for delaying 😂.

Here is the repo IPAPatch-WeChat.I comment the line metioned above and you can uncomment it to reproduce the issue.

@Naituw
Copy link
Owner

Naituw commented Mar 28, 2017

Thanks! I will try it later

Update
@wang9262 I do reproduce this issue, but I didn't find the reason yet, I will do some experiment about it. I will let you know if I find something.
At this moment you can just comment that line when using IPAPatch with Wechat.

@Naituw
Copy link
Owner

Naituw commented Mar 29, 2017

@wang9262 I pushed another commit to fix this issue (6589581), it is a temporary workaround, may not reliable. Would you try this again please?

@wang9262
Copy link
Contributor

wang9262 commented Mar 29, 2017

@Naituw Great! It makes sense.Could you tell me more details about why this issue happen?

@Naituw
Copy link
Owner

Naituw commented Mar 30, 2017

@wang9262 This issue is very weird, I didn't really find the actual reason, just worked-around it. I find WeChat will call sysctl twice during launch:

  • first call's (*arg2).kp_proc.p_flag is a value contains P_TRACED
  • second call does not

If I didn't change the result of first call, WeChat will launch without problem, so I just bypass the first call by checking the input value of (*arg2).kp_proc.p_flag.

Since the actual reason haven't been discovered, I will open another issue to track this (#21).

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

No branches or pull requests

3 participants