[Q] Move/link internal sdcard to 2nd partition on CM11 - Android Q&A, Help & Troubleshooting

Hello everybody
I have a S4 mini that works perfectly with CM11 and has the perfect size for me, so I hope not to change it for many years The only problem is that internal storage is quite tight, so my hope is to move or link the internal sdcard (/mnt/shell/emulated/0 or the entire location /mnt/shell/emulated) to the 2nd partition of my 64GB external sdcard. In the past, I made a init.d script for my previous phone (which had KK) that moves the files in the internal sd on a tmp folder, mounts the 2nd partition on the internal sd path and then moves the files back (the moving files thing, only to keep the files still eventually present on the internal folder inserad of the 2nd partition), but on the S4mini I cannot have it working again because of some problem in using the internal sdcard as a mountpoint. I already tried to change the permissions on that folders into the script and to execute the commands as different user in the script but nothing.
Someone could please help me or pint me to the right direction to link/mount/somethingelse the 2nd partition as internal sdcard? If possible I prefer a init.d script or a mountpoint change instead of an app because of the zero manteinance and the fact that preferably I don't want to rely on an app.
Thank you

Alefello said:
Hello everybody
I have a S4 mini that works perfectly with CM11 and has the perfect size for me, so I hope not to change it for many years The only problem is that internal storage is quite tight, so my hope is to move or link the internal sdcard (/mnt/shell/emulated/0 or the entire location /mnt/shell/emulated) to the 2nd partition of my 64GB external sdcard. In the past, I made a init.d script for my previous phone (which had KK) that moves the files in the internal sd on a tmp folder, mounts the 2nd partition on the internal sd path and then moves the files back (the moving files thing, only to keep the files still eventually present on the internal folder inserad of the 2nd partition), but on the S4mini I cannot have it working again because of some problem in using the internal sdcard as a mountpoint. I already tried to change the permissions on that folders into the script and to execute the commands as different user in the script but nothing.
Someone could please help me or pint me to the right direction to link/mount/somethingelse the 2nd partition as internal sdcard? If possible I prefer a init.d script or a mountpoint change instead of an app because of the zero manteinance and the fact that preferably I don't want to rely on an app.
Thank you
Click to expand...
Click to collapse
What will you use it for?
Sent from my GT-S7580 using Tapatalk

The phone or the script?
Inviato dal mio GT-I9195 utilizzando Tapatalk

Alefello said:
The phone or the script?
Inviato dal mio GT-I9195 utilizzando Tapatalk
Click to expand...
Click to collapse
The script, of course
Sent from my GT-S7580 using Tapatalk

DodoGTA said:
The script, of course
Sent from my GT-S7580 using Tapatalk
Click to expand...
Click to collapse
Sorry, I asked because I thought it could be understood from the first message.
I will use it for using the 2nd partition of my uSD card instead of the internal emulated sdcard. In this way I could use all the internal memory for the apps and the data will be saved on the larger 2nd sdcard partition.
Inviato dal mio GT-I9195 utilizzando Tapatalk

Up... In this holydays I've time to test something... Could someone please help me?

Related

[APP] Root All to SD

Has anyone tried this app for Data2SD?
I stumbled upon this app while taking a stroll in the Market. And wanted to share it with y'all.
And, NO, I am not the dev of the app.
☞ The Dev is WindowsNT. ★
I would've tried it myself, but I already have Data2SD on my phone. It might help those who need Data2SD.
Root All to SD -
http://market.android.com/details?id=rappsd.v1
Sent From My Galaxy 3.
I 'm the dev.
I 'd be happy to answer any questions. The app simply creates and formats a storage in the SD, then links data from apps to that partition.
WindowsNT said:
I 'm the dev.
I 'd be happy to answer any questions. The app simply creates and formats a storage in the SD, then links data from apps to that partition.
Click to expand...
Click to collapse
Does it do all this automatically.. I mean is there any special script or kernel required..?
Sent from my GT-I5800 using XDA Premium App
1. You first use the "storage" menu to create a storage file (default 500MB) to be used as a partition. This partition is then automatically formatted to ext2 and mounted on the device startup.
2. From the "apps" menu you select an application and you have a list of the movable files.
3. You move/restore the files you wish.
Of course, don't do it for applications that start on boot, because the storage won't be mounted until the sd card is visible.
WindowsNT said:
1. You first use the "storage" menu to create a storage file (default 500MB) to be used as a partition. This partition is then automatically formatted to ext2 and mounted on the device startup.
2. From the "apps" menu you select an application and you have a list of the movable files.
3. You move/restore the files you wish.
Of course, don't do it for applications that start on boot, because the storage won't be mounted until the sd card is visible.
Click to expand...
Click to collapse
Is this only for 2.2 or can it be used for 2.1?
It can be used with 2.1 as it doesn't move the app itself (as the 2.2 system does), it moves the internal data in /data/data/<package>.
(requires root).
Glad to see the Dev himself here.
Hope many people benefit from this App.
Sent From My Galaxy 3.
Hell mate. I tried this with 500mb.
It stuck at 25mb which is like 5%
Then i formatted my sd card and tried with 50mb and again it stuck at 25mb.
Why is this problem occuring ? Also i have a 16gb sdhc which is class2
Hm, perhaps a problem with your SD card ?
Try this from shell:
dd if=/dev/zero of=/mnt/sdcard/rallsd/storage bs=1024 count=102400 (for 100MB).
this is similar to the command used by my app. If it also stucks, then it seems that there's an error with your SD card (chkdsk ?)
If it works, notify me and I 'll take a look.
WindowsNT said:
Hm, perhaps a problem with your SD card ?
Try this from shell:
dd if=/dev/zero of=/mnt/sdcard/rallsd/storage bs=1024 count=102400 (for 100MB).
this is similar to the command used by my app. If it also stucks, then it seems that there's an error with your SD card (chkdsk ?)
If it works, notify me and I 'll take a look.
Click to expand...
Click to collapse
This dint work too
Then, a storage card issue.
Perhaps a chkdsk would help.
hi,
i installed the app n also created the storage file of (1024) n it successfully finished,but it says that storage is not mounted n when i try to mount it, it says mount attempt n nothin happens.
please help.
sinahidden said:
hi,
i installed the app n also created the storage file of (1024) n it successfully finished,but it says that storage is not mounted n when i try to mount it, it says mount attempt n nothin happens.
please help.
Click to expand...
Click to collapse
I got the same issue also, thought it would be nice if the app was more transparent
SmallWalrus said:
I got the same issue also, thought it would be nice if the app was more transparent
Click to expand...
Click to collapse
Heh, reply to self, but I managed to work around the initial problem by simply deleting off the storage file, and creating a smaller (128mb) one
hi, i have 2 questions before ill give it a try.
is the app able to allocate free space from the sd card to create the partition
or do i have to wipe the sd completely before ?
will the app interfere in any way with already installed and normal moved apps ?
thanx in advanced, stavro
Doesn't work on my Archos 7ob eReader (Eclair 2.1). Once the second part created by Root All to SD, it doesn't recognize its job ! Worse, Windows can't at all read the SD Card.
WindowsNT said:
I 'm the dev.
I 'd be happy to answer any questions. The app simply creates and formats a storage in the SD, then links data from apps to that partition.
Click to expand...
Click to collapse
no answeres on my question ???
Sent from my HTC Wildfire using Tapatalk
in the meantime i am using link2sd on my rooted stock rom.
works perfect. i just had to create a second partition on my sd card
(no need to wipe the sd) and start the application. no "not enough memory" problems anymore
SmallWalrus said:
Heh, reply to self, but I managed to work around the initial problem by simply deleting off the storage file, and creating a smaller (128mb) one
Click to expand...
Click to collapse
i used 340mb and it work perfect!
Three questions
I have three questions:
1) How can I reduce size of allocated memory space (I have mount 2 GB but now I see that is to much for my needs)
2) What happens with files that are on mounted partition if I uninstall Root all to SD app? How can I move it back to the original place?
Thanks in advance!

[MOD]External SD as Primary/Internal

