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

How is the dylib API gonna work? #1

Closed
rweichler opened this issue Jan 30, 2015 · 6 comments
Closed

How is the dylib API gonna work? #1

rweichler opened this issue Jan 30, 2015 · 6 comments

Comments

@rweichler
Copy link

Are you gonna do it similar to dlopening everything in /Library/MobileSubstrate/DynamicLibraries... or something else? You said something about bundling this in a standalone application... how exactly would that work?

Also do you have an IRC chan?

And which iOS device/version are you primarily testing this on?

@h1rule
Copy link

h1rule commented Feb 4, 2015

Is this substitute available on any Cydia Source yet?

@shinvou
Copy link

shinvou commented Feb 4, 2015

@rweichler As of now it will be working like CydiaSubstrate: Substitute looks for the .dylib and the appropriate .plist in /Library/substitute/DynamicLibraries/ (but unlike CydiaSubstrate it requires a appropriate .plist to exist).
This information can be found in /ios-bootstrap/bundle-loader.m.

@rweichler
Copy link
Author

@shinvou thanks. I made a channel on freenode #substitute if anyone wants to join.

@comex
Copy link
Owner

comex commented Feb 4, 2015

To catch up with this:

  • Sorry I haven't really done anything in the last week. I've been busy with other things, so this is still broken and should not be installed; thus it is not on any source. That will probably change tomorrow or Friday.
  • Yes, the iOS interface for loading into the system is a copy of the Substrate one, although I expect to add some functionality for hot loading/unloading.
  • I'm testing this on iOS 8, but I want it to work on 7 as well; this is an arbitrary cutoff, but I'm not terribly interested in testing things on old platforms, since for most use cases you could just use Substrate.

As for bundling into a standalone application, if you want to interpose calls from some system library in your own app only, you can just statically link Substitute; might even be able to sneak into the App Store this way, although it's almost certainly against the rules. If you want to port to other platforms, you can also reuse however much makes sense... maybe contribute your changes back if you're nice (though the LGPL does require releasing the source of modified versions of Substitute itself).

@nabla-c0d3
Copy link

Thanks for your work, I've been waiting for something like!
Quick question: Will substitute require WX memory pages like substrate does ?

@comex
Copy link
Owner

comex commented Mar 2, 2015

I'm rather late, but to answer that question: direct function hooking requires the ability to change writable pages to executable, because that's pretty near unavoidable (maybe not completely, but the alternative would be a big mess). However, the library also supports dynamic interposing of symbol imports, which does not require WX.

Closing this since there doesn't seem to be an actual bug.

@comex comex closed this as completed Mar 2, 2015
comex pushed a commit that referenced this issue Nov 16, 2016
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

5 participants