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

Don't scan /private/var/mobile #1337

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Don't scan /private/var/mobile #1337

merged 1 commit into from
Mar 4, 2024

Conversation

CastanaEddd
Copy link
Contributor

Results in large loading times on jailbroken devices and causes some devices to hang.
Probably something that shouldn't be done on launch, maybe have this as a manual button/toggle inside the app?
Fixes #1227

@CastanaEddd
Copy link
Contributor Author

@jonahdecker
Copy link

Before: https://files.catbox.moe/9qpdyp.mp4

After: https://github.com/jpd002/Play-/assets/128545778/4a67606c-51e1-4aa2-8c9b-1e1ae68f5c53

How did you change that so it only scans the Play! folder? I am trying to patch Play! to work on iOS 17 with TrollStore, but I keep running into lagging issues unless I am using iPhone Pro model. I have successfully enabled JIT and my app runs un-sandboxed, but there is something wrong with the emulator that causes it to lag.

@CastanaEddd
Copy link
Contributor Author

CastanaEddd commented Jan 31, 2024

Sorry for the delayed response this never showed up in my inbox for some reason.
Also I'm not quite sure what you're asking about... You can view the changes I've made with this pull request in the "files changed" section of this page.

If you're confused on what's happening, basically on launch Play! will attempt to scan /private/var/mobile if an "active directory?" isn't specified (default behavior) or if a full device scan is forced (done when you scan through the settings page). For some reason this causes a bit of lag and results in the device being stuck on "Building Collection" indefinitely.
What this pull request does is it changes it so that it only does that scan when a full device scan is forced.

This normally isn't a problem unless given permission to, something that's done on jailbroken installs and probably trollstore too when ran unsandboxed.

A compiled ipa with this change can be found in the github actions page of this fork.

@jonahdecker
Copy link

jonahdecker commented Feb 2, 2024

Thank you! I think you are right about the scan being indefinite because I have been trying to patch Play! to work with TrollStore on iOS 17 with no luck. It runs, but the lag in game is really bad and CocoaTop lists the Play.app process around 100 times and used nearly all of my CPU. These processes never end, so I think you are right. I will test out your IPA and see if it works.

Looks like TrollStoreJitEnabler, which is what I inject into Play! to enable JIT via TrollStore, is the problem. The app will crash unless I inject flotsam as well (makes iOS not kill your processes).

@CastanaEddd
Copy link
Contributor Author

CastanaEddd commented Feb 3, 2024

Hmm seems like the issue you're facing might be unrelated to what this patch is trying to address, but I'm glad to hear you got it working :)

Also on an unrelated note trollstore recently got native support for launching apps with JIT. With the new update you can open trollstore then launch Play! with JIT from there. Combined with the custom URL-scheme you could create a shortcut to automatically enable and launch the app with JIT. Might possibly be a better alternative to whatever tweak you're trying to inject to into it.

@jonahdecker
Copy link

jonahdecker commented Feb 14, 2024

I heard about that. However, I wanted to get the apps to have JIT enabled natively without any shortcuts or going through TrollStore. I was actually able to fix the bug in TrollStoreJitEnabler that was causing memory issues by changing one line of code. Now I have Play! patched correctly and JIT works natively. If you use the dylib from my fork and sign with the required_entitlements.plist file it will work.

It can be used to enable JIT without having to launch TrollStore for any app you want.

@jpd002
Copy link
Owner

jpd002 commented Mar 4, 2024

I've been super out of the loop with iOS stuff, sorry about that. Since everyone seems to agree this is a good change, I'll merge it in. Thanks!

@jpd002 jpd002 merged commit 5655c63 into jpd002:master Mar 4, 2024
13 checks passed
@jonahdecker
Copy link

I've been super out of the loop with iOS stuff, sorry about that. Since everyone seems to agree this is a good change, I'll merge it in. Thanks!

Great addition.

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

Successfully merging this pull request may close these issues.

Building collection, scanning games on filesystem
3 participants