This is a simple mod to make the external SDcard mount as the primary/internal (/sdcard)
and the internal is mounted as the secondary (/sdcard-ext)
This should work on most (all?) roms but is only tested on MIUIv4 with a GSM RAZR
Just flash the switchSD.zip
To revert the effect, flash reswitchSD.zip
Requested by lukas77 external sd mounted in folder of internal (/sdcard/sdcard-ext)
Some problems though, after each boot you will have to remove and insert SD for it to mounts.
It is safe to remove SD because it isn't mounted but it's a bit of a hazzle.
Flash SDinFolder.zip to revert, just flash reswitchSD.zip as above.
make shore before flashing that you don't have any file or folder named sdcard-ext on internal sdcard.
EDIT:
I have been away for a while and came back to a thread full of pproblems and a bunch of PMs.
Unfortuneatly I don't have time to ivestigate the problems or fix for newer builds.
My recomendations for everyone is: Do Not Use It unless you'r realy know what your doing and can fix it for your build.
work perfect eclipce 1.3 via GSM
Sent from my XT910 using Tapatalk
what is the advantage of doing this?
therazrguy said:
what is the advantage of doing this?
Click to expand...
Click to collapse
Some apps doesn't support external SD (Very noticeable on MIUI as music can't find music on external and file explorer only browses internal).
Some people (me) prefer a storage that is easily movable.
If you always have a larger SD inserted you'll probably find yourself a bit limited with the original mounting options.
pajn said:
Some apps doesn't support external SD (Very noticeable on MIUI as music can't find music on external and file explorer only browses internal).
Some people (me) prefer a storage that is easily movable.
If you always have a larger SD inserted you'll probably find yourself a bit limited with the original mounting options.
Click to expand...
Click to collapse
Can this be done without damaging currently installed programs?
And what does this do? Symbolic links?
sletta said:
Can this be done without damaging currently installed programs?
And what does this do? Symbolic links?
Click to expand...
Click to collapse
If you have programs (or games, mostly games) that is installed on your internal SD they will break. I guess games that download extra data to SD just will have to download it again though...
The good thing is that you can test and then just flash reswitchSD.zip if it didn't work.
This tells vold (the program responsible for mounting the storages) to mount external on /mnt/sdcard and internal on /mnt/sdcard-ext instead of the reverse.
No links.
pajn said:
If you have programs (or games, mostly games) that is installed on your internal SD they will break. I guess games that download extra data to SD just will have to download it again though...
The good thing is that you can test and then just flash reswitchSD.zip if it didn't work.
This tells vold (the program responsible for mounting the storages) to mount external on /mnt/sdcard and internal on /mnt/sdcard-ext instead of the reverse.
No links.
Click to expand...
Click to collapse
Works great! Thanks!
it this just a edited vold.fstab file? or is there more to it?
Boomer187um said:
it this just a edited vold.fstab file? or is there more to it?
Click to expand...
Click to collapse
Just vold.fstab. That is all that is needed
Will we need to reflash this after flashing any roms or are we all set until we undo it manually?
qoncept said:
Will we need to reflash this after flashing any roms or are we all set until we undo it manually?
Click to expand...
Click to collapse
You will for a ROM that erases the whole system partition but won't for a patch. But it doesn't seem like there are that many ROMs that provides patches so you probably will.
can we mount external sdcard as folder inside /sdcard/? (phone memory)
Wysłane z mojego XT910 za pomocą Tapatalk
lukas77 said:
can we mount external sdcard as folder inside /sdcard/? (phone memory)
Wysłane z mojego XT910 za pomocą Tapatalk
Click to expand...
Click to collapse
Great idea! However my testing found out that it wasn't the easiest thing to do as vold will try to mount the external SD before the internal is mounted and the folder present.
It works but after every boot you will have to remove SD (safe as it isn't mounted) and reinsert it. May work better on other ROMs (did some Googeling and found that CM7 on O2X did have problem while stock didn't whit exactly the same thing)
Adding to first post now!
Would it be possible to mount SD as an expansion of your internal? i.e., treating them as the same memory unity?
Haloman800 said:
Would it be possible to mount SD as an expansion of your internal? i.e., treating them as the same memory unity?
Click to expand...
Click to collapse
No, if so we would have to raid them but I have never heard of some raid utilities built for Android.
Even if it's theoretically possible to build the Linux utilities for ARM and run them on Android it would probably be loads of work and customization for each ROM as Android have very bad possibilities of running scripts at boot.
Anyone tried this on stock 2.3.6 ROM?
Szadzik said:
Anyone tried this on stock 2.3.6 ROM?
Click to expand...
Click to collapse
Not tried but should work.
Szadzik said:
Anyone tried this on stock 2.3.6 ROM?
Click to expand...
Click to collapse
I have it working on stock 2.3.6.
pajn said:
Just vold.fstab. That is all that is needed
Click to expand...
Click to collapse
Hey would it be possible for you to edit this vold from a epic 4g touch so i can do this on my phone? Heres the link to my vold file if you can thanks... http://db.tt/2E1QAqVe
iUseJuGGZz said:
Hey would it be possible for you to edit this vold from a epic 4g touch so i can do this on my phone? Heres the link to my vold file if you can thanks... http://db.tt/2E1QAqVe
Click to expand...
Click to collapse
It's actually really simple.
Ofc. this isn't tested so if it doesn't work just let me know.
If you want to push it manually just extract the vold.fstab from the zip.

