[Q] Moving and linking Folders to external SDCard (eg Google Music cache) - Eee Pad Transformer Q&A, Help & Troubleshooting

Hello folks,
I am trying to move my google music cache to the external 32GB SD card so that it won't fill up my internal storage but somehow I fail.
Here is what I did so far:
format sdcard as ext2
manually mount sdcard since it won't automatically when ext:
Code:
mkdir /Removable/MicroSD
mount -r -w -t ext2 /dev/block/vold/179\:9 /Removable/MicroSD
mkdir /Removable/MicroSD/GoogleMusicData
Then move all data from /sdcard/Android/data/com.google.android.music/cache to /Removable/MicroSD/GoogleMusicData/cache
I did this with root explorer since I'm not too much of a terminal h4xx0r.
Delete the folder /sdcard/Android/data/com.google.android.music/
Link the new Folder on external MicroSD Card to the original location via this terminal command:
Code:
ln -s /Removable/MicroSD/GoogleMusicData /data/media/Android/data/com.google.android.music
Since /sdcard is already a link like the one I am setting up here, it is not possible to link to this linked location (/sdcard/Android/data/com.google.android.music).
Instead I had to link to the origninal destination of /sdcard which is /data/media.
Now the microSD card is accessible for root explorer. It shows read and write access.
But google music won't find it. It says that it doesn't have enough space to stream music so I figure that it somehow doesn't have access to the sd card.
What could be the issue here?
Also instead of 28GB free memory root explorer shows me only 364,44MB free memory. the command "df" in terminal however confirms 28GB of free memory.
I thought that a reboot might do it. But it doesn't. Instead it gets rid of all the hacking I've done in terminal. So I guess I would have to place a script in /etc/init.d for the link to be set everytime I reboot, right?
Help please?

We don't know how gmusic checks that, but I would suggest checking the perms on the mount, perhaps even mounting somewhere else.
Never done it and don't have the resources but I'm sure with root, making /mnt/sdcard a real microsd is possible.
Sent from my Transformer Prime TF201 using Tapatalk

Maybe this thread will help ?

Thanks for your response!
What do you mean by "checking the perms on the mount"?
I don't want to mount my microsd to /sdcard since then I would have 16 gigs of unused space on my internal memory.
I would rather just link this music folder to my external card and maybe some others later (e.g. DCIM and so on).
I have also tried the mount -o bind command instead of ln but that didn't do the job either. the folder com.google.android.music then only appeared under /data/media/Android/data/ but not under /sdcard/Android/data/ which I totally don't understand how that can happen.
I have root of course.
Does anybody maybe have a script by hand of a similar undertaking so that I can look into that and try to understand how this whole mounting and binding thing works?

Related

How to get my backed up apps back onto SD card?

So before I resized my partitions I backed up the app and app-private folders on my SD card. Now that I have reformatted the card I am not sure how to get them back onto the card. cp -R command got the files onto the card but they didnt work (in ubuntu had a funny symbol on their icons). So I think I should be able to just copy the files back and have them work again but I cant figure out how to get them copied. And IFS drives didnt help, the SD card doesnt show up.
Ideally I would like to use windows or copying the files from my FAT32 partition onto my ext2 partition.
Code:
adb pull /sdcard/location_of_apks app/
adb push app /system/sd/app
That is working for me but for some reason it keeps hanging on/after copying instamapper. Should I keep waiting or can I do it again and leave out that file?
Ok, so I removed instamapper and tried again and it worked fine. Here is what I used, and thanks again for that command, I was close but had a problem with my syntax
Code:
adb push app /system/sd/app
adb push app-private /system/sd/app-private
brandenk said:
So before I resized my partitions I backed up the app and app-private folders on my SD card. Now that I have reformatted the card I am not sure how to get them back onto the card. cp -R command got the files onto the card but they didnt work (in ubuntu had a funny symbol on their icons). So I think I should be able to just copy the files back and have them work again but I cant figure out how to get them copied. And IFS drives didnt help, the SD card doesnt show up.
Ideally I would like to use windows or copying the files from my FAT32 partition onto my ext2 partition.
Click to expand...
Click to collapse
i've always backed up with "cp -a" and then copy back the same way "cp -a" for the EXT2 partition .. have not yet encountered any troubles with that .. without the "cp -a" you won't have all the permissions set properly
Thanks for the advice! Im starting to get the hang of this.

[HACK] How to move games' SD card data to internal memory

