Effective code injection for Snow Leopard 64-bit apps?

Recently I’m looking for a way to make Safari AdBlock support Safari in 64-bit.

64-bit apps stopped loading Input Manager bundles, so it is impossible to use SIMBL in 64-bit apps either. Neither does PlugSuit (which is using mach_inject). The web plugin solution suggested by 1Password team stopped working too. Frankly, I think it’s time to start looking for a better code injection technique for 64-bit Snow Leopard apps seriously.

What still works?

  1. Scripting Additions, it’s what 1Password using for all its plugins (for Safari, WebKit, Camino, NetNewsWire, etc.), basically it works for all apps that support Apple Scripts, but the problem is you’ll need to run a daemon to watch the launch of these apps, then send a custom Apple event to trigger the initialization of the code you inject.

  2. Use a DYLD constructor as initialization point, then use DYLD_INSERT_LIBRARIES or techniques described in this faq to trigger the load of this bundle or dynamic library. The problem is you will need all the users to modify their environment variables, which is cumbersome.

Is there any other solution? I’ll be glad to hear.

Author: jjgod

A software engineer from China, working on text rendering for a fruit company. Interested in typography and science fiction.

1 thought on “Effective code injection for Snow Leopard 64-bit apps?”

  1. SIMBL now works for 64 bit. I think using SIMBL is a good solution, because the code injection problem is done by SIMBL, and you don’t have to worry about it.

    SIMBL works using scripting additions at the moment I think.

Leave a Reply

Your email address will not be published. Required fields are marked *