For a project requirement I am trying to resize the memory partition on userdata (/data filesystem) to create a new file system. I am using parted on the device. When I tried to use resize command in parted mode for /data memory block, I am unable to do so because it is used by default in the device.
Error obtained :
Error: Partition /dev/block/mmcblk0p4 is being used. You must unmount it before
you modify it with Parted.
As this is /data folder I am unable to unmount it. When I tried to unmount I am getting following error.
umount /data
failed: Device or resource busy
I tried killing all the processes using this folder using lsof command. However, this contains all apps data so killing all those processes reboots device.
Can somebody help me ways to resize these partition? I need commands only through adb as I am trying to create an automatic script for this.