Readit News logoReadit News
Posted by u/cindori 3 months ago
Show HN: I reverse engineered macOS to allow custom Lock Screen wallpaperscindori.com/backdrop...
Hi HN, I'm Oskar, a solo indie Mac developer from Sweden. For those in the Mac community, you might know me from my other apps like Sensei and Trim Enabler.

For years, I've been frustrated by the lack of customisation of macOS. In particular the Lock Screen which supports animated wallpapers, but only ones provided by Apple. There's never been a way to add your own personal videos.

I decided to figure out how to solve this, and the result is Backdrop 2.0. Backdrop is my Live Wallpaper app for Mac, it can play video wallpapers on your desktop. And now it can play on your Lock Screen too.

The core technical challenge, as you can imagine, came from trying to do something that Apple otherwise does not allow. However, through extensive reverse engineering of the macOS wallpaper system, I figured out a way to provide Backdrop wallpapers to the system in a way that allows them to play on the lock screen, and even appear in a custom section in System Settings.

I'm here all day to answer any questions—especially about the reverse engineering process, the challenges of integrating with macOS, or the experience of being an indie Mac developer.

Would love to hear your thoughts and feedback.

nerdjon · 3 months ago
Worth mentioning that if you want a free way to do this that does not require running additional software.

All you have to do is have a video you want to use, download one of apple's through settings, go to the location of the downloaded background (I don't remember where that is right now but a quick google search would take care of this), rename your file to the name of apple's file and then replace it.

Mac will act as if this video is the right video and use it without complaints. Until apple starts doing any checksum checks on these files I doubt this method will break anytime soon.

This has been working flawlessly for me for a while now.

This may take some finagling to make sure that your video file is not so large that your Mac can't handle it and that you are using the right format. But it is not hard to do.

cindori · 3 months ago
I think you will find that if you try to do that, it will actually not work properly. Visiting the lock screen repeatedly will eventually crash the wallpaper extension, producing a black screen. And updating macOS will reset all your wallpapers.

Backdrop uses a more advanced approach that ensures that it works seamlessly across reboots and macOS updates.

commandersaki · 3 months ago
seamlessly across reboots and macOS updates

Famous last words.

ronsor · 3 months ago
> Until apple starts doing any checksum checks on these files I doubt this method will break anytime soon.

Watch as this is used for malware persistence through a code execution exploit. Then Apple will start verifying the file content.

1970-01-01 · 3 months ago
.scr files are untrusted for this very reason.
doix · 3 months ago
What's reverse engineering like on a Mac? Have you ever written about it? I had a lot of experience reverse engineering things on windows (win32 + x86, before 64bit was a thing) using OllyDbg and patching binaries and/or (ab)using dlls. If I had to use windows again and wanted to customize something, I'd probably use windhawk nowadays [0].

On Linux, I can just compile software myself if I need to make changes. But usually most software is configurable enough that I don't need too.

On OSX, I feel like I'm helpless. I've found very little people writing about their experiences, the tools they use, their workflows, the reverse engineered data structures etc. Can you share how you approached this?

The fact that title bars on OSX aren't a fixed size drives me crazy every single day. I looked into it briefly and realized somehow everything I know about other platforms is basically useless.

[0] https://windhawk.net/

