SDSPLIT repartition your SDcard on phone (w/o a PC)

Search This thread

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
Sorry I did not respond all day yesterday, I couldn't pass up the 8 inches of fresh white stuff calling from Breckenridge! :)

I reset my phone this evening and tested this out on JF rc33. It's brilliant. You've done a great thing here.

I am very glad that it worked well for you. That gives me confidence that it should work for others (which means I can write "monkey" instructions with less guilt). I will try to write a little more and answer some of the questions posted yesterday. I'm not sure about the "brilliant" part, I just used google to find a mke2fs and wrote up a small script. :eek: I am very glad to at least meet my "helped one person" quota though! :)


I hope you don't mind but I've posted a how to over on the android section of nokia apps at the request of a few users! Of course i linked to this page and gave full credit!

I reviewed your instructions, very nice, I will use them as inspiration. My suggestion would be to use /data/local/bin since it does not require users to make /system rw! Also, you may want to mention the JF prerequisite since it is unlikely to work if users do not have that.

I am a little confused, the "Mounting you're new linux partition" part of step2 should not be required, the script already does this:

Code:
 mkdir /system/sd
 busybox cp -a /sdcard/mountd.conf /system/etc/mountd.conf
 busybox cp -a /sdcard/init.rc /system/init.rc

Perhaps you used the 1.0 version (early Friday? 1.1 came out late Friday), that version did not make the /system/sd correctly and required a reboot?



i have an 8 gig sd card. i want to have my EXT2 to have 800 MB and the rest FAT32. how much do i give the FAT32 portion?

Come on, I hope I don't have to answer simple math questions the whole time? :cool: 8000M-800M = 7200M. I don't know any better than that. Sorry, I do not know whether fdisk uses 1000 or 1024, so that could be a little off. But, that is the idea.
 

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
Script Update

OK, I added a "HowTo for Dummies" section to the first post which should potentially make things easier. Please do continue to ask questions about things which are unclear. These steps should include everything that needs to be typed and how to calculate partition size, hopefully making it possible for just about anyone to run this script successfully.

I also updated the script so that it uses wget to download the mke2fs executable which should make things even easier.
 

cronin4392

Senior Member
Jul 9, 2007
188
0
thanks alot for the step by step instructions but i still dont get this step:
After downloading, save this file (perhaps remove the .txt extension) to somewhere in your path (/data/local/bin), and give it execute permissions.


i checked on my phone and my sdcard and i can not find that directory. do i create it or what?
 

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
thanks alot for the step by step instructions but i still dont get this step:
After downloading, save this file (perhaps remove the .txt extension) to somewhere in your path (/data/local/bin), and give it execute permissions.


i checked on my phone and my sdcard and i can not find that directory. do i create it or what?

Hmm sorry, I thought that was there by default on JF updates, but it makes sense that it probably wasn't (they don't touch /data do they?) I must have added that dir manually previously. I have updated step #1 of the HowTo. If someone has a better suggestion, please let me know.
 

cronin4392

Senior Member
Jul 9, 2007
188
0
Hmm sorry, I thought that was there by default on JF updates, but it makes sense that it probably wasn't (they don't touch /data do they?) I must have added that dir manually previously. I have updated step #1 of the HowTo. If someone has a better suggestion, please let me know.

when i tried doing step 2 where you make the directories it says you can not because it is a read only file system.
 

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
Whenever I do the cd /data/local/bin command, I get a "can't cd to /data/local/bin" message. Am I doing something incorrect?

No, probably not, likely step 2 got updated after you read it. Can you reload the HowTo page and try the new step 2?

when i tried doing step 2 where you make the directories it says you can not because it is a read only file system.

Sorry again, it appears, the android mkdir is rather broken and fails with the -p option if one of the already existing parent directories is on a read only fs!!! The busybox mkdir does not seem to have this problem. I've updated Step 2 again to avoid this. Again, I do apologize the HowTo was written today and I created those dirs a while ago so I did not see those failures. Seems like writting the HowTo is harder than writting the script! ;)
 

speoples20

Senior Member
Jun 10, 2007
1,213
12
Hey MartinFick first off let me say great job on getting this going. Now my question, any chance of making this automated and making it into an apk? Like open the app and select the size of the partition you want the press format. I have a few coworkers who I just recently rooted their G1s and are interested in moving their apps to the SD card. This would make it easier to do it for them.
 

