[Nokia X] yshalsager:
[IMG="Sign"]https://3.bp.blogspot.com/-Lg1oTgqvr40/VtRYfpOm3eI/AAAAAAAACH0/yhiA8MbXqsA/s320/sign.png[/IMG]

Ultimate Guide to Re-partition Nokia X/XL

(Increase System & Data size)

​

#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

Disclaimer:

By doing this, of course your warranty is now void, This method is VERY ADVANCED, I don't recommend newbies & beginners to do it, You may BRICK your device !

FIRST read to the end then do it !! I am not responsible for the "BRICKs".

If you have any question before doing this method i'll be happy to answer you in comments below.

Before doing anything make sure to do FULL DD Backup of your mobile, to restore it if anything went wrong.

Check [MENTION=4135482]mdfzhi[/MENTION] Guide Here

Part 1: Information:

Nokia X/XL have 3.9 GB EMMC Storage (26 Partition), System is 560 MB , Data is 1.1 GB and Internal Storage is 1.2 GB.

Nokia X Partitions & Blocks:

Nokia XL Partitions & Blocks:

by looking to this table, we don't know about These Partitions (p1-p2-p4-p5-p6-p7-p8-p9-p10-p11-p12-p13-p15-p20-p24-p26) Mounts, So before doing anything YOU HAVE TO BACKUP Them.

The Main idea of Re-partitioning:

Increasing some partitions size by decreasing some others, WITHOUT dealing with any partition we don't know.

So you can control size of: System - Cache -Data - Storage - Preload

Open my Partitions Table Here and look:

Choose your mobile then Read :D

I have two MODs:

1- 2.30 GB Data With 150MB.

2- 950 MB System + 2.30 GB Data With 150MB.

In these MODs i didn't changed any partition size except ones i have marked.

How to Calculate Size of Any partition?

End - Start = Total (Number of blocks)

Total * 8 = Blocks (Size in Blocks)

Blocks / 1024 = Size in MB

Editing Partitions Sizes:

In order to edit any partition size you need to delete all partitions before it.

Ex. To edit Storage (p21) i have to delete partitions from p26 to p21.

Then you'll create them again with modified sizes.

The next step is set each partition ID like table (YOU CAN'T CHANGE ANY ID)

Final step is Syncing Partitions table & Apply changes.

Lets GO !

You'll need to:

- Many spare times to read and follow this tutorial.

- Your phone with battery not below 50%.

- Any Custom Recovery as long as it can unmount all partitions & use adb (Make Sure Recovery won't reboot suddenly)

I have done it with TWRP 3.0.2-0 Recovery - I think Miui Recovery is good choice also.

Download Miui Recovery Here

- A reliable PC with Nokia X/XL Drivers & ADB installed.

Drivers on Windows/Linux/Mac Here

Download ADB & Fastboot Here

- A reliable USB cable.

- About 700 MB Free space in SD Card.

- Choose MOD you'll do as you like. (But READ the two before DOING ANYTHING)

Part 2: Re-Partitioning:

Copy All Commands & Sizes From My Excel Sheet :D

MOD 1: Increase System To 950 MB & Data Size to 2.30 GB (The Best !)

Nokia XL

Nokia X

http://i.imgur.com/EYcizum.png

We'll Re-partition all partitions from p18 to p26) with sizes in above picture, to make System 950 MB - Data 2.30 GB - Internal Storage 150 MB & Preload 30 MB - Check Page 3 in Partition Table.

A-Preparing:

1- Copy whole data from Internal Storage to SD Card or PC

2- Boot to Custom Recovery then Unmount all partitions except SD Card.

3- Connect phone to PC via USB cable then open ADB tools (Shift + Right Click in ADB Folder - select Open CMD.

4- Type

adb shell

you'll see # sign, Now type

fdisk -l /dev/block/mmcblk0

5- You'll see your partitions table, make sure it's like "First Page in Partition Table"

Nokia XL

Nokia X

B-Backing Up Unknown Partitions :

1- Backup Partitions from 23 to 26, type:

dd if=/dev/block/mmcblk0p20 of=/sdcard/mmcblk0p20.img
dd if=/dev/block/mmcblk0p23 of=/sdcard/mmcblk0p23.img
dd if=/dev/block/mmcblk0p24 of=/sdcard/mmcblk0p24.img
dd if=/dev/block/mmcblk0p25 of=/sdcard/mmcblk0p25.img
dd if=/dev/block/mmcblk0p26 of=/sdcard/mmcblk0p26.img

2- Make sure this backup stored in SD Card not Internal Storage.

C-Re-Partitioning-Deleting Partitions:

1- Continue in ADB, type:

busybox fdisk /dev/block/mmcblk0

2- We'll use "d" command to delete partitions from 26 to 21

Type each line command below then hit enter after every command

d
26
d
25
d
24
d
23
d
22
d
21
d
20
d
19
d
18

D-Re-Partitioning-Creating New Partitions:

1- Now we'll use "n" command to create new partitions with modified sizes, command usage:

n - Enter: To start creating new partition.

Start block - Enter: First cylinder of partition.

End block- Enter: Last cylinder of partition.

2- Continue in ADB After last command, type:

n
16931
134688
n
134690
147487
n
147489
147491
n
147493
166690
n
166692
452514
n
452516
464674
n
464676
465954
n
465956
469794
n
469796
477184

E-Re-Partitioning-Set New Partitions Type:

1- Now we'll use "t" command to set new partitions type as (Original Partition Table) with modified sizes, command usage:

t - Enter: Start Partition Type Modification.

Partition Number - Enter: Choose Partition.

Type ID - Enter: Set Partition ID.

2- Continue in ADB After last command, type:

t
18
83
t
19
83
t
20
4c
t
21
c
t
22
83
t
23
83
t
24
7d
t
25
83
t
26
83

F-Re-Partitioning-Apply Modifications And Saving:

Till now we haven't done any real changes, you can cancel these changes by Closing ADB Window.

To Apply Changes:

1- use "p" command to sync new partitions to table, type:

p

then press Enter.

2- You'll see Modified Partition Table, Make sure all changes is OK.

3- Type

w

to save New Partition Table, then Wait till changes.

G-Restoring Unknown Partitions Backup:

We are finished Re-Partitioning, it's time to restore backup we made in step "b".

1- Type:

dd if=/sdcard/mmcblk0p20.img of=/dev/block/mmcblk0p20
dd if=/sdcard/mmcblk0p23.img of=/dev/block/mmcblk0p23
dd if=/sdcard/mmcblk0p24.img of=/dev/block/mmcblk0p24
dd if=/sdcard/mmcblk0p25.img of=/dev/block/mmcblk0p25
dd if=/sdcard/mmcblk0p26.img of=/dev/block/mmcblk0p26

2- Now Exit ADB, type:

exit

then

adb reboot

H-The last step:

In order to use New Partitions we need to wipe it through Custom Recovery.

Boot to Custom Recovery and Wipe all partitions except SD Card.

Congratulations ! you have done it successfully, Now Flash any ROM / Restore Custom Recovery Backup to use your phone.

MOD 2: Increase Data Size to 2.30 GB

We'll Re-partition (p21 & p22) with sizes in above picture, to make Data 2.30 GB & Internal Storage 150 MB - Check Page 2 in Partition Table.

A-Preparing:

1- Copy whole data from Internal Storage to SD Card or PC

2- Boot to Custom Recovery then Unmount all partitions except SD Card.

3- Connect phone to PC via USB cable then open ADB tools (Shift + Right Click in ADB Folder - select Open CMD.

4- Type

adb shell

you'll see # sign, Now type

fdisk -l /dev/block/mmcblk0

5- You'll see your partitions table, make sure it's like "First Page in Partition Table"

Nokia XL

Nokia X

B-Backing Up Unknown Partitions :

1- Backup Partitions from 23 to 26, type:

dd if=/dev/block/mmcblk0p23 of=/sdcard/mmcblk0p23.img
dd if=/dev/block/mmcblk0p24 of=/sdcard/mmcblk0p24.img
dd if=/dev/block/mmcblk0p25 of=/sdcard/mmcblk0p25.img
dd if=/dev/block/mmcblk0p26 of=/sdcard/mmcblk0p26.img

2- Make sure this backup stored in SD Card not Internal Storage.

C-Re-Partitioning-Deleting Partitions:

1- Continue in ADB, type:

busybox fdisk /dev/block/mmcblk0

2- We'll use "d" command to delete partitions from 26 to 21

Type each line command below then hit enter after every command

d
26
d
25
d
24
d
23
d
22
d
21

D-Re-Partitioning-Creating New Partitions:

1- Now we'll use "n" command to create new partitions with modified sizes, command usage:

n - Enter: To start creating new partition.

Start block - Enter: First cylinder of partition.

End block- Enter: Last cylinder of partition.

2- Continue in ADB After last command, type:

n
101413
120613
n
120613
406437
n
406437
418597
n
418597
419877
n
419877
469797
n
469797
477184

E-Re-Partitioning-Set New Partitions Type:

1- Now we'll use "t" command to set new partitions type as (Original Partition Table) with modified sizes, command usage:

t - Enter: Start Partition Type Modification.

Partition Number - Enter: Choose Partition.

Type ID - Enter: Set Partition ID.

2- Continue in ADB After last command, type:

t
21
c
t
22
83
t
23
83
t
24
7d
t
25
83
t
26
83

F-Re-Partitioning-Apply Modifications And Saving:

Till now we haven't done any real changes, you can cancel these changes by Closing ADB Window.

To Apply Changes:

1- use "p" command to sync new partitions to table, type:

p

then press Enter.

2- You'll see Modified Partition Table, Make sure all changes is OK.

3- Type

w

to save New Partition Table, then Wait till changes.

G-Restoring Unknown Partitions Backup:

We are finished Re-Partitioning, it's time to restore backup we made in step "b".

1- Type:

dd if=/sdcard/mmcblk0p23.img of=/dev/block/mmcblk0p23
dd if=/sdcard/mmcblk0p24.img of=/dev/block/mmcblk0p24
dd if=/sdcard/mmcblk0p25.img of=/dev/block/mmcblk0p25
dd if=/sdcard/mmcblk0p26.img of=/dev/block/mmcblk0p26

2- Now Exit ADB, type:

exit

then

adb reboot

H-The last step:

In order to use New Partitions we need to wipe it through Custom Recovery.

Boot to Custom Recovery and Wipe all partitions except SD Card.

Congratulations ! you have done it successfully, Now Flash any ROM / Restore Custom Recovery Backup to use your phone.

Video Tutorial

Notes:

1- If you get "Warning" Error in Step F-3. Check Partitions using "p" command, if changes can't be done then Change Custom Recovery then do Steps again.

2- If Custom Recovery rebooted suddenly, don't worry do Steps again.

3- If TWRP couldn't wipe New Partitions, boot to ClockWorkMod Recovery 6.0.4.8 and Wipe them.

4- Nokia X doesn't have p26 partition.

Final Result :D

- Data Only:

Thanks:

netware @ 4pda For helping me doing this on Nokia XL
[MENTION=7095051]ani00[/MENTION] For testing on Nokia X

Me :cool: For Testing and writing this guide

Don't Forget To make BACKUP And Hit Thanks :good: