First of all u need to be rooted.
1.Download persist file n move it to main internal storage.
2.Install termux app
3.Give root permission by typing 'su' and press enter
4.Then copy paste this command
dd if=/sdcard/persist_EXT4.img of=/dev/block/by-name/persist
Then press enter
5.Then type 'reboot' n press enter
Phone will reboot
@vijayksha