The achievement of complete conversion of PbBr2 films presents a significant challenge in the development of CsPbBr3 films with consistent growth, comprehensive coverage, and controllable components. To address this challenge, introducing a porous structure in the planar PbBr2 film is advantageous for facilitating the immersion of CsBr precursor, thereby reducing impurity phase formation and mitigating strain caused by the film volume expansion. In order to accomplish this, indium tribromide (InBr3) was employed as an additive and the InBr3(DMF)3 adduct was utilized to expedite the release of organic molecules in PbBr2(DMF), resulting in the transformation of planar PbBr2 film into porous structures. The growth orientation of PbBr2 crystals was altered by this transformation, effectively suppressing the generation of metallic Pb impurities in the film. Additionally, it not only optimizes the morphology of CsPbBr3 film but also reduces impurity phase. As a result, the InBr3:CsPbBr3 perovskite solar cell achieved an efficiency of 7.28 %. The majority of In3+ ions were concentrated near the buried interface between SnO2 and InBr3:CsPbBr3, leading to significant improvements in both non-radiative recombination defect states within the perovskite film and electron injection and collection capabilities within the device.