How to install apps DIRECTLY to SD card without putting them in phone memory - General Questions and Answers

I know that there are several threads explaing how to move you apps from phone memory to SD card but this is not what I need.
I want to know if there is a way of installing an application directly to my SD card. I want to install an application that is bigger than my hole phone memory so I can't put it first on phone and move it afterwards.
I have a HTC Hero with 2.1 on it, with root and superuser.
Until now I user Link2SD ( something similar with apps to SD) but it can't be user now.
//sry if there is another thread explaining how to do this but I couldn't find it.

If you know the directory on the sdcard to install the app into its easy with ADB.
example for mine with sd-ext partition for extra programs
adb remount
adb push stuff.apk /sd-ext/app
replace "stuff.apk" with the actual file obviously.
and it should auto install
In the Link2SD forum http://forum.xda-developers.com/showthread.php?t=919326
It seems to use /data/sdext2 instead of /sd-ext/app
hope that helps

But I think it still uses a place in the memory (same as installing in the memory then moving it to the SD card)!!

Just an idea...
I have not tried this, but how about,
1) Create a large folder on the sd card big enough to hold all existing apps and your new app.
2) Copy all app files from installation folder in phone memory to sd folder.
3) Rename phone folder (just so it is not found)
4) Create symlink for this folder to sd folder.
5) Install your app.
6) Move new app to SD.
7) Copy any residual files from the installation into the original folder (I don't believe that any apps install 100% on SD).
8) Delete symlink,
9) Rename phone folder back to original name.
Obviously, renaming and symlinking will have to be done using ADB in recovery mode, and may need an ext partition.
Messy, maybe dangerous, and may not even work.
How badly do you want to install this big app?

Just came across this thread while looking for the same solution, and thought I'd share what I came up with what I did:
Code:
adb shell pm setInstallLocation 3
adb install -e Package.apk
adb shell pm setInstallLocation 0
The "pm" commands change the default installation target to SD-Ext. I'm not sure they're needed.
The -e switch to "adb install" isn't in the adb docs, but when I ran "pm" on my device directly, that's the switch to use with pm install to install to SD-Ext. I assume adb is just passing the switches to "adb install" through to "pm install".
This was done on a HTC Dream running "Froyo by Laszlo", a CyanogenMod Froyo build with Native App2EXT [Magpie], so your mileage may vary.

Related

Issues with apps to sdcard?? POST HERE ONLY!!!

I was able to install and run apps from the sd card (ext2), but somehow I still uninstall some apps that i don't use frequently. Is there anyway I can remove the apps from the sd card that i uninstalled? I know the fact that they don't occupy that much spaces, but still I'm thirsty for the knowledge on that issue
uuummm you can go to your terminal and
1- su
2- cd /system/sd/app or app-private
3- ls
4- rm "filename you wanna remove" without double quotes
5- Thats it !!!
samysam05 said:
uuummm you can go to your terminal and
1- su
2- cd /system/sd/app or app-private
3- ls
4- rm "filename you wanna remove" without double quotes
5- Thats it !!!
Click to expand...
Click to collapse
and because of the "ln -s" command you could also cd /data/data/app .. it all points to the same place now
issues partitioning SD card for moving apps
I am having ALOT of trouble trying to format my 4GB SD card to the fat32/ext2 partitions.
I have tried using partition manager 9, setting the fat32 (2.8GB) as a primary, and also setting the SECOND partition ext2 as a primary (1GB). I also tried using gparted and did the same EXACT partition, size and settings in all the different programs. I also tried a mixture of FAT16/FAT32 and ext2 for all the settings. I then tried using ext2fsx on my mac using the same exact settings as before. No matter what, it doesn't mount /system/sd, it always is mounted to /system/sdcard.
(the below are estimated because I was entering all commands in the terminal on my G1)
I'm suppose to see something similar to the following:
dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sd
I always get something to similar to:
dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sdcard
I always see the fat32 partition but never the ext2. I know that alot of people on this forum seem to be able to do this without issue. I unfortunately have been working it on all day.
Can someone PLEASE help me out? Thanks!!!
have you tried moving the apps to sd? see if you actually move all your apps and look at that line again to see if there is an adjustment in size
Which directory does your mountd.conf and init.rc files specify in it if you open them up? Does it say /system/sd or system/sdcard? I believe tempo had his saying system/sdcard and used different files than the ones in the post by dwang that does basically the same thing. I recall one of them using /system/sdcard in their post and the other doing just /system/sd. Use the same file from the same post and don't mix the 2 up because they are not the same.
I used dwang's instructions and files and got my 2GB card partitioned and working. I have had a problem getting my 8gb card working for some reason but that is another story. It seems my 8gb isn't readable or writeable after I partition the ext2 section although the fat32 is ok. I'm familiar with linux but don't know what I need to do to make that partition writeable when I can't get it to show up at all except in gparted and partition manager under windows. I tried busybox df -h without it showing so no luck there...
Hopefully what I metioned helps you and maybe somebody has an idea why mine didn't work either although I wasn't very specific.
I tried both files and mounting on both /system/sd and /sd neither of which worked . I also tried various programs to partition the sd card. I have no other ideas...
Hi,
This is how it should look.
I use an adb shell through the computer (windows xp).
The drive with 1.5g available is the sd card drive.
Non-market apps on SD card issue
Okay... Getting this to work has sucked horribly for me and after rooting through the other forums that would apply to my issue i've found no solution. I have RC33 JFv1.42 LucidREM mod, with /app, /app-private, and /data all copied to the EXT2 partition of my SD card. I am trying to install the AndroidVNC viewer using the AppsInstaller app, I have AndroidVNC saved onto the root of the FAT32 partition of my SD card. The Appsinstaller sees it but when I go to install the .apk itself it's giving me the following error:
"androidVNC could not be viewed. Free up some space on your phone and try again." Giving me a 'cancel,' and 'manage applications' button under.
The error doesn't make any sense because when I login to my terminal as root and # busybox df -h, the only parts of my system that are full are the usual suspects:
/system
/system/modules
/system/xbin
all of which are full, but they always have been for me, so I'm not sure if the Appsinstaller is trying to use one of those blocks to extract to temporarily or something like that. what am i missing here!?!?
bump
Partial App migration to SD card...possible?
Has anyone tried to move only *some* of the apps to the SD card?
I'm stuck with a class 4 mSD card, so as I understand it, moving the apps en masse to the SD card isn't a recommended option.
But I was wondering if perhaps I might move *some* apps to the SD card...maybe just ones that I don't use often, or aren't particularly complicated, or maybe just ones that seem to run perfectly fine from the card.
Some of the "high performance" apps, or ones with a lot of I/O dependency I'd leave on the phone internal storage.
As it stands right now, I'm at total app saturation. I've uninstalled infrequently used apps and have them backed up for ready restoration anytime/anyplace. I've moved every cache possible. Yet even at 13MB free, the phone still complains I don't have enough room to install the latest build of AndNav2.
Should I even attempt a partial migration? I have no paid apps (and apparently couldn't install any even if I wanted to) so I'd just be moving the *.apk file and maybe the *.odex files? Is that all I need to move and then symlink to?
Bump for day crew.....
I'm using this setup. I use my own bash script to move apps:
Code:
#!/bin/bash
# mvappndata.sh 1.1 by Autarkis
# GPL OpenSource
adb remount
adb shell cp -rp /data/app/$1.apk /system/sd/app/$1.apk
adb shell rm /data/app/$1.apk
adb shell ln -s /system/sd/app/$1.apk /data/app/$1.apk
adb shell cp -rp /data/data/$1 /system/sd/data/$1
adb shell rm -r /data/data/$1
adb shell ln -s /system/sd/data/$1 /data/data/$1
You call it with the application's name without the .apk suffix.
Code:
mvappndata.sh com.mobisystems.msdict.embedded.wireless.pons.ssd
Known Bugs:
* apps moved this way don't show as Installed or Updated in Market, but as Free
* sometimes, when you are running out of memory, it won't be possible to install new apps from market - the downloading process will hang right at the beginning. Making even more room does the trick
I leave all apps that are being started at boot time or once started should run as a service in the internal memory. I move all the big apps (like dictionaries) to the SD. It mostly works, but since many apps are buggy themselves it's difficult to tell where a certain Force Close is coming from.
Cheers from Switzerland,
Autarkis
Ah...precisely what I was looking to do. Thanks....that helps a lot.
I'm guessing I can modify the script to run directly on the phone....it appears you have constructed to move apps while connected to a PC via the USB cable. Is this correct?
f4phantomii said:
Ah...precisely what I was looking to do. Thanks....that helps a lot.
I'm guessing I can modify the script to run directly on the phone....it appears you have constructed to move apps while connected to a PC via the USB cable. Is this correct?
Click to expand...
Click to collapse
Yes on both counts. I also use ls -laS to display installed apps sorted by size.
looping on android, home button & silent not working on 1.42
Hi,
Had a weird experience the other day. Phone was fine (rooted RC33/JF1.41). Got some AK Notepad reminders but was busy with something so I ignored them (but heard the alert go off). A few minutes later, the phone spontaneously rebooted and from that point on just looped on the android screen.
I figured I was due for an upgrade, so I popped out the sdcard and upgraded to JF1.42. The phone did come back to life, but at that point the home button won't work (wasn't a hardware issue as it worked to get me to the home+power loader) and when I held down power to shut down, I got only the "power off phone" option but no "silent mode" option. Very strange. This was obviously no good, so I went back to 1.41.
Long story short, the phone still looped, so I took this as a sign that a wipe was unavoidable (I didn't have a recent nandroid backup), but since I had WAY too many apps I never used (~200) and my phone was getting unstable (things were constantly force-quitting), I figured I may as well do some spring cleaning and start fresh.
I learned my lesson and finally got the important apps reinstalled and the phone reconfigured the way I want it -- and then did a nandroid backup so I can avoid this in the future.
But what the heck happened that made the buttons not work? That one freaked me out a bit...
And of course I still wonder what caused me to loop in the first place, totally randomly and spontaneously. Are there specific things that can cause that and if it happens again, is there an easy way to fix it?
Thanks
Gah! This is driving me nuts! I absolutely can't make this work.
I can transfer the whole /data/app and /data/data directories to /system/sd, but as I have a class 4 SD card, I get tons of force closes on apps.
So then I try just moving single apps. For example, moving the OI Flashlight app to the sd card.
Code:
# busybox -a /data/app/org.openintents.flashlight.apk /system/sd/app
# rm -r /data/app/org.openintents.flashlight.apk
# ln -s /system/sd/app/org.openintents.flashlight.apk /data/app/org.openintents.flashlight.apk
I do the same thing with the appropriate data directory for the app. I check and the files are moved. The symlinks are present.
But when I try to run the app, it just tells me that the application is not installed on my phone!
Grr! Then if I delete the symlinks and cp the files back to their original locations, same result. I end up having to re-install from backup.
Very frustrating. Any advice?
I don't know what busybox -a does.
It probably shoud say "cp -rp" instead.
It's important that you preserve access rights.
It's also very important that /system/sd is an ext2 partition. vfat won't do.
My script also assumes that as a preparation, /system/sd/app and /system/sd/data have been created. Like that:
Code:
mkdir /system/sd/app
mkdir /system/sd/data
I assumed that was self-explanatory, but it probably wasn't.
unionfs works for this:
have cake and eat it micro-howto:
(Use a recent jf dist)
/system/bin/insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko /system/modules/2.6.25-01843-gfea26b0/kernel/fs/unionfs/unionfs.ko
(partition sd card as described in the aps-on-sd howto)
(mount to /data/local/ext for this example)
mkdir /data/local/ext/app
busybox mount -v -t unionfs -o dirs=/data/local/ext/app=rw:/data/app=ro unionfs /data/app
This has been tested; downloaded apps go to sd card but the system sees apps in /data as well.
The only issue with this is you can't umount the unionfs mount. In theory, you can have writes go to the real /data/app with:
busybox mount -o remount,dirs=/data/local/ext/app=ro:/data/app=rw /data/app
But I have not tested this.
losing storage after moving cache and apps.
Hi all,
I have moved apps to Sd Card.. I have moved cache to sd card and when all is said and done I had 47mb of 74mb free.. YES... but wait..
Now in using my phone I keep losing free space I am now at 45 of 74mb free. How can I found out what is taking my free space up .?
Please help. Thanks in advance for your time.

New and improved Apps to SD(more stable, more powerful, etc) Tutorial

Well, some of you may have heard my ramblings around here that I've been working with some of the devs here(JF and MartinFick deserve major praise, probably more than me) on getting a better way to do the whole apps to sd thing.
After 3 days of talking/discussing/working on it, I've finally reached the fruits of that investigation and thought I'd share. This new method uses the filesystem unionfs to essentially meld the /data directory with the /system/sd directory, so that they appear to be one. This has the potential to allow users to move specific apps to or from the sd card, is far more stable than the normal symlink method(will still boot, etc even if there's no SD card) and should be easier to set up. Now, onto the tutorial of setting this up.
BIG DISCLAIMER NOTE: This is a major hack of the phone and it is fully possible that it will break your phone(I've seen no permanently bricked phones but that doesn't make it impossible). Use this method, and my app along with it at your own risk.
REQUIREMENTS:
1: This only works on JF(possibly only on 1.5, not sure about the others) and The Dude's v.1.0 or greater. The Dude's 1.0 or greater actually does the steps in this tutorial for you so you can just run appstosd2 and set it all up from there if you're using his ROM.
2: This still requires you to have 2 partitions set up, first FAT32 and second ext2. Although you can use the appstosd2 app attached to this post and available in the market for $0.99 which will partition the card for you.
3: If you want your apps to go to the sd card, you must have a directory "/system/sd/app" If you didn't have apps to sd before on the ext2 partition do the following in terminal emulator or run my appstosd2 app after finishing the tutorial:
Code:
su
mkdir /system/sd/app
If you want the private-apps, or dalvik-cache moved you can replace "app" in that code with ""app-private", or "dalvik-cache" respectively. Do not copy "data" to the sd card. My script will delete it on the next reboot.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Alright, first there's some files you need.
1: init.rc in .zip attached to this thread
2: a2sd.sh in .zip attached to this thread
All the above listed files should be put on your sd card(my tutorial will assume they are in the root directory of the sdcard(the topmost folder)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
If you need to undo the normal apps to SD first do the following in the recovery terminal(it's not strictly necessary but I'd recommend it):
Code:
mount data
rm /data/app
mkdir /data/app
if you moved the dalvik cache, repeat steps 2-3 with "dalvik-cache" instead of app. Ditto with "data" for the data cache.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Then go to terminal emulator and type the following:
Code:
su
cp /sdcard/init.rc /data/
cp /sdcard/a2sd.sh /data/
Then reboot and you're set. By default all future apps are installed to the sd card. In order to move an app to the internal memory do the following in terminal emulator:
Code:
su
cp /system/sd/app/[the app you want to move] /system/intmem/app/
rm /system/sd/app/[the app you want to move]
I will be incorporating this into my appstosd app soon(probably as a JF and TheDude-only version until the rest of the devs get on board).
I have included a copy of appstosd 2, which will copy all apps from internal memory to the sd card with an option to remove them from the internal memory. This will only work if you have followed this tutorial.
If you don't have partitions set up, appstosd2 will now do that for you with user-set partition sizes.
NOTE: If you're using The Dude's ROM and find yourself with an outdated version of this since he doesn't always update his ROMs at the same time I update this, do the following in terminal emulator to update(after putting a2sd.sh from the attached a2sd.zip on your sdcard):
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
rm /system/bin/a2sd.sh
cp /sdcard/a2sd.sh /system/bin/
reboot
For JF1.5, do the following to update:
Code:
su
rm /system/intmem/a2sd.sh
rm /system/intmem/init.rc
cp /sdcard/a2sd.sh /system/intmem/
cp /sdcard/init.rc /system/intmem/
reboot
NOTE FOR UPDATERS: If you had your data on the sdcard(/system/sd/data), it WILL GET DELETED with the new version. This is a necessity in order to get both wallpaper and protected apps working. I recommend moving it back to the phone.
EDIT: And here's another tutorial from ThatsBS(might be easier for the less tech savvy to follow?):
I am still learning a lot everyday from this forum. So for people new to this process let me noobify it, if I can, as I am one too.
Start by reading the first page!! Get all the stuff you need from page 1. (apps2sd2.zip and a2sd.zip )
I started from a fresh wipe and flash of jf1.51 adp.
A newly formatted fat32, non partitioned sd.
Put the init.rc and app2sd.sh on the sd (the files NOT the zip)
Then go to the terminal emulator and typed:
su
cp /sdcard/init.rc /data/
cp /sdcard/a2sd.sh /data/
Then reboot
Next I ran the apps2sd 2 app. It will ask you how much to you want to partition. I did 3000mb the first successful time and the dreaded low mem notice would not leave the status bar. I have read not to make it more then 1500mb. Have a good connection, dont force close it. It will reboot.
Next, after the reboot, I ran the apps2sd 2 app again and pressed "copy apps to sd" (let it do its thing)
Reboot.
Next I went back to the emulator and typed:
su
mkdir /system/sd/app-private
mkdir /system/sd/dalvik-cache
Reboot.
Go back to the apps2sd 2 app and hit move dalvik-cache.
Reboot for good measure and your done.
I did this in about 10 mins. Worked flawlessly.
I have a ?, if i have been using your app what dod i do diferent or what should i change?
Thanks
Good job, thanks!
[email protected] said:
will still boot, etc even if there's no sim card
Click to expand...
Click to collapse
You mean SD card?
[email protected] said:
Alright, first there's some files you need.
1: unionfs.ko from here:
Click to expand...
Click to collapse
JF1.5 build has already unionfs.ko in it, doesn't it? Is there any difference between this unionfs.ko and the one included?
1. I hear unionfs is not really stable at this point, is it true?
2. Why do you want to move the whole /data folder to sd, instead of just /data/app, /data/app-private?
3. You might want to add a command to remove previous app2sd changes (i.e. delete symlinks, create folders.)
4. How do you put selected apps to internal memory after this? Copying to /data will copy to sd card again.
The whole idea is really interesting! Thank you for your work!
ArmandHammer said:
I have a ?, if i have been using your app what dod i do diferent or what should i change?
Thanks
Click to expand...
Click to collapse
You don't have to do anything different. It will find all the apps you put on the sd card. If you want to set the phone back to normal(so the phone memory apps can still be there), you can do the following in the recovery terminal:
Code:
mount data
rm /data/app
rm /data/dalvik-cache (only if you moved the dalvik-cache)
mkdir /data/app
mkdir /data/dalvik-cache
@Dimath: yes, I did mean SD card, good catch
1:JF didn't mention it and from a little bit of using it, it seems stable to me. Plus, no matter how much I've screwed up, I haven't managed to boot loop my phone yet.
2: You could just mount those independently. I might end up doing that eventually but for now the way it is works for reasons I'll get to.
3: True, although it's not strictly necessary. If apps2sd already works, this won't break it. I'll put in a guide on undoing the symlink method
4: Actually, no. My script sets the internal memory as the main file system in the union, so apps automatically go there. Moving apps to the sd card just involves copying them to /system/sd.
Ok, just a little confusing.
I didn't use the apps2sd to move apps over to my SD card. What I did was set it with the busybox ls command. I guess that's the symlink.
My question is, if I didn't use apps2sd, can I still use your method? I also moved the dalvik cache also, everything works fine for me now, my apps go directly to the SD card when installing since my memory stays at around 65 MB no matter what I do.
Just need some laymen terms to help me understand that if I'm NOT using apps2sd, and I just linked them with the recovery method, what's my pitfalls / advantages?
Thanks.
larrygates said:
Ok, just a little confusing.
I didn't use the apps2sd to move apps over to my SD card. What I did was set it with the busybox ls command. I guess that's the symlink.
My question is, if I didn't use apps2sd, can I still use your method? I also moved the dalvik cache also, everything works fine for me now, my apps go directly to the SD card when installing since my memory stays at around 65 MB no matter what I do.
Just need some laymen terms to help me understand that if I'm NOT using apps2sd, and I just linked them with the recovery method, what's my pitfalls / advantages?
Thanks.
Click to expand...
Click to collapse
Yes, any other method of apps to sd currently uses the same symlink method, so following the directions as if you installed my app will work. A note though is that all future apps will install to the internal memory by default. I did that because it's MUCH easier to move apps from the memory to the sd card than vice versa. You can use the code I posted if you want it the other way around.
would this also work for /data/data and app-private?
or is this particular setup only for dalvik-cache and app?
oh and before I do this, just wondering, so in theory, since I have a 1.5GB ext2 partition, my free memory will be 1.573GB (1.5GB + 73Mb internal)? The internal memory will just run down and switch over to the sdcard when needed (but be seen as one filesystem)?
andonnguyen said:
would this also work for /data/data and app-private?
or is this particular setup only for dalvik-cache and app?
Click to expand...
Click to collapse
This works for the whole /data folder and everything under it. Everything is automatically installed to the phone memory right now so you can just move over anything you don't want on it(will be making an app to do this automatically)
EDIT: oh and anything you already moved over to the sd card will still show up.
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/unionfs.ko /system/
cp /sdcard/init.rc /data/
cp /runme.sh /data/
cp /sdcard/a2sd.sh /data/
I see, when I run these lines of code (I can do this from adb also right using adb remount) this IS the new symlink method. It's just all at one time without me having to manually link anything.
Right?
larrygates said:
Code:
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/unionfs.ko /system/
cp /sdcard/init.rc /data/
cp /runme.sh /data/
cp /sdcard/a2sd.sh /data/
I see, when I run these lines of code (I can do this from adb also right using adb remount) this IS the new symlink method. It's just all at one time without me having to manually link anything.
Right?
Click to expand...
Click to collapse
Wrong, no symlinks here. Pure unionfs goodness. Basically it convinces the operating system that /data and /system/sd are the same thing. So anything that's on /system/sd shows up under /data but everything that's normally under /data is still there. Think of it like what happens in windows when you merge folders with the same name, but in this case in actuality everything stays exactly where it was.
New news: If you haven't seen it, I updated this tutorial(and the scripts with it) quite a bit and would now consider it to be completely fully functional.
Also The Dude will be sending me an advance copy of his next ROM tomorrow to verify it works. In his build the apps to sd will be automatic, with no user setup(although if you want apps on the sd card you'll have to make an app directory under /system/sd(mkdir /system/sd/app), ditto for dalvik-cache and data).
Finally, I will attempt to add this into my apps to sd app tonight, thus rounding out everything I can do.
After all this, the only thing left is for Haykuro to build it into his ROM and me to make an app to move specific apps to/from the sd card automatically.
This will no doubt be the method of choice in no time. Great work. Sticky?
If anyone dl'd the latest version(that fixed the race condition, etc), please download the one I just put up. I made that one in windows and I believe the funky carraige return(that indicates a new line) that windows uses screwed it up
So I got some kind of error, and I don't know what is going on.
I put in all the lines in the terminal emulator app..
but after line cp /runme.sh /data/ it gives me an error
it says "cp: cannot stat '/runme.sh': No such file or directory
Any help? I rooted my phone just so I could run my apps off of my SD card.. and now I can't figure out how to get it to work. Somebody help me please.
GTASouthPark said:
So I got some kind of error, and I don't know what is going on.
I put in all the lines in the terminal emulator app..
but after line cp /runme.sh /data/ it gives me an error
it says "cp: cannot stat '/runme.sh': No such file or directory
Any help? I rooted my phone just so I could run my apps off of my SD card.. and now I can't figure out how to get it to work. Somebody help me please.
Click to expand...
Click to collapse
Which ROM is this? JF1.5 should have runme.sh there...
[email protected] said:
Which ROM is this? JF1.5 should have runme.sh there...
Click to expand...
Click to collapse
Ok, I am going to re-partition my memory card.. and then re flash to JF1.5 and try it again.
Just tried it, one issue I'm seeing is android seems to install [email protected]@[email protected] into /system/intmem/dalvik-cache at boot. Is there anyway to have that only in my dalvik-cache on the sdcard?
Its a fairly large file at 3megs so I want it to reside solely on the sdcard and even if I delete it from intmem, whenever I reboot it gets added again.
Now when I display the internal phone storage from the settings menu, it shows up at 835 megs.
I wonder if this is possible to use unionfs and make an ext2 fs object as a file on the FAT fs. That way no 2nd partition is necessary. Plus, if you remove the sdcard, everything will still work.
Maybe we could combine unionfs and this method that uses an ext2 image on the fat32 for apps to sd.
http://forum.xda-developers.com/showpost.php?p=3402947&postcount=687
mkefs can be downloaded here:
http://sites.google.com/site/juanjosec/android
dwang said:
I wonder if this is possible to use unionfs and make an ext2 fs object as a file on the FAT fs. That way no 2nd partition is necessary. Plus, if you remove the sdcard, everything will still work.
Maybe we could combine unionfs and this method that uses an ext2 image on the fat32 for apps to sd.
http://forum.xda-developers.com/showpost.php?p=3402947&postcount=687
mkefs can be downloaded here:
http://sites.google.com/site/juanjosec/android
Click to expand...
Click to collapse
I've been looking at that possibility with JF and MartinFick as well, seems like it could be a good plan but I wanted to get this bit done first. It's a good point about the dalvik-cache, but in order to fix it JF(in this case) would have to change /init.rc to make sure to do this bit before building the dalvik-cache.
Can't download apps from market
hmm so I didn't hit any errors when doing this, but afterwards I am unable to download any apps from the market. It just continually says "Starting Download..." Everything else seems to work well.
I had this same issue when I tried to manually setup apps to sd using the symbolic links. I narrowed the issue down and figured out this only occurred after I moved the dalvik-cache over to the sd card. I'm assuming I'm doing something wrong, but can't seem to figure it out. Any pointers in a general direction would be most helpful
I'm using JFv1.50 ADP1.5, not the modded version by LucidREM. For some reason the bootloader couldn't pickup his version on my phone and --edit-- I'm pretty sure I have the SD card partitioned correctly... everything else seemed to work ok. The ext2 partition shows up as the correct size
*EDIT* So apparently my issue was the SD card as well. Just did a format of the sd card and it fixed it. I also formatted data and cache (alt+w in recovery mode). Thanks MarcusMaximus!
[email protected] said:
New news: If you haven't seen it, I updated this tutorial(and the scripts with it) quite a bit and would now consider it to be completely fully functional.
Also The Dude will be sending me an advance copy of his next ROM tomorrow to verify it works. In his build the apps to sd will be automatic, with no user setup(although if you want apps on the sd card you'll have to make an app directory under /system/sd(mkdir /system/sd/app), ditto for dalvik-cache and data).
Finally, I will attempt to add this into my apps to sd app tonight, thus rounding out everything I can do.
After all this, the only thing left is for Haykuro to build it into his ROM and me to make an app to move specific apps to/from the sd card automatically.
Click to expand...
Click to collapse
If I have apps2SD and the dalvik-cache both moved on the dudes builds already, do I still have to create those directories or will my existing setup still work fine? I would like to know what kind of issues I may run into when the dude releases .95 with this (hopefully, not getting my hopes up just in case).

[SCRIPTS] [HOWTO´S] (untested) app2sd, sd card speed fix script | how to guides |

hi all! im new TF user but i tough i could post here some fixes and scripts that i use on my Samsung galaxy 3 but beaware that i have not tested these but they should work on every device im not responsible for any damage that may occur when you apply these scripts!!
1st there are 3 app2sd scripts
What is App2sd? App2sd is a utility which automatically moves some/all your data partition to your ext sd partition. So, your internal space is partially/not used
Which app2sd version should i choose? As you can see, there are 3 versions: App2sd-v1, App2sd-v2 & App2sd-v3.
Differences in versions App2sd-v1: It is the normal app2sd script. This script moves your /data/app/ & /data/log/ to your sdcard's ext partition. It is very fast but your real internal space will be full if you install many apps. This version is not recommended. App2sd-v2: It is an enchanced version of app2sd, which moves /data/app/, /data/log/ & /data/dalvik-cache/ to your sdcard's ext partition. It is fast and you can install many apps until your internal memory reaches 0mb.. Is is recommended for sdcards class2 - class4. App2sd-v3: It is an ultra enchanced version of app2sd, which is like data2sd, but you won't have so many lag like data2sd. App2sd-v3 moves /data/app/, /data/log/, /data/dalvik-cache/ & /data/data/ to your sdcard's ext partition. Your internal memory won't be used unless you do install so many apps and your sdcard's partition get full! SDcard class6+ is highly recommended! Conlusion: If you have class2 or class4 sdcard use App2sd-v2. If you have class6 sdcard use App2sd-v3.
Requirements You must have a kernel which supports init.d & ext4. And you must have an ext partition in your sdcard. Ext4 is recommended. And last thing... You need android 2.2.
How do i check my sdcard's class? Remove your sdcard from your phone and check if you see a circle with a number. If your dont see anything, you may have a class2 sdcard.
How to partition my sdcard? Download MiniTool Partition Wizard Home Edition 6.0. But make a backup before
How to install the script? Take a nandroid backup. Download it from links below and decompress it to your sd. You can either adb push this script in /system/etc/init.d/ or copy it with root eplorer to /system/etc/init.d/. Type the commands: adb shell (adb only) su mount -o rw,remount /dev/block/stl6 /system chmod 777 /system/etc/init.d/* chown 0.0 /system/etc/init.d/* Then reboot in recovery and do a wipe data/factory reset. All your data will be wiped. From now on some/all of your data (depends on the script version) will be moved to your sd automatically. Before you restore your apps with titanium, go in titanium preferences and select to force restore apps to internal memory. Don't move apps to external!!
Why i see only 200mb as internal? App2sd is invisible You can check your sdcard's ext partition in Titanium Backup.
=> app2sd script v.1
http://forum.xda-developers.com/attachment.php?attachmentid=592379&d=1305062488
=>app2sd script v.2
http://forum.xda-developers.com/attachment.php?attachmentid=592380&d=1305062488
=> app2sd script v.3
http://forum.xda-developers.com/attachment.php?attachmentid=592381&d=1305062488
credits go to KYRILLOS13 who introduced these on SG3!
then there is sd card reading speed fix
How to make it work!
At first it needs root & busybox...
Download the script, choose the cache size you want between 1024, 2048, 3072, 4096 kb! (Recommended size: 2048kb)
Extract the .zip file you downloaded and put the 77sdcardspeedfix in your sdcard.
Run root explorer and move the file in /system/etc/init.d/ (If there is no init.d folder, create one!).
You can also adb push 77sdcardspeedfix /system/etc/init.d/
Run a Terminal Emulator/Adb and type the commands:
Code:
adb shell (if you are using Terminal Emulator, skip this command)
su
chmod 777 /system/etc/init.d/77sdcardspeedfix
chown 0.0 /system/etc/init.d/77sdcardspeedfix
reboot
After that the phone will reboot. You will see that your sdcard reading speed has increased!
thanks for BRAINMASTER who made the script!
more scripts coming soon!!
[HOWTO] get ADB up and running (easy way)
ADB is an acronym for Android Debug Bridge and is a development tool for the Android Mobile Operating System
NOTE this is only for windows!
-open this link --> http://adf.ly/Xfyl wait 5 secs and click upper right corner "skip ads" it will download a program that automaticly installs android sdk (wich includes ADB)
-Open the app, leave the destination as C:\ and click ok/install
-Installing ADB/USB Drivers:
*NOTE* You may need additional (Device Specific) Drivers for your Device!
- Connect your Android Device to your PC using the provided USB Cable or just a plain ole 6-pin to 4-pin usb cable... (I prefer to use one with a ferite core)
- When the new hardware device notification pops-up on your pc point windows to the driver folder we moved to our C-drive(C:\android-sdk-windows\google-usb_driver) and install the adb driver.
** if your having issues with installing ADB drivers read this --> http://dl.dropbox.com/u/20575563/ADB...or_dummies.pdf
-Running ADB from the Command Prompt:
-Windows XP: Select Start or Tap the Windows Key on your Keyboard, select
"Run" and type "CMD" then hit "Enter".
-Windows Vista/Win7: Select Start or Tap the Windows Key on your Keyboard, select the search box on the left and type "cmd" then hit "Enter".
Add the "ADB" directory path as a system variable in windows:
-To do this right-click on "My Computer" and select Properties. Next select the Advanced tab(Advanced Settings in Vista/7) then select Environment Variables.
-Click "New" under System Variables and add the following:
Variable =
Code:
adb
value =
Code:
C:\android-sdk-windows\platform-tools
-Call up your Command Prompt:
Time to start adb
- Open up a Command Prompt Windows
- Type the commands below:
Code:
cd C:\android-sdk-windows\platform-tools
<= press enter
Code:
adb.exe
<= press enter
and voila You will see alot of scripting fly through the command prompt window.
***note! you have to enable usb debugging in --> settings --> applications --> developement --> check usb debugging
tutorial is not made by me, its made by AndroidSamurai. i found it after lot of researching, so i tough i could share it with you!
[HOWTO] edit BUILD.prop
1. open root explorer
2. go to /system, find build.prop, change to read/write mode. open the build.prop in text editor
* change build version: 4th line should say ro.build.display.id=(here you write your build version name), reboot and check build version in "about phone"
* change model number: 15th line should say ro.product.model=(here write your model number ), reboot and check model number in "about phone"
* change firmware version: 8th line should say ro.build.version.release=(here write your firmware version, like 4.x ice cream sandwich), reboot and check firmware version in "about phone"
you can also change different things but ill write a guide of that later
hope you like it!
also reserved for later use
updated how to´s
over 100 views but no replys.... are you there ? if you like these ill provide more scirpts, how to's and fixes
Considering the TF is android 3.x based I assume this is just a typo in the first post "Requirements You must have a kernel which supports init.d & ext4. And you must have an ext partition in your sdcard. Ext4 is recommended. And last thing... You need android 2.2."
Thanks for the post
1 question:
WHY use app2sd on a device with 16gb of internal storage?
DroidRevenge said:
1 question:
WHY use app2sd on a device with 16gb of internal storage?
Click to expand...
Click to collapse
well, maybe you have 16gb of music and you wnt to have somegames too : D
jazux said:
well, maybe you have 16gb of music and you wnt to have somegames too : D
Click to expand...
Click to collapse
Why not put the music on the microsd card instead? Then you wouldnt need apps2sd.
stuntdouble said:
Why not put the music on the microsd card instead? Then you wouldnt need apps2sd.
Click to expand...
Click to collapse
true.. well the script is there if someone wants it
jazux said:
true.. well the script is there if someone wants it
Click to expand...
Click to collapse
Ehhh....just a couple notes about the "speed fix" at least. First, it's easy enough to test using hdparm. Second, none of those scripts will work for the external card because that's not where the readahead knob is located. Third, the only script that will work is one that would be exceptionally ill advised to use. The scripts writing to .../vold/179:0 or mmcblk0 adjust the readahead for all of the mmc0 partitions, ie, /system, /cache, /data, etc. If you set readahead to some obscene value, you'll certainly end up thrashing data as you do all sorts of unnecessary readahead. (ie, you readahead on a file, you don't use the section of data which was read ahead, it gets flushed from memory, you readahead on another file, don't use it, it gets flushed from memory, etc, etc.)
Fourth, I actually did test this when I first got my Transformer, and the difference is read speeds was only about 1.5% for a readahead value at the default 128kB or 2048kB for either the internal or my external class 10. YMMV.
edit - Please update the op so we don't keep spreading bad information.
Waste Thread
lol don't you think this thread is crap and it should be deleted
jazux said:
true.. well the script is there if someone wants it
Click to expand...
Click to collapse
But does it work with android 3.2??? or only 2.2?
stuntdouble said:
Why not put the music on the microsd card instead? Then you wouldnt need apps2sd.
Click to expand...
Click to collapse
because some reason the stock music player and many other music player dont even read music on the microsd card.
Add the fact we are starting to get large games that has gigabyte worth of data to download(shadowgun)
victorythagr8 said:
because some reason the stock music player and many other music player dont even read music on the microsd card.
Add the fact we are starting to get large games that has gigabyte worth of data to download(shadowgun)
Click to expand...
Click to collapse
What are you talking about? The stock music app absolutely DOES read music off the microSD. I don't keep any music on the internal SD.
You guys are arguing over a several month old thread that someone necroed.
philburkhardt said:
What are you talking about? The stock music app absolutely DOES read music off the microSD. I don't keep any music on the internal SD.
Click to expand...
Click to collapse
i confirm it,i have msic on sdcard and gb of gameplay files on internal memory from the day that i buy transformer,half summer!
Jazux thanks so much you rule
Sent from my Transformer TF101G using Tapatalk

How to get more internal space on galaxy fit

firstly I'm not responsible for any kind of damage caused to you
but I have tried all the things on my galaxy fit before explaining here
It's not copied from somewhere instead It's based on my experience on my galaxy fit.
For Non Rooted Devices
There is nothing other then using app2sd apps. Then move all the movable items to sd card. After installing app2sd all newly installed apps are automatically moved to external storege.
I uses app2sd by sam lu.
But for non rooted users I will highly recommend to root there device and make the best use of this smartphone.
for beginners everything about rooting/custom roms/nandroid backups etc is explained in this thread
http://forum.xda-developers.com/showthread.php?t=1606380
thanks a lot to A.cid for this wonderful guide
For Rooted Device
apps required
1.Root explorer or similiar
2.Link2SD (Link2sd Setup is explained later in this post)
step 1.Removing Useless system apps from stock or custom rom
go to /system/app using root explorer and mount as r/w
now delete unwanted apps
I will prefer freezing the app first using link2sd and then if phone is working fine then you can unfreeze and then delete that app
Step 2. Removing dalvik cache files
go to /data/dalvik-cache
now search for the dalvik cache files of deleted system apps
it will having name like
[email protected]@[email protected]
delete this file
Step 3. Linking files to Sd-ext or second partition of Sd card
if you have finished Link2sd setup then you can proceed further
open link2sd and then create Link for all the apps you want to linked to sd card
check all the 3 box 1. link apk 2. link dex 3. link lib files
and then your app will be moved to the sd-ext partition
if there are apps which are used very frequently then i prefer not linking dex files to sd card. link only apk for them.
currently system apps can't be linked using link2sd
In the case if app is not working properly after linking then remove links for that app.
Plz help me to improve this article.
suggestions and questions are welcomed.
forgive me for my poor english
Plz help in improving this article. If there is anything wrong in this post let me know. and if you have any other simple method to do this plz post here and help beginners to get more space. But try not to post complicated method which beginners find hard to perform
this post is for beginners
Link2SD steup on galaxy fit
Copied from A.cid main article from
http://forum.xda-developers.com/showthread.php?t=1606380
There are a lot of ways and scripts to transfer apps from your internal memory to the sd ext partition, but the most consistent method I found was Link2sd.
This method works across all roms (rooted stock and custom, both) that I’ve tried, even on all variations of CyanogenMod7 (CM7) as well as on ICS CM9, and is very easy to setup and use.
However, if a custom rom already has DarkTremor's a2sd (a2sdgui app will be present) or any similar script, then DO NOT configure them.
for example: Creeds v3 has a2sdgui, and if i want to use Link2sd, then after flashing Creeds, i SHOULD NOT run a2sdgui, and directly install (and configure) Link2sd...if you run/configure a2sdgui, then it will clash with the working of Link2sd.
Similarly, if any custom rom has any memory hack already implemented, then you cannot use Link2sd...
Steps to setup Link2sd:
• Download Link2sd from Play Store (it’s a free app).
• After it gets installed, run it, and allow root access.
• You will get a message to select the format of your sd partition, select “ext3”.
• Link2sd will then automatically create mount scripts that it requires to work, and will then tell you to reboot your phone.
• Do a proper reboot, and not a ‘hot reboot’.
• After rebooting, open up Link2sd, press menu then select “settings”.
• Select/check the options “automatically link newly installed applications to sd”, “auto link notification”, “relink lib files at boot” (and “fast scroll”, if you want).
• For “install location” option, select “internal”.
• Then go to “auto link settings” and select/check all the three options (you can skip/ unselect “link dalvik-cache file” if you wish)
• Done
Now, every new app that you will install will automatically be moved to your sd ext partition.
Link2sd is also an excellent (and fast loading) app manager, with which you can freeze, uninstall, re-install…though you can move only user apps to sd-ext partition.
Also, there is no point in having your entire phone memory empty, so you probably should unlink the dex (dalvik cache) of your apps. I usually link only the apk and lib files, and leave the dex files unlinked and on the phone storage, so as to avoid any sluggishness in operation., though if your phone memory still fills up, you can link the dex of your rarely-used apps, and leave the dex of important and frequently used apps on the phone storage.
Suppose a custom rom has s2e/app2sd pre-implemented, then after a fresh install, FREEZE the app (rather than uninstall), and then install Link2sd...
Also, if you get error "mount script not created", then choose partition as ext4 (rather than ext3 mentioned below), even though your partition might be ext3...(don't know why this happens with some roms )
In some custom Roms Link2sd doesn't mount sd-ext partition even after selecting correct type of partition in that case try to select other types whether they are working or not
Like in Chocobread v3.2 it worked after selecting partition as ext4
Plz view this thread if you are still facing any problem
Go through this thread
http://forum.xda-developers.com/showthread.php?t=1698813
What happens when we install a new app??
I'm not a developer but this is what I experienced
/data directory is the space which is shown as Internal Storage in phone
/system directory has nothing to do with this internal storage
when we install a new app then it during the installation process three things happens
1.it creates an apk file in /data/app
2.creates an .dex file in /data/dalvik-cache
3.creates one folder in /data/data
when we move apps to sd that apk file moved to sd storage in
.android secure folder and creates an .asec file there
so basically that .dex file and data files are responsible for eating our internal space and for the apps which can't be moved to sd that apk file is also responsible.
we can't use widgets if app is on sd storage.
so in order to use widgets we have to move back to internal storage.
this is where Link2sd helps us
link2sd links selected files to sd-ext partition and for system it still appears in internal storage but it's not there actually.
While for system apps
.apk files remains in /system/app
only .dex files are in data/data directory
we can use widgets of system apps even apk files are not in /data/app directory
so it is recommended that if you want to use widget of the app but you don't want it on internal space(as it is using much more space while it is in internal memory)
here is the solution
create an apk file for that app using any backup app
then move that file to /system/app
change the permissions to rw-r--r--
for this simply see the permissions of any other system app and apply same here
to system
Simply partition your sd card via cwm.. U can get as much internal space as u want..
amn_grg said:
Simply partition your sd card via cwm.. U can get as much internal space as u want..
Click to expand...
Click to collapse
Let consider your post now tell me how to install 100 apps having size more than 500 mb
Without using link2sd or a2sd or any simliar app
Sent from my GT-S5670 using xda premium
Nikhil_G said:
Let consider your post now tell me how to install 100 apps having size more than 500 mb
Without using link2sd or a2sd or any simliar app
Sent from my GT-S5670 using xda premium
Click to expand...
Click to collapse
By symlinking apps manually, one by one...:beer:
Possible - yes
Feasible - no
Everything is possible bro!
Typed using a small touchscreen
a.cid said:
By symlinking apps manually, one by one...:beer:
Possible - yes
Feasible - no
Everything is possible bro!
Typed using a small touchscreen
Click to expand...
Click to collapse
Yeah right...
Informative Thread
amn_grg said:
Simply partition your sd card via cwm.. U can get as much internal space as u want..
Click to expand...
Click to collapse
can you detail the procedure please.
vikrant prabhakar said:
can you detail the procedure please.
Click to expand...
Click to collapse
partition ur sd card through cm recovery then install s2e from play store now all cm7 rom come with pre install s2e script .
Another way is to use terminal emulator .
Download terminal emulator from the PlayStore and then run the following codes:
Code:
su
*grant/allow superuser permissions*
Code:
pm set-Install-Location 2
exit
exit
Note: sometimes if you get an error you may have to run
Code:
pm setInstallLocation 2
if it fails.
All this does is it allows moving many apps that aren't normally movable to the SD card. After running these codes you should be able to move apps to the SD card via Settings>Apps.
This code also sets the default location for apps to install into as the SD card.
What i do for more internal memory..!
Partitioning your sd card is an option. But if you have a sd card of less storage then this option is ruled out. I use a 2gb sd card and partitioning it is not very feasible for me. so...
1. If I'm on a stock gingerbread ROM i use this script http://forum.xda-developers.com/showthread.php?t=2303856 .
(I dont use it very often. Only if necessary.) And i odex the ROM if it is de-odexed by using http://forum.xda-developers.com/showthread.php?t=2303856 Universal Odex Script by MatrixDJ96. Odexing works very well!!! :good:
2. For a custom ROM not many modifications are needed. I just remove the unwanted apps using Link2SD. :good:

[ROOT] Move obb folder to external SD (mount -o bind folder)

Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
needo2 said:
Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
Click to expand...
Click to collapse
Trying to follow your guide....can't get it to work ?
1: Moved the entire OBB folder to my SD
2: Installed busybox, started it, software says it is installed, there's a button to install again....don't know what else it does ? If I click install, well, it installs again
3: Created the new script, saved it, ran it. It seems OK
4: When I open FX File explorer, I don't know what I'm looking for, I don't see anything going on, no operations running ?
...I didn't want to delete the original OBB directory since I don't have confirmation of this working ?
Thanks for your help
almost there...
Hi there
Had the same problem and found your thread after quite some surfing. Following your instructions, all seemed to work fine, just had to inject an "su" before the busybox mount command, then the whole external_sd (/storage/sdcard1/) was mounted to an existing (empty) folder on the internal sd (/storage/emulated/legacy/External_SD)... at least that's how it looks in SManager. When checking the target folder via file explorer, it still looks empty.
My setup:
- Samsung S4 mini on Cyanogenmod 10.2
- phone is not fully rooted, but root is granted to SManager and Busybox
- external sd card has permissions "d---rwxr-x" and is owned by "system" whereas the internal storage has permissions "drwxrwxr-x" and is owned by "root"
do I face a permission issue?
If yes, how to solve that (tried to change permissions of the External_SD folder recursively using chmod -R under root... but didn't suceed)
If not, any ideas...???
Thanks for any hint!
cheers
I'm using Lucky Patcher to bind oob folder, you should try.
@needo2: Is it required to mount the folder? This could cause problems on rejecting sd card. Maybe it does work replaceing the source directory with a simple link ("ln -s") to sd?

Categories

Resources