The bomber acquired the device from Al Qaeda handlers in Yemen. It wasn’t an amateur effort. He was just stopped by vigilant crewmembers and passengers before he was able to detonate the main device.
Oh, OK. I saw something about firecrackers as well. Maybe just a confusion in the story.