The main way to do this involves hacking/cracking firmware. Go onto p2p and you'll find ready made images for a variety of phones. However, it is a painful process for each phone, and phone model type. You're basically working on many to get one, instead of working on one for many.