Phone: Mediatek Symphony V32(root privilleged)
My /system partition is messed up, I accidently deleted some system apps, and also some bin files. Although it's functioning properly, I pretty much want it to get back to it's original state. Hence I downloaded the stock firmware. The stock firmware came in a .zip extension. I also have twrp recovery on my phone. Is it possible to flash the entire thing using twrp? I unzipped the firmware.zip to see what's in there(I attached a screenshot of the file contents).
To view the contents of system.img, I did
mount -o ro,loop system.img system/
Now, I could see all the contents of what's in there in the system.img, like app, bin, data, init.rc and such. I copied a few app to my desktop, and tried copying them back to my phone and it said,
symlink could not be established. I can copy regular files to my phone. But only from system.img from pc to phone, it says symlink to found.
I was surfing the web, and came across a post where it said that the whole /system partition can be replaced with the original stock one if I had stock system.img using a
dd command. In order to do that I got the block of my system partition using
cat /proc/mounts which lead me to discover that the system partition is called from
/dev/block/platform/mtk-msdc.0/by-name/system. This file is a symbolic link to
/dev/block/mmcblk0p20 Hence, if I had to perform a dd command from the twrp terminal menu, I would have to do
dd if=/storage/sdcard0/system.img of=/dev/block/platform/mtk-msdc.0/by-name/system bs=512k
If all goes well I should have a stock /system partition. Now, I'm trying to be careful since there are some nasty stuffs I read online that could go wrong while doing this. What are your experience with it? Have you tried doing it before? What suggestions would you like to give me to be successful while doing this? Will doing this with twrp command line be a safe way to do that? What are the possibilities that the whole thing could go wrong?
P.S. I am for the moment am not intending to use spflashtool since I am in no position to do so(I don't have the proper resources to run the program on my pc atm).
Screenshot of the file contents: