Free SD Card Photo Recovery on Mac: PhotoRec Blocked?
In this article
If PhotoRec is blocked on your Mac, it is usually because macOS Gatekeeper or System Settings privacy controls are preventing the unsigned command-line tool from running. You can fix this by right-clicking the app to open it, using the `chmod` command in Terminal, or granting Full Disk Access, and then PhotoRec will recover photos from your SD card for free.
Why PhotoRec Gets Blocked on macOS
PhotoRec is a free, open-source data recovery utility distributed by CGSecurity. It is a command-line program, and the Mac version is not signed with an Apple Developer ID and not notarized by Apple. Since macOS Catalina (10.15), Gatekeeper requires all downloaded software to be notarized. When you try to run an unsigned tool like PhotoRec, macOS may show a warning like “PhotoRec cannot be opened because the developer cannot be verified” or simply refuse to execute it. Additionally, on newer macOS versions (Monterey and later), even after you allow it in System Settings, the Terminal or the app itself may need Full Disk Access to read the raw SD card device, otherwise it appears blocked or returns a permission error.
How PhotoRec Actually Works
PhotoRec does not use the file system to find deleted photos. Instead, it scans the raw storage blocks of the SD card and looks for file signatures—specific byte patterns that mark the start of a JPEG, PNG, RAW, or other file format. This is called “carving.” Because it ignores the file system, it can recover files even after the directory entries have been overwritten or the card has been reformatted. However, this also means it recovers files without their original names and may recover many fragments or corrupted files if the card has been heavily used after deletion.
To use PhotoRec on a Mac, you typically download the TestDisk/PhotoRec package, extract it, and run `photorec` from the Terminal. The tool presents a text-menu interface where you select the disk (the SD card), the partition, the file system type, and the destination folder for recovered files. It then scans and saves whatever it finds.
How to Unblock PhotoRec (Step-by-Step)
- Download and extract the Mac version of TestDisk/PhotoRec from the official CGSecurity website. Use a tool like The Unarchiver or the built-in Archive Utility to extract the ZIP file.
- Right-click the extracted folder (or the `photorec` file inside) and select “Open” from the context menu. If macOS shows a warning, click “Open” again in the dialog. This adds a Gatekeeper exception for that specific file.
- If right-click Open does not work, open Terminal and navigate to the folder: `cd ~/Downloads/testdisk-7.2` (adjust the path to your actual folder). Then run `chmod +x photorec` to make it executable, and run `./photorec`.
- Grant Full Disk Access to the Terminal app (or to PhotoRec if it has a GUI wrapper). Go to System Settings → Privacy & Security → Full Disk Access, click the “+” button, and add Terminal. This is required for PhotoRec to access the raw SD card device on macOS 10.14 and later.
- If you still get a “Kernel panic” or “Resource busy” error, unmount the SD card first. In Finder, right-click the SD card icon and select “Eject.” Do not physically remove the card—just unmount the volume so PhotoRec can access the raw device.
Common Problems and Fixes
- “PhotoRec cannot be opened because the developer cannot be verified” – This is the Gatekeeper warning. Right-click → Open, or go to System Settings → Privacy & Security and click “Open Anyway” next to the blocked message.
- “You don’t have permission to access this device” – This usually means Full Disk Access is missing. Add Terminal (or the PhotoRec wrapper) to Full Disk Access and restart Terminal.
- PhotoRec finds no files – The SD card may be physically damaged or the photos may have been overwritten. Try a different card reader, and avoid writing any new data to the card.
- Recovered files are corrupted – This is common when the card has been used after deletion. PhotoRec may salvage partial files; try a tool like `strings` or open them in a viewer to check.
- PhotoRec crashes or hangs – Try running it with `sudo` (but be careful) or use the 64-bit version. Also, ensure you have enough free disk space on the destination drive—at least double the size of the SD card.
PhotoRec vs. Other Free Mac Recovery Tools
PhotoRec is not the only free option. Other tools like TestDisk (its sister program) can repair partition tables, and Disk Drill has a free trial that recovers up to 500 MB. However, PhotoRec is unique because it is completely free, open-source, and does not have a recovery size limit. Its downside is the command-line interface and lack of file names. GUI tools like Disk Drill or ExifTool (for metadata) are easier for beginners but may cost money for full recovery. If PhotoRec is blocked, you can also try ddrescue (for creating a disk image) followed by PhotoRec on the image, which is often safer for damaged cards.
Costs and Safety Considerations
PhotoRec is completely free. There are no hidden costs or premium tiers. However, using it carries risks: if you write recovered files to the same SD card, you may overwrite the very data you are trying to save. Always save recovered files to a different drive (e.g., your Mac’s internal disk or an external hard drive). Also, PhotoRec can be resource-intensive and may take hours for a large card. It is safe to use on a Mac, but you should never run it on a card that is currently mounted with write access—unmount it first to avoid file system corruption.
Alternatives When PhotoRec Is Blocked
If you cannot unblock PhotoRec, or if it fails to work, consider these alternatives:
- TestDisk – Can rebuild the partition table, which may make deleted files visible again without carving.
- Disk Drill (free trial) – Has a graphical interface, but the free version only recovers up to 500 MB.
- PhotoRec via a Live Linux USB – Booting from a Linux live USB bypasses macOS permissions entirely, and PhotoRec is often pre-installed or easily installed.
- Use a different computer – If you have access to a Windows or Linux machine, PhotoRec runs there without Gatekeeper issues.
Frequently Asked Questions
Can PhotoRec recover photos from a formatted SD card?
Yes, PhotoRec can recover photos from a formatted SD card, as long as the data has not been overwritten. Formatting usually only clears the file system index, not the actual photo data. However, if you have written new files to the card after formatting, those new files may overwrite the old photos, reducing recovery chances.
Does PhotoRec recover photos in their original file names?
No. PhotoRec recovers files with generic names like `f1234567.jpg` and places them in numbered folders. It does not preserve the original file names, folder structure, or dates. If you need those, you may need to manually rename files or use a different tool.
Why does PhotoRec need Full Disk Access on Mac?
macOS restricts direct access to storage devices for security. Full Disk Access allows Terminal (or PhotoRec) to read the raw device nodes (`/dev/disk*`) that represent the SD card. Without this permission, the tool cannot scan the card at the low level required for file carving.
Can I use PhotoRec on a Mac with Apple Silicon (M1/M2)?
Yes, PhotoRec has an Apple Silicon version. Download the appropriate package from CGSecurity (look for the arm64 version). If you run the Intel version, it will work through Rosetta 2, but the native version is faster.
Will PhotoRec damage my SD card?
PhotoRec only reads from the SD card; it does not write to it. However, if you accidentally choose the wrong destination drive and write recovered files to the SD card itself, you could overwrite data. Always double-check the destination folder and ensure it is on a different drive.