Probably by installing some hardened memory on your phone to prevent cosmic bitflips or the such.
Unless you are going to go to NASA lengths of hardware reliability, you can't really hope much for the software that has to deal with the issues of... how many different android phones are there?