yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] kolobok01:
Hello guys i have trued to do the same. I have formatted my class 4 8GB sd card to 2 partition one fat32 and the other to EXT2 but i don't see EXT2 partition wan i do all i get is

C:\Users\Kolobok>adb shell

# busybox df -h

busybox df -h

Filesystem Size Used Available Use% Mounted on

tmpfs 48.4M 0 48.4M 0% /dev

tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals

/dev/block/mtdblock3 67.5M 64.0M 3.5M 95% /system

/dev/block/loop0 1.4M 1.4M 0 100% /system/modules

/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin

/dev/block/mtdblock5 74.8M 3.3M 71.5M 4% /data

/dev/block/mtdblock4 67.5M 1.1M 66.4M 2% /cache

/dev/block/mmcblk0p1 7.0G 4.0K 7.0G 0% /sdcard

#

I have trued to do this from Ubuntu. And same thing i have trued to format it from windows using "Paragon Partition manager 9" and same thing I can't see EXT2 partition wan I do busybox df -h command.

Any suggestions.?

I have JFv1.31_RC30 version installed on the phone.
[G1 Android Development] dwang:
Did you change and replace the /system/init.rc file correctly? That's where it mounts the ext2 partition. And make sure that /system/sd directory has been created. Its should look like this:

cat /system/init.rc
on system
mount cramfs loop@/system/modules/modules.cramfs /system/modules ro
mount cramfs loop@/system/xbin/xbin.cramfs /system/xbin ro
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mknod /dev/mmcblk0p2 b 179 2 1000
mount ext2 /dev/mmcblk0p2 /system/sd noatime nodiratime
#
[G1 Android Development] kolobok01:
Ok I have got it thank you. The thing that i did wrong is I have not restarted my phone. In instruction it saying to restart you machine not phone so i did restart my computer not phone.

Thanks guys for your help.
[G1 Android Development] dwang:
LOL...

ok changed the text to "reboot your g1." :-)
[G1 Android Development] Smokuevo:
did u do

/mkdir system/sd

??
[G1 Android Development] usmc2k:
Dwang !!! Kan u please let me know if my sd card has to be fully formated & empty before i attempt to partition it ?????? or atleast the steps u used to partition in the ext2... im not familiar with partition manager and im using xp
[G1 Android Development] Smokuevo:
use partition manager... format some of the space fat 32 the other space with ext2
[G1 Android Development] usmc2k:
so the sd card has to be completly cleared of all data ?... Kus when i do it i get this error..... "Incorrect dir structure - errors in dir tree. CHKDSK should be used to correct"
[G1 Android Development] dwang:
Sorry I used linux to partition my sdcard. Perhaps somebody else here could give you a hand.
[G1 Android Development] lazaro17:
Thanks! this works great on a class 4 8gb card. My memory was down to 48mb but I forgot to send cache for a few apps to sd card. At 64mb now with 30+ apps installed FTW.
[G1 Android Development] mark925:
I used Paragon Partition Manager for Windows to partition mine. It did not require me to format the card before partitioning. It partitioned it without a problem.
[G1 Android Development] h4ng0ver:
Thanks

Just tried it on my class 6 8G microcard, works great.

Thanks
[G1 Android Development] LPChris:
Is there any reason why this can't be all rolled up into a script that we can run? Or maybe make an app that gains root and then creates all of the folders, symlinks, puts the files where needed, etc.
[G1 Android Development] Beast84:
In doing so, did it format the card once you did the fat32 portion? Or did all the info on the sdcard just get moved to the fat32 when the ext2 was created?

Also I keep getting this when I try to format my card, anyone know why I can't partition it?

One more question, would formatting this with my card reader afterwards delete the partition or would it just format the fat32 portion?
[G1 Android Development] mark925:
When I did mine it moved all the stuff I had on there to the FAT32 partition when ext2 was created.

You keep getting what when you try to partition it?

As for putting it into a card reader, I think it would likely only see the FAT32 partition and that's it... but that's just a guess.
[G1 Android Development] andonnguyen:
You can use partition manager in ubuntu. =]
[G1 Android Development] MontAlbert:
silly question now:

how big do the partitions have to be? How much do you need for the programs? I am assuming say 200MB enough seeing as the phone doesn't even have that much..... or more? 512MB?

thx
[G1 Android Development] Beast84:
When I put my card in the card reader & open paragon, I click on the card & this is what it tells me, "A new partition cannot be created on this hard disk. Most probably, all primary slots are occupied and there is no extended partition." It won't allow me to partition is. Does the card have to be a certain size? I am trying it on my 2gig card just for a reference to learn the program. I have an 8gig card in my phone
[G1 Android Development] dwang:
thats up to u. i have a 8g sdcard so i allocated 1gig to extt2, but thats probably overkill. i would think 512mb or even 256mb is plenty.
[G1 Android Development] xxkingpinxx:
having trouble with the Pull/Push steps using adb

adb pull /system/etc/mountd.conf <dir on your desktop>

When I enter this command nothing happens, I just get a long string stating basically all the commands you can perform with adb., I don't think i'm entering my desktop directory right, when I hit properties my desktop is at C:\Documents and Settings\Checkmate\Desktop, can you give me an Idea how my adb command to pull and push should look?

Oh btw, to push the command you gave was adb push /<dir on your desktop of modified file>/mountd.conf /system/etc/mountd.conf

properties says the location of the modified files is C:\Documents and Settings\Checkmate\Desktop\modified mountd & init,

Thanks for any help you can offer?
[G1 Android Development] dwang:
I don't think you have adb installed properly. Do you have the android specific device drivers installed correctly? Please search the forum as its all explained here if you search.
[G1 Android Development] xxkingpinxx:
I'm pretty sure I do, I downloaded the sdk, downloaded the drivers, put the phone in dev.debug mode, typed in the commands given in the thread that shows how to get modded rc 30, and all looks well, it appears the system recognizes the adb, I was even able to rune the makdir command for the sd, I guess I just need to know the actual command string I put in that will find my desktop, what do I put in in the <dir to your desktop>?
[G1 Android Development] dwang:
Its whatever directory you want..
[G1 Android Development] xxkingpinxx:
That's what I'm trying, when I type:

adb pull /system/etc/mountd.conf <desktop>

Nothing happens, when I type:

adb pull /system/etc/mountd.conf /C:\Documents and Settings\Checkmate\Desktop

Nothing happens, when I type:

adb pull /system/etc/mountd.conf <C:\Documents and Settings\Checkmate\Desktop>

Nothing happens, I don't know the correct command line?
[G1 Android Development] dwang:
try this:

adb pull /system/etc/mountd.conf . <--- dot is part of the command

and it will pull the file to your current working directory on the desktop..
[G1 Android Development] soulsponjah:
using this is much easier. is this how you also push the mountd.conf and init.rc file from the same directory?

adb pull /system/etc/mountd.conf . <--- dot is part of the command

and it will pull the file to your current working directory on the desktop..
[G1 Android Development] xxkingpinxx:
good looking out, finally, both files appeared in my tools folder in the sdk folder, now the part I'm stuck, what's the command line to push the files? Do I need to replace the modified files into the tools folder?
[G1 Android Development] xxkingpinxx:
I tried saving the original in another folder, and replacing the modified files in the tools folder the pulled files appeard, then tried typing:

adb push /<.>/mountd.conf /system/etc/mountd.conf

But I get?: access is denied
[G1 Android Development] soulsponjah:
when i do step 12. From the G1 shell run the following cmds to copy your app and app-private directories from the internal g1 storage to the sdcard.

busybox cp -a /data/app /system/sd

i get an error: operation not permitted
[G1 Android Development] dwang:
I'm assuming you are running on windows. windows uses "\" instead of "/" as directory delimiters.

So try this:

adb push \<.>\mountd.conf /system/etc/mountd.conf

also make sure you've set the system directory as writable ie

adb remount
[G1 Android Development] dwang:
Did you do "adb remount" before connecting to the g1 shell?
[G1 Android Development] soulsponjah:
thanks dwang for your help. for whatever reason i had to reboot my phone twice. apps now moved to sd.
[G1 Android Development] mark925:
There should not be a limit on card size. Mine that I did is an 8 gig card.
[G1 Android Development] Beast84:
Are there any other programs besides paragon? I put my 8gig card in & it gave me the exact same response as my 2gig card. Is it cuz I didn't buy the program? I was just using the free trial
[G1 Android Development] jeffmthomas:
I was wondering if anyone else has run into this same problem. I moved the /data/data folder over onto my sd card partition and all of the applications keep crashing when they are running... the problem stops when i move everything back onto the phone. Is there a way to properly move this folder over. I basically did it the same way as I moved the apps and apps-private folder over.
[G1 Android Development] beartard:
Just in case anyone is searching for ways to do this in GNU/Linux, the quickest way to partition an SD-card is to use parted, which is available standard on many distributions (I use Kubuntu). I tried using qtparted to do it graphically, but felt it was like beating my head against a wall. A few, quick commands in the terminal worked just fine, however.

Here's a synopsis of how to do it. I'm using an 8GB card, formatted as one, big, FAT32 filesystem. I'm going to shrink the FAT32 partition to 7GB and make an ext2-formatted 1GB partition for my application storage.

1. Determine the device name of your sd-card (it was /dev/sdc on my computer).

1a. With the SD-card mounted, you can type cat /etc/mtab to find its device name.

1b. Unmount the drive using the graphical or command line utility of your choice.

2. Run parted in a terminal by typing parted /dev/sdc

2a. While in parted, your prompt changes to "(parted)"

3. Type print to get information about the drive and its partitions. Note the size of the drive, as well as the start/end points of the partition. Here's a sample of the output of the "print" command:

GNU Parted 1.8.9
Using /dev/sdc
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Generic USB SD Reader (scsi)
Disk /dev/sdc: 8192MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 8192MB 8192MB primary fat32 boot

4. To shrink the partition, freeing up space for the new one, type resize 1 32.3kB 7168MB

This tells parted to resize partition number 1 to start at 32.3kB (its original start point)

and end at 7168MB (or 7GB). Parted defaults to MB, but you can type whichever

units you prefer.

5. To make the new, ext2 partition, type mkpartfs primary ext2 7168 8192

This tells parted to create a primary partition, formatted to ext2, from the end of partition

number 1 to the end of the drive (all from the "print" command above.)

6. Type quit

Also, when using Linux (or any other OS for that matter) you can do away with using adb at all and do all the work on the G1 itself, assuming the needed files are on the SD-card. It's a little more typing on the phone, but it keeps from having to use a computer or download the SDK.

To remount your /system directory as writeable, just type mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system on the phone instead of "adb remount" on the computer, and the rest is normal Linux commands substituted for the adb-prefaced equivalents.
[G1 Android Development] APrinceAmongMen:
Thanks so much for this. Love it. :)

Also, the cache on the sd does wonders too.

Added the MeetMe app cache to the wiki for all of you. :)

Thanks again.
[G1 Android Development] Beast84:
I downloaded the VMWare to try to partition my sd but I have no idea how to get it to read my sd once its in my laptop? I can read it through windows but when I go into the VMWare, I can't find it anywhere. Any suggestions?
[G1 Android Development] NinjaNerdBGM:
Okay, I got as far as rebooting my phone after pushing the modified mountd and init to my phone. Now my phone hangs at the "T-Mobile G1" screen and won't boot.

What's going on?
[G1 Android Development] dwang:
did u create the sd dir?

u still should be able to get a shell.

connect the g1 to your pc and do adb shell
[G1 Android Development] NinjaNerdBGM:
Yeah, I've got the shell, but only when I go into recovery mode.

I'm reflashing my phone and I'll try again.
[G1 Android Development] johnowa636:
adb: not found

C:\Users\Johnowa636>cd\
C:\>cd androidsdk\tools
C:\androidsdk\tools>adb shell
# adb pull /system/ect/mountd.conf/C:\Users\Johnowa636\Desktop
adb pull /system/ect/mountd.conf/C:\Users\Johnowa636\Desktop
adb: not found
#

:mad:

can someone lend a hand.

I have tried "adb pull /system/ect/mountd.conf . <-----part of command" as in a earlier post but still get error "adb: no found"

Thanks for the help.
[G1 Android Development] antempire4:
Worked great. Thank You!
[G1 Android Development] antempire4:
You don't want to be in the shell for the directions posted here regarding pulling and pushing files. Bring up a command prompt on your desktop computer start > run > cmd

then cd to your tools folder to ensure adb will run

then enter the commands here (yours didn't have the necessary space inserted):

adb pull /system/ect/mountd.conf/ C:\Users\Johnowa636\Desktop

adb pull /system/ect/mountd.conf/ C:\Users\Johnowa636\Desktop
[G1 Android Development] antempire4:
So just to verify. Does this method allow for new apps to be installed to the sd card after this process has been completed. Or does it need to be redone every time I want to add a new app to the sd card?
[G1 Android Development] beartard:
The old install directory is linked to the sd card. New app installs will go directly to the sd card.
[G1 Android Development] antempire4:
Thank you. And thanks again to every one here at XDA. You guys are extremely helpful and patient.

Keep up the good work!
[G1 Android Development] johnowa636:
C:\Documents and Settings\John Garcia>cd\
C:\>cd androidsdk\tools
C:\AndroidSDK\tools>adb remount
remount succeeded
C:\AndroidSDK\tools>adb push \<.>\mountd.conf /system/etc/mountd.conf
Access is denied.
C:\AndroidSDK\tools>

still having issues. getting Access is Denied.

I have done adb remount, i have rebooted, I even upgraded from JFRC30v1.3 to v1.31. Still nothing. Once I pulled the files i replaced them with modified files in the tools folder. What am i doing wrong.
[G1 Android Development] antempire4:
Well, your backslashes instead of forward slashes..... Try this...

adb push C:\Users\Johnowa636\Desktop\/mountd.conf /system/etc/mountd.conf

adb push C:\Users\Johnowa636\Desktop\/init.rc /system/init.rc
[G1 Android Development] johnowa636:
Thanks antempire4, that worked.
[G1 Android Development] kagero:
since 2 days i dont manage to get my sd card (16gb class 2 till i get the 8gb class6) formated/partitioned to ext2 right with this partition manager running on xp !!! do i have to give a special volume name or driveletter ??? also dont get it as primary partition only as logic ??? so i only can see the fat partition with busybox df -h command.

i´m begging for help here :)
[G1 Android Development] beartard:
Don't beg ;)

A simple way to do it would be to download a LiveCD of a Linux distribution (like Ubuntu). That way you can boot into Linux, re-partition and format your SD-card, then reboot into XP without having touched your hard drive.

I gave some Linux partitioning examples here: http://xdaforums.com/showpost.php?p=3180773&postcount=126

You can download the 32-bit Ubuntu CD here: http://lug.mtu.edu/ubuntu-releases/intrepid/ubuntu-8.10-desktop-i386.iso
[G1 Android Development] Preech2003:
Adb bull****!!

Is there anyway to do this with out using ADB Shell. I mean, all i wanna know is why someone cant make to script files (.sh) and then load them up here. Just show Newbies how to install a script file. That process cant be done????????????????

Someone Please Help.

I think everyone who has a G1 could benefit from a app like DroidSan Tweaks but instead of the autorotate ****. How about a droid san tweaks that actual makes u "Run & Install Apps from the SD Card". Ima Registry Hack Windows Mobile man. Im just gave up WM6.1 & Im very new to Linux.

Id pay $50 dollars through paypal quick for such a master winning app for all ROOT'ers alike.

Or atleast somescript files or something??

If this were dont than people would only have to partion there Sd cards in half. Presto. People are already making Script Files to moves the cache data..
[G1 Android Development] kagero:
Ubunto recognizes the already existing ext2 partition, but when i try to reformat it tells me that there are no more primary partitions possible !?!

shouldn´t i have fat32 and ext2 as primary partition ?
[G1 Android Development] beartard:
Yes, it's possible to do all this without using adb. It just requires a lot more typing on the phone itself.
[G1 Android Development] beartard:
Yes, they should both be primary partitions. You choose either "primary" or "extended" when you repartition using parted.

Parted also repartitions and formats it in one step. You'd have to use mkfs.ext2 to format it if you partitioned in a separate step.
[G1 Android Development] Beast84:
I just tried paragon again & it read my SD this time. In paragon it shows that my SD is partitioned but when I look at the properties on windows, its showing 0bytes. Its a 2gig SD partitioned in half. I don't know if it did it correctly. When I try to format it in paragon, it hangs on the loading screen forever. When I try it in windows, it says it is write protected. Anyone else have this issue?
[G1 Android Development] heldc:
Worked PERFECTLY! I installed dozens of apps, and still have over 60MB of system memory free! Apps&cache on SD card is made of win!
[G1 Android Development] :
I am having this problem now. I used Paragon Partition Manager and I have rebooted my phone several times and it won't see my ext2 partition. I'm using ADP1 v1.31.
[G1 Android Development] LucidREM:
very awesome

i've gotten everything transferred to my SD card .. still with 60MB on the phone .. only using a 2G card at the moment (1.4SD / .5EXT2) and there's plenty of space .. at some point i'll change to a 4G or 8G but i love that someone did all of this research for me .. made things so simple to follow and when i upgrade my SD i can copy the partitions and not lose any data

