1

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 & 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) & I have installed TWRP via the TWRP App.

0

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:

  1. 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 > /sdcard/efsdevblock-mmcblk0p1.img - this copies the entire partition as an image to your internal SD Card. This is probably a safer method.
  2. 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:

  1. Copy either efsbackup.tar.gz or efsdevblock-mmcblk0p1.img from your PC to /sdcard (the internal SD Card) of your Galaxy S2.
  2. 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 > /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.

0

REPIT from https://github.com/Lanchon/REPIT aims to preserve exiting data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.