yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Jakorf:
I had to reinstall the apps. On removing the links and copying the data back, this issue doesn't exist.

EDIT: I'm using an ADP1 with JFv1.43 once the phone is rooted the g1 and adp1 are identical give or take packages.

doing an ls -l on /data after moving everything over shows the size of the shortcut obviously, however before the move, everything in /data is 1 2048 (default size for yaffs2 i assume)

Everything on the sd card reads 2 4096 (size for ext2)

my /system/sd/data reads 71 4096 (that's a ton of hardlinks...)

nothing points the the directories inside /data/* except /data itself (therefore the 1 hardlink). The directories inside /system/sd/* are hardlinked from /data/*link* and /system/sd/* therefore the 2 hardlinks.

it looks like each object inside /system/sd/data links to /system/sd/data(69 objects) + /system/sd + /data = 69+1+1= 71

This must probably the problem.

Is it possible to format the sdcard with yaffs2 (yet another flash file system version 2) instead of ext2? This would allow us to get rid of the ext2 module and having to load it on bootup to access the sd-card.

@jdc4429: Your posts are making this board messy. Please condense your posts into a single post not a million double posts and if you have to change your post please edit it. You have taken up most of the posts on the last three pages....
[G1 Android Development] All~G1:
Fixed.... (filler)
[G1 Android Development] LucidREM:
Moving Apps

so when you move apps .. does everyone here have to re-install? i'm just trying to figure out what "piece of the puzzle" is missing and why it doesn't register the apps installed even tho you can still run them .. there's got to be something
[G1 Android Development] LucidREM:
not sure how the ADP1.1 is working .. tried it yet??
[G1 Android Development] Jakorf:
You must have root to change init.rc/mountd.conf or remount /system writeable. So adp1.1 still needs to be rooted.

I can't seem to find which apk the market activity resides in. More importantly where is the local version of the markets's cache? I'm guessing the local cache list is screwing up causing it to default to market saying they arn't installed.

edit: have we tried installing a new app to sd card then undoing the sdcard and see if there are different caches?

EDIT: moving app and data to /data/lab and rebooting is not a problem for market.
[G1 Android Development] LucidREM:
i think it just has something to do with the yaffs2 -> ext2 conversion
[G1 Android Development] MontAlbert:
I am not 100% sure my busybox stuff worked properly after flashing 1.42ADP... when i go:

ls /data/app it still lists all the apps in there. Is that correct?

Shouldn't it have removed that directory anyway with rm -R /data/app ?

Or does the ln -s command just link that directory to the /system/sd/app directory so when i type ls /data/app it is actually looking in /system/sd/app?

****edit*** may have figured it out: the data/app directory just has the data for each app rather than the app actually installed on it???? apps on device are installed in /system/app (in here are the inherent google android apps and nothing else)????
[G1 Android Development] Pamela3:
Yes, not because of these steps but because it is connected to your USB and charging. It will get warm around the base (where the home and back keys are). I imagine something to do with charging and / or screen on permanently etc.

I am just confirming that this works on the latest jf 1.43 adp. Thanks again, I have just done this for the third time using these instructions. Superb!
[G1 Android Development] .haNk:
my G1 will not boot with the hacked init.rc in place. i am trying to find where it is failing by manually entering the commands from the new init.rc, but i cannot get past the mknod command.

trying to create the device, i am using the following:

# mknod /dev/sdcard b 179 2 1000

i decided to use /dev/sdcard as my new device rather than the one included in the file, for clarity. i am confused about the command though...my understanding is that mknod accepts a "major" and "minor" device number following the "b" option; however, there are 3 parameters included in the new init.rc file. this third number seems to be causing the 'mknod' command to fail. am i missing something?

also, for my own reference...how are these numbers determined? how do i find the "major" and "minor" device numbers?

i'm also doing the partitioning on my G1 using fdisk. if anyone has done this, please let me know if it worked for you. here is my SD card's partition table:

Device	Boot	Start	End	Blocks	Id	System
/dev/block/mmcblk0p1	1	218751	7000024	6	FAT16
/dev/block/mmcblk0p2	218752	249296	977440	83	Linux

*should* I be using FAT32 for p1? this is approximately 7GB.

Edit: why do I need to create a new device anyway? can't it just be mounted from /dev/block/mmcblk0p2?
[G1 Android Development] LucidREM:
FAT16 only works up to 4G .. anything more than 4G will NOT work .. so change to 4G or else change to FAT32
[G1 Android Development] .haNk:
thank you for the confirmation.

as for the 'mknod', i just dropped the 1000 off the end of the command, and it was able to create the device. i am still not sure what this new device's purpose is though. if somebody can clarify that, that would be very much appreciated. :)

also, running into trouble with the formatting. i do not have access to 'mkfs' or anything similar. are there any other ways to format my SD card from the G1 using busybox? i've not had a need to format this way before. a buddy of mine suggested cross-compiling mkfs for armv61 and copying it over to my G1, but this is not something that i am even remotely familiar with as of yet.
[G1 Android Development] andrews240:
I finally did the /data/data move. A few apps force closed once but have been working fine ever since. The one app that will not work for me is the Power Manager app. I have tried reinstalling the app and everything but it will not run its service and it force closes when i try to open it. Otherwise, I have no other problems.

Does anyone have any advice on a resolution. I can live without Power Manager, I would prefer not to.

Thanks for the great writeup dwang
[G1 Android Development] andrews240:
It looks like the third reinstall was the charm. Power Manager is back and working well.
[G1 Android Development] thum123:
I do it follow instruction that use Terminal method. When I reboot G1 in the last one, why now it show only the Android screen that have a flash-android's toy. My G1 can't run to desktop screen.

What am I do next? I would like the solution.

:(:(:(:(:(
[G1 Android Development] dalef:
crashed after moving /data/data

2 problems

1.I moved app and app-private following Instructions without adb using terminal app by LucidREM. But after downloading 50+ apps I found my internal memory decreased every day. So I checked the /data/app and found all the apps i downloaded after moving /data/app are all there (apk files) and I thought they should go to my sdcard right?

2.after moving data/data to sdcard using cp -rp command...apps just got forced to quit and the machine is slow for using. I wanna reverse the procedure

rm /data/data ( my phone just got reboot and keeps flashing at android robot after this command in Terminal Emulator ). I wiped my phone and now wanna hear you guys. What's wrong with my procedure?
[G1 Android Development] LucidREM:
if all you do is "ls /data/app" you will STILL see all the apps .. there is "ln -s" that tells the phone to direct ALL traffic pointed at /data/app to /system/sd/app .. your apps ARE moved if you do:

#ls -l /data

and you see at the end of /data/app -> /system/sd/app

in order to undo procedures you must throw everything into reverse .. you can rm /data/data which deletes the "ln -s" and then you must cp the files BACK to /data from /system/sd/data or else the folder is empty
[G1 Android Development] dalef:
Well, I redo those procedures and now my phone is back. I checked the Unix reference and understand those commands.Thanks for your patient help~~

But still, I m wondering how did you move all your /data/data file to sdcard without any problem.I did this, which is exactly the instructions:

mkdir /system/sd/data

cp -rp /data/data /system/sd

rm -r /data/data

ln -s /system/sd/data /data/data

since this makes my phone so slow and apps force to quit, then i did,

rm /data/data

then phone rebooted immediately and kept flashing at the android robot. So actually I don't have a chance to cp the files back.

Hopefully, I don't need to try undo next time. :)
[G1 Android Development] dalef:
Maybe this is the reason?

My EXT2 partition is 2.7G .... I checked ur other thread which says that : if the space on the EXT2 partition exceeds available space on the phone this will not work properly. So maybe this is the problem?
[G1 Android Development] thum123:
anybody can solve my problem?
[G1 Android Development] Beast84:
Market force closes???

So I just spent the last couple of hours re reading this entire thread from beggining to end so please excuse me if I have overlooked this somewhere. But after moving my apps to the sd, the market force closes everytime. I can't even get into it. Anyone else have this issue? Or a fix for it?

EDIT: Took a few hours but its back to normal
[G1 Android Development] bestwebs:
HI,

If you are stuck at the android screen:

Reboot in recovery mode and do a wipe.

and/or

If you have previously set up apps and or caches on the sd card,

then you may have to reformat your ext2 partition.

I had to do this after I went from jf 1.41 rc30 to jf 1.41 rc33.

Let me know if it helps.

:)
[G1 Android Development] Beast84:
What would the commands be to do this from terminal on the phone?

13. Copy /data/data directory from internal storage to sdcard. This is OPTIONAL as some people are still reporting issues.

mkdir /system/sd/data
cp -rp /data/data /system/sd
rm -r /data/data
ln -s /system/sd/data /data/data

Reversal procedure:

rm /data/data
cp -rp /system/sd/data /data

Would I simply add busybox to the beggining of each command?
[G1 Android Development] bestwebs:
Hi Beast,

Hopefully this diagram I made will help.

I used adb from the computer to do the whole procedure.

It took me hours to do it correctly the 1st time.

:)
[G1 Android Development] Beast84:
Well I just tried moving /data/data over to the ext2 partition & I got force closes instantly on every app I opened. I moved it all back right away but I'm just curious if this is normal & will stabalize?
[G1 Android Development] gottifour:
I hope you have luck with this experiment! I would love to get my data to the sd card and not have problems. I really love this phone but for the life of me can't understand why they made the internal memory so small. I'm sure it has been discussed somewhere here but geez! How about 4 gigs or something? Why limit it to such a small amount? Maybe the G2 will have more and they want to sell those.Who really knows.
[G1 Android Development] bestwebs:
Hi,

I did this procedure this way:

I had jf 1.31 rc30

Copied all my apps the the sd card 1st.

It's always good to back up.

Then I went into recovery mode and did a wipe.

Then I installed jf 1.41 rc33.

Now there are no installed apps on my phone and it is clean .:)

Then I did the procedure as shown in the graphic.

Now I started to reinstall my apps one by one.

95% of the time there are no force closes.

My memory card is sandisk 16 gb

Fat32 and 1.6 gb ext2 primary partition.

Maybe that will help.

:)
[G1 Android Development] All~G1:
I also had that happen after I did the move via adb, waited on the force closes and it did stabilize. Its been 2 weeks since I did the /data/data move and I am getting an inconsistent com.android.phone force close but I think it is more app related (shake awake and auto-rotate) then the /data/data move
[G1 Android Development] gottifour:
I agree. It is probably a program or two causing all the trouble here. I'm thinking about doing a total wipe and running the phone for a week or more with data/data moved with only stock apps and original theme. I'm just not sure I feel like having a basic phone for that long. Might drive me insane. :)
[G1 Android Development] Beast84:
Mine was with all the apps I had installed, not just a few. And I don't have the auto rotate from the droidsans, just the browser. I don't have the shake awake installed so I know it can't be those 2. How long did it take for it to stabalize? I don't wanna go long without using my phone. I know some apps are useless but some I do use on a regular basis. I just don't wanna go for a week force closing everything just waiting
[G1 Android Development] All~G1:
It wasn't all the apps, just a few actually. It stabalized within minutes.
[G1 Android Development] Beast84:
Hmm maybe I'll try again tonight
[G1 Android Development] tubaking182:
first off i'm not a n00b, i have a rooted G1 and i have JFv1.41 RC33 on the phone. i bought a new 4GB pny card today and for some reason when i run the adb shell ls /system it says "ls not found" i have all the drivers installed. i just wiped the phone, i created the /system/sd easily, but when i run any adb shell it tells me that whatever command i typed in is not found.

i am running ubuntu 8.10, and i partitioned the SD card with my partition manager. i have done this stuff before with ubuntu and a 2GB card but i decided to wipe the phone and reinstall everything onto my 4GB card. any help would be greatly appreciated. thanks in advance
[G1 Android Development] andrews240:
I had the data folders moved for about a week without issue. Today, all of a sudden, the phone process started crashing every time after I finished an incoming call and every time I make a call before the phone app fully opens. Due to the seriousness of this problem I decided to undo the data move with the instructions in the OP.

After entering the two lines of code to undo the data move, I received a stale nfs file handle error for myfaves. Is this error something that I should be worried about or is it normal? Could that error be any kind of indicator of what my data move problem may have been?

This, along with the Market problems that I have had for the past couple days, has made the past few days no fun for me.
[G1 Android Development] .haNk:
have you tried running the 'ls' command directly on the phone?
[G1 Android Development] scrappyabs2:
HELP!!!!!! Big problem with G1!!

I have encountered a huge problem while attempting to mod my (rooted) phone to save applications onto my SD card.

Problems:

1) My SD card no longer shows up in My Computer when I mount it. Also, I cannot Unmount/Eject the card because that option is greyed out from the phone settings. Also, the total SD memory size says "unavailable". Even after I got rid of the EXT2 partition, and reformatted all to FAT32, the phone still does not recognize the card in a normal way. This is VERY problematic b/c I want to reinstall JF 1.41 and I can't even load the update files onto the card.

2) The SD card is a 16gb sandisk. After trial and error with partitioning it, I could only partition 13gb (Paragon Manager and Ubuntu only recognize this amount). I have no idea where the remaining 3 gigs went. I was able to partition the 13gb into FAT32 and EXT2, and I thought I got the app saving program to work, but then I kept getting Settings Force Close's and Market wasn't allowing me to install any programs.

3) I decided to reformat the SD card to FAT32 (UBUNTU and Paragon Partion will do this), but the SD card size is still "unavailable" and cannot be ejected and does not show up in My Computer.

I tried to switch SD cards, and put in my 1GB stock SD card, but when I boot up (after wiping the phone), the T-mobile splash screen freezes and the only way to power off is to take out the battery.

It's almost like my G1 is DEPENDENT on my 16GB card, but the card still doesn't function for what I want it to do, which is to load the JF 1.141 files so I can reinstall RC33 and start over with a clean system.

Is there anyway I can undo this mod such that my SD card will act normal again, or at least allow me to use a different SD card?

PLEASE HELP ME SAVE MY PHONE. I don't know what else to do.
[G1 Android Development] cchap07:
It sounds like you already had the apps on sd card hack done and when you put in another sd card it looks for the ext2 partition. What you have to do is put the non modded JF 1.4 on your stock 1gb sd card and turn the phone on by holding Home+Power. You then have to do a wipe(ALT+W) and can then install the non modded JF 1.4 RC 33 by just using ALT+S. About your 16GB card, I do not know. You can try completely deleting all the partitions and reformatting. BTW i dont recommend you use a 16 gb card with the apps on it because the read and write speed is too slow and your apps might lag. Good luck!
[G1 Android Development] scrappyabs2:
Big problem with G1!! Update

Thanks Chap for your help. I tried something different. I was able bootup Ubuntu and copy the RC29 update from my desktop to my 16GB SD card and reboot. The update loaded fine. However, when I checked the settings on my SD card, the size was still "Unavailable" and could not be unmounted/ejected. I powered off my phone and inserted my stock 1GB card, and the phone loaded fine. I really must have screwed up my 16GB card.

Now I am going to proceed with updating from RC29 to JF 1.4 (modded). Does that seem like a reasonable approach? Or is it better to install the non-modded 1.4 first?
[G1 Android Development] rynosaur:
stale NFS file handles / error in mount output

I have errors in my ext2 partition, specifically in my /system/sd/cache directory. I use the partition for apps and caches. When I look in my cache directory, I get errors with 'ls' like:

ls: ./AVMC_UGIR_1327456966160878265: Stale NFS file handle

I looked up such an NFS error in a unix forum and they recommended running 'mount'. I did this and got some interesting info in my mmcblk0p2:

# mount

rootfs on / type rootfs (ro)

tmpfs on /dev type tmpfs (rw,mode=755)

devpts on /dev/pts type devpts (rw,mode=600)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)

/dev/block/mtdblock3 on /system type yaffs2 (rw)

/dev/block/loop0 on /system/modules type cramfs (ro)

/dev/block/loop1 on /system/xbin type cramfs (ro)

/dev/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=continue)

/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)

/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)

/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)

I'm using LucidREM 1.42 firmware.

Anyone willing to hazard a guess as to what's going wrong here?

On the Unix forum, the OP was told to reboot the NFS server but in my case, in the Android OS, I'm sure that's not quite as straightforward as in a Unix box.

Thoughts? Thanks.
[G1 Android Development] dwang:
Your ext2 partition has errors. Boot up ubuntu and run fsck on the sdcard to repair it.

This happens quite frequently if /data/data is moved to the sdcard which is why I don't recommend it.
[G1 Android Development] netbus:
Hello.

I have also a problem

when i look under telephon info i have only 65mb free altough i used the tutorial.

/sdcard/download # 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 62.6M 4.9M 93% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 779.8M 16.1M 724.1M 2% /system/sd
/dev/block/mtdblock5 74.8M 5.6M 69.2M 7% /data
/dev/block/mtdblock4 67.5M 1.1M 66.4M 2% /cache
/dev/block/mmcblk0p1 6.8G 38.2M 6.8G 1% /sdcard
/sdcard/download #

/sdcard/download # mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/mmcblk0p2 on /system/sd type ext2 (rw,noatime,nodiratime,errors=continue)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
/sdcard/download #

What is wrong?
[G1 Android Development] rynosaur:
You got me there . . . I tried to move /data/data with LucidREM's script. Nothing but problems.

Can you think of a way to clean up/fsck the sdcard if I have it installed in the phone?
[G1 Android Development] LucidREM:
your phone shows 65M free? what's the problem?
[G1 Android Development] dwang:
I couldn't figure out how to get fsck to work on the g1 itself, not that I tried very hard. Maybe somebody else here can help out.

Just run the ubuntu live cd and then u can do fsck on the sdcard from ubuntu.
[G1 Android Development] rynosaur:
That would work I'm sure, if I had a card reader. I use Linux Mint and Ubuntu, so what I'm trying to figure out is how to mount the ext2 partition through G1 USB. Maybe it can't be done with the modded mount.conf and init.d files running in Android?
[G1 Android Development] apfroggy0408:
I've done a couple of searches and I can't seem to find how to move a single application from the sd card to the phone. Is there anyway to do it via the g1 terminal? I would like to do it for the wifi tethering app.
[G1 Android Development] alansdrew:
update needed

First of all thanks to the author of this thread I found it very informative and achieved a goal that I could of only dreamed of in terms of upgrading my G1's functionality.

However can you please update this thread to make us UK RC8 firmware users aware that the mod will work for this firmware. It took me a bit of courage to try this on my phone initially because you didn't list that it worked for the Uk. However it does so just to save any further UK user's a little aprehension it would be useful to update the thread.

Chears Alan
[G1 Android Development] pkmoazzam:
yeah, been looking around the forums, couldn't find. that's what i want to move a single app to internal memory. i would like to know how to move.
[G1 Android Development] apfroggy0408:
Well I don't know what I did or what I didn't do but wifi tether is working and connects to my eee pc wonderfully. All I have is apps to sd no caches, maybe that is it?
[G1 Android Development] dwang:
I'ved updated the OP so that it says this procedure works with all versions of rooted g1.
[G1 Android Development] dwang:
Its possible. You just have to do a symlink back to the internal flash.

I'm not sure why u want to do that, the wifi tethering app works fine on the sdcard.
[G1 Android Development] dwang:
That could be the reason.

You should probably just break down and buy a card reader. :-)
[G1 Android Development] pkmoazzam:
dwang,

can you do code for us? i did code

mv /system/sd/app/android.tether.apk /system/app

but it failed on /system/sd/app/android.tether.apk cross link

any idea?
[G1 Android Development] dwang:
cd /system/sd/app

cp android.tether.apk /data/android.tether.apk

rm android.tether.apk

ln -s /data/android.tether.apk android.tether.apk

To move everything back to the sdcard

rm /system/sd/app/android.tether.apk

cp /data/android.tether.apk /system/sd/app/android.tether.apk

rm /data/android.tether.apk
[G1 Android Development] pkmoazzam:
after i fellow your codes. i got errors "your phone is currenty in an unknown state, try to reboot"

how about move wifi tether data to phone?
[G1 Android Development] apfroggy0408:
I think that's what did it for me. I've yet to data/data to the sd and the app works fine for me.