Skip to content

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

@user919722

Description

@user919722

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions