All-inorganic perovskite battery preparation