How To: Re-partition Your Android Tablet Or Smartphone? (All Options Included: Change Size, FS Type, Etc…)

A general and inclusive walk-through on how to re-partition an Android device: create, delete or resize partitions, change file system types, labels and more…

Updated Nov 16, 2017How To's

The guide before you consists of 2 parts:

  • The first – a general explanation regarding the partitioning process and the tools needed.
  • The second part – a live example of how it’s done on a real device (physical, as opposed to virtual) with genuine screenshots.

Note: as much as I’d like to, I do not currently possess the resources to grant readers technical support. The guide itself, in the vast majority of cases should be sufficient help. For any individual issue please refer to online forums which are meant for that purpose.

Why Re-Partition?

If you’re here out of curiosity or any other reason than necessity, you may wonder: “why would anyone want to repartition a smartphone / tablet?”.

To answer, each person probably has their own reason, a couple of such I can think of are:

  1. In the case of an upgrade, when there’s not enough space on one partition but others has aplenty.
  2. When you don’t have enough space to install more apps – since your data partition is full – so you want to resize that partition.

Of course, some cases can be resolved via a more simple solution, however, if you want to deal with the problem directly and not just bypassing it – repartition is perhaps the best way to go.

On the same note though, I must warn anybody who tries repartitioning his/her Android device.

Warning: Re-partitioning your Android may lead to a complete breakage of your device software and may render it unbootable!  Do NOT engage unless you know what you’re doing.


ADB (Android Debug Bridge) installed – the reason we use ADB is it gives us a wider range of options in comparison to other software, such as Odin for instance, which only has limited set of features when it comes to repartitioning.

Partitioning tool – you may already have one installed on your device by default (I’ll explain later where to look for it), but just in case you haven’t here’s one for ARM 32-bit:

Parted 32-bit ARM

Note, if you’re unsure about the architecture type of your device, you may try look for it online or use Android system info apps like this one.

CLI (Command Line Interface) familiarity – the guide revolves around executing various commands in order to go through the partitioning process. There’s no GUI (Graphical User Interface) software that can achieve the same results at the moment.

Backup (Optional) – I recommend you backup everything prior to making any changes.

Partitioning Steps

In order to re-partition your device, basically, these are the steps you’ll need to make:

1. Connect your device to your PC.

2. Open up a command shell, on Windows you’d probably use CMD / PowerShell, on Mac / Linux – Terminal.

2-a. Reboot into recovery mode. (Optional, depends on the partition you plan to modify)

3. Use ADB to connect to your device.

4. Launch a partitioning software.

5. Start partitioning.

6. Reinstall any required system file in case you’ve deleted those and afterwards you may exit the shell and reboot your device.

Explaining The Steps

1. We use another machine, in this case our PC, in order to re-partition Android, because we want to have access to our Android system just in case something goes wrong during the partitioning, and also, since Android system cannot be run and resized at the same time.

2. This step is rather self explanatory. We must use a flexible tool that will assist us re-partitioning.

2-a. If you wish to modify any partition other than the recovery partition, I recommend booting into recovery mode in order to do so.

Being inside recovery mode wouldn’t interfere with the process as you may delete the system partition and its files. Furthermore, it might become handy in case you’ll need to reinstall Android system.

3. ADB is an official Android developers tool and it also happens to be the most suitable tool for the job at the moment.

To make sure ADB recognizes your device, issue:

adb devices

If you’re device is recognized you’ll see output similar to this:

androidi partition - adb devices

Check that ADB recognizes your device

To connect to your device you issue both:

adb root
adb shell

You should see a new command line host-name with a “#” sign next to it which indicates you’re connected as root user.

Note, you may need to navigate the command line shell into adb directory prior to issuing the commands.

4. In this step we launch the partitioning program we’re going to use by typing the name of the program and the right path to the block where our partitions lie (some devices may have more than one block).


androidi partition - parted

In case you get an output similar to the following in return: /sbin/sh: parted: not found  then it means parted tool is probably not installed.

Look for partitioning tools inside /sbin directory (or /system/bin if it’s mounted), and use what you find in there.