[CONTEMPLATION] getExternalStorageDirectory

So, I make apps for android, and if anyone is familiar with it, the proper way to write to the storage is using Evironment.getExternalStorageDirectory(); this will return with the internal sd card location on devices with internal sd card.
Well, i decompiled the system files and found the method that is "getExternalStorageDirectory" and found how it creates it.
So, i can change it to return with the path to the ACTUAL external sd card. This means that every app that uses getExternalStorageDirectory will place EVERYTHING onto the actual EXTERNAL sd card. Thus freeing up the internal sd card AND the data partition allowing for more apps to be installed.
What are your guy's thoughts about this? I feel like it might work. However, if one doesn't have an external sd card, things could go very hay wire.
Yep, it will work for apps relying to this function.
There is such mod for Xperia Z for quite some time. You can look to that mod to simplify modding process
Be great to have looking for a switch mount script like I had on S2 and S3.
Sent from my SGH-M919 using Tapatalk 2
Miami8906 said:
Be great to have looking for a switch mount script like I had on S2 and S3.
Sent from my SGH-M919 using Tapatalk 2
Click to expand...
Click to collapse
This isnt a script. This is a smali edit which is a lot better. I don't like scripts
elesbb said:
This isnt a script. This is a smali edit which is a lot better. I don't like scripts
Click to expand...
Click to collapse
Cool is it available yet or are you still working on it?
What path are you using to designate the external sdcard or how are you determining it?
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.
CNexus said:
What path are you using to designate the external sdcard or how are you determining it?
The Thanks button is just to avoid "THANKS" posts in threads. Nothing more. Don't defeat the purpose of why it was introduced.
Click to expand...
Click to collapse
The mount point for the external sd card is /mnt/extSdCard
And there is another method that I can use to test for if it's mounted or not, and if it's not mounted, then revert to internal sd card. I'm hoping it works lol. Still haven't had time to mess with it though.
Sent from my SGH-M919 using Tapatalk 2

[Q] Problem with Link2SD

