Refurbishing a 2012 MacBook Air
A couple of days ago, I was sent a link to an advertisement on Facebook Marketplace for a defective Macbook Air in the city I live in. It was dirt cheap (40€) and only listed one error: "internal memory defective". Exactly the sort of cheap shenanigans I'm always up for. So I bought it.
Figuring out what's wrong with it
To be specific, the Macbook I bought was a 2012 13" Macbook Air. Given that "internal memory defective" is an incredibly vague term, there could be two options on what could be defective: the RAM (which would be a pain in the backside as that's soldered in) or the SSD (which would be no pain at all as that can just be swapped out). However, this issue was quickly resolved, as the MacBook booted just fine and only showed a folder with a question mark. Perfect.
So, is the SSD dead or just completely formatted?
There actually is a fairly simple solution to figure out what's wrong with the drive and the computer as a whole: the online recovery mode and the online Apple Hardware Test. Alternatively, you could also try booting from an USB, which is what I did first.
At first, I tried booting a version of Pop!OS, as it comes with a Live ISO and should have all of the features necessary to get the drive back up and running. However, Pop!OS could not boot, as it "couldn't find a hard drive". I also tried running Linux Mint, which came up with the same error. So I decided to try the GParted Live USB, which revealed which CPU is in this MacBook Air (an Intel Core i5-3427U), as well that the RAM (4GB of DDR3 memory) is fully functional. Partial success, but I still couldn't get into the actual partitioning Software within GParted, as that just froze and never showed anything.
Going after the Online Apple Solutions
So I decided to finally try the Apple Online Recovery Mode. Disk Utility within didn't show anything (only the Recovery Disk, which was probably set up as a RAM disk), so just installing Mac OS X was no option. I then decided to try the online Apple Hardware Test, which didn't show any issue with the SSD either, as there was another issue that stopped the test short: the battery was defective. What sealed the deal for me was this article by the Verge, which stated that the SSDs in 2012 MacBook Airs could be defective and that Apple used to offer a replacement program.
Fixing this machine
So I went online and ordered a new battery and a new SSD. These cost me about 80€ in total. One thing to look out for: Apple put about 70000 different types of connectors on their SSDs and it seems like they changed them every time an Apple employee sneezed. Okay, I might be exaggerating, the number of different connectors is about 10 (see this guide for more information); what I'm getting at is that finding the right SSD, or - in my case - the right adapter, can be troublesome. I ended up getting an adapter that's essentially a PCB that stacks between the SSD and the motherboard, making the SSD the tallest part on the board and causing the back panel to flex, but hey, it works!
Once the SSD and battery were installed it was basically plain sailing: Create a macOS Catalina Install USB with another machine, boot the MacBook from said USB, install macOS onto the new SSD, the whole shebang. And voilá, it's alive!
After then using the device for a couple of days and finding no further issues with it, I ended up selling it on, as I had no further use for another MacBook. While I was sad to let it go, ultimately I think it can find another life with others.