yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] MarcusMaximus04@gmail.com:
Umm I wouldn't proceed cause if /system/sd/app isn't a directory then you're gonna have lots of problems. I need to know what it says after you type

su
cd /system/sd/
ln -s

Specifically, there'll be a line of output that has the word "app" towards/at the end. I need to know what's in that line. If the line doesn't start with a 'd' then app isn't a directory and something happened and you need to remove /system/sd/app by typing this in the terminal emulator:

su
busybox rm -rf /system/sd/app

and then restart the process from the beginning.
[G1 Android Development] wizern23:
it says that /system/sd/app is not a directory but when i do mkdir /system/sd/app it says the file already exists.

the line with app in it says

-rw-r--r-- system system 29303 2009-04-14 17:27 app.

okay removing that made it work.

[edit] Thank you so much. it finally worked. i now have 73mb free on the phone.
[G1 Android Development] MarcusMaximus04@gmail.com:
glad I could help. On a side note Apps to SD app is now live :)
[G1 Android Development] new_guy:
anyone else having their acore process crash when viewing the call log?
[G1 Android Development] MarcusMaximus04@gmail.com:
Hmm haven't seen that one... interesting... Unfortunately there I have no clue how to help, except maybe moving one of the caches back...
[G1 Android Development] LucidREM:
anyone using JFs versions can use my modified update.zip and retain apps to SD without going thru any process at all .. each time a new version is produced i will take JFs and add the apps to SD modifications
[G1 Android Development] cevatt:
i used your app and it worked great. kudos sir. the only problem i'm having now is that as i go back through my apps and try to download them again through the market they won't actually download. it's stuck at the "Starting download...." stage. i know this has happened from time to time with the market being weird but because it just started happening to me after moving everything over to the sd card i couldn't help but think it was related. i've waited for a few hours, rebooted a few times, and still the same deal. anyone else seeing this?
[G1 Android Development] lchanmanl:
I have the same problem
[G1 Android Development] MarcusMaximus04@gmail.com:
Ya, that's not my app. People started reporting that last night on haykuro's post. Google seems to be doing something with the market.

As an example, without having used my app, after a wipe I reinstalled Haykuro's 5.0.1G(accidentally pressed alt-s instead of alt-x at the recovery screen :S) last night and then tried to download terminal emulator and it just sat there at starting download for me as well. Then about 30 minutes ago it showed up as installed.
[G1 Android Development] cevatt:
uh oh. google hates apps on sd.
[G1 Android Development] MarcusMaximus04@gmail.com:
lol, no, my guess would be that they're upgrading it to take care of cupcake and since we have cupcake.... we're seeing the worst of it. Of course if sufficient people have this problem on JF then god knows whats going on.

EDIT: oh and LucidREM: good point, I didn't know that but that sounds like a great thing to have for those with apps to sd already set up.
[G1 Android Development] LucidREM:
i haven't really noticed on JFs but i did notice some major problems last time when they went from 1.0 to 1.1 .. now they are preparing for 1.5 it's probably just a little buggy .. shouldn't be a big deal once the final is released
[G1 Android Development] funbacon:
My phone stuck in HTC screen. I use 5.0.2H

I use Transcend 8gb class 6

EDIT : I think moving app,app-private,dalvik-cache is enough. Moving data will make your phone run very lag
[G1 Android Development] MarcusMaximus04@gmail.com:
For how long? It'll take a while the first time. Also, did you get any errors while following my tutorial?
[G1 Android Development] unrafa:
Cache to sd card may be dangerous.

I dont know how dalvik cache works, but many writes to a sdcard may render it useless, i read somewhere sdcards are designed to support a few thousands of writes, and if the phone uses the dalvik cache as much any windows/linux program does, i think it could be just matter of weeks / few months until we start seeing lots of dead memory cards.

apps to sd is ok, but cache? is it really necesary? just to free a few MB from the phone who even will not be used. Since i moved apps to sd card i have 20 25 MB free on the phone and i think it will continue that way because no firmware made by google will bypass the max memory G1 has..

I think cache to sd card is a mistake as big as the swap to sdcard idea who already was probed to be a mistake.
[G1 Android Development] MarcusMaximus04@gmail.com:
Then feel free not to do it. That's the exact reason why I made it optional both in my tutorial and in my app. If people want it on the sd, they can. If they don't, they don't have to.

EDIT: just a little side info from http://forum.notebookreview.com/showthread.php?p=3002889:

"For example, the 16GB A-DATA SDHC card has an estimated endurance or lifetime of 1,000,000 write cycles. What does that mean is "real world" terms? You would have to constantly write, erase and re-write data non-stop for several years before you need to be concerned about failure.

If your SDHC is 4GB with a formatted capacity of 3900MB, and you do nothing but write to it as fast as you can - at, say, 30MB/s - you'll still only be able to replace its entire contents every 130 seconds. At that rate, it'll take you 1,500 days (4.1 years) to hit 1,000,000 cycles."
[G1 Android Development] short/y:
As I said in one of the other topics, I'm really paranoid about doing things like this while the phone's active and that includes the first steps of copying the directories over to /system/sd. How about a minor mod to copy busybox from /system/xbin over to the /system/sd while the phone's active, then powering off and coming up in the recovery console, mounting data and do the copies using the busybox on /system/sd followed by the removes and reboot? That would make the whole thing look like this (ignore the error about not being able to preserve permissions on the copy of busybox to /sdcard):

su
busybox cp -p /system/xbin/busybox /sdcard
exit
exit

Power off, come up in recovery console and type

mount sdcard
mount data
/sdcard/busybox cp -a /data/app /system/sd/
/sdcard/busybox cp -a /data/app-private /system/sd/
/sdcard/busybox cp -a /data/dalvik-cache /system/sd/
/sdcard/busybox cp -a /data/data /system/sd/
rm -rf /data/app
ln -s /system/sd/app /data/app
rm -rf /data/app-private
ln -s /system/sd/app-private /data/app-private
rm -rf /data/data
ln -s /system/sd/data /data/data
rm -rf /data/dalvik-cache
ln -s /system/sd/dalvik-cache /data/dalvik-cache
reboot

I should really try this myself but I don't have time right now and I'm not sure when I'll have the cycles to go through and debug the things I've doubtless missed in this thought experiment.
[G1 Android Development] MarcusMaximus04@gmail.com:
Good idea, but there's one VERY big problem. It /system/sd won't be mounted in the recovery terminal even if you mount /system, since /system/sd is a separate device. I've tried everything I could think of to get it to mount but have been totally unsuccessful so far. If you can find a way to do it I'll put it in.

