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

[BUG] ".framework" tweaks injecting not work #314

Open
user919722 opened this issue Jan 17, 2025 · 1 comment
Open

[BUG] ".framework" tweaks injecting not work #314

user919722 opened this issue Jan 17, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@user919722
Copy link

I‘m having trouble injecting the .framework part of a tweak into apps via LC‘s tweak page (the tweak was specifically designed to work on jailed devices).

I‘ve attached what exactly I am injecting and what the framework looks like as images below.

First, I simply tried extracting the dylibs + framework from the .deb file, which resulted in the following error:

dlopen(/private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/iGSpoof.dylib, 0x0009): Library not loaded: @rpath/libsubstrate.dylib
  Referenced from: <D928E20E-9DAF-3125-9AA1-B4A53D75A5AC> /private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/iGSpoof.dylib
  Reason: tried: '/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/libsubstrate.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/libsubstrate.dylib' (no such file), '/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/libsubstrate.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/libsubstrate.dylib' (no such file), '/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Applications/com.hammerandchisel.discord.app/Frameworks/libsubstrate.dylib' (no such file), '/usr/local/lib/libsubstrate.dylib' (no such file), '/usr/lib/libsubstrate.dylib' (no such file, not in dyld cache)
dlopen(/private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/CustomOffsetPatcheriOSGodsCom.dylib, 0x0009): Library not loaded: @rpath/libsubstrate.dylib
  Referenced from: <8CA754B0-7742-3387-92C6-69C3E0F8F464> /private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/CustomOffsetPatcheriOSGodsCom.dylib
  Reason: tried: '/usr/lib/swift/libsubstrate.dylib' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libsubstrate.dylib' (no such file), '/usr/lib/libsubstrate.dylib' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/libsubstrate.dylib' (no such file), '/var/jb/usr/lib/libsubstrate.dylib' (no such file), '/private/preboot/Cryptexes/OS/var/jb/usr/lib/libsubstrate.dylib' (no such file), '/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/libsubstrate.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/libsubstrate.dylib' (no such file), '/usr/lib/swift/libsubstrate.dylib' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/libsubstrate.dylib' (no such file), '/usr/lib/libsubstrate.dylib' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/libsubstrate.dylib' (no such file), '/var/jb/usr/lib/libsubstrate.dylib' (no such file), '/private/preboot/Cryptexes/OS/var/jb/usr/lib/libsubstrate.dylib' (no such file), '/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/libsubstrate.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Tweaks/igg/libsubstrate.dylib' (no such file), '/var/mobile/Containers/Data/Application/3DDAF439-9B3C-4494-8226-9B2D8B3094DC/Documents/Applications/com.hammerandchisel.discord.app/Frameworks/libsubstrate.dylib' (no such file), '/usr/local/lib/libsubstrate.dylib' (no such file), '/usr/lib/libsubstrate.dylib' (no such file, not in dyld cache)

I managed to fix that by changing the dylib‘s paths to @rpath. I also included libsubstrate.dylib. I can confirm that the dylib-part of the tweak successfully loads in now.

However, the .framework part still doesn‘t load in. I‘ve tried deleting every dylib from the tweak folder (even libsubstrate) and then tried opening an app to see what error I would get. I didn‘t get an error message similar to the one above (no error at all actually). The same happens if I delete everything but the framework and libsubstrate.dylib: no error message and the app loads in like no tweaks are injected.

Now I‘m kinda at a loss. I didn‘t change anything about the .framework part of the tweak (simply copy pasted it from the .deb). I‘m using LC 3.2.0. Can LC not load any frameworks as tweaks or am I doing something wrong?

Any help appreciated!

what exactly I am injecting
what the .framework looks like

@hugeBlack
Copy link
Collaborator

Yes, this is a bug, I'll fix that soon. However it is unlikely that tweaks with assets will work with LiveContainer's tweak loader due to file location issues even if they are designed for rootless environment. It's recommended to directly inject the tweak to the app itself.

@hugeBlack hugeBlack changed the title [Maybe BUG] Trouble injecting ".framework" tweaks into apps [BUG] ".framework" tweaks injecting not work Jan 18, 2025
@hugeBlack hugeBlack added the bug Something isn't working label Jan 18, 2025
hugeBlack added a commit to hugeBlack/LiveContainer that referenced this issue Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants