yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] esnapz:
Hope this helps. I had the same issues last night. For some reason it wouldn't mount after reboot. I read these threads several times and tried the following.

Manually mount it. If it mounts its not the sdcard.

# mount -t ext2 /dev/mmcblk0p2 /system/sd

# busybox df -h

If it mounts check your init.rc file. That was my problem. It should read as follows.

# 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

My problem was with the last line. It had /sd instead of /system/sd
[G1 Android Development] forceshield:
Is anyone getting the not enough space error after moving /data/data? I cannot fix it. I have tried to format my ext2 and redo all the moves several times and had no luck.
[G1 Android Development] makam:
thanks ,great work,many thanks
[G1 Android Development] LPChris:
I don't think we should publish the instructions to move the /data/data folder. It looks like a lot of people are having problems. I moved it over to the sd card today and everything appeared fine, however after rebooting just now I keep getting a message that com.tmobile.myfaves has stopped unexpectedly.

Moving the data folder over seems to cause nothing but trouble.

EDIT: I went into the shell and looked at /data/data/com.tmobile.myfaves/databases and when I run a "ls" I get

ls: ./contacts.db-journal: Stale NFS file handle

That's got to be the reason for my force close error of myfaves. I wonder if I can somehow clear that file handle out and it'll recreate it.
[G1 Android Development] LucidREM:
it seems so weird that some people are experiencing troubles .. i have the three folders moved to the EXT2 partition (class6SD)

/system/sd/app

/system/sd/app-private (any reason this is empty?)

/system/sd/data

i have no noticeable decline in performance .. no strange errors .. but the side thing is i have no strange changes on the phone

1. rooted and ran 1.31 update

2. moved /data/... to /system/sd

3. ran 1.41 update (maintaining apps on SD)

no bootloaders .. no themes .. nada .. is there anything else that could be causing force close issues? can't just be /data/data or everyone would have similar problems .. yes?

note: i did try moving the /data/data prior to 1.41 and my class6SD and i'll tell you .. don't do it .. i've also noticed more and more apps are now utilizing the /sdcard for storing data .. most people may not need to move /data/data over only /data/app .. just a thought
[G1 Android Development] dwang:
your ext2 filesystem is corrupted. You need to run fsck on the ext2 partition from a linux box.

Did you pull out the battery or something while the phone was still on?

I actually ran into the same problem myself. I pulled out the battery and it caused the data dir to get corrupted so I had to delete the /data/data dir and start again. Maybe I'll remove step 13 from the instructions.

busybox on the jf images has fsck, but it doesn't seem to work.
[G1 Android Development] dwang:
Pac-man goes in there. I'm guessing paid apps will be put in app-private..
[G1 Android Development] LPChris:
Everything seems to be working fine. The only thing I did before getting that error was do a Call+Menu+End soft reboot.
[G1 Android Development] bulletproof77:
THANKS

@ antempire4----thanks for the assistance. I really appreciate it.
[G1 Android Development] LucidREM:
perhaps just clearly mark it as OPTIONAL so people know it's an unnecessary step .. without moving /data/data i still had 34M on the phone and installing app after app after app did not make it move
[G1 Android Development] Autarkis:
I did the partitioning with gparted.

The status quo is:

* apps are run from SD - works smoothly, and fast

* MP3s and images are accessible from the phone

* I've undone the moving of /data/data to the /system/sd/data because of the following problem...

If I plug the phone into my Debian Linux box it shows /dev/sda without any partitioning. This means that I can't move MP3s to the SD card, since I can't mount /dev/sda1. But if I do adb shell mount it shows FAT32 and ext2 partitions.

And in syslog on my desktop system:

Where it would usually say /dev/sda1 vfat, /dev/sda2 ext2 (but I haven't seen that one ever).

Can anyone help me out? From my point of view, ADB1.1 changed the partitioning of the sd card so that it's no longer visible from my Linux box.

Edit: This seems to be partially "resolved" meaning it's working, although I am somewhat puzzled. I can apparently mount /dev/sda directly. I'm not sure why gparted would treat the SD card unlike a harddisk. I'm not sure why I can't see the ext2 partition anymore. I don't see why in the process of resizing partition /dev/sda1 vfat and creating /dev/sda2 as ext2, /dev/sda1 should suddenly become /dev/sda. Is there something wrong with my partition table? Highly probable. I need a Linux guru to help me here...

Edit 2: I think I remembered what happend... I had /dev/sda1 mounted while repartitioning and after that in my stupidity unmounted it. That might have corrupted the partition table somewhat. If that was the case... any ideas how to get the table clean again? I think I could always undo /system/sd and back up /dev/sda and start all over again. If there's an elegant solution, I'm interested!

Sorry for the confusion.
[G1 Android Development] DeadBody79:
Please Help !

I do everything from first post and all worked fine.

but when i now try to install something from market i get the not enugh space error.

can i fix this by undo moving the /data/data ?

if yes, please tell me how i can undo this.

thanks !

/e;

i also moved the chache with this commands:
[G1 Android Development] BobbyHill:
I'm starting to wonder if part of the problem lies with that paragon partitioning software. My sd card seems to be awful wonky after formatting with it.

I've formatted 2 partitions, the 2800mb FAT32 and 1000(ish)mb EXT2. After this, neither of my pcs will recognize it. (One running XP and one Vista. Have not tried yet under linux)

The Paragon software shows it there, but Windows won't see it as a drive. (I know it wouldn't recognize the ext2 partition, but it's not even showing the FAT32 one)

I might boot up into Ubuntu again and give GParted another try.
[G1 Android Development] vr24:
Dump Paragon, I had nothing but problems with it. My phone wouldn't recognize the partitions after using Paragon either. Worked like a charm with GParted. I am using RC30 though, if that matters.
[G1 Android Development] BobbyHill:
I'm having nothing but troubles now. I reformattd the card to fat32 with the windows vista disk manager. It's still hosed though. Formatted it again in my digital camera, pcs still won't recognize it.

I only paid $7.49 for the thing. I'm going to chalk this one up to experience and say screw it.
[G1 Android Development] JesusFreke:
fdisk

Hint: JFv1.41's busybox has fdisk. that being said.. I haven't tested it :p
[G1 Android Development] BobbyHill:
I'll play guinea pig. I don't have anything to lose with the sd card
[G1 Android Development] andonnguyen:
Oh NOW you tell us jesusfreke lol :D
[G1 Android Development] BobbyHill:
I just realized the phone's not even seeing the 4gb sd card now.

After (I think) Paragon hosed it, the only thing that would see it and let me reformat was my digital camera. I did that and put it back in the phone, and now it's not even mounting (/dev/block/mmcblk0p1 966.6M 144.8M 821.8M 15% /sdcard) like my 1g card does.
[G1 Android Development] dwang:
Cool... I think the biggest problem that people are having with doing this procedure is actually partitioning the sdcard. I'll play around with fdisk tonite (I'm in California so it may be a while) and if it works I'll update the original post with instructions on how to partition the card using fdisk.

If somebody can get it done before me, I'll be happy to include the instructions in the original post.
[G1 Android Development] LPChris:
Paragon worked perfectly for me and two other SD cards that I did the procedure on.

BTW, I fixed my MyFaves error by just clearing the data on it which kills that databases folder and rebuilds it. My SD card wasn't corrupted.

EDIT: Actually that might've just made it worse. I'm getting all sorts of acore force close errors now.
[G1 Android Development] BobbyHill:
Well, I have a new SD card on the way. Hopefully by the time it comes, we'll have these glitches worked out. :)

(I decided maybe the card was bad to begin with and not Paragon, so I contacted NewEgg.com about a replacement. Their automated RMA thing told me I'd have to send the old one back. I talked to a real person and she agreed with me that between the gas driving to the ups place and the price of shipping it back, it wasn't worth it...they're just going to send me a new unit for free. Woohoo!)
[G1 Android Development] LPChris:
I have a theory that the reason people see such varying success moving /data/data to the sdcard is some kind of throughput or number of connections limitation of the hardware interface to the sdcard. I think having every app/service on the phone going to the sdcard for its data is clogging up the pipe and the system rejects some of them if it's too busy. Thus the reason why we get random issues. I definitely think undoing the procedure is my next step and just moving the heavy cache's and such 1 by 1 will result in less errors.
[G1 Android Development] LucidREM:
very true .. which would also be one reason why class6 has more success than the others? how many background apps are running? you can put your link in anywhere tho too .. instead of looking directly for a cache section you could link the entire com.***** to the card

ie. /system/sd/data/com.android.browser/

then you could bypass the whole /sdcard/cache part .. yes?
[G1 Android Development] Smokuevo:
i have class 6 8gb and no problems. got 87 apps installed.. 60 mb free..

another issue might be due some people having cache files directed to sdcard.. rather then having all data data with cache on sd...

i re-rooted my phone cuz i had the problem of insufficient space so i just moved the apks and data data to sd and everything is BEAUTIFUlL!
[G1 Android Development] Smokuevo:
yes yes :)
[G1 Android Development] LPChris:
Yeah that's true, I do have the individual cache's moved to the FAT32 portion of the SDcard and the /data/data moved to the ext2. Maybe I'll just do a wipe tonight and then just move the apps and /data/data over to the card.
[G1 Android Development] Smokuevo:
if u want to re move caches to data data again
[G1 Android Development] karlb619:
Ok so I moved everything over, and I did the /data/data move also. I am getting the message "Sorry, there's not enough space to install this item." when I go to try and install a new app. I think I have seen someone else with this problem but I cannot find that post. Can someone give me a clue to what might be causing this? I have plenty of space for new apps, I partitioned 3.73 gigs for my ext2.

Edit: would i do this to undo the data data move?
[G1 Android Development] Smokuevo:
in terminal as root do

ls -l /data

and record ur findings.
[G1 Android Development] karlb619:
here it is

# ls -l /data
ls -l /data
drwxrwxrwx 1 1000 1000 2048 Jan 20 06:40 anr
lrwxrwxrwx 1 0 0 14 Jan 28 22:19 app -> /system/sd/app
lrwxrwxrwx 1 0 0 22 Jan 28 22:21 app-private -> /system/sd/app-private
drwxrwx--x 1 1000 1000 2048 Jan 20 06:39 dalvik-cache
lrwxrwxrwx 1 0 0 15 Jan 28 22:31 data -> /system/sd/data
drwxrwx--x 1 2000 2000 2048 Jan 20 06:39 local
drwxrwx--- 1 0 0 2048 Jan 20 06:39 lost+found
drwxrwx--t 1 1000 9998 2048 Jan 20 06:39 misc
drwx------ 1 0 0 2048 Jan 20 06:39 property
drwxrwxr-x 1 1000 1000 2048 Jan 20 06:40 system
#
[G1 Android Development] LPChris:
I undid my /data/data move and everything is working perfectly for me again. If you want to do the same try doing this

su

rm -r /data/data

cp -rp /system/sd/data /data

that should get the /data/data directory back onto your SD card.
[G1 Android Development] forceshield:
I was also the one having the problem with the /data/data move and insufficient space error. I had a post Here about it. I have done, redone and done it again several times always returning to the same error, but only after /data/data move. I have tried manually, and also with the batch files that were posted in hopes I was missing something repeatedy, but the batch files work - until data is put on ext2.

If you figure out a fix, please post it :)

Are you running jf(1.41)rc30? (jf1.41)ADP1? because of the varying success rate, im curious if its limited to rc30 causing the errors.
[G1 Android Development] danguyf:
I had instabilities after the /data/data/ move as well. I was running JF1.41_RC30 with caches on the SD card. I wondered afterwards if maybe that was the issue, having /data/data/ point to /sdcard/sd/data/ while /data/data/com.android.browser/cache/webviewCache/ was pointed at /sdcard/cache/browser/ -- nested symbolic links, so to speak.

My instability manifest as a bunch of apps starting themselves all the time. Alarm Clock, Voice Dialing, MyFaves, Klaxon, etc. They'd start and then crash over and over again.

Undoing it didn't work so I took the opportunity to wipe and switch to JF1.41_ADP1.1!
[G1 Android Development] LucidREM:
so since FAT32 and EXT2 read files and permissions differently .. couldn't we assume that undoing a move from the phone to the FAT32 cannot be undone without causing errors? you would have to manually enter any permissions that copied incorrectly .. whereas using "cp -a" or "cp -rp" from the phone to the EXT2 can be undone because it copies all permissions properly .. yes?

with my limited understanding of linux and my extensive understanding of DOS i know they don't communicate well with each other

but yes .. i wouldn't move the /data/data to /system/sd/data while maintaining /sdcard/cache because even if it doesn't crash you get a double slowdown .. any hesitation you may get from the EXT2 partition is now magnified when it starts looking to the FAT32
[G1 Android Development] walabe25:
i really need some help using adb. ive been able to do every mod to my phone except pulling these dam files i have adb up, running, and reading my phone. i just cant get it pull anything im always gettin errors. can some1 please help me get through this step.
[G1 Android Development] forceshield:
Gonna need some more info to help, what errors are you getting? did you try adb remount first? as stated before, if you just type "adb pull /system/etc/mountd.conf ." with the period at the end, it will pull to your current working directory (likely where you are running adb from.
[G1 Android Development] walabe25:
thanks forceshield that worked i just cant believe the importance of that period is excluded in more than one tutorial. that made it so much easier. now back to work i go
[G1 Android Development] LucidREM:
exactly .. give the error codes etc on that would help .. the "adb pull" syntax requires a source and a destination .. to simply things i always put things in the root of my computer (when working with Microsoft) .. thus you extract the sdk files into C:\SDK\ .. so you open the DOS prompt and type:

cd\SDK\TOOLS

adb pull /system/etc/mountd.conf .

now you have a file C:\SDK\TOOLS\MOUNTD.CONF
[G1 Android Development] forceshield:
the period is just a replacement for directory adb pull /system/etc/mountd.conf C:/mountd.conf would work too.
[G1 Android Development] antempire4:
With that being said, what if caches or the data/data folder were moved to the ext2 partition? Is it possible. Would it resolve any of the clogged pipe/crash issues?
[G1 Android Development] LucidREM:
/data/data should always be on the EXT2 partition .. some people were utilizing moving large cache files to the FAT32 without a second partition
[G1 Android Development] giantcrazy:
Finally got around to doing this today, and it worked like a charm. Thanks for the writeup!
[G1 Android Development] themykel:
Here are the steps I am using to do this. Pretty much the same thing that you use but it seemed to be simplier for most of the people that have PM'ed me (not sure why.....)

Pre-steps. Download the aforementioned init.rc and mountd.conf and put them in the root of your SDCard. Also use Paragon Partition Magic to format your SDCard with a second partition (its a GUI - follow the onscreen steps! It required me to reboot my laptop while the phone was connected via USB cable and the SDCard was mounted - after the reboot everything worked perfectly!). Note: I have data wiped my phone a few times and redone this procedure to test it out (originally toyed with making it a shell script, but cut n paste of all these steps will get you there!).

Also - have adb installed in your computer. Someone said that installing it in the windows system folder will allow you to run it from all Command prompts, but mine is in my root C: so I just run everything from there.

So - you have parititioned your sdcard with paragon. Your phone is NOT mounted but IS connected via USB. Do the following from where ever your adb is (if you dont have it - download the android SDK from google).

adb remount
adb shell
cd /system/etc/
mkdir sd
cp /sdcard/mountd.conf mountd.conf.new
cp mountd.conf mountd.conf.old
cp mountd.conf.new mountd.conf
cd ..
cp /sdcard/init.rc /system/init.rc.new
cp init.rc init.rc.old
cp init.rc.new init.rc
reboot

adb remount
adb shell
busybox df -h
busybox cp -a /data/app /system/sd
rm -r /data/app
ln -s /system/sd/app /data/app
busybox cp -a /data/app-private /system/sd/app-private
rm -r /data/app-private
ln -s /system/sd/app-private /data/app-private
reboot

Voila - step by step procedures!
[G1 Android Development] hawaiianboi:
ok im stuck on step 7...yes im sure i mounted using adb remount. to make things easier for me i moved both modified files to the main C: drive, but after typing in this command i get this error...

adb push /C:/mountd.conf /system/etc/mountd.conf

cannot stat '/C:/mountd.conf' : No such file or directory

help!!! please?
[G1 Android Development] themykel:
Read the post right above yours...
[G1 Android Development] hawaiianboi:
i did...gettin stuck on the busybox part now...
[G1 Android Development] LucidREM:
it's exactly what is says '/C:/mountd.conf' : No such file or directory

get rid of the '/C:' in the front .. you're asking the computer to enter a directory called 'C:' and obviously it's not there
[G1 Android Development] hawaiianboi:
ya i caught that after a good nights sleep and startin with a clear mind! haha
[G1 Android Development] Mikey:
Will this work on ADP1 roms? or it strictly for RC30?
[G1 Android Development] Autarkis:
I have JF ADP1.1, works perfectly.
[G1 Android Development] MontAlbert:
silly question now- but i am trying to get my head around the why and how of all these commands (I don;t like to follow blindly but understand what i am doing).....

When you type in the commands how does the phone know which partition to put the folders etc in? Is it because it always goes to the Ext2 partition first?

With the data people have been having issues when it has moved it to the Fat32partition.... how to make this data move go to the Ext2 partition and not the FAT32?
[G1 Android Development] Mikey:
what is one command to actually see proof, that the apps get saved on sd card.

I did all the steps after a wipe with no problems.

Thanks.
[G1 Android Development] LucidREM:
SDpartition1: loaded into phone as /sdcard

SDpartition2: loaded into phone as /system/sd

when you dual partition the MicroSD in order to install apps the first partition MUST BE fat32 .. and thus the second partition will be EXT2
[G1 Android Development] Smokuevo:
do u know why does the space still goes down after the move of data and apks.. what else needs to be moved?
[G1 Android Development] MontAlbert:
cool. thanks for that- now it is starting to make sense- now back to reading my Ubuntu linux for dummies book! seriously... :o
[G1 Android Development] Sistum Id:
What a pain, something when wrong and I had to wipe the whole phone. Had issues with the SD card and had to format it in my PSP because my PC or my G1 wouldnt see it or anything. Fresh starts are always good. Everything working good.
[G1 Android Development] Zionator:
Holy crap!!!!

3. Backup your original mountd.conf and initrc.rc files from your g1 by running the following commands on your desktop from the cmd shell:

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

adb pull /system/init.rc <dir on your desktop>

-----------------------------------------------------------------------

When i type "adb pull /system/etc/mountd.conf" i get ('adb' is not recognized as an internal or external command, operable program or bach file.)

i got (android-sdk-windows-1.0_r2) but can't find (adb) any where can any one help?

I am running Vista Ultimate on my laptop.

Ps. I am big time noob hehe but i found rooting easy if that can give u an idea for how much i can understand.
[G1 Android Development] MontAlbert:
there is actualy a link somewhere to DL the ADB by itself without the whole sdk kit. It tells you how install it etc (something about creating a path variable to it in the pc settings) .......

edit.......found it: http://modmygphone.com/wiki/index.php/Setting_up_ADB
[G1 Android Development] LucidREM:
all depends on where you stuck the files you extracted from the .ZIP .. knowing vista like i do .. it's probably something like:

C:\Users\Zionator\Downloads\android-sdk-windows-1.0_r2\tools\

when you selected to extract the SDK files where did you stick them? without the system having a "path" to that specific location you have to change your location before you can run it .. ie. CD\<location>
[G1 Android Development] d1nd141:
Hello,

if i do a hard reset (want to sell my G1), is this "mod" automatically removed ?

I lost my original init.rc and mountd.conf files.

Could you please send me the original files.

Thanks !!!
[G1 Android Development] forceshield:
Depends what you'll be doing to do a "hard reset." Just use adb push C:\location\mountd.conf /system/etc/mountd.conf and then for init.rc to "undo" it. Or you can reflash for the most userfriendlyish fix.
[G1 Android Development] kathi17:
Or, you can try to sell your G1, advertising that it has root access. You might be able to get more money for it from someone who has read up on the G1 and wants root, but is afraid to do it themself.
[G1 Android Development] kringer2501:
so... I got to step 11. and seemd to be successful however, all commands are "not found".

eg.

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

(both on phone and dos prompt)

mount: not found

if I try cp: or ls: commands same "not found" error

and if I try

# busybox df -h

all I get is

busybox df -h

but, if I check to make sure I moved and used the correct mountd and init files I get this:

C:\ANDROID\TOOLS>adb shell 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

C:\ANDROID\TOOLS>adb shell cat /system/etc/mountd.conf

## mountd configuration file

## add a mount entry for each mount point to be managed by mountd

mount {

## root block device with partition map or raw FAT file system

block_device /dev/block/mmcblk0p1

## mount point for block device

mount_point /sdcard

## true if this mount point can be shared via USB mass storage

enable_ums true

I tried su to see if that was stopping me and it wasnt...

any help would be much appreciated, thanks!
[G1 Android Development] HorusUK:
Confirmed working on JFv1.41_RC8

For the benefit of the UK Droids, I'm rooted with JFv1.41_RC8 and can confirm that this works. I have 113 apps installed and have 55Mb of memory free :)

Had a couple of early wobbles with browser force closing a lot to begin with, but it seems to have calmed down now.