I need a little help i have a problem with Link2SD. I assign 500 mb to ext2 partition, and i have all my apps in the sd card, playstore, facebook and 2 others are linked. Well my problem is that, i have a notification for less space in internal storage :/ when i trying to install some new games ( well i have like 5 games installed already on the sd)... So why i have just 19% free space in internal storage if i have all my apps in sd? PD : see the image and sorry my bad english
Sent from my GT-S5830i using xda app-developers app
Link all apps. Don't move them to SD Card.
Sent from my GT-S5830i using Tapatalk 2
move your apps to internal storage and then link them
Sent from my LG Optimus 4X HD using xda-developers App
Im gonna try that . But i have another issue, why when i install apps automatically install on sd card, i remember in old version of link2sd, new apps are linking to sd and no install on sd. How i can activate that if is possible?
Sent from my GT-S5830i using xda app-developers app
BuhO.- said:
Im gonna try that . But i have another issue, why when i install apps automatically install on sd card, i remember in old version of link2sd, new apps are linking to sd and no install on sd. How i can activate that if is possible?
Sent from my GT-S5830i using xda app-developers app
Click to expand...
Click to collapse
In Link2SD go to settings, Check Auto-Link.
Sent from my GT-S5830i using Tapatalk 2
iamashank said:
In Link2SD go to settings, Check Auto-Link.
Sent from my GT-S5830i using Tapatalk 2
Click to expand...
Click to collapse
Yeah that is activated at the first but for some reason didn't works, idk but now is working, thanks.
I've been having a similar problem to the OP. Am I right in thinking you move ALL applications to internal storage, even the ones that install to SD card by default and then link them?
I guess there's a problem with your rom or kernel. Who knows
Rahul4Ace said:
I guess there's a problem with your rom or kernel. Who knows
Click to expand...
Click to collapse
But is this the way to do it? Make sure user apps are are on PHONE before linking?
I'm using LinkSD and it saves me a lot of space in /data.
The way it works :
When installed, an app has three or four parts : the .apk file, the .dex file (in a deodexed ROM), the data folder and, eventually, one or more .so in /data/data/app_folder/lib
- If the app is in internal storage, every parts of it are in /data : .apk in /data/app, .dex in /data/dalvik-cache, data folder and libs in /data/data/name_of_the_app folder
- When the application is moved to sd Card, the .apk file is moved in /mnt/asec/, but the .dex and the data folder remains in internal storage (some applications may also have data in SD Card)
- When the application is linked, the .app, the .dex and the .so files are moved to /data/sdext2 (which is the place where the 2nd partition of the SD Card is mounted), only the data folder (without libs) remains in /data/data (internal storage).
So, the best way to save place in internal storage is to link user applications (no need to move it to internal storage first, it also works when the application is in SD Card).
All my 50 user apps are linked, and I still have 85 Mb free in /data.

External SD card permission issue

Weird enough suddenly I found all my external SDCard files have all permissions like:
---rwxr-x
Why !?? This happens to every file I copy onto it.
I needed them like:
rwxrwxr-x
so far, the only rough and long way I found is through Aromafilemanager and PhilzTouch recovery.
Yet I have to change the permissions one file at a time.
Can anybody help?
Sounds like a problem unique to you, I've never heard of it.
Flash the official stock rom, format your sd card in your pc using the industry formatting tool and test.
If the problem disappears then it was probably some combination of your individual setup.
Yep. Also ensure you haven't got any scripts running at startup. Sd permissions are set on boot and cannot be changed afterwards
Sent from my GT-I9300 using Tapatalk 4
Thank you, I'll surely restart from the beginning and report back
Sent from my GT-I9300 using xda app-developers app
rootSU said:
Yep. Also ensure you haven't got any scripts running at startup. Sd permissions are set on boot and cannot be changed afterwards
Sent from my GT-I9300 using Tapatalk 4
Click to expand...
Click to collapse
Which script could do that?
Sent from my GT-I9300 using xda app-developers app
Any mods that mount folders or swap storage.
Otherwise, something built into the rom.
Sent from my GT-I9300 using Tapatalk 4
boomboomer said:
Sounds like a problem unique to you, I've never heard of it.
Flash the official stock rom, format your sd card in your pc using the industry formatting tool and test.
If the problem disappears then it was probably some combination of your individual setup.
Click to expand...
Click to collapse
@boomboomer
which filesystem do i have to use in formatting extsdcard 8gb via pc? exFAT / FAT32 / EXT4 / NTFS ?
moreover, in this post and following on dev rom thread, it seems it's a normal behaviour... am i missing sth?
https://www.sdcard.org/downloads/formatter_4
Fat32 is the normal filesytem.
If it's common to your rom then your chef is the best one to approach, he may have set a script or mod.
rootSU said:
Any mods that mount folders or swap storage.
Otherwise, something built into the rom.
Sent from my GT-I9300 using Tapatalk 4
Click to expand...
Click to collapse
I read through about 7 pages of sd card issues on the s3 and thought i cant read anymore, so i thought i would just ask. I've just bought an s3 and i got my 64gb sd card from my old phone to my new one. Problem is i have data from other games in the SD and titanium back up files in the externel sd card. Seems the S3 has its own built in SD card and only reads from that. I copied my TB files from externel to the internel. Now the games still require Extra files although they are in the externel SD. So how in the world do i get it to read my Externel sd instead of my internel? I thought of copying the files but i have 16 gb internel, 64 externel so its not gonna work considering i have 39 gb left in my 64 gb one,

Categories

Resources