How to Fix an Accidentally Deleted Android System Partition

 

What to do if you accidentally deleted your android's /system partition ?

I also deleted my android's system partition on my Redmi Y2 or S2 using the fastboot mode, I was trying to remove the Operating System of my phone using the fastboot mode but ended up deleting the whole /system partition. So, if you are in a same situation in which I was follow the following steps - 

How and Why did I deleted the /system from fastboot mode ?

I was trying to install a new custom rom to my phone named lineage os. This custom rom is best for battery backup and normal usage. So, I downloaded the zip file of this custom rom for my phone and flashed it. Something went wrong while flashing and now I was not able to boot into the Operating System and my custom recovery was also stuck on the boot logo(cause no any other custom recovery works with lineage OS except its own official custom recovery). I thought that the only thing i need to do is to remove the operating system using the Fastboot mode, so I searched for some Fastboot commands that can format all these partitions - System, Data, Vendor, Userdata, Persist. I got a command named - fastboot erase system. And I immediately used this command not knowing that this command is used to completely remove the whole Android system from the device. And that's how I removed the Android system from the device by deleting the /system partition.

How I recovered my device ?

I got into a silly situation as I explained in the earlier paragraph. After deleting the /system, I was able to boot into the recovery but was not able to use the recovery because the recovery was not able to mount the /data partition. Now, I was not even able to use my custom recovery to recover from what happened, there was no operating system on my device, the /system partition got deleted and the only option was to recover by only using fastboot mode. So, I told my problem to Android Professionals on Github  and they told me to download the firmware of my device, extract the system.img file from it and flash it on my device using the Fastboot Mode. And I did the same thing, firstly I downloaded the firmware of my device and extracted it but it didn't contain any system.img file. I downloaded all the firmwares of my device from different websites and I finally got one with system.img in it. I flashed the system.img and other partitions like - userdata.img, cache.img, boot.img, vendor.img. And now I was able to flash anything from the recovery, so I flashed the lineage os Operating system again and luckily it worked. And now currently I am using Lineage OS 19.1 on my device Redmi Y2 or Redmi S2 or ysl.

What should you do ?

If your situation is just as same as me than the best option will be to do the exact same of what I did. But if you have any other problem like stuck in a bootloop and not able to boot into the recovery than you can just use the Fastboot command - fastboot erase recovery and fastboot flash recovery recovery.img. These commands can be used to remove the previously installed recovery and then install a new recovery (plz search for a tutorial on youtube for how to install a custom recovery using fastboot mode if you face any problem or confusion). 

keywords-
  • what to do if you accidentally deleted the system partition.
  • what to do if you deleted the system partition on android 
  • I deleted the system partition on android 
  • What to do if your device is stuck in a bootloop
  • what to do if you deleted the whole android system
  • No any recovery working alongside lineage os
  • Custom recovery not booting up
  • custom recovery stuck on boot logo
  • custom recovery not working
  • custom rom bootloop
  • custom rom not working
  • custom os for android not working
  • lineage os not working

Post a Comment

0 Comments

close