[GH-ISSUE #314] [BUG] ".framework" tweaks injecting not work #287

Closed
opened 2026-03-03 15:32:22 +03:00 by kerem · 1 comment
Owner

Originally created by @user919722 on GitHub (Jan 17, 2025).
Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/314

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

Originally created by @user919722 on GitHub (Jan 17, 2025). Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/314 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](https://github.com/user-attachments/assets/98f272ba-c96d-40df-b35b-b9a4b57985f2) ![what the .framework looks like](https://github.com/user-attachments/assets/be74cac0-2a4e-4a1e-a459-ee861d0d60c3)
kerem 2026-03-03 15:32:22 +03:00
Author
Owner

@hugeBlack commented on GitHub (Jan 18, 2025):

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.

<!-- gh-comment-id:2599512923 --> @hugeBlack commented on GitHub (Jan 18, 2025): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LiveContainer#287
No description provided.