[Q] Explain Link2SD with MicroSD? - Android Q&A, Help & Troubleshooting

No matter how many tutorials I've read I just don't understand... my guess is because of the terminology involved between the different SD cards involved... I simply want to have a partition on my MicroSD card where most of my apps live. That includes the libraries and .apk files. I don't care about large games. As far as I see, Link2SD just installs on the phone's internal SD card. How can I set that up? Is a second app needed (Foldermount?)

Related

Everything about partitions...!!!

Clear your doubts guys!!!
Ok, so here's the deal, in a very longwinded way that should hopefully explain everything and answer ALL questions.
You have an SD card in your phone and, a bit like normal PC Hard Drives, you can "partition" them (split them into two or more sections of different filesystems). Normally, your SD card is just one big FAT32 partition, which is fine for storing your pics, messages, emails, etc.
Now, other then your Phone's SD card, your phone will have its own internal flash memory (or "NAND") storage. Tradditionally with Android, you could only install applications to this NAND storage, you cannot install them onto your SD card. So if you have an empty 32GB SD card, but only 5Mb of internal phone storage, you still wont be able to install many apps, if any at all.
This was done to protect the apps from things like piracy - it's not easy to access the location where apps are installed on your phone's internal storage (normally impossible without root), so you can't for example buy an app, copy it, refund it, then install it again.
Still, this is no good for those of us who like to install lots and lots of apps, legitimately, as we run out of internal storage very quickly.
So Google came up with a way to install apps to the SD card. A folder is created called something like .android_secure and this stores (I believe) encrypted versions of applications, but there's a few catches:
1) Apps aren't automatically stored here, you have to manually "move" them
2) Not all apps are capable of being moved, in fact most apps aren't, the developer needs to update their app and allow it. Some apps aren't and wont be updated and some developers may not want to allow it for whatever reason.
3) Not all app data is moved, most of it is but some data is left on your phone so many people still run out of internal storage quickly.
4) You can force ALL apps to be moved to this area by default, but it breaks incompatible ones - such as Widgets, which are unable to load due to the SD card not being "prepared".
So that's Froyo's version. Before Froyo existed, some very clever people came up with a thing called "Apps2SD". Remember I said that your SD card normally is one big FAT32 partition? Well, Apps2SD works by having your SD card patitioned into TWO filesystems. A normal FAT32 partition for your usual stuff and a secondary "EXT" partition. EXT is just a filesystem, like FAT32 or NTFS, but it's the filesystem used by Android internally. The SD card is normally FAT32 because it's a "universal" filesystem, that just about any machine will be able to read, whereas EXT filesystems are generally Linux only, but I digress.
EXT has several different versions. The most common one you'll see is ext3. The main difference between ext2 and ext3 is "journaling", which is just a fancy way of saying that should an operation (such as copying, writing or reading) be interrupted unexpectedly (say, by you turning your phone off), then no data should be lost or corrupted. You know how when you turn your phone on, it says "preparing SD card"? It takes a few minutes, but what it's actually doing is checking that the FAT32 partition hasn't been damaged, because FAT does NOT have journaling. If you used a computer back in the Windows 98 days, you may remember that lovely blue "Scandisk" screen that had to run every time you didn't shut your computer down correctly - that's the same thing. But then Windows 2000/XP came along with NTFS, which also has journaling, meaning you had less chance of loosing data. But I digress once more.
So you have your SD card partitioned into EXT and FAT32. Generally it doesn't matter if it's ext3 or ext4, but you don't get any real advantage with ext4 over ext3 in this instance. Apps2SD then runs a special script on your phone which "symbolically links" the folder from your phone's internal storage where your apps are normally stored, to the ext partition on your SD card. A symbolic link is a bit like a shortcut for folders, except it's transparent to the OS: In other words, Android doesn't know that when it's installing it's apps to the internal phone storage, it's actually being stored on the SD card. This effectively boosts your internal phone memory from the previous 5mb that you had in my example above, up to whatever size you made the ext partition on your SD card (often 512Mb or 1Gb, but it depends on how many apps you install).
Plus, because it's "journaled", it doesn't need to be "prepared", meaning it's ready to go as soon as the phone starts - so your widgets and apps work immediately (unlike "forced" Froyo Apps2SD, where widgets disappear).
The catch with Apps2SD is that whatever space the ext partition takes up is taken away from the SD card. So if you have a 4Gb card (with something like 3.5Gb of actual storage) and you make a 512Mb ext partition, your SD card will "shrink" to 3Gb. The space isn't actually lost, it's just being used by the ext partition. If you reformat your card, you'll get it back.
Finally, there's a difference between "Apps2SD" and "Apps2SD+". Remember I said that your apps are stored on a special folder inside your Phone's NAND storage? Well, that was a bit of a lie. It's actually stored in TWO places. There's a second area which is called the Davlik Cache. You don't really need to worry about what this is for (Hint: IT's to do with the Java runetime your phone uses to run apps), all you need to know is that apps use it to store data, which also eats up internal phone memory. Apps2SD+ moves davlik cache to the ext partition on your SD card as well, freeing up even more space. Some people believe that this may come at the cost of performance, as the internal NAND memory should be faster than your SD card (Which is why you also get people arguing over which "class" SD card is better for Apps2SD - the logic being that a faster SD card means less impact from this move), but the truth of the matter is that your applications will be running from your Phone's RAM anyway, so performance isn't really impacted at all. Since most apps are only a few hundred Kb's in size, or a couple of MB at the most, it's a non-issue.
Finally, any recent version of Apps2SD/Apps2SD+ should work with an SD card that is or isn't formatted with an ext partition. It'll check for this partition when your phone first boots and if it's not there, just use internal phone storage.
Having an ext partition WITHOUT Apps2SD+ shouldn't cause any issues, either, so you can format your SD card whenever you're ready.
So in summary:
Apps2SD "fakes" your phone's internal memory and puts it all on a hidden section of your SD card.
Apps2SD+ pushes even more content to the SD card, freeing up even more space on the phone itself.
"Froyo" Apps2SD has various limitations that "old" apps2SD does not, but is much easier to handle as it doesn't involve any kind of "partitioning".
IF U LIKE HIT THANKS​
Good idea, mate