That aside, "cp -a /data/app /system/sd/" really shouldn't do anything bad. It's not writing to anything in use by the system and reads won't hurt it at all.
[G1 Android Development] short/y:
Hmmm ... I can see I should've done some experimenting cuz you're right, that's a pretty serious problem :) OK, well, IIRC /dev/mmcblk0p2 wasn't automatically created and had to be done by hand during system inititalization so, if it doesn't exist in recovery mode you'll have to do the mknod in /dev ("mknod /dev/mmcblk0p2 b 179 2 1000" is what's in my /system/init.rc) then you can mount -t ext2 -o nodiratime,noatime /dev/mmcblk0p2 /system/sd.

No, I'm sure you're right and it won't hurt anything but with processes being suspended and resumed behind the scenes, I would think dalvik-cache and maybe even data might be changed and we could catch something partially updated. That could lead to some incongruities and may even be responsible for some of the oddities some people are seeing. And, like I said, I'm paranoid.
[G1 Android Development] MarcusMaximus04@gmail.com:
lol, pretty much all of those steps went over my head.
[G1 Android Development] short/y:
OK, sorry. Well, in recovery console, if you do

ls -l /dev/mmcblk0p2

and it doesn't display a file, you need to create the node in /dev which provides the link to the hardware. That's what mknod does, BUT the parms to mknod are kinda kernel- and driver-dependent so you need to know what numbers to enter ... and if you screw them up, you could really mess up your phone. Probably nothing terribly bad will happen but, again, I'm paranoid.

I guess until someone who's a LOT more knowledgeable about the HTC hardware and the kernel that the recovery console runs takes a look and chimes in, your method is the best we have. And it seems to work well. Paranoia can be a bad thing. :)
[G1 Android Development] TheDudeOfLife:
So in theory I can add that command to the init.rc and recompile JF's recovery console to add /system/sd support?

If so, wonderful!!!
[G1 Android Development] stogchris81:
Maximus, you went law degree on that guy. lol. i have a question. i am trying to copy all my sd card files to linux so that i can put them on my new 16GB class 6 Adata card but linux will not allow me to copy/paste the /data folder saying i dont have permission and when i open the /data folder all of the folder icons have little padlocks above them. any suggestions?

the reason i need to copy them to linux first is because partition editor is not reading the new card in my card reader.so i will need to put it in my phone to format and partition it.
[G1 Android Development] MarcusMaximus04@gmail.com:
Yep. You don't have permission. Luckily you can make yourself superuser in linux through the shell :) just go to the shell and do a su and then cp -a (wherever your sd card mounts to) (wherever you want to put it)
[G1 Android Development] stogchris81:
where do i type the name of the file?

so, if my sdcard mounts to /media/disk-1 and i want to put the /media/disk-1/data file in /home/chris/Desktop/new sd card ext2 what would the command look like?(please remember, i used linux for the first time last night. THANKS!
[G1 Android Development] short/y:
In theory. I wouldn't just go and do that, though. First, I'd note the major and minor numbers for /dev/mmcblk0p1 and /dev/mmcblk0p2 in a running G1(or just write down what ls -l shows for each of them) then I'd boot into recovery console and verify that the numbers for /dev/mmcblk0p1 matches what I wrote down. If it does then you're probably pretty safe to do the mknod. If not you need to tweak the parms to mknod. If you don't tweak them ... well, who knows what'll happen?
[G1 Android Development] stogchris81:
and btw, when i type in su and then my user password, it says" authentification failure".
[G1 Android Development] hellbringer626:
would the stock apps change between build 5.0.2H and 5.0.2r2H? reason being I originally did apps to sd with 5.0.2H and flashed to the newest revision (r2) and just linked to my ext2 partition.

Would i be losing update to any files by doing that? Would i need to completely redo my configs each time there's a new H build (since it has a wipe script)?
[G1 Android Development] MarcusMaximus04@gmail.com:
Not really sure what you mean by your question but is sounds like you're asking if you'll have to redo the apps to sd setup? If that is what you mean then yes, you will(you can use my app which will do this for you, just uncheck the checkbox.)
[G1 Android Development] bootleg16:
one quick question.

will this work with a class 4 4gb?

EDIT: im running the latest JF build with tmobile.
[G1 Android Development] MarcusMaximus04@gmail.com:
The type of sd card doesn't matter. You have to have one of the apps to sd roms(LucidREM's or Haykuro's) in order for it to work. Also your sd card must be partitioned to first FAT32 and second ext2. If you don't have these set up and try to run all these steps you will probably brick your phone.
[G1 Android Development] naars90:
Hiya...okay...sooo right now I'm still on JF build...tried Hyakuro's builds ( all of em at one time or another ) and the only reason I went back to JF was because of this whole app to sd thing which I could never get to work, either through terminal, or adb-just kept hitting all sorts of roadblocks...but I'm not gonna get into that...anyway your tutorial makes it sound so simple that I'm almost willing to take the plunge again...but a couple of questions, please...I already have all my apps on sd with the JF build...if and when I flash Haykuro's build again, do they disappear and I have to redownload them again or do I just use your method and they'll be back on my phone? If I do have to redownload everything again, when do I utilize this tutorial, before or after I redownload apps?

BTW, I dl'd your app last night while I was on Haykuro's build and it worked for a while until my phone kept telling me " sorry there's no space available for this item" when I tried to update an app...I don't know if that was your app or something else that caused that...at any rate, I think your doing a great job for this community and everyone else like you...cheers!
[G1 Android Development] overground:
A statement, two questions and possible assistance to Windows users

First of all, thanks to MarcusMaximus for all of his hard work and great apps.

My first question is, in your opinion (I know nothing is absolute), let's say for an 8gb card, what would be the ideal ext2 partition size for apps and cache to sd?

Second question: In the rc33 build of jf 1.42, does busybox come preinstalled in the correct location? If not, how is getting it there performed? Don't get mad, I haven't really searched yet:rolleyes:, but I figured that info would be good to have somewhere in this thread. Thanks. (I'm using Haykuro's H apps to sd build).

I'm posting this in hope this helps someone. I donated to AppstoSD, and that might have worked for me in the end, but here's what worked. After looping at boot numerous times, wiping, reflashing, rewiping till I was sick of it here's what worked.

Apparently the problem turned out to be partioning. So here's what I did. The only program I could find talked about that would make an ext2 partition in windows was Paragon Partition Manager. Well they have no "live" functional demo's listed and I wasn't gonna spend $39.95 for 1 partition. I found this http://download.cnet.com/7tools-Partition-Manager/3000-2094_4-10187612.html?tag=mncol. I don't know how long the demo is functional for, but it worked perfectly for me. I suggest repartioning your whole card with it, starting with the fat32, and then do the ext2 with the remaining space. Don't forget to press "apply" in 7tools partition manager before closing.

At this point, Marcus' AppsToSD app probably would have worked fine, but I went the long route and followed the steps at the beginning of this thread. Finally, success!!! :D Thanks again Marcus!
[G1 Android Development] speoples20:
From what I have read on the Lucid thread is 1GB is ideal for ext2. My friend is running 1.5GB on his and has had no issues so far. So it depends on the card. Plus if you are going to put apps and cache on your sdcard I would recommend getting a Class 6 card.

And yes JF builds come with busybox already built in.
[G1 Android Development] overground:
Thanks for the quick reply

Well that answers it, thank you. Yeah right now I'm testing with a class 4 card until my class 6 arrives. Seems to run ok (a little sluggish) but I'm definitely taking your advice and upgrading to a 6. Thanks again.
[G1 Android Development] Ryanmo5:
MarcusMaximus04

Have you figured out how to undo dalvik?
[G1 Android Development] MarcusMaximus04@gmail.com:
undo moving it? Ya, you can just move it back and it should work. in terminal emulator:

su

rm /data/dalvik-cache; cp -a /system/sd/dalvik-cache /data/dalvik-cache

and then restart(restart might not be necessary, I'm not sure, but it's best to be safe) :)
[G1 Android Development] Ryanmo5:
That did the trick, didn't have to reboot but did it anyways haha. Thanks wanted it just in case.
[G1 Android Development] naars90:
oy...did the tutorial....how come my phone's internal storage keeps going down everytime I install an app? What did I do wrong?
[G1 Android Development] MarcusMaximus04@gmail.com:
If you don't move the cache(moving it is unstable) then when you install an app it creates a cache and uses space. It'll use MUCH less space though.
[G1 Android Development] craneo:
I got this below error msg, when I tried to download something from Market.

"Sorry, there's not enough space to install this item"

Is this normal? if it is, what is the meaning of have 73m unused spaces?
[G1 Android Development] bootleg16:
say my phone becomes unstable because of the cache on the sd, will i be able to move it back to the phones ROM?
[G1 Android Development] chief2842:
I partitioned my sdcard but it's not showing up as a drive when I mount it on my laptop, now I can plug my phone up to my desktop and it will mount any clues why?
[G1 Android Development] MarcusMaximus04@gmail.com:
@craneo: Hmm how much space did you give the ext2 partition?

@bootleg: If moving cache doesn't work your phone won't boot. You'll have to go into the recovery terminal, mount the /data folder(mount data) and delete the symlink (rm /data/data) and remake the directory (mkdir /data/data).

@chief2842: Do you mean just your ext2 partition or both? The ext2 partition can't mount on windows so if your laptop is windows and desktop isn't that'd explain why.
[G1 Android Development] bootleg16:
oh alright thanks.

ruight now im trying to download a program to make the ext2 partition but all the paragon partition downloads that ive done have a trojan horse.

and the free trial from their site doesnt let me do the partition
[G1 Android Development] craneo:
I have almost 2G free for ext2. I am not sure I am the only one have this kind of issue?? I am using 5.01H rom
[G1 Android Development] chief2842:
Keep getting that there is no /system/sd directory?
[G1 Android Development] moosefist:
I am getting the same error, I formated once with acronis, once with paragon, and a third time with the diskutility on mac with ext2fsx installed. I am trying to set a 300mb partition on a Kingston 8gb microSDHC class 4 chip.

Also I tried the app, but when i install it and try to use it i get a constant loop at the htc screen, which is how i discovered my next issue.

When i boot into recovery mode with home+power, alt-x is not pulling up the console??? whats the deal, does anyone know?

I could use help, i am not going to be able to use any adb methods because i dont have access to my PC with the SDK for a few weeks. Thanks.
[G1 Android Development] MarcusMaximus04@gmail.com:
It sounds like your installation of your ROM got messed up. When you hold down home and press power to start the phone does it come up to a menu? If so is there an option for alt-x to start recovery terminal? What ROM are you running?
[G1 Android Development] moosefist:
I got 5.0.2Hr3 apps to SD. It just gives me the stock bootloader.

I can power on with the camera+power and get a rainbow screen.

edit: removed huge pic
[G1 Android Development] MarcusMaximus04@gmail.com:
Wow... that's the stock bootloader.. dunno what the crap happened but you might want to try flashing one of the JF ROM's and then doing Haykuro's again?
[G1 Android Development] moosefist:
am i going to have to down grade, obtain root, and then install it like at first? or should i be able just install it from the boot loader?

edit: I don't have a nandroid backup to revert too also.
[G1 Android Development] MarcusMaximus04@gmail.com:
well it sounds like you have root so downgrading and all that shouldn't be necessary. My guess would be that you should just be able to follow the instructions on JF's post. I think it might have happened just because you skipped from RC29 straight to Haykuro's rather than going through JF. I'd suggest going back and doing that step so at least you can get into the recovery terminal.
[G1 Android Development] moosefist:
Ok, I am about to attempt that, I think I messed up installing the SPL, but I do remember have a different bootloader when i first did this 2 weeks ago. I hope it works out.
[G1 Android Development] bigballa:
i did this and didnt move data/data because i have a class 4 card

but i did try it and my phone couldnt even open up the contacts pane without force closing hahaha

but if some people wanna do apps to sd with a class 4 card i suggest move everything except data/data

itll leave you with 69mb free out of 74 :-D

thanks marcus for ur help

this is awesome!!!

im so excited to order my 16gb class 6 card

then i can run the whole phone off the sd card

which is totally weird

google made a phone

and we run it off the sd card lol
[G1 Android Development] pkmoazzam:
so which manual or automatic app to sd is better? for example manual is more stable then automatic app to sd? or they are same?
[G1 Android Development] MarcusMaximus04@gmail.com:
The app just does the steps here automatically. The only thing it won't do is moving the cache to sd because that's too unstable, so I took it out.
[G1 Android Development] efreese:
I used your manual method to get my apps moved and am trying to decide if I should also move my caches. Other than saving space on the phone, is there any other benefit to moving the caches?

Is it the Dalvik-cache or the /data/data that is unstable to move? or both?
[G1 Android Development] MarcusMaximus04@gmail.com:
I've found /data/data to be unstable to move. I think dalvik-cache has worked for most people and has consistently worked for me. There are no other benefits to doing these other than saving space.
[G1 Android Development] overground:
So besides the fact we can say that we have 72-74mb free and a whole lot more room for apps than originally provided, is there anything beneficial that can be done with that newfound and now unused 72-74? Also, if you're not recommending moving cache, is it ok to skip the:

busybox cp -a /data/dalvik-cache /system/sd/ (and, or)

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

in the Terminal Emulator section, as well as steps 6-9 (or 6 and 7 if you're moving dalvik) in Recovery? Or are the cp commands still required for those parts?

Thank you for all of your hard work and undying patience. I've noticed you are very active in helping others, even though it must seem like banging your head against a wall at times.

Duh...nevermind, the answer to my second question is in the first post. Maybe I should "read before I ask!" lol
[G1 Android Development] cvsolidx17:
system/sd not showing

Hi Guys I know for a fact that my card is formatted correctly, i have about 350mb partitioned in ext2 format but for some reason I can't see system/sd when i run the df -h command. this is what i get....

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Angel>adb remount

remount succeeded

C:\Documents and Settings\Angel>adb shell busybox df -h

Filesystem Size Used Available Use% Mounted on

tmpfs 48.3M 0 48.3M 0% /dev

tmpfs 4.0M 12.0k 4.0M 0% /sqlite_stmt_journals

/dev/block/mtdblock3 67.5M 65.5M 2.0M 97% /system

/dev/block/mtdblock5 74.8M 44.6M 30.1M 60% /data

/dev/block/mtdblock4 67.5M 1.2M 66.3M 2% /cache

/dev/block//vold/179:1

3.3G 2.9G 471.5M 86% /sdcard

Any ideas? By the way I'm on build 5.02Hr4 apps-to-sd
[G1 Android Development] wettems35:
ok im a newbie and a complete noob when it comes to this. I have busybox on my sd and ive partitioned my sd card. im running on the dudes build.

so, i followed every single step this tutorial provided, and it seems like i did everything right, but when i d/loaded new apps, my internal space decreased. was i supposed to create some folders in my sd or something? or am i supposed to move the apps to my sd on my own or something? i thought this would do it for me