Resizing /System Partition on Galaxy S2 I am trying to resize my /system partition on my Galaxy S2 and as soon as I partition /system using various sizes I lose all of the mobile data connectivity &amp; IEMI number is invalid (missing)

However, returning back to stock partition and re-flashing stock ROM returns the IEMI number and mobile data connectivity is fixed.

I need to change my /system partition to 6GB but I can't find any way to stop this partition "bug". I tried hundreds of ways to fix this but none of them worked.

For the mean time I'm just running stock with root (King Root) &amp; I have installed TWRP via the TWRP App.
When re-partitioning the internal storage, you are wiping out the /efs directory that contains device-specific information, including phone's IMEI, wireless MAC address, etc.  This information is encrypted, so you will need to take extra steps to back up this folder, and restore it after partitioning.

You can do this manually by following the steps for backup:


On your computer (assuming Windows PC) open Command window and issue the following commands:


su - accept the prompt on the phone to allow root privileges.
busybox tar zcvf /sdcard/efsbackup.tar.gz /efs - this compresses the contents of the /efs directory and copies the file to your internal SD Card, preserving the Linux file permissions, OR
cat /dev/block/mmcblk0p1 &gt; /sdcard/efsdevblock-mmcblk0p1.img - this copies the entire partition as an image to your internal SD Card. This is probably a safer method.

Copy the file(s) created above (efsbackup.tar.gz and/or efsdevblock-mmcblk0p1.img) from your internal SD Card to your computer.


To restore you would need to do the reverse:


Copy either efsbackup.tar.gz or efsdevblock-mmcblk0p1.img from your PC to /sdcard (the internal SD Card) of your Galaxy S2.
On your PC open Command prompt and issue commands to restore the contents of /efs folder:


su - gain root privileges.
busybox tar zxvf /sdcard/efsbackup.tar.gz -C / - restores only the /efs folder, OR
cat /sdcard/efsdevblock-mmcblk0p1.img &gt; /dev/block/mmcblk0p1 - restores the entire partition containing the folder.



Alternatively, dev community members came up with apps (that you must either side-load or run from your PC) that will automate this process for you.

Keep in mind that while this works on many Samsung devices, other manufacturers store device-specific information in other locations of internal memory, so the instructions will be different, and apps may not work.