There's no magical formula. What works for one company doesn't necessarily mean it'll work for another. MS hasn't decided what kind of company it wants to be yet, and I don't see the new CEO discovering what that is.
Making HW, and SW really well is much easier said than done. While using Android isn't ideal it has allowed the other manufacturers to survive, that gives them the potential to turn things around, and take the mantle from Samsung, but we'll never see another Palm device.