[Q] app install location

I have a few questions about app install locations for the g-tablet. There are three places where apps can go: 1. internal memory, 2. internal sd card, 3. external sd card.
For internal memory, I can see the installed apps (the apk files) at /data/app. I cannot find any evidence of any apps installed on the internal sd card (do they stay packaged in the apk file or get exploded out). What directory do they get put into on the internal sd card? In case you're wondering, according to App 2 SD Pro, I have 10 apps installed on the sd card.
Is there a way to install apps on the external sd card? Everything that I've read about and the sd card app managers that I've tried only work between the internal memory and the internal sd card.
Hmmm...nothing but crickets. Not even a question for more information? Well, here is a little more anyway. The tablet is rooted and I have tnt-lite 4.4.0 installed. I'm using Root Explorer to browse around in the file system.
This discussion might help, somewhat.
Yes, that other post was somewhat helpful. I can see the apps that have been moved to the "internal" SD card are at /mnt/asec with Root Explorer (I didn't have to unmount either...but the .android_secure folder did show as empty).
A couple of other questions for you:
1. Are you using a remote Linux machine to do those find commands or is there a way to get to that command line on the g tablet? I only have Windows so I may be stuck there.
2. Unmounting the SD card in the Settings will unmount the "external" SD card, right? not the "internal" SD card?
3. Do you know anything on my other original question about the "external" SD card? Can we move apps there some how? If not, I'd be game to try to write an app that will do it but my guess is that if there isn't an app that does it already, its probably harder than it seems that it should be.
Puhn said:
(I didn't have to unmount either...but the .android_secure folder did show as empty).
Click to expand...
Click to collapse
If you unmount the SD card (internal or external -- depends on the ROM), you will see stuff in /mnt/sdcard/.android_secure/.
1. Are you using a remote Linux machine to do those find commands or is there a way to get to that command line on the g tablet?
Click to expand...
Click to collapse
I use a telnet session into the gTablet, but, you can run the commands either inside a Terminal emulator or via adb. It usually doesn't matter how you run the commands.
2. Unmounting the SD card in the Settings will unmount the "external" SD card, right? not the "internal" SD card?
Click to expand...
Click to collapse
Depends on the ROM. In CyanogenMod, the SD card is the removable SD card. The internal non-removable one is called "emmc" (mounted under /mnt/emmc). Other ROMs have /mnt/sdcard and /mnt/sdcard2 (Froyo/GB) or /mnt/sdcard and /mnt/external_sd (Honeycomb ROMs).
3. Do you know anything on my other original question about the "external" SD card? Can we move apps there some how? If not, I'd be game to try to write an app that will do it but my guess is that if there isn't an app that does it already, its probably harder than it seems that it should be.
Click to expand...
Click to collapse
CyanogenMod does what you want by default. As I mentioned above, for it /mnt/sdcard is always the external removable SD card. So, everything "moved to SD card" ends up on the external SD. If you want other ROMs to behave this way, you'll have to change some of the /init*.rc files and the /system/etc/vold.fstab file and change what gets mounted as /mnt/sdcard (ie, which device is assigned the "sdcard" label). Look around, the changes are fairly obvious.
My recommedation, however, is to just install CyanogenMod and avoid the /init*.rc and vold/fstab hackery.
Good information. Huge THANKS !
One last question (hopefully)...if the SD card in CyanogenMod is the external SD card, I guess I have the reverse question for it. Can/how do you move apps to the non-removable SD card?
I guess what I'm getting at is I have a 16 GB internal, non-removable SD card and a 16 GB removable SD card that I'd like to maximize the use of. I'm not stuck with only being able to put apps on one or the other depending on the installed ROM am I?
Puhn said:
I guess what I'm getting at is I have a 16 GB internal, non-removable SD card and a 16 GB removable SD card that I'd like to maximize the use of. I'm not stuck with only being able to put apps on one or the other depending on the installed ROM am I?
Click to expand...
Click to collapse
Heh. What started as a simple question about App install locations has now progressed to low-level mucking about with the system. What next--RAID using the SD cards?
To answer your question, with the standard, unmodified ROM you are stuck with only using either one or the other. But, since Android is based on Linux, (and since we have the source code for most of the programs on the system), it can be made to do a lot of non-standard things.
I'm pretty sure that the system can be modified to use both the internal and external SD cards for App installations, but, this will need a fair bit of customization of the ROM. Which means that if you switch ROMs or even upgrade the current one, the setup will have to be redone again.
Therefore, my recommendation, is that you use one of the SD cards solely for app installs and the other only for storing media/books/whatever. 16GB only for apps is a fair bit of space, I feel.
rajeevvp said:
Heh. What started as a simple question about App install locations has now progressed to low-level mucking about with the system.
Click to expand...
Click to collapse
Well, I had hoped to avoid the mucking about part and that one of the available ROMs already had the ability to put apps anywhere but it sounds like that is not the case. I guess I wasn't clear with my original question.
Anyway, thanks for all of the answers. I'll stick with what I've got for now. At some point I may play around with some things and see how thoroughly mucked up I can get it.

Why don't Android ICS apps detect my external SD card?

Hi guys I am new to android and I got myself a Micromax A110 running on android ics with 2 gb of internal SD card memory...
As you guys can figure, the internal memory just isn't enough for installing heavy games and storing and downloading large videos and music, so I added a 32 gb external micro SD card.. the card shows in my file manager and its contents are accessible, most apps like ttpod, ttorrent, vlc, chrome etc don't detect my external card. They only access the contents of my internal SD card, download to it.. I can't set the default directory to the external card...
When I installed nfs most wanted to my phone, it asked me to free up data in my SD card or insert another one as there was no space left due to obvious reasons of my internal SD card being filled with other apps.. I uninstalled and reinstalled it after setting the default storage location to the external storage... I found that the game installed in the internal storage this time and on startup, it gave the same message..
Is it a common problem or a limitation to the OS? Is there a work around for this? If so how? Does my phone needs to be rooted for the purpose? Please help as the problem is getting annoying.. my external card is lying almost empty...
Thanks in advance,
Extremely sorry for the long post...
Sent from my Micromax A110 using Tapatalk 2
It's because Google made the stupid decision, starting with Honeycomb (which is why the Motorola Xoom, the first Honeycomb device needed an update to enable use of it's MicroSD card slot) to merge the /data/ and /sdcard/ partitions. What that means is that the SD card becomes a virtual space (a folder, in fact) located in the same place where all your apps are stored. Why is it stupid? If you have a phone that actually has a MicroSD card slot, like yours or the Galaxy S III, the MicroSD card becomes a different "folder" (something like /sdext/, which stands for either extension or external). Only apps that specifically are programmed to look for that mount point/folder will be able to use it. Most music/video/picture players/viewers can, because it makes sense to automatically program to do that. But with large games, like you said, NFS Most Wanted (which I also have), it sucks because the game is like 2GB.
My Galaxy S3 has 16GB internal and a 32GB card. I'm forced to use the internal storage only for large games because they don't see the memory card. It sucks. The good thing about merging /data/ and /sdcard/ is that it simplifies things, like on the iPhone where your space is your space, no matter how you use it. It used to be that you had like 1GB or 2GB for apps (the APK files only, not the files that games download for example) (which the HTC One X does, but still only uses internal storage because there's no card slot), and the rest went to your MicroSD card slot. Now it's all to internal storage because your internal storage IS your MicroSD card slot at system level.
Product F(RED) said:
It's because Google made the stupid decision, starting with Honeycomb (which is why the Motorola Xoom, the first Honeycomb device needed an update to enable use of it's MicroSD card slot) to merge the /data/ and /sdcard/ partitions. What that means is that the SD card becomes a virtual space (a folder, in fact) located in the same place where all your apps are stored. Why is it stupid? If you have a phone that actually has a MicroSD card slot, like yours or the Galaxy S III, the MicroSD card becomes a different "folder" (something like /sdext/, which stands for either extension or external). Only apps that specifically are programmed to look for that mount point/folder will be able to use it. Most music/video/picture players/viewers can, because it makes sense to automatically program to do that. But with large games, like you said, NFS Most Wanted (which I also have), it sucks because the game is like 2GB.
My Galaxy S3 has 16GB internal and a 32GB card. I'm forced to use the internal storage only for large games because they don't see the memory card. It sucks. The good thing about merging /data/ and /sdcard/ is that it simplifies things, like on the iPhone where your space is your space, no matter how you use it. It used to be that you had like 1GB or 2GB for apps (the APK files only, not the files that games download for example) (which the HTC One X does, but still only uses internal storage because there's no card slot), and the rest went to your MicroSD card slot. Now it's all to internal storage because your internal storage IS your MicroSD card slot at system level.
Click to expand...
Click to collapse
Hey man! Thanks for the reply....
Can you tell me how to work out a solution for this?
Is directory bind or fstab file hack the only solution?
Is it possible to overcome this without root?
And some apps do detect my Micro SD card... It is in the directory mnt/sdcard2
Please post questions one time only and in the proper Q&A section.
http://forum.xda-developers.com/showthread.php?t=2019921

[Q] Cannot move apps to SD, Memory is almost full, please help

I recently bought a 32GB SD card that cost 50$! for my phone, however none of the app2sd apps work on my phone.
I have alot of apps I need to move to the SD. I may want to put videos, etc. on there in the future too.
Thread moved to proper forum.
Bump
bump
I'm not sure of the tech reasons but apparently the way Samsung implemented the internal memory system means apps cannot be moved to or run from the external SD card. There is however a rather neat way to use your SD card as Internal memory and your phone's internal memory as the extSD card. Have a look in ExtSd2InternalSd v4|Increase your data storage
You could try Directory Bind: http://forum.xda-developers.com/showthread.php?t=1410262
Works well for me but I could make problems with apps that need loaded its data right at the beginning after bootup.
But for game data and stuff like that it works well.

[Q] What exactly does moving apps to the SD card do?

I'd like to understand more about what happens internally when you move an app to the SD card. When you do this, how does the app know which bits have moved and what constitutes what can be moved and what can't. Does it do something like moving the files and the creating symbolic links to those files?
Then what happens when you upgrade and app? Assuming that it has some parts in the applications partition and some parts on the sd card, how does the upgrade know what files to put where?
Thanks for any clarifications. Feel free to point me towards another thread. When searching I couldn't really find and detailed information.
octessence said:
I'd like to understand more about what happens internally when you move an app to the SD card. When you do this, how does the app know which bits have moved and what constitutes what can be moved and what can't. Does it do something like moving the files and the creating symbolic links to those files?
Then what happens when you upgrade and app? Assuming that it has some parts in the applications partition and some parts on the sd card, how does the upgrade know what files to put where?
Thanks for any clarifications. Feel free to point me towards another thread. When searching I couldn't really find and detailed information.
Click to expand...
Click to collapse
When you move the apps to the SD card its taking all the files needed to run that to the SD card. I may not be a 100% correct on this but im pretty sure that most System apps need to stay on the internal storage to run correctly and most 3rd party apps (games and such) can be moved the SD card to help free up space on the internal drive.
Droid Premium said:
When you move the apps to the SD card its taking all the files needed to run that to the SD card. I may not be a 100% correct on this but im pretty sure that most System apps need to stay on the internal storage to run correctly and most 3rd party apps (games and such) can be moved the SD card to help free up space on the internal drive.
Click to expand...
Click to collapse
So in summary what you said is "the files are moved"? Thanks for that.
move apps to sd.
I would like to know where actually does the "move apps to sd" moves all the data, in which directory in sd card.
thanks in advance
The app will be installed in sd card but if that app has obb files then the files won't be moved to sd card cuz it has to be in internal in order to run properly..

Categories

Resources