Port persist installer support from AOKP (1/3)