faithnolonger

Senior Member
Jan 23, 2009
66
0
Hey Martin, thanks again! I've moved your how to over to nokia apps referencing this page again. You're entirely correct i was using the bleeding edge version, and yeah not having to rw that simplifies things greatly.... stupid......stupid stupid........:). Anyway I've got a free day tomorrow i'll try out your new how to later, i'm also going to put it on droidappz, just to ensure full coverage.

speoples20 Not to dismiss your idea, and i know many users would be ok with it but i like being able to see the code before i run it, and i think the nature of this requires it be at very least open source
 

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
Hey MartinFick first off let me say great job on getting this going. Now my question, any chance of making this automated and making it into an apk? Like open the app and select the size of the partition you want the press format. I have a few coworkers who I just recently rooted their G1s and are interested in moving their apps to the SD card. This would make it easier to do it for them.

I doubt that I will find the time for this, but consider it considered. ;) If someone wants to get some experience writing a really simple GUI for this I would definitely support them. If I have to take the time to learn the android SDK, I have other apps I want to write first. But, if I do, I suppose it would then be rather easy to do this. Of course, I also do not want to spend $25 just to make this app available through the market...
 

bound4hi

New member
Apr 3, 2009
2
0
Yes thank you MartinFick for your offering, I plan to use SDSPLIT as soon as I run out and get a larger SD card.

Which brings me to a question; what is the effect to the OS when the SDSPLIT-formatted SD card is replaced with a new SD card. Does this wreak havoc with mountd or init.rc?

Thanks again!
 

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
LucidREm:
FAT16 -> It's more likely that I just wasn't doing something right at the time, I only have a 1G card.

bound4hi:
Which brings me to a question; what is the effect to the OS when the SDSPLIT-formatted SD card is replaced with a new SD card. Does this wreak havoc with mountd or init.rc?

As I have very little experience with this so far, you are better off searching or asking in some of the migrated app threads. I just removed my card and the phone won't boot. But, none of this should be specific to my script, it should behave the same as a system split some other way (using a PC).

As for running the sdsplit a second time to repartition the new card, that shouldn't be a problem if you can boot and if you use the -nc (--noconfig) option to avoid rewriting the mountd and init.rc. But, even if you forgot the switch, you should be safe, it will try to backup what you have and if it notices the previous backups it will prompt you to see if you want to overwrite them. You should likely answer no so that you can keep the originals around. Either way, the system "should" work, but obviously I have not tested this.
 

cronin4392

Senior Member
Jul 9, 2007
188
0
No, probably not, likely step 2 got updated after you read it. Can you reload the HowTo page and try the new step 2?



Sorry again, it appears, the android mkdir is rather broken and fails with the -p option if one of the already existing parent directories is on a read only fs!!! The busybox mkdir does not seem to have this problem. I've updated Step 2 again to avoid this. Again, I do apologize the HowTo was written today and I created those dirs a while ago so I did not see those failures. Seems like writting the HowTo is harder than writting the script! ;)


i will try the new steps out ina bit, and once again thanks so much.
 

bound4hi

New member
Apr 3, 2009
2
0
I just removed my card and the phone won't boot. But, none of this should be specific to my script, it should behave the same as a system split some other way (using a PC).

Not knowing for sure how the operating system responds to "missing devices" the boot process could interrupted trying to perform the SD associated file system mounts.

I'm wondering if the mount of the file system onto the EXT2 partition should be made to be conditional based on the existence of :confused: ....Yea I'm a bit out of my element so I should stop before I embarrass myself.
 

SolemnWishing

Senior Member
Feb 26, 2009
642
12
Oregon
Well there goes my 8gb card I just bought yesterday, I followed the instructions correctly but at the repartitioning part it gave me an error and now the card is unusable and freezes Windows Explorer when I put it into my computer. I am seeing how to fix it now...
 

MartinFick

Senior Member
Mar 12, 2009
214
2
Boulder, CO
www.theficks.name
Sorry for your problems, can you post the error or email me the log file, were you able to capture the log file?

It should not be too hard to recover your disk by simply reformatting it, either on windows or on the G1. I will gladly work with you to solve this, but I need more info.