Remove All Ads from XDA

[Q] Merge /data and internal storage

44 posts
Thanks Meter: 5
By curlyboi, Member on 26th June 2014, 02:35 PM
Post Reply Email Thread
Hi, I noticed there are about two similar threads but focusing on slightly different things so I am starting a new one.

I have ZLR F9006 (aka. ALPS F9006 or STAR F9006). It's a MT6582 cheap nobrand phone.
It has 4GB internal memory divided into several partitions. Since I have a 32 GB sdcard in it,
I find the existance of 1GB internal sd partition very annoying and I would like to merge that space
to /data instead, completely vanishing the internal_sd.

I have installed CWM Touch and booted into it. Here is df in recovery via adb:
Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   497520        48    497472   0% /dev
/emmc@cache             127044      4208    122836   3% /cache
/dev/block/mmcblk1    31159328   6732768  24426560  22% /sdcard
/emmc@fat              1029872     47888    981984   5% /emmc
/emmc@usrdata          1828400   1133596    694804  62% /data
/emmc@android           706392    488788    217604  69% /system
/sbin # cd /emc
(usrdata=/data, emmc=internal storage)

I installed parted but I get this error:
~ # parted /dev/block/mmcblk0 print
parted /dev/block/mmcblk0 print
Error: Can't have a partition outside the disk!
I know this is the internal memory because mmcblk1 is the SD card (and opening it in parted works).

I have these block devices:
/dev/block # ls
loop0         loop4         mmcblk0       mmcblk0p2     mmcblk0p6     platform
loop1         loop5         mmcblk0boot0  mmcblk0p3     mmcblk0p7     zram0
loop2         loop6         mmcblk0boot1  mmcblk0p4     mmcblk0p8
loop3         loop7         mmcblk0p1     mmcblk0p5     mmcblk1
As you can see, there are 8 partitions on the internal block device, with the p7 being the /data partition:
/dev/block # parted /dev/block/mmcblk0p7 print
parted /dev/block/mmcblk0p7 print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p7: 1900MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  1900MB  1900MB  ext4
And the p8 being the internal SD i want to get rid of:
/dev/block # parted /dev/block/mmcblk0p8 print all
parted /dev/block/mmcblk0p8 print all
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/block/mmcblk0p8: 1055MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags
(Strangely enough, you can't see the filesystem on those, but the msdos partition table and size fits.)

I was hoping I would simply delete that p8 and then expand the p7 to the remaining size, all that
should be perfectly doable with parted without even losing data (apart from few empty dirs on the p8).
But I highly doubt I can do it by directly calling parted on that specific partitions, I think that I need to make
it work calling it for the whole /dev/block/mmcblk0 (could someone confirm this?).
If yes, how can I make that happen?
27th June 2014, 05:03 AM |#2  
Senior Member
Flag Manila
Thanks Meter: 142
You're likely to brick your phone if you do it that way. Take a look here on how to repartition your internal memory. It's for MT6577, but I think it could be of relevance to your situation.
27th June 2014, 10:02 AM |#3  
OP Member
Flag Prague
Thanks Meter: 5
Thanks, this is very relevant. This is how my block table looks like (attached). I was right about the partitions being the last (but i am not sure about the bmtpool at the end).
Attached Thumbnails
Click image for larger version

Name:	blocks.png
Views:	202
Size:	39.7 KB
ID:	2819965  
Post Reply Subscribe to Thread

merge data usrdata internal storage phone sd

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

Advanced Search
Display Modes