[Xiaomi Redmi 3s Guides, News, & Discussion] Abhijeet Rajgor:
4 this kind of guys x)

Warning:
Your device will never boot :D
Does this enough?
Ok jk but consider its possible
So don't blame me,
not responsible for anything

Trick:

Read 2nd Post First

(if u think necessary)(i would)

Why ?? :

Cuz u want to increase/decrease size on internal storage/internal sd card/nand/emmc.

So u can save Avengers 1080p in dual audio

I.e. default internal storage will increase from 24.x GB to 26.x GB :)

Sounds cool ?

Go ahead

Tools required:

0. Nandorid Backup ,

back up everything every way you can/know

1. Rooted Phone

2. Custom Recovery with ADB Sideload

3. Minimal ADB and Fastboot Tools(for Computer)

4 parted utilities.zip (download from below)

5. Computer should recognise device for that install necessary drive

6. brain, commen sense, patients,calm etc.

---> PROCEDURE/STEPS

(will add screen shot, Rewrite again )

1.

Extract 'parted' from zip copy to "/system/bin"

(if can't Open Es File explorer app>find & tape Root explorer option>mount r/w option> mount system to r/w (read/write allow)

2.

Put phone in TWRP Recovery

3.

Connect to computer

On command line interface

(Windows>Run>CMD>enter)

#commands:

adb shell

su

parted /dev/block/mmcblk0

you will see the following screen

4.

Now to see the partitions and their partition numer use the following command

print

It will output a screen like follows

From the list above we can see partition number, the start position, the end position and the type of partition

Now from the List we need to figure out what partitions we need to remove and remake, and since we are majorly concerned about the Userdata and system partition, we will be playing around with those partitions only. But from the screenshot above you can see that Between the system and the userdata partition there is the cache partition.

To avoid any problems further. i would suggest you take a screenshot of this list .

5

Now Enlisting the partitions that we would have to remove inorder to resize them, they are:-

partition no. 27 i.e. system

partition no. 28 i.e cache

partition no. 29 i.e. userdata

In case you are using a device that has 2 system partitions (For eg. MI3) and you wanna reduce system2 and increase system1 you will need to delete only those 2 partitions

So now going further we will now remove the partitions using the following commands

rm 27

The above command will remove the partition no. 27 i.e the system partition

rm 28

This will remove the partition no. 28 i.e cache

rm 29

This will remove the partition no. 29 i.e. userdata

At this point of time you have lost all the data on your internal storage, system and cache partition. that means your device wont boot anymore except in recovery (which we are already in )

6.

Now that we have removed the partitions, we have raw space with us, which we would allocate to the three partitions that we removed, as per our choice.

To do that, we use the following commands

mkpartfs primary ext2 336 1250

mkpartfs primary ext2 1250 1653

mkpartfs primary ext2 1653 7818

336 is the start position of the partition and 1250 is the end position of the paritition.

since the partitions we removed started at 336 and ended at 7818, for my device, we would be able to play around only between these two numbers. i.e 336 and 7818

The first parition we made here is numbered 27 by default and will be of the size (1250-336 = 914) MBs

The second partition we made is numbered 28 and will be of the size 403 MB. (This is the cache partition and since I did not want to change the size i kept it the same)

The third partition we made is numbered 29 and will be of the size (7818-1653 = 6165) MB

The Important thing we need to note here is that the partition Number should not change as this could cause problems later on. i.e., considering my case the system parition should be 27, cache should be 28 and userdata should be 29.

7.

Now we will name these partitions using the following commands

name 27 system

name 28 cache

name 29 userdata

8.

Now punch the following command

quit

This will make you come out of parted utility. so that we can perform the next set of commands

Now we need to convert the partitions from ext2 to ext4 using the following commands

**// For System Partition //**

tune2fs -j /dev/block/mmcblk0p27

e2fsck -fDp /dev/block/mmcblk0p27

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p27

e2fsck -fDp /dev/block/mmcblk0p27

**// **

**// For cache Partition //**

tune2fs -j /dev/block/mmcblk0p28

e2fsck -fDp /dev/block/mmcblk0p28

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p28

e2fsck -fDp /dev/block/mmcblk0p28

**// **

**// For userdata Partition //**

tune2fs -j /dev/block/mmcblk0p29

e2fsck -fDp /dev/block/mmcblk0p29

tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p29

e2fsck -fDp /dev/block/mmcblk0p29

**// **

9.

Now we have changed the type of the 3 partitions that we created from ext2 to ext4 and we are ready to go

Now we will enter the parted utility again and check to see if the partitions are made properly or not.

parted /dev/block/mmcblk0

print

As we can see in the screenshot. The system partition is now 914 MB and the userdata partition is no 6165 MB

Now punch the command

quit

exit

exit

Yes you need to exit two times.. first to come out of super user and second to come out of ADB shell

10.

Now Once the repartitioning is done

you need to flash your ROM

(MIUI /Lineage/RR/Viper/Mokee etc)

Now exit sideload in the TWRP and goto Install and select the Rom package and flash it.

Reboot and you should be done!

CREDITS, Thanks :

https://iwf1.com/how-to-re-partition-your-android-tablet-or-smartphone-all-options-included-change-size-fs-type-etc

https://xdaforums.com/crossdevice-dev/android-one-general/guide-repartition-internal-storage-to-t3292159

http://en.miui.com/thread-183258-1-1.html