I have a Alcatel C5 5036, initially with 4GB internal storage I have rooted it successfully, I tried to increase ram with "ROEHSOFT RAM Expander (SWAP)", After some unsuccessful tries, While any SWAP was not created, The internal storage decreased to 2.05GB, 2 GB has been lost! I tried SWAPoff for several times, but there was no any SWAP for it to remove now in storage or any other explorer location, it shows the total capacity of internal storage as 2.05GB, instead of 4GB. Please help me as to how to recover the lost storage.
Try to change partition size using GParted
Using adb you can dump whole internal storage to your PC this will work only on linux but since you will have to use gparted it shouldn't be a problem connect phone to the PC and type in the terminal
adb shell su cat /dev/block/mmcblk0 | busybox nc -l 6666
aasuming that your pc and phone are in the same network and phone's IP address is
in another terminal type:
nc 192.168.0.101 6666 > dump.img
after few minutes transfer should end and then you can edit
dump.img using gparted:
after editing partition layout dump it back to your phone (you may need to remount all partitions read-only before it)
adb shell su busybox nc -l 6666 > /dev/block/mmcblk0
and in another terminal
cat dump.img | nc 192.168.0.101 6666
The answer given by rav_kr certainly provides a solution – but looks a bit complicated to me. Not only does it require Busybox on the device, and deals with partitions over the network (one more possible cause of problems) – it involves too many steps. Hence here's my suggestion:
Backup the storage device (as described in mentioned answer) is always a good idea. But we can use an easier approach:
adb shell "su -c \"cat /dev/block/mmcblk0 > /sdcard/mmcblk0.img\""
- Install AParted (the Android pendant to GParted) and use it to re-partition the storage device directly:
AParted (source: Google Play; click images for larger variants)
Done. In case anything goes wrong, reverting changes is as easy as
adb shell "su -c \"cat /sdcard/mmcblk0.img > /dev/block/mmcblk0\""
And if you want to take a look first, there are other Android partitioning apps available as well – two from the same dev as your RAM Expander; but at least these two are rather expensive, while AParted comes for free.