I recently bought ShadowGun and N.O.V.A 2 from Google Play and discovered that my SD card didn't have enough room with all of my music (10+ GB) and misc. other stuff, and I had around 6 GB of extra space on my internal memory, so I figured this out.\
Pre-requisites:
Plenty of space on your internal memory
Root access
Note: This has only been tested with SD card data that was already downloaded, but you should be able to download directly to internal memory. Also, this has only been tested on my Droid X running MIUI.
Step 1.
First, find your game's data location. ShadowGun's is at
Code:
/sdcard/Android/data/com.madfingergames.shadowgun
and N.O.V.A 2's is at
Code:
/sdcard/gameloft/games/GloftN2HM
Step 2.
Next, create the new folders in /data/data and /data/local for the Market cache. (Without this, the Market gives a "insufficient storage" error.)
Code:
adb shell
su
mkdir /data/data/ShadowGun
mkdir /data/data/GloftN2HM
mkdir /data/local/cache
Step 3.
If you haven't downloaded the game's data yet, skip this step.
If it's already on your SD card, then move the data from the folders we found before to the folders you just created.
Code:
mv /sdcard/Android/data/com.madfingergames.shadowgun/* /data/data/ShadowGun/
mv /sdcard/gameloft/games/GloftN2HM/* /data/data/GloftN2HM/
Step 4.
Finally, copy the following commands into a shell script:
Code:
mount -o bind /data/data/ShadowGun /sdcard/Android/data/com.madfingergames.shadowgun
mount -o bind /data/data/GloftN2HM /sdcard/gameloft/games/GloftN2HM
mount -o bind /data/local/cache /data/data/com.android.vending/cache
If other apps are crashing with insufficient storage errors, just link them all to /data/local/cache.
You can find whatever way you want to run this script every time you boot, but the easiest way is to download Script Manager from Google Play and set it to use su and to run at boot.
Step 5.
For those who haven't downloaded the SD data yet, download it and see if it takes up any more space on your SD card. I haven't tried it before, so no guarantees.
Uninstalling:
To uninstall, just move files back to SD card, disable script running at boot, and reboot.
I AM NOT RESPONSIBLE IF YOUR PHONE BLOWS UP, YOUR DOG GETS WORMS, OR WW3 STARTS. Thank you.
Can I do this with GPS iGO data (about 400 MB)?
worked on my xperia U! tried dead trigger game
The files will be at internal memory but also show at sd like they are there.. for exemple if we delete it on sd it will delet the file in internal memory!
Going to try with more games
Why is good do this?
i did the factory reset and i have all games on my SD like FIFA 12 etc.
is it possible to do it that way?
+ i am little mixed up with the code, where should i do it?
i can create folders and move data through file managers but not sure about the mount and bind action.
i downloaded scrip manager and console was showing Shell...is it the one i should write the commands as mentioned?

[Q] Symbolic Linking

Hello,
I am trying to find a way to free space on my Samsung Galaxy Centura (SCH-S738C) without rooting. I thought symlinks would be the answer to all my problems, because the phone stock comes with the ln command.
However, this is what I have done and the outcome:
/mnt/sdcard is the emulated SD-card that is really internal storage.
/mnt/extSdCard is the true removable SD-card.
I can create a text file on the external SD-card, for example /mnt/extSdCard/test.txt
ln -s /mnt/extSdCard/test.txt /mnt/sdcard/text.txt
Link is created sucessfully.
cat /mnt/sdcard/test.txt will display the contents of test.txt located on external SD.
However, if I try to link for example Minecraft PE worlds from the external SD to internal storage, the link is created successfully, however the game does not see the files.
I am not sure why this is, the links work properly, I can see the linked files if I 'ls /mnt/sdcard/games/MinecraftWorlds/' but the game wont see them.
Is there a reason for this? Obviously the links are successful since I can 'cat' a text file link and see its contents?
Thanks.
I think I ran into this problem trying to run games on linux from installs on my windows partition. But I think that may have been because of the different filesystems or some other problem.
Maybe the game can't see through symlinks. :0

How can I format SD card that was formatted as internal SD in android 6.0?

Dear Friends,
I need your help, my Redmi Note 3 pro is dead and the 64GB sd card was formatted as internal storage and that means it canoot be used in other device, I cannot format it is regular whey- is there a way to remove the android protection?
all the filles are there- just cant delete/format or add files.
Xperia-Ray said:
Dear Friends,
I need your help, my Redmi Note 3 pro is dead and the 64GB sd card was formatted as internal storage and that means it canoot be used in other device, I cannot format it is regular whey- is there a way to remove the android protection?
all the filles are there- just cant delete/format or add files.
Click to expand...
Click to collapse
So you can't delete the files? Do a live boot of linux and see if it shows up.
sd card
ive just formated my sd card to ext4 partation for android 6.0 with KDE partation manager in linux mint and the sd card works fine on my phone so maybe try that hope it helps.
also if u cant delete files it more than likley because of permissions so ude need to chmod the permissions on the media device as such so bring up a terminal in linux or u could try terminal emulaitor and cd to the directory of ur storage usually something like /media/username/devicename in linux and the directory for ur phone may be different but u can bring its directory up with any file manager anyway once that is done su to root then once cd to directory or sub directory of mount point chmod 777 -r or chmod -r 777 for recursive and press enter if formating as root in linux dosent work. hope it helps
Or you can start a live cd version of gparted and wipe the whole thing and let it mount and let the device you want to use it on create the partitions itself. That's what I'd do.

how to make a autorun script on android 6,and mount tf card,360 qiku n5 cellphone

i want my 360 qiku n5 cellphone to use the tf card as an internalSD card, and also link to the /data/data diretory,so that I can make the storage more sufficient.
i have so many app to install, and the app use much space consuming up the internal space,leaving the tf card empty.
i'd tried making tf card ext4 and mounted to /mnt/sdcard-ext,and maked a link "ln -s /mnt/sdcard-ext/data /data/data",but the apps just crashed as soon as they started.then i deleted the link and cellphone return normal.
after try i found using the "su, mount" script to mount tf card on any directory,the nornal apps which do not use "su" can't read the mount point,I think that's why i link the tf card to /data/data but apps could not start. So how can i solve this problem?I use the supersu as the root and have allready turn off the "Mount namespace separation" option.
And how can i make a startup autorun script on the android6 phone?
Anybody help me please?
This will not work how you want. Apps on SD cards only work with Googles new feature to make the sdcard as internal storage. But even that is buggy due to the sdcard code that has never been made to work for apps on sdcard.

Categories

Resources