If you don’t have any partitioning tool pre-installed on your device, you may use the one mentioned in the ‘Requirements’ section if your device is of similar architecture, otherwise, google for a suitable one online.

To install the partitioning tool on your device, first exit the device shell (type exit, press enter), then issue the following (extract the file in case it is compressed prior to doing so):


This will install the partitioning tool on your device where it’ll remain until you reboot (upon reboot, Android automatically deletes unfamiliar files).

If Android complains you don’t have writing permissions to push the program into it, execute:

adb shell mount -o remount,rw /

This should remount the file system root directory with read & write permissions.

5. Step 5 may seem the shortest of all the above steps but it’s actually the longest and most important one.

Since this step depends on what you’re actually intending to do with your device – it doesn’t say much, it is an open step, open for your decisions that is.

By typing the help command of your partitioning tool you’ll get a list of the options available to you. For example, these are a few of the options you’ll see in parted:

  • rm NUMBER – will delete a partition
  • mkpart – will create a partition
  • unit UNIT – will set unit type, for example “unit b” will set parted to use bytes, “unit gb” for Giga bytes, etc… (Tip: use bytes for maximum accuracy).
  • name NUMBER NAME – lets you name the partition (upon making any changes, don’t forget to name the partitions properly).
  • q – quit parted.

Important Things To Note:

  • fdisk executes your commands only when changes are saved whereas Parted executes them instantly.
  • fdisk may not fully support GPT partition table, thus in case yours is GPT, it’s recommended to use Parted instead.

    androidi partition - fdisk GPT

    fdisk indicates a GPT table

  • To set the file system type, in case Parted / fdisk couldn’t set the type you want, you may need to use another tool such as mke2fs.