cindori · 3 months ago
I have not written about it yet. I use Hopper (https://www.hopperapp.com) to disassemble related binaries and frameworks. It's a great way to explore whats actually happening within macOS or Apple apps.

My current workflow is to run Hopper, export assembly files and then throw various agents (Gemini, Claude etc) at them to learn more or validate my theories. It's surprisingly effective! Maybe I'll write about it.

mthoms · 3 months ago
Please do!
worldsavior · 3 months ago
Here is my 2 cents:

You can run these days macOS as a virtual machine. I have some experience reverse engineering iMessage. Here I only needed to look into the network requests with some SSL pinning removal.

There are some decompiled libraries of Apple's libraries so it helps. Many tried to reverse engineer macOS/iOS before so there is a helpful amount of knowledge out.

I think the best way is just to open up a decompiler program and just start RE. The decompiled source code contains some metadata such as function names so it is readable.

cosmic_cheese · 3 months ago
> The fact that title bars on OSX aren't a fixed size drives me crazy every single day.

Are you talking about standalone titlebars or are you including merged/unified titlebars+toolbars? Plain titlebars have a single height and merged unified toolbars have a little bit of variance but not a lot.

Any significant variance beyond those is due to third party developers hiding the standard window chrome and drawing their own. You could probably tweak NSWindow instances to bring back the standard chrome, but it’s going to look strange since it’ll show in addition to the custom chrome.

doix · 3 months ago
I am so uneducated that I cannot even answer your question properly. But for example, the default terminal in OSX has a really nice thin bar. VSCode/Cursor have a _slightly_ thicker one. Google Chrome and Firefox are huge. The red/yellow/green buttons also don't have a consistent position between those applications.

Do you happen to know which are custom chrome and which are "unified"? It didn't occur to me that other programs could be drawing their own chrome, since they look _mostly_ native(at least to me). On windows, if something was using custom stuff it would just look completely different (i.e winamp).

I guess part of the problem is that I've never done native OSX development, so I don't know what the APIs or native toolkits are like.

iKlsR · 3 months ago
> The core technical challenge, as you can imagine, came from trying to do something that Apple otherwise does not allow

I think the main question most would ask is what affordances can you give or details you can share to prove that this will continue working in future versions of the os since the foundations seem brittle.

I use Wallpaper Engine on windows for one purpose mostly to avoid burn in since my monitors are always on but I've grown to like it over the years and would like to try something on mac but would hate to purchase software that stops working or future update comes with a readme of how to "re-enable" it.

cindori · 3 months ago
That’s totally valid. In the end, all apps on Apple platforms exist at the liberty of Apple. I have several friends who’ve seen their app stop working on Tahoe or previous macOS due to subtle changes in the SDK or the OS.

I think Backdrop fills a specific need that Apple does not want to cover, much like other utility apps like Bartender etc. It will likely require continuous updates, but I’m not new to that, having supported my Trim Enabler utility all the way from OS X Leopard to current macOS.

jaimehrubiks · 3 months ago
To me it's a bit too expensive for what it provides, so I'll probably not buy it. However I must agree that the hacks on the internet with renaming videos doesn't work very well, and I like the product, so I still wanted to say congratulations, well done.
cloudking · 3 months ago
This is awesome, nice work!

Next, can you please reverse engineer spaces (multiple desktops) so we can rename them? Desktop 1, Desktop 2 etc is not very useful.

captaincrowbar · 3 months ago
I like this and would seriously consider buying it - except that the purchase page only has prices in something called "AA$". I have no idea what currency that refers to (AA is Aruba, but they don't use dollars), or how much that might come to in my local currency.
whycome · 3 months ago
Must be a placeholder? But you briefly made me think it was some sort of Apple-specific currency. We really aren’t that far away from “Apple Bucks” are we?
squigz · 3 months ago
I'm a bit surprised Apple Coin doesn't exist yet.
cindori · 3 months ago
Thanks for reporting this! To clarify, what currency did you expect to see?
captaincrowbar · 3 months ago
I'm in Australia, you're Swedish (but I don't know if your business is based there), and most web sites show US prices by default. So I wouldn't like to guess whether it was meant to be AUD, USD, or SEK.
vevek · 3 months ago
I really like the wallpaper that plays on the top of your website. Can't seem to find it on the app. Could you point me in the right direction? https://cindori.com/backdrop
cindori · 3 months ago
It's not available (it's just a promotional video), but I've received to many requests for it so I guess I'll have to make a real wallpaper from it!
TuringNYC · 3 months ago
Hi Oskar - I'd love to propose a product idea to you, i'd love to buy something like this or the Mac if it were available. I had this on my linux laptop (https://man.archlinux.org/man/xtrlock.1.en) but it is surprisingly difficult to find for Macs -- something that locks the computer but still allows you to see the screen. This would be ideal for log windows, dashboards, etc.

Separately, if there is something like this already from a reputable MacOS appstore ecosystem i'd appreciate knowing about it from anyone.

jasonpeacock · 3 months ago
What you're asking for is called "kiosk" mode.

Here's a random app I found: https://www.mackiosk.com/

c22 · 3 months ago
I don't think this is quite the same thing as a kiosk setup, though depending on your specific goals you may find a kiosk-based solution to be an acceptable alternative.