What are the right steps of flashing stock ROM using TWRP
(Tecno Spark K7, Android 7.0 Nougat, TWRP v3.0.2
), and still have TWRP Recovery
on the phone, after the process.
I already have the phone backed up and have the stock ROM as a zip file.
1 Answer
you need a linux machine for converting sparse image into raw partition image
sudo apt-get install android-tools-fsutils android-tools-adb android-tools-fastboot
simg2img system.img system.ext4
connect phone in twrp
adb push system.ext4 /dev/block/bootdevice/by-name/system
if file smaller than < 4 GiB you can rename to system.emmc.win, copy to sdcard and restore from twrp directly, or manually restore from built-in terminal
cat /external_sd/system.emmc.win > /dev/block/bootdevice/by-name/system
repeat this for vendor/odm (if exist). boot.img is already in raw format and can be renamed into boot.emmc.win directly
your data and internal storage is maybe encrypted, if you want to backup you need to adb pull /dev/block/dm-0 or /dev/block/bootdevice/by-name/userdata + /dev/block/bootdevice/by-name/metadata
or
make twrp backup and adb pull -p -a /sdcard