Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

SMC breach

breaching into Macs just got EASIER! A menu bar utility from FiniteCode that talks directly to the Darwin kernel (she's rude, but we tamed her, iykyk) and broadcasts live power consumption, battery health, and logic board stats right to your screen.

AppIcon

Download for macOS

Features

  • Live Battery Power: Precise real-time wattage reading into the battery for charging, or the drain in Watts for discharging.
  • Adapter Wattage: Displays the total DC power entering the machine's logic board directly from the external AC adapter.
  • System Power Load: Live system load/uptime tracking alongside raw battery capacity.
  • Menu Bar Native: It lives quietly up top as a menu bar extra and won't mess with your dock.
  • Liquid Glass UI: Grouped layout that uses Apple's SF Symbols.

Screenshots

Screen.Recording.2026-08-01.at.00.01.33.mov

The Stack

  • UI: SwiftUI menu bar extra, SF Symbols.
  • Hardware Access: IOKit via Objective-C bridging, AppleSmartBattery, PowerTelemetryData.
  • Build: Xcode.

Building

Prerequisites:

  • Xcode installed.
  • M1 Mac or later. (BUT, Only Tested with MacBook Air M3.)

Spinning it Up:

  1. Download the .pkg from the link above.
  2. IMPORTANT: Actually follow the install guide in Releases. DO NOT SKIP 'EM.
  3. Open it up. It lives quietly up top as a menu bar extra, not gonna mess with your dock.
git clone https://github.com/Finite-Code/SMC_breach.git
cd SMC_breach

Open the project folder in Xcode, let the stuff index, and hit Cmd + R to build and run.

How this actually works

macOS doesn't natively broadcast a lot of this power info, so you have to go through hidden system APIs. This is exactly why apps like this are never on the App Store. I've yapped in my devlogs about IOKit being an absolute tragedy, but under the hood the app leverages it via Objective-C bridging to dig into the macOS power and battery subsystem. We connect directly to the AppleSmartBattery service. On M1 and later Macs, Apple introduced a detailed sub-dictionary called PowerTelemetryData. My PowerMonitor ObservableObject uses a timer to safely extract amperage, voltage, and internal states directly from these nodes. Working with these is kinda a nightmare for a newbie like me, so an open declaration: AI did help me here. To make this robust, everything is fetched using C functions and safely dispatched back to the main queue. I also heavily relied on defer { IOObjectRelease(...) } to ensure we don't leak memory. Quality > security panic, and it's open source so you can see exactly what's going on under the hood.

External Help

AI/LLMs were used for the following things:

  • Gemini and Claude: helped me in surviving my 3 hours of debugging and doing the heavy-lifting on researching the crazy powermetrics IOKit C APIs.
  • General low-level IOKit work because these nodes are kinda a nightmare for a newbie.

Shoutouts

  • The OSS Community: For the extensive research and forum posts that helped me crack into the AppleSmartBattery nodes. Old aldente code, coconut battery etc ohh and Reddit too
  • Stardance: For the hackathon infrastructure, which is what actually motivated me to make this.

Stay tuned, I'm trying to get charge control and live USB readings out of doze nutss next. Hopefully unless I'm hit with these month long exams again, bcuz I was inactive for 2 months due to the same. Peace.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages