FORUMS
Remove All Ads from XDA

[Tutorial+Video] How to Re-partition Nokia X/XL (Increase System & Data size)

1,021 posts
Thanks Meter: 1,074
 
Post Reply Email Thread
Sign

Ultimate Guide to Re-partition Nokia X/XL
(Increase System & Data size)
Code:
#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 @mdfzhi 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
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

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

Nokia XL

Nokia X
https://img.xda-cdn.com/mS0utZdHrfzAHZltXqvAFiziOkM=/http%3A%2F%2Fi.imgur.com%2FEYcizum.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
Code:
adb shell
you'll see # sign, Now type
Code:
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:
Code:
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:
Code:
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
Code:
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:
Code:
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:
Code:
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:
Code:
p
then press Enter.
2- You'll see Modified Partition Table, Make sure all changes is OK.
3- Type
Code:
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:
Code:
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:
Code:
exit
then
Code:
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
Code:
adb shell
you'll see # sign, Now type
Code:
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:
Code:
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:
Code:
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
Code:
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:
Code:
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:
Code:
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:
Code:
p
then press Enter.
2- You'll see Modified Partition Table, Make sure all changes is OK.
3- Type
Code:
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:
Code:
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:
Code:
 exit
then
Code:
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





- Data Only:


Thanks:
netware @ 4pda For helping me doing this on Nokia XL
@ani00 For testing on Nokia X
Me For Testing and writing this guide
Don't Forget To make BACKUP And Hit Thanks
Attached Thumbnails
Click image for larger version

Name:	12_52_1330upper.png
Views:	368
Size:	48.5 KB
ID:	3857715   Click image for larger version

Name:	Screenshot_27-08-2016_23.58.11.png
Views:	362
Size:	30.5 KB
ID:	3857716   Click image for larger version

Name:	Screenshot_27-08-2016_23.58.22.png
Views:	354
Size:	32.5 KB
ID:	3857717   Click image for larger version

Name:	Screenshot_27-08-2016_23.58.00.png
Views:	270
Size:	24.6 KB
ID:	3857718   Click image for larger version

Name:	Original X.png
Views:	242
Size:	39.2 KB
ID:	3864697   Click image for larger version

Name:	Original XL.png
Views:	236
Size:	42.1 KB
ID:	3864698   Click image for larger version

Name:	System+Data XL.png
Views:	226
Size:	41.4 KB
ID:	3864700   Click image for larger version

Name:	System+Data X.png
Views:	174
Size:	40.3 KB
ID:	3864701   Click image for larger version

Name:	Data XL.png
Views:	174
Size:	41.2 KB
ID:	3864702  
Attached Files
File Type: txt After.txt - [Click for QR Code] (2.2 KB, 128 views)
File Type: xlsx XL.xlsx - [Click for QR Code] (36.5 KB, 112 views)
The Following 7 Users Say Thank You to yshalsager For This Useful Post: [ View ]
 
 
29th August 2016, 11:16 AM |#2  
veez21's Avatar
Senior Member
Flag Guess Where
Thanks Meter: 1,323
 
More
With this good news in hand, will there be any rom development coming on Nokia X/XL?
The Following User Says Thank You to veez21 For This Useful Post: [ View ] Gift veez21 Ad-Free
29th August 2016, 12:28 PM |#3  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 1,074
 
Donate to Me
More
Quote:
Originally Posted by veez21

With this good news in hand, will there be any rom development coming on Nokia X/XL?

I am still trying with MM but till now build can't complete
29th August 2016, 02:32 PM |#4  
veez21's Avatar
Senior Member
Flag Guess Where
Thanks Meter: 1,323
 
More
Quote:
Originally Posted by YSH ALSAGER

I am still trying with MM but till now build can't complete

Can you share the link if there is any, i wanna have a look.
29th August 2016, 07:37 PM |#5  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 1,074
 
Donate to Me
More
Quote:
Originally Posted by veez21

Can you share the link if there is any, i wanna have a look.

Link for what?
29th August 2016, 11:48 PM |#6  
veez21's Avatar
Senior Member
Flag Guess Where
Thanks Meter: 1,323
 
More
Quote:
Originally Posted by YSH ALSAGER

Link for what?

Source code
30th August 2016, 07:59 AM |#7  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 1,074
 
Donate to Me
More
Quote:
Originally Posted by veez21

Source code

See my github.com repository
The Following User Says Thank You to yshalsager For This Useful Post: [ View ]
30th August 2016, 09:45 PM |#8  
Sofiane omega's Avatar
Senior Member
Thanks Meter: 94
 
More
You Are Useng PAC Rom On Your Phone Did The Hotspot Work And Ring With Vibration Too And What Is The Clock Speed
Please Tell me How You Fix It
31st August 2016, 08:41 AM |#9  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 1,074
 
Donate to Me
More
Quote:
Originally Posted by Sofiane omega

You Are Useng PAC Rom On Your Phone Did The Hotspot Work And Ring With Vibration Too And What Is The Clock Speed
Please Tell me How You Fix It

I've Nokia XL, so everything works perfectly
31st August 2016, 10:22 AM |#10  
Sofiane omega's Avatar
Senior Member
Thanks Meter: 94
 
More
Quote:
Originally Posted by YSH ALSAGER

I've Nokia XL, so everything works perfectly

Can You Fix The Patch For X And What I Need To Send You From The Logcat To Fix Wifi Hotspot
31st August 2016, 11:00 AM |#11  
yshalsager's Avatar
OP Recognized Developer
Flag Cairo
Thanks Meter: 1,074
 
Donate to Me
More
Quote:
Originally Posted by Sofiane omega

Can You Fix The Patch For X And What I Need To Send You From The Logcat To Fix Wifi Hotspot

On Nokia X everything works expect hotspot, try to grab adb logcat and send it to me
The Following User Says Thank You to yshalsager For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
data, nokia x, nokia xl, re-partition, system

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes