The most easy way is to flash on 3uTools, and select the option "Retain User's Data While Flashing".
open