thanks!!
[G1 Android Development] dwang:
Let me know if you have any success copying over the partition to a new sd. I tried to do that after I got my 8g sd card with ubuntu and I got all sorts of errors, I had to re-install all my apps to the new sd card.
[G1 Android Development] heldc:
Dunno if this has been posted yet, but the undo process is simple. I just did it with no problems, and thought others might want it as well. (Note-if you're copy pasting this to do it, anything following # til the end of a line is just a comment, don't copy/paste it.)

adb remount #makes your file system writeable

adb push /<place you backed up mount.conf to>/filenameofbackeduporiginalmount.conf /system/etc/mountd.conf #restores the original mount.conf

adb push /<place you backed up init.rc to>/filenameofbackeduporiginalinit.rc /system/init.rc #restores the original init.rc

adb shell #opens the phone shell

rm -r /data/app #deleting the symbolic link to /system/sd

mkdir /data/app #recreating /data/app

rm -r /data/app-private #deleting the symbolic link to /system/sd

mkdir /data/app-private #recreating /data/app-private

reboot
[G1 Android Development] LucidREM:
64MB

so after moving the entire /data/data to the SD i now have 64MB and basically unlimited storage for the phone .. i had read someone stating they had more space (70MB free) on the phone .. now granted 64MB is perfectly awesome .. i was just wondering if there's some other way to get more space or if this person was just blowing smoke

soon enough i'll have my 8GB card and i'll let you know how the transfer goes .. one thing i've noted is that you MUST turn your phone off and place the SD into the computer via a card reader for the best performance .. i tried mounting thru the phone and got errors .. while the phone's running it's accessing the information you're trying to move .. anyone else have experience with this?

NOTE: i'm using Ubuntu 8.10 x64 for setting my EXT2 partition .. for those who haven't figured it out already, FAT in Microsoft is aka FAT16 in the linux language .. when i set the FAT16 partition i also had to FORMAT the partition .. when i set the EXT2 partition linux automatically did the format for me
[G1 Android Development] dwang:
Thanks for that... I'll add this to the original post
[G1 Android Development] Preech2003:
Hey Beartard, 3 Questionz

1. How would u go about doing this procedure without using ADB. Would I use Terminal Emulator?? or Telnet??

2. Would it be the same command as ADB but with alittle extra's here & there?

3. When the RC31 Update comes or if i switch RC Firmwares will i have to do this procedure again?????????????
[G1 Android Development] robpet2:
hopefully there will be a way to run the apps off the card without partitioning the sdcard... will try this as soon as i order me a 16gig card tho
[G1 Android Development] rynosaur:
Market problem after move apps to Sdcard

Has anyone had the problem where 'My Downloads' in Market loses track of installed apps after this hack is applied? At first, all my installed apps showed free, after I manually reinstalled all of them, they now will not switch to 'free' when there is an update available.

Any idea how I might fix this? Delete database files in com.vending.android, maybe, and see if the phone will recreate them? Thanks.
[G1 Android Development] LucidREM:
really it would be exactly the same commands .. minus "adb " on the front end

i did most of the commands directly on the phone (once i gained "root" access) without ADB .. simply pull up the terminal and enter "su<enter>" so the display shows the "#" instead of "$" .. now you can completely manipulate the files directly .. setting up the double partition was a piece of cake in my opinion with Ubuntu / Linux and the Partition Editor
[G1 Android Development] beartard:
The guy above answered most of these. The only command radically different is the remount command. From a terminal on the phone the command is something like:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system

Skip this part if you want:

By the way, in case anyone wants to understand what that command does, the mount command is used in Linux to mount devices to be read as storage. "o" is for "options." The options are "read/write" access and "remount." "t" is for "filesystem type" which is "yaffs2" for Android system partitions. /dev/block/mtdblock3 is the device name (the internal Linux device name) for the partition, and /system is the mountpoint, or place in the directory tree where that device will show up to be read by us.

In Linux filesystems, all drives, partitions, etc, are mounted under "/" or root. Yes, the slash is called "root" which isn't to be confused with the root user or superuser (su). It's the top level of the filesystem. In most Linux systems you'd set up your main partition as / and everything else (even other partitions) are directories logically mounted under that. When you go to "/sdcard" it means you have a block device (with its own /dev/block/... node) mounted under / as "sdcard".

Aside from that, most of the commands are just regular Linux commands, copying, moving, making symlinks, and deleting directories. Depending on how you rooted your G1, you can issue the commands directly or as "busybox <command>" instead. So the abbreviated procedure would be like this: