Hello! I've searched all over the internet about this but haven't found any usable information about this. I was thinking about storing music files etc on the ext partition on my SD-card. I've a 8GB sdcard with a 64MB swap, 1024MB FAT32 and rest of the space goes to an ext2 partition. The problem is, how do I acess the ext2 partition in the phone? I know it is placed in /system/sd. But it seems it is only the super-user who has access to this folder. Is it possible to symlink the folder to another place and make it accessible for the user?
Every info I find is about storing apps on the ext-partition, which works. But having 6GB space for apps feels very overkill. FAT32 seems to be quite limited to speed when copying files, and also it have size limit of files.
The easiest and most recommend way to solve your problems is to repartion your card to:
0M swap (no use for swap on hero)
512M ext2 (see below)
rest as FAT (over 7G for your music)
If you plan on having every single one of the apps on the market you can give the ext2 partition 1024MB, no need to give it any more. There are numerous problems that can arise from having larger ext2 partitions, just of the top of my mind if you do have more data on the ext2 partition larger than your FAT free space you can't do a nandroid backup, you'll end up storing too much stuff on the ext partition which is usually wiped on ROM update and replacement, and it is much harder to access these files, as opposed to the FAT partition which is can be mounted as a USB drive to your PC.
Finally note I said ext2, and not ext3/ext4 because Ext3/4 are journaling file systems which are NOT suited for flash devices. They also have much more CPU overhead then ext2. Finally not all ROMs/kernels support ext3/ext4 and for a good reason!
BTW, please post questions in the either the Q&A or general sections. This is the DEVELOPMENT fourm.
Good luck.
Thanks for your reply, and sorry for posting in the wrong forum, which is quite obvious when I see it now!
Moved to Q&A as not development
erasmux said:
The easiest and most recommend way to solve your problems is to repartion your card to:
0M swap (no use for swap on hero)
512M ext2 (see below)
rest as FAT (over 7G for your music)
If you plan on having every single one of the apps on the market you can give the ext2 partition 1024MB
Click to expand...
Click to collapse
+1, Yeppers, wow a 6gb ext... That is some serious overkill,why?
Sent from my phone.
I was thinking to use the ext partition as a storage of music etc instead of the fat32 partition. The ext-partition is faster to copy files on, especially if you get a 32gb card and maybe you want to transfer big files. If I remember it right FAT32 table doesn't allow file-sizes more the 4GB, and it is also slower to copy to or from.
Any linux operating system should be able to read the ext partition on your sd card, or a program such as gparted is another thing to look into. Remember you can boot to linux without installing the operating system (boot from CD). Ubuntu or Knoppix is a good one to check out if you're new to it all.
Hehe, I think you did misunderstand my main question. The question is how to read the ext-partition directly from the phone with a file-manager (i.e. Astro File Manager). Not from a computer, from the phone, in the phone.
Vantskruv said:
Hehe, I think you did misunderstand my main question. The question is how to read the ext-partition directly from the phone with a file-manager (i.e. Astro File Manager). Not from a computer, from the phone, in the phone.
Click to expand...
Click to collapse
O in that case you have no chance lol. AFAIK there isn't any program designed for this purpose.
Vantskruv said:
Hehe, I think you did misunderstand my main question. The question is how to read the ext-partition directly from the phone with a file-manager (i.e. Astro File Manager). Not from a computer, from the phone, in the phone.
Click to expand...
Click to collapse
Well it depends where your ROM mounts it. I think most ROMs mount it to /system/sd, so you can use any file explorer with root permissions to browse there (i.e. ES File Explorer).
Related
Hi i have searched and cant find a clear guide, I have a 8 gig memory card and want to install apps to it. I can easily set a 3.8gig fat32 and 3.9gig etx3 partition but form this point on im lost!!
cheers
delete i figured it
IMHO, 3.9 gig as an EXT3 partition is way too big. It won't hurt of course, but it is rather a waste of space that could be better employed elsewhere.
512mb should be more than enough - indeed most Apps2SD guides I've seen seem to recommend this amount.
Regards,
Dave
anarchyuk said:
delete i figured it
Click to expand...
Click to collapse
Where? I'm lost yet...
sorry
I figured out where i was going wrong, I used the recovery image to format and part the 2gig that came with it and realised in gparted on linux that it had the LBA flag so i re done it, 6gig fat32 LBA, 1.4gig ext2 and 100meg swap when i booted the phone i then mounted the ext partition and it had already created a apps folder and moved stuff over!! This modaco rom is good!!
Hey guys ive been lurking around for a while troubleshooting my builds, I have figured out that when I run my android build off of the sd card by itself everything runs well, but once i put in my 10GB of music everything starts to fall appart and i get sod after a minute or two in the lockscreen. I was wondering if creating a separate ext2 partition for android to boot from and keeping my data on the other partition would provide me with any more stability. BTW im using the stock 16 gig class 2 card that came with the phone
Where on the SD card is your music? Root or in the Android folder. I ask because I have a 2 year old 8GB class 4 SD card that came with my preloaded CGO8 navigation (ICO8, but for US) and have never formatted. I've loaded most of the Android builds and most I've had no problems, other than typical for the build.
SD cards are digital. Unlike analog hard disks data is not fragmented. Formatting does not serve a useful purpose for an SD card. Even deleting files (except protected) deleting is just as, if not more, effective.
Do some research, think independently to come up with your own conclusions, but these are mine.
Oh, by the way, this is not the right forum for your question....you should have done some research before posting.
i was not asking about formating i was asking about partitioning and if running android from an ext2 partition on the sd card would create more stability on the build
audscott said:
SD cards are digital. Unlike analog hard disks data is not fragmented.
Do some research, think independently to come up with your own conclusions, but these are mine.
Oh, by the way, this is not the right forum for your question....you should have done some research before posting.
Click to expand...
Click to collapse
Analog hard disks? No fragmentation on flash media? Wow, sounds like you need to do some research...
I also have the same issue where if I put Android along with my music on the 16gb card, it gets stuck at jumping to kernal on reboot.
im copying my music on the new sd now will report back if the problem persists, but i have a feeling that running off of an ext2 partition will provide us with better r/w speeds, similar to ubuntu running on an ntfs partition instead of ext4
Having music (anything else) on your SD card should not really affect Android. Most builds are in an 'Android' folder, so that is where the system looks for its information. This may slow things down a bit (just like an overloaded HDD) but generally there should not be much difference.
Creating and ext2 partition will not help. Of course, now that I have said that, I have an ext2 partition on my SD card that was left from using my rooted G1 with cyanogen mod and Apps2SD. By default, my android build on my HD2 automatically looked in that partition for apps (froyo does this).
So, I do not think it will change anything about freezing or 'jumping to kernal' but it does have its uses.
EDIT: And, since WinMo is actually booting android, I don't think containing your android stuff in an .ext2 partition would even work. Needs to be FAT32 for haret to see it. (this is my assumption, not necessarily a fact)
Isn't the rootfs.img file actually like a simulated ext2 filesystem? Doesn't this file emulate the device memory? I'm not exactly sure, maybe someone else can expand on this. I don't think there is any benefit to partitioning the card in the current state of the hd2's development. Maybe when we are able to flash nand, nand will be formatted to ext2.
polo735 said:
Isn't the rootfs.img file actually like a simulated ext2 filesystem? Doesn't this file emulate the device memory? I'm not exactly sure, maybe someone else can expand on this. I don't think there is any benefit to partitioning the card in the current state of the hd2's development. Maybe when we are able to flash nand, nand will be formatted to ext2.
Click to expand...
Click to collapse
Well, there is that and the system.ext2 and data.img. This is all the files in Android (basically).
But with these files, android knows where to look to find them, placing them in your own ext2 partition will hide them from android.
When we are able to flash to nand (and now) an ext2 partition will allow you to store apps on that partition, given you are able to move apps to SD, which is not currently possible in our builds.
I installed apps to my SD card on my G1 (on an ext2 partition), so when I used Froyo on my HD2, android was able to read from that partition and use my old apps. All that means is that I did not have to reinstall all my old apps, and save space in the data.img created by android.
audscott said:
Where on the SD card is your music? Root or in the Android folder. I ask because I have a 2 year old 8GB class 4 SD card that came with my preloaded CGO8 navigation (ICO8, but for US) and have never formatted. I've loaded most of the Android builds and most I've had no problems, other than typical for the build.
SD cards are digital. Unlike analog hard disks data is not fragmented. Formatting does not serve a useful purpose for an SD card. Even deleting files (except protected) deleting is just as, if not more, effective.
Do some research, think independently to come up with your own conclusions, but these are mine.
Oh, by the way, this is not the right forum for your question....you should have done some research before posting.
Click to expand...
Click to collapse
First of all, before you call someone out you might want to do some research of your own so you don't come across looking like a moron. Fragmentation happens regardless of the actual hardware, and most file systems are vulnerable (whether it be fat, ntfs, ext2, ext4, etc). And while deleting files and reformatting end in the same result, a quick reformat makes far fewer writes to the card by simply wiping the allocation table. Each file name must be modified individually if you delete them, adding unnecessary wear to the card. As for a hard drive being "analog", it stores its data the same way as a memory card - 0's and 1's - which is digital. Just a little refresher there.
Now, as for the question at hand, which is completely appropriate for this forum as it directly concerns the development and installation of android on our HD2's, the use of ext2 for the android files has been done successfully on other winmo devices in order to increase stability and speed in the system. In fact I have done this very thing on my Kaiser in the past. Whether its possible with our current HD2 setup is another matter, so I'll direct you to these links - do a little reading and play around with it, let us know what you find. I'll probably look at it myself this weekend as a stop-gap until a full NAND flash becomes available, which hopefully is sooner rather than later - I'll report back if I find something.
http://www.androidonhtc.com/wiki/Installing_Android
http://android-devs.org/forum/viewtopic.php?f=56&t=194&sid=69cc2d8c93262ff8c70de594d50e5874
In my own experience, I have a 4Gig class 10 and 16Gig class 2 (stock).
I use my 4Gig for Android test runs.
I use my 16Gig for my Android currently in use.
I have my Music in at the root /Music
Android is in the traditional /Android
Any pics I take I just move over /DCIM
I haven't experience any corruption. Before testing, I format the SD card on my computer with 64k or 32K blocks. I copy over my saved /Music and /DCIM and then load the new Android in /Android.
ALWAYS Eject the SD card. Keeping those rules and I haven't had issues.
Well I switched to my other 16gig class 2 and my problems went away, it seems the stock card was going bad but not using a 20yr old file system would be nice regardless
Sent from my HTC HD2 using XDA App
... oh, and about fragmentation, I'm not a software engineer (I'm electronics engineer), but I wouldn't get too worried about SD card fragmentation. It can happen, but not in the same way as a physical HD.
SD cards can do random access reads/writes much better than a physical hard drive. However, if you've formatted your blocks too small, the controller has to piece together two bits of info instead of one.
Example: 64k file written to 8k formatted SD, will have to piece together 8 blocks.
A 64k file written to 64k formatted SD is written all to one block.
The flip-side is if you have a bunch of small files (1k - 5k) and you're formatted at 64k, you've just wasted 63k of a 64k block writing a 1k file. It's inefficient.
willgill said:
Example: 64k file written to 8k formatted SD, will have to piece together 8 blocks.
A 64k file written to 64k formatted SD is written all to one block.
The flip-side is if you have a bunch of small files (1k - 5k) and you're formatted at 64k, you've just wasted 63k of a 64k block writing a 1k file. It's inefficient.
Click to expand...
Click to collapse
Considering the sizes of most music and picture files these days and the fact that all Android little files are inside one large file, I believe going with 64k blocks would be better. Even going with a larger block size than 64k might be a good idea. Too bad 64k is the limit.
Larger block sizes might be inefficient when dealing with system folders like C drive in windows or system folder in linux since they contain a huge number of small files. That is why windows default is 4k.
Has anyone got this working? I used to have Link2SD in 2.1 but now the ext partition is the only partition recognized by GB and not my main partition. I can access my main partition from USB connect, but not from within the phone. Anyone has the same issue?
You can natively move apps to the SD on GB in Options>Applications>Manage applications. Choose an app that supports it and the option to move to sd will be there. No partition needed.
Thx, i will just fix up my SD card into a single partition again then
Does this also mean that I don't need the app Apps2SD anymore?
With App2SD you can quickly indicate which apps can be moved to SD. So I still have it there. Furthermore, App2SD also quickly clean your cache.
Link2SD gave the option of moving ANY app to the ext2 partition. The native gingerbread app2sd doesn't support moving all apps to the SD card.
Any way of making link2sd work on GB 2.3.3?
can anyone confirm what's the current sdcard partition layout. also which partition is detected in phone.
i think i have an idea which might help up getting this to work.
anantshri said:
can anyone confirm what's the current sdcard partition layout. also which partition is detected in phone.
i think i have an idea which might help up getting this to work.
Click to expand...
Click to collapse
@Anant: My SD is setup as per the guidelines described here:
http://forum.xda-developers.com/showpost.php?p=10711328&postcount=1
I have a 8GB card and I have allocated 7.05 GB of FAT32 memory to the Data partition, and have allocated 0.5GB to the secondary partition. This partition was also setup as FAT32 since i had issues with EXT2.
*Edit: After the 2.3.3 update, the X10 now detects only the 2nd partition (480MB) instead of the data partition (7GB) - but when I plug into a PC, the data partition gets mounted correctly.
Hope that helped.
That is not good, it means that you cannot transfer data or programs between your PC and the 7GB partition... is there a way to fix this?
When you plug into pc, your data-partition mounts correctly, so you can copy your data to your pc as a backup.
I recommend using a adapter to connect the sd-card to your pc, formatting both partitions, and then put it back. I did it that way, be it that I removed my second partition and went back to one partition only, 8 Gb, and all works fine now.
I don't intend to use Link2SD anymore, because in 2.3.3 the system can apply data2sd itself, I learned, with or without Apps2SD.
Good luck, greetz,
kwarkje
From my observation, the 2.3.3 android system moves the appdata to the sdcard only in certain large apps (apps >7mb in size?) which is good if you have are dealing with huge apks like AngryBirds, but not too handy if you have a huge number of small apps all ~3MB in size.
BTW the native app2sd isn't compatible with all apps.
Use "Move2SD Enabler" from Market to allow moving any app to SD.
https://market.android.com/details?id=com.leinardi.setinstalllocation&hl=en
This didnt work with my 32GB SD card... it is now a single 32GB FAT32 partition. What type of format should I use? FAT? EXT2?
kwarkje said:
When you plug into pc, your data-partition mounts correctly, so you can copy your data to your pc as a backup.
I recommend using a adapter to connect the sd-card to your pc, formatting both partitions, and then put it back. I did it that way, be it that I removed my second partition and went back to one partition only, 8 Gb, and all works fine now.
I don't intend to use Link2SD anymore, because in 2.3.3 the system can apply data2sd itself, I learned, with or without Apps2SD.
Good luck, greetz,
kwarkje
Click to expand...
Click to collapse
@doomed151:
Thats what I was looking for! Good find!
This app has its own hitch though: the move2sd enabler needs lots of caution...some apps aren't supported, and moving them to the SD causes them to crash. There is no way of knowing which apps can be moved and which ones can't. I happened to move GT Racing HD to the SD and it stopped working. Had to reinstall!
anantshri said:
can anyone confirm what's the current sdcard partition layout. also which partition is detected in phone.
i think i have an idea which might help up getting this to work.
Click to expand...
Click to collapse
@Anatshri Any luck on this? I would prefer to use link2sd instead of the native move2sd in GB.
I tried a 16gb & a 4gb sd card but couldn't get it to work. I've also tried ext2, ext3 & ext4 as the 2nd partition but I don't think the stock kernel supports any of them. The sd becomes unreadable after a reboot but if I connect directly to the pc I can see both partitions.
If I make both fat32 partitions only the 2nd partition gets mounted. Do you think this is kernel related as well or can we modify the mounting scripts to correct this?
I am suffering from bad health conditions right now so can't work much however all I can see right now is if this is the case you can do two things
1) create a script that mounts partition 1 at /data/sd-ext coz link2 sd needs mounted partition at this location. I suppose init.d script could help us. However
2) the problem would be that recovery will detect only partiton one
Sent from my X10i using XDA App
anantshri said:
I am suffering from bad health conditions right now so can't work much however all I can see right now is if this is the case you can do two things
1) create a script that mounts partition 1 at /data/sd-ext coz link2 sd needs mounted partition at this location. I suppose init.d script could help us. However
2) the problem would be that recovery will detect only partiton one
Sent from my X10i using XDA App
Click to expand...
Click to collapse
I'm sorry to hear about your health, hopefully it's nothing serious and you get well soon. Thanks for the suggestion, I'll give this a try when I get a chance.
Any solution on this?
I move from 2.2 to 2.3.4 and link2sd don't work anymore cannot mount the 2nd fat32 partition.
App2SD sucks because doesnt allow some apps to get moved.
Thanks
Lockon Stratos said:
I'm sorry to hear about your health, hopefully it's nothing serious and you get well soon. Thanks for the suggestion, I'll give this a try when I get a chance.
Click to expand...
Click to collapse
Thanks for the wishes.
I have extended weekend this time will try to give my old card a twist and see if i can get link2sd work again on my handset.
bbsrailfan said:
Link2SD gave the option of moving ANY app to the ext2 partition. The native gingerbread app2sd doesn't support moving all apps to the SD card.
Any way of making link2sd work on GB 2.3.3?
Click to expand...
Click to collapse
I agree with you and hope that we will have this possibility, I really miss link2sd, the best app ever to move apps to sd.
Congrats to all who figured out the rooting process on NT. The NT has a measly 1gb media partition and over generous 11gb data partition. Can more experienced developers look into gparted-live-0.10.0-3.iso and e2fsprogs-1.41.14.tar.gz to use as tools to repartition the NT? I do not have a NT yet. I have a rooted emmc CM7.1 NC oc'd to 1.225gHz. I appreciate and respect all the effort that goes into this project. I used the develop financial apps for a big US bank.
hwong96 said:
Congrats to all who figured out the rooting process on NT. The NT has a measly 1gb media partition and over generous 11gb data partition. Can more experienced developers look into gparted-live-0.10.0-3.iso and e2fsprogs-1.41.14.tar.gz to use as tools to repartition the NT? I do not have a NT yet. I have a rooted emmc CM7.1 NC oc'd to 1.225gHz. I appreciate and respect all the effort that goes into this project. I used the develop financial apps for a big US bank.
Click to expand...
Click to collapse
Looks like it won't be necessary...
http://forum.xda-developers.com/showthread.php?t=1355969
Necessary no, but definitely desired.
Sent from XDA Premium app CM7.1
Not even desired if storage is really not partitioned, as it now appears.
unsivil_audio said:
Necessary no, but definitely desired.
Sent from XDA Premium app CM7.1
Click to expand...
Click to collapse
At best, repartitioning will give you an additional 1GB of space, and probably break the ability to ever do a factory restore or load additional updates when they are released by B&N.
I think we need to wait for an unlocked bootloader or at least an accessible CWM with bootable workaround (like on the Droids) before we start messing with the filesystem.
Current configuration allows 11gb for purchased apps, movies, books, music from Amazon app store, BN app store or Google market. Only 1gb is allowed for end user loaded music, books, movies etc. If you have over one thousand song music collection (5gb) you want loaded to NT you will need to use a microSD card. You cannot load an HD movie in the 1gb media partition. The old NC partition scheme had 5gb media and 1gb data. The newer NC partition scheme (blue dot) has 1gb media and 5gb data. Most users will not utilize the 11gb for purchased apps.
Thank you hwong for my case in point.
Sent from XDA Premium app CM7.1
hwong96 said:
Current configuration allows 11gb for purchased apps, movies, books, music from Amazon app store, BN app store or Google market. Only 1gb is allowed for end user loaded music, books, movies etc. If you have over one thousand song music collection (5gb) you want loaded to NT you will need to use a microSD card. You cannot load an HD movie in the 1gb media partition. The old NC partition scheme had 5gb media and 1gb data. The newer NC partition scheme (blue dot) has 1gb media and 5gb data. Most users will not utilize the 11gb for purchased apps.
Click to expand...
Click to collapse
You can add custom search paths to some media players to scan /data/media (or whatever you want to call it). You might even be able to setup a symlink. You can also open the files (large movies, etc) directly from a file manager like Root Explorer.
I do see your point, though, how the layout is different from the NC. I'm using a 32gb memory card so I guess this isn't an issue for me.
The data partition is ext4 formatted whereas the media partition is vfat formatted. When the NT is connected to a computer via USB, the vfat system is what the user sees for loading his own content. I do not think the ext4 partition shows up as a drive on the computer.
thread moved..
Thread moved to general section ..
So, ext4 cant be used ? Can't have books and videos, etc stored in it ?
hwong96 said:
The data partition is ext4 formatted whereas the media partition is vfat formatted. When the NT is connected to a computer via USB, the vfat system is what the user sees for loading his own content. I do not think the ext4 partition shows up as a drive on the computer.
Click to expand...
Click to collapse
What about in a linux distribution like ubuntu? I know that windows doesn't read ext4 (unless 3rd party drivers are installed) nor the first partition (if the nook tablet is really partitioned, that is).
You can store files on the EXT4 partition and access them through a file manager, but it won't appear as a drive on your computer when you connect it. You would have to copy files to an SD card, then from the SD card (plugged into the Nook) to the /data partition.
I'm working on a way to create a "virtual" FAT filesystem within /data that would be mounted to /media instead. This would allow you to use around 10GB for media (while leaving 1GB for /data). The best part is that it doesn't require any repartitioning or reformatting and can be easily undone.
If you can't wait for that virtual mount to work (which sounds super cool, by the way; would a different approach be to look at the smb.conf in the Samba server for Android and share /data via Samba over the network? I've read the 'stock' samba server can't share linux filesystems, but I can't help but wonder if that can't be overridden in .conf) you can do some fugly hacking like I did on the NST:
On the NC and NST, /data is an android-only vanilla filesystem
/mnt/media is the filesystem that is swapped out of Android for copying in from Windows.
On a rooted device where /data is not full, you can use fdisk (or busybox fdisk in case you have not symlinked busybox to the commands it supports) to shrink /data. I would do this over a wireless connection, so that you don't get involved in both partition editing and unmount/remount at power on.
If the /data partition is the LAST partition listed by /mount, you can delete it and resize it hot very easily.
delete it.
hit n
create the 'new' partition as a smaller size.
w to write your changes.
You get an error about the kernel still using the old partitioning. You don't care. Reboot, and your /data partition has shrunk. Now might be a good time to run fsck on that new, smaller paritition. You'll get a warning about running fsck on a mounted disk. On a device with a resized partition and no actual filesystem damage, this has not been an issue for me. YMMV.
Then you would need to delete and recreate /mnt/media to the desired size, toggle the partition label to make it a fat filesystem, reboot, confirm that those boundaries worked also, and then run mkfs.vfat (if I'm remembering correctly) on your new partition.
The tricky bit is getting the partition order correct in a complicated filesystem like this one.
On the NST, you don't actually have to get everything just right.
I found that out by happy accident - I wanted to resize /data and /media there, and they are partition 6 and 8 respectively.
The first time I did it, I was confused about which set of notes described what. When the device failed to start 8 times, it looked at the world and realized a reimage was needed, and formatted the available ext fileystems as /data and /cache, and the fat filesystem as /media.
I did not realize this until quite recently, when I needed to reimage my NST to apply update 1.1, and lo and behold: the partition table after reimaging from stock was not in the order I'd ultimately imposed on it the first time.
I do not know how robust the recovery on the NT is.
Seems to me this is a great time to find out - but I would only muck around with the /data and /media and not touch anything below those, and I don't have one of the NTs so my money's not at risk.
mmcblk0p10 is media vfat partition
Mmcblk0p11 is data ext4 partition
Here is how you repartition /data and /media partitions using Gparted and e2fsprogs as done by a Kindle Fire owner. Methodology is same for Nook Tablet.
http://forum.xda-developers.com/showthread.php?t=1388996
hwong96 said:
Here is how you repartition /data and /media partitions using Gparted and e2fsprogs as done by a Kindle Fire owner. Methodology is same for Nook Tablet.
http://forum.xda-developers.com/showthread.php?t=1388996
Click to expand...
Click to collapse
Partitioning seems different as that Extremely Well done set of instructions for a fire only seems to use GParted which I don't believe understands the partitions on th NT???
I could very easily be wrong and if you tried and were successful doing this on an NT then I apologize and want to buy you a case of beer for your efforts to help us all on the NT.... just I'm skeptical as NT doesn't use traditional FS layout or format as far as I believe...
If this worked for you PM me with some proof and your paypal and I'll pay up with thanxs added... else I just felt obliged to question and put my money where my mouth is to save others from at a min. soft bricking their NT...
I still haven't picked up an NT yet so I did not try this yet.
For discussion only.
I would think the repartitioning process is simpler than the Kindle Fire since the /media(vfat) and /data(ext4) partitions are at the end of the SD. Gparted does not create ext4 partitions. Gparted can create ext2 partitions and e2fsprogs changes ext2 to ext4 if I follow the logic correctly. My first step would be to make a backup of the /data partition. Then I would delete /data partition. Then I would increase the /media partition using GParted. Then I would create the /data partition as ext2 using GParted. Then using commands in e2fsprogs to convert format to ext4. Then restore the /data backup from the first step.
Here is the NT partitions from NookDevs
http://www.nookdevs.com/Dump_NookTablet_Partitions
hwong96 said:
Gparted does not create ext4 partitions.
Click to expand...
Click to collapse
Not yet! An update to it today actually has gparted displaying the partition correctly (it wasn't before? I thought it had ok support for ext4 partitions before, or since 2009ish), so pretty sure they're working on it. I'd be inclined to wait for official support over making ext2 partitions tbh
hwong96 said:
Here is how you repartition /data and /media partitions using Gparted and e2fsprogs as done by a Kindle Fire owner. Methodology is same for Nook Tablet.
http://forum.xda-developers.com/showthread.php?t=1388996
Click to expand...
Click to collapse
Has anyone tried it? I wish to try, but don't understand how to make those binaries work, coz KF used CWM, which we don't have yet! Can anyone direct me?
Beware, this guide is more or less untested, it will interfere with stuff like memory encryption and OTA or other firmware updates. You have been warned, I assume no warranties for bricked phones, SD cards or lost data.
Many cheap-ass Mediatek phones ship with Android 4.4.2 or later and only ridiculous amounts of internal storage (2GB in my case, CAT B15Q). That may be enough for basic apps, but as soon as you install Navigon or other data-heavy apps (or WhatsApp with a load of videos) you're going to run out of space in no time - and because Google is a bunch of fools, they disallowed app installations to SD cards entirely in 4.4!
So, we're going to move /data in its entirety to our nice huge SD card and be able to use even bigger apps on small phones. It might be possible that this guide works on other phones, but that depends on how they boot and where the fstab and init.rc reside!
Prerequisites:
Mediatek-based 4.4.2 or later phone with root access in recovery (boot it in recovery, run adb shell, therein run id. If it says root, all fine. If not, install CWM)
A large enough SD card (I chose a 32GB card with a 50:50 split between /data and the "external sd card")
Solid Linux knowledge, one Linux PC and one Windows PCs. I urge you to NOT use any kind of VM unless you have experience with USB passthrough.
spFlashTool and the Mediatek drivers from http://forum.xda-developers.com/general/general/stock-rom-cat-b15q-rom-development-t2988774, for a flashing guide see http://forum.xda-developers.com/android/help/howto-firmware-flashing-cat-b15q-t2989627
mtkdroidtools from https://www.androidfilehost.com/?fid=23501681358558543 on the Windows PC
mtk-tools from https://github.com/bgcngm/mtk-tools on the Linux PC (no, Cygwin does not work, it messes up the permission bits), cloned on an ext4 partition (not sure if ext2/3 can handle the extended permission bits...)
a network connection between the PCs or a USB stick to transfer files
Take the sd card out of the phone and insert it into your computer. Many laptop SD slots don't like SDXC (>4GB), you might need e.g. a Huawei 3G stick or a SDXC-compatible USB dongle.
Repartition the SD card using Acronis Disk Director, gparted or whatever you're familiar with. The first partition must only be resized (this is the FAT partition), the second partition is a ext4 (!) partition. Both MUST be primary partitions. Acronis and other tools on Windows might require a reboot to repartition SD cards. I recommend a 50:50% split, but if you're heavy on apps or their data, you might go for a 25% FAT: 75% EXT4 split.
Boot your phone into recovery, connect to it with adb in a root shell.
Assuming your data partition is at /dev/mmcblk0p8 (look in /fstab to find it out, followed by mount /data and ls /data to verify), execute the command "dd if=/dev/mmcblk0p8 of=/dev/mmcblk1p2", wait until it is finished. This can take up to ten minutes or more, depending how much data there is.
Shut down the phone, take out battery and SD card.
Insert the SD card into your Linux machine, run resize2fs /dev/sdb2 (or wherever the ext4 sd card partition ended up, check it in dmesg) as root so that the filesystem grows; then eject the SD card and put it back into your phone
Readback your BOOTIMG partition, transfer it to the linux PC (or, if you already have a boot.img for your current firmware, use this one)
On the Linux PC, open a rootshell (to avoid permission issues when building the ramdisk).
Run "./unpack-MTK.pl /path/to/bootimg"
"cd boot.img-ramdisk" (directory might be named different, depending on how you named the bootimg dump file)
Using a text editor, edit the "fstab" file(s) (there might be multiple, with suffixes): From (adjust if needed)
Code:
/[email protected] /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,encryptable=footer
to:
Code:
/dev/block/mmcblk1p2 /data ext4 noatime,nosuid,nodev,noauto_da_alloc wait,check,encryptable=footer
Now, edit the init.rc file (beware, other .rc files in the ramdisk root might also contain mount commands!).
Search for "on fs_property:ro.mount.fs=EXT4" and again replace /[email protected] (or whatever the node for /data had been) with /dev/block/mmcblk1p2 in the commands in this block (should be fsck, tune2fs,ext4_resize and mount).
Repack the boot image: ./repack-MTK.pl -boot boot.img-kernel.img boot.img-ramdisk/ /path/to/newboot.img
Transfer newboot.img to the Windows PC and flash it using spFlashTool
boot your phone, look in Settings->Memory to see if it went OK!
If the memory view didn't change, also modify the other blocks of on fs_property, in case your device does not use an ext4 rootfs (but yaffs or ubifs instead).
Functionality
It is a good idea, but
Are I still have part of it as external storage?
If yes, it means I can not remove it because there are some apps used it.
If no, it means I will not have external storage anymore!
e.ahmedmahfouz said:
It is a good idea, but
Are I still have part of it as external storage?
If yes, it means I can not remove it because there are some apps used it.
If no, it means I will not have external storage anymore!
Click to expand...
Click to collapse
The SD card is now both internal and external storage! You are not able to remove it because else your system will not boot anymore.
harddisk_wp said:
The SD card is now both internal and external storage! You are not able to remove it because else your system will not boot anymore.
Click to expand...
Click to collapse
what if the sd card is damaged ?
Can my phone boot again..or will booltloop
madthinker said:
what if the sd card is damaged ?
Can my phone boot again..or will booltloop
Click to expand...
Click to collapse
If you manage to kill your sdcard while you have my sdcard hack installed, then the phone will bootloop until you insert a new sd card partitioned just like the old one. Then it will act like you had factory-resetted it.
Alternatively you can always reflash original boot.img/recovery.img and use the phone with limited internal memory.
harddisk_wp said:
If you manage to kill your sdcard while you have my sdcard hack installed, then the phone will bootloop until you insert a new sd card partitioned just like the old one. Then it will act like you had factory-resetted it.
Alternatively you can always reflash original boot.img/recovery.img and use the phone with limited internal memory.
Click to expand...
Click to collapse
i see, thanks to explain me :good:
There is another way to get more space: Link2SD (2.- euros) with a second partition on your external SD-card exactly like shown above (ext4 partition, primary).
The advantage is, that if the sdcard is faulty the system still runs, just the apps which are symlinked to the ext4 partition won't run.
So I use this for all these not absolutely important apps which needs lots of internal memory, e.g. kindle bookreader, Amazon, WhatsApp etc. I dont use it for all apps, most importantly not for any app, where there is no alternative. Last week my two years old 64 GB MicroSD card (SanDisk, with warranty 10 years) in my SGS4 stopped working and this could happen all the time. They are not that reliable I think, that I would put my system on it.
I did this now with the Cat B15Q of my friend.
EDIT: and she has now more than 1 GB free internal space
I think this is the best solution, 2 GB for the pure ROM and the system apps is more than enough and all user apps go to the external sd-card (2nd partition).
good day!
hope you can help me.
what if i want vice versa? because my phone's default storage (0) is sd card.and i want my default storage will be its internal since it is 32gb rom. tried all ways but i think the answer is its boot.img. thank you..hoping for a help