6. When you’re done partitioning, reinstall required system files by using the recovery mode options available on the device, and only then exit the shell and reboot. Otherwise, you may not be able to boot at all. :(

Check out page #2 for a step by step example.

COMMENTS (beta 4)

Add your comment here...
Naveen Jangid 17 days ago
/parted: line 1: syntax error: unexpected word (expecting ")") what should i do?? this is my last option I got. pls help my phone cant mount /system /data /cache etc.
Guest 1 mons ago
can't use adb in recovery device unauthorized
Adriano 24 days ago Guest
You are using an old adb version. Update it, try to use and then authorize the use on phone.
populus 1 mons ago
first of all, very nice and clear tutorial.  I've tried this on an Moto G4 Plus (athene) with TWRP to increase the size of the boot and recovery partition. (deleting and creating partitions 28 to 48). But it doesn't seem to stick after a reboot. Anyone got the same problem ? 
peterh 1 mons ago populus
Same problem here on a Samsung S6. After a reboot, and reflashing TWRP the partition table is back to it's original state.
phrenetik 1 mons ago
Hi! At first, I want to thank you about the tutorial, so useful. I'm having an 'stupid' issue but i can't manage to solve it. At least in my device, the system partition is not mounted while I'm in recovery mode so I guess that If I continue resizing, the system will be unable to boot even in recovery mode; it will ruin all the work since I would have to reinstall ROM and it will rebuild partition table to its original state, won't it? I've tried to use adb remount in order to force system to mount partitions but, obviously, it failed returning 'Remount failed: Success' message. Have anyone any clue in order to solve this issue? Am I missing something at some point?
mansoor 2 mons ago
I repartitioned my android ststem partition using your detailed tutorial. This resulted in a successful installation of OS. However, now it does not complete the installation of OS after first time boot. and gets stuck there. As per your details above there are 12 partitions whereas in my android there were 31 partitions. I repartitioned them as per your details given above. But when I see the userdata partition in twrp it shows zero size. and no file system. The userdata partition can be formated in fat then ext4. TWRP shows now the userdata partition to be of the required size and file system. But the problem of first time boot is not solved. If I go back in TWRP it shows again the userdata partition to be of zero size and no file system. Any way out of this issue
Kevin 3 mons ago
when i type p in /parted block/mmcblk0 shows this: Warning: Not all of the space available to /dev/block/mmcblk0 appears to be used, you can fix the GPT to use all of the space (an extra 32735 blocks) or continue with the current setting? Fix/Ignore?and type fix and maybe fix but when i type rm 44 (for delete partitions of data, or whatever) it returns the partitions number 44 and no delete partitions what did you show me
user1 4 mons ago
can't use adb in recovery device unauthorized
zak53 4 mons ago
Thank you nice work .
Emmanuel Baah 5 mons ago
Thank you, it worked on my Wiko Lenny 2! I wanted to increase the system partition for porting some marshmallow roms and it worked!
fur 5 mons ago
Why not using parted's mkpartfs command instead of mkpart command and using an extra tool outside parted (mke2fs)? Should I expect problems the other way?
nam 7 mons ago
Forvme,  system's number is 24 , cache is 25 ,  and userdata is 46 , how to extend from system to userdata ? Have a lot of other partitions
ksolowoniuk 7 mons ago
I'm trying to use parted on a Nexus 7 (grouper) 32GB but when I try to print I get:

/dev/block/mmcblk0: unrecognised disk label

Any Ideas? I'm running Android 7.1.2 and I'd like to install opengapps (stock) but I don't have sufficient space.
rvs 9 mons ago
Can we resize boot partition using this..
I want to increase the size of boot partition from data partition
Bad English 11 mons ago
Are u sure? Can i try this tutor in my experia d2212 ? i change my eMMC to 16gb but my partition can be read only 2gb on system n userdata (mmcblk0p22-24). Please.... 
Moshiur rahman 11 mons ago
I'm using a pc which has windows 10 as well as android. I wanna remove android and its related partitions and make the disk space available for windows. Can I do this from windows using diskpart command?
Vishla Mar '17
i've lost my system partitions.. i've a zenfone 5..... in twrp i'm facing the problem of cannot mount/system,cannot mount cache and cannot mount data... can i use this method to get my partitions back... also i've no os installed now on my phone... can you help me please?
Guest 11 mons ago Vishla
Factory reset your phone
Guest 9 mons ago Vishla
Reflash the stock rom or find a custom rom suitable on your device, this solves the issue.
Roland Giesler Oct '16
I can get into the Android shell, but parted doesn't want to play along as you show it should. Firstly, $ adb root adbd cannot run as root in production builds I can however got into my android shell and then "su root", will that do the same as "adb root"? # /data/local/tmp/parted /dev/block/mmcblk0 GNU Parted Using /dev/block/mmcblk0 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p p Error: Can't have a partition outside the disk! What now?
Endroid 3 mons ago Roland Giesler
same i have this problem too
Lili O. Sep '16
i get this /system/bin/sh: parted: not found how install parted i don't understand . Please your help
Karel Ondrka Sep '16
Hi guys. I am currently trying to solve problem with my HTC Wildfire S that suffers from low storage and "Google Play Servives has stopped" pops up all the time. I allready repartitioned the SDcard so I have plenty of space for user apps, but GPServices needs to be part of the system obviously, so resizing the /system seems to be innevitable. I am not a newbie to rooting and stuff but this is just above me. I walked through it quickly. I see there big Partitioning chapter but I can't recognize if there is anything about resize. I am not native English speaker, which does not help. Is there in the text also anything about simple resize? If it is even possible to it just that "simple"? If yes, which part please... If no, any ideas about solving this problem? Thanks for any response...
Michael Aug '16
Your provided URL for the RAR of Parted gives a 404. Did you build it yourself if so how? And could you please re-upload the file?
Liron Aug '16 Michael
The file is now downloadable
Michael Aug '16 Liron
Thank you very much.
pmarini01 Jul '16
Everything appears to be fine in my case, but when I try to 'rm' a partition I get nothing. No warning, no error but also no partition is removed. Any idea what's going on?
opocaj May '16
hello. I've been looking for this for a while too bad I'm stuck at installing parted
borekon Jun '16 opocaj
maybe you are not rooted and/or in your android distribution the mmcblk0 is not present or does not exist. This is a very generic tutorial and it is not complete