Try two things.
1. You keep on the ac adapter and then try to upgrade 5.50 - GEND. If its still goes on and off , I really doubt it would be with any softare issue. In that case better visit service center
2. Try using your Pandora battery. You must have those while flashing OFW and installing CFW.
Hope above suggestiong will come to your help.