• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Swap internal/External Insufficient Storage

opps lol i put a i instead of a l .

so i did it and when entered it it said Cache link failed file exists then the /data/data/com.android.providers.downlods link came up with the # at the end.

That means the cache directory may not have been removed.

try:

cd /data/data/com.android.providers.downloads
ls -l

Look to see if cache exists. The error tells me it does.

It may already be a link for some reason (you've tried several things). If it is, you can read where it's link to - report that back if you see it.

If cache is a directory, then:

rm -r cache

Then try the link command
 
Upvote 0
That means the cache directory may not have been removed.

try:

cd /data/data/com.android.providers.downloads
ls -l

Look to see if cache exists. The error tells me it does.

It may already be a link for some reason (you've tried several things). If it is, you can read where it's link to - report that back if you see it.

If cache is a directory, then:

rm -r cache

Then try the link command

Alright, i did that now says opendir permission denied for both commands ls -l
and rm -r cache
 
Upvote 0
Alright, i did that now says opendir permission denied for both commands ls -l
and rm -r cache


alexcool, I'm sorry this is giving you so much trouble, but it appears that you're proceeding on a step by step basis without real comprehension of the commands you're following. I empathize, these things are technically deep.

To do what you want, you'll really need to consider reading a little on using the Linux shell, sometimes referred to as the bash shell (Android uses a simplified version of it).

Now, to your specific problem at this point:

About the only reason I can think this would give you such a response is if you're not operating as the super user, AKA root user.

If the prompt you're getting from the phone ends with a $, you're a "regular" user.

You have to enter "su" to switch to the super user.

The prompt will then end with a #.

When you're configuring a device that has been rooted, and require the level of security access only available to the super user, you must be sure the # is at the end of the prompt, or the commands will be denied on a security basis.

This is one of the primary reasons for rooting a phone.

To this point I've proceeded under the assumption that you're over 25 years of age. There are two reasons I can think of that someone would be inquiring here for instructions of this level:

1 - An Android device owner entirely unfamiliar with the technology, but so frustrated with the phone that they're willing to push through and spend time trying to fix it, because they've invested significant money into the device and can't use it others.

2 - An Android device owner younger than 21, curious about the phone, interested in pushing it's limits and correcting its flaws, and otherwise unfamiliar with the technology.

I need to learn which applies to you?

You're going through quite a lot of obstacles to complete what is, to someone of 30+ year's experience as I have, a quick task.

I empathize with everyone...literally hundreds of millions of people...for which this technology is a complete mystery.
 
Upvote 0
alexcool, I'm sorry this is giving you so much trouble, but it appears that you're proceeding on a step by step basis without real comprehension of the commands you're following. I empathize, these things are technically deep.

To do what you want, you'll really need to consider reading a little on using the Linux shell, sometimes referred to as the bash shell (Android uses a simplified version of it).

Now, to your specific problem at this point:

About the only reason I can think this would give you such a response is if you're not operating as the super user, AKA root user.

If the prompt you're getting from the phone ends with a $, you're a "regular" user.

You have to enter "su" to switch to the super user.

The prompt will then end with a #.

When you're configuring a device that has been rooted, and require the level of security access only available to the super user, you must be sure the # is at the end of the prompt, or the commands will be denied on a security basis.

This is one of the primary reasons for rooting a phone.

To this point I've proceeded under the assumption that you're over 25 years of age. There are two reasons I can think of that someone would be inquiring here for instructions of this level:

1 - An Android device owner entirely unfamiliar with the technology, but so frustrated with the phone that they're willing to push through and spend time trying to fix it, because they've invested significant money into the device and can't use it others.

2 - An Android device owner younger than 21, curious about the phone, interested in pushing it's limits and correcting its flaws, and otherwise unfamiliar with the technology.

I need to learn which applies to you?

You're going through quite a lot of obstacles to complete what is, to someone of 30+ year's experience as I have, a quick task.

I empathize with everyone...literally hundreds of millions of people...for which this technology is a complete mystery.

Ok, i think i would be the 2nd one.
I redid everything being superuser with the # at the end. I think i did it correct this time no errors came up. not sure if it worked or not yet. Also how would i partition my sd card so i can move other apps on internal to the sdcard. Thanks
 
Upvote 0
Partitioning the SD card can be done with a free app called AParted. I've not used it, so I can't attest to how it works, but that's it's intention. I assume you're planning to use 'link2sd' with it's requirement to partition the card.

You can prove the link is working with a simple test. Get into the shell "adb shell", switch to su (root/super user), then:

cd /data/data
df ./
cd com.android.providers.downloads
df ./
cd cache
df ./

The first two 'df' commands should report the space on the INTERNAL sd card.

The last one should report the space of the EXTERNAL sd card.

That's because, if all worked well, the directory 'cache' inside com.android.providers.downloads (itself under /data/data) is routed by the symbolic link.

Now, as to the clear cache issue...I'm not exactly sure.

I'll have to wait until my son returns with his F6 to discover where the gallery and 'android.process.media' store their information. Something they expect to see is now gone.

As you proceed, you'll want to be sure to backup anything you deem of value precisely because this kind of thing can happen.

I have to take some care and concern here. Being among the "under 21" category as I asked earlier explains why you'd have the persistence in solving these issues. Most in the 'over 25' category would loose patience and pay someone else to fix their phone.

The problem is that you're proceeding with powerful commands without genuine comprehension. When I was 17 I had a Fiat Spyder, rusted to it's ears. I was by no means a mechanic, but I was audacious about tinkering and the car needed the head serviced (two valves, it turns out, were burned and damaged, though the car still ran).

It was winter, so I was working in a garage. I didn't realize one is supposed to disconnect the battery before doing this kind of work. I demonstrated why, to myself. As I reached for the last bolt on the head I hopped up on the car, one knee on the driver side fender, the other by the radiator, the engine below me. I got the bolt off, lifted the head and...spark! The head brushed against some positive lead coming from the battery and ignited the fuel vapor. A flash of flame washed over my face and thorax, then a raging fire engulfed the engine underneath me. It took me at least 2 seconds, INSIDE that fire, to figure out where to drop the head so I could find an extinguisher, which of course I didn't have. I ended up emptying 3 cans of Sprite, shaken vigorously, to put out the fire. For some reason that worked, just as the fire department arrived (someone heard and apparently looked to see me fighting to save the house from burning down).

Now, fortunately, the days of destroying computer equipment in a blaze of sparks and fire is behind us (there was a time). Yet, with respect to the relative safety of the experiment, you are in the 21st century analogy of doing something like that.

Hence, expect Google applications to complain, repeatedly, if something isn't exactly where they expect it to be.
 
Upvote 0
I i got it stuck in boot loop mode by changing the font and i didnt install a recovery and now i dont know what to do. i dont know how to get it out. fast help would be appreciated. thanks

update:i got it to the factory hard reset i did that and it still does boot loop.

from my knowledge, there is no way of escaping a boot loop but using the unbrick guide
 
Upvote 0
This report tells me that you have an 8 Gbyte card (or partition) mounted for access through both /sdcard and /storage/sdcard0. These are commonly routed to /data/media, and therefore the internal SD card, on stock devices. This informs me that you have the app2external_sd application, which I think you mentioned.

This means your directory /storage/external_SD is probably mounted to /data/media.

You can confirm this with the mount command (maybe post the result if you need another eye on it). Typing mount with no parameters shows the report. Also, df /storage/external_SD would report the same space as the /data/media shows here.

Ok, to direct Google play you should create a directory on the external card, which in your case is visible through /sdcard or /storage/sdcard0 (they're the same directory ultimately).

mkdir /sdcard/google_downloads

or something to that effect...your preference, as long as it's under /sdcard

to make sure permissions are wide open,

chmod 777 /sdcard/google_download_cache

The directory you want to re-direct (and this time I'm double checking this :D ) is /data/data/com.android.providers.downloads/cache

There are a few directories under /data/data/com.android.providers.downloads, and the cache directory is the one you need to route.

Just so any existing content remains available (though it's not critically important)....copy it.

cp -rp /data/data/com.android.providers.downloads/cache/* /sdcard/google_download_cache

Adjust the tail of that command to your directory name preference..it's the directory you made earlier.

You've asked about creating a link, and I did that myself in earlier experiments...Google worked fine with this. There are valid reasons to consider a mount...it's an alternate way of doing this.

But first, the symbolic link method:

Now that the content of the cache has been copied, we must remove the cache content on the source (this MAY free up a little space, but we also need the directory gone to create the link there).

Take a careful moment when typing the rm command below, it recursively removes all files from the given directory and all it's subdirectories...get it right.

perhaps a preparatory:

ls -l /data/data/com.android.providers.downloads

helps make sure we're both pointing to the right place...yes, I left of "cache" above compared to below.

rm -r /data/data/com.android.providers.downloads/cache

That rm removes the content of the cache recursively.

Now, finally, create the link - the first directory parameter (/sdcard/google_download_cache) is the name I use as an example, substitute what you chose to creat

ln -s /sdcard/google_download_cache /data/data/com.android.providers.downloads/cache

The link that is create is the last parameter...the link is cache under /data/data/com.android.providers.downloads

now, ls -l /data/data/com.android.providers.downloads

You'll see a few directories listed, and the one entry named cache will be identified as a link to /sdcard/google_download_cache.

Just so we're clear about all of this, there are a few minor consequences.

If the external SD card is removed, this link will point to nowhere. Google Play would suddenly be unable to download anything.

If the directory this link points to is removed, the same thing results.

If you decide to move things around, you can simply rm the link (that is, rm /data/data/com.android.providers.downloads/cache) - then remake the link to some other location.

You could just mkdir to recreate the original cache directory as it was to undo this.

If you remove app2external_SD, this link will again point to no where.

On a stock device (where app2external_sd has NOT routed /sdcard to the external card), the destination for the same example directory I had you create above would then be

/storage/external_SD/google_download_cache

I point this out in case you uninstall app2exernal_sd and want Google to continue working - you'd have to refashion the link to fix that.


Ok, that's about it for the link approach, now about the mount approach. Mounting is typically reserved for more upper level directories and devices, but it can be applied anywhere and has a similar resulting effect as a symbolic link with an important difference.

Some applications explicitly look for and occasionally have problems with symbolic links. If you copy a directory with symbolic links inside it, what is copied is not the CONTENT, but the LINK (basically just a notation that it is LINK). That is usually the correct choice, but not always. If, for example, you expect to back things up, the link approach produces a LINK in the backup archive, but the CONTENT is not backed up, unless you explicitly tell the backup software to descend through symbolic links to get the data instead.

In general use, if an application refers to directory or a file that is a symbolic link, opens it and uses it - doing exactly what you'd expect...it ends up getting the information from where the link directs it. Not ALL applications do that, and backup software is among them. The copy command (cp) is another.

Mounts, however, don't cause this behavior. When you backup from locations with mounts, there is no link - the backup gets CONTENT, just like any normal directory.

The problem with mounts is that they don't stick around after a reboot. They only stay around while the machine is running. Links are written to a directory, and therefore DO stick around between reboots. Mounts are commands to the operating system...nothing is written to a directory, so they have to be written into startup scripts if you need them to be mounted at every boot (this is a typical configuration choice).

For the Google Play directory this has no serious consequence, but now that you know how to create symbolic links you need to be aware of their side effect, and the alternative.

The mount command's use is like this:

mount -o rw,bind /sdcard/google_download_cache /data/data/com.android.providers.downloads/cache

This is a bind mount...the assumption being that your binding the source directory, /sdcard/google_download_cache to the destination directory /data/data/com.android.providers.downloads/cache

Both directories must exist for this to work. To use a mount instead of a link, you begin with the same steps I listed above for the link, but stop at the link (and don't perform the link).

Then, one time only, after you have removed (with rm -r ) the old /data/data/com.android.providers/cache content, you must create the empty directory named cache to receive the mount.

mkdir /data/data/com.android.providers.downloads/cache

The empty directory will stay between reboots, but the mount command only lasts until a reboot.

To use a mount you must install something like Smanager or Universal Init.d and follow their instructions to place the mount command in a shell script that will execute at every boot.

That's simply how mounts are used which must be persistent. They have significant advantages over links, but require initialization scripts.

I point this out because I know the problem you're solving. I had it too....you will eventually run out of space, again and again. You'll probably want to route other locations to targets on the external card, and now you have some information on how to do that. I've been at this for decades. I know how this is.

There's an axiom I learned back in the mid 80's when 60 Mbytes (yes Mbytes not Gbytes) was considered large for a PC. The axiom is...data will tend to occupy all available space.

That has actually gotten worse over time, so you'll need to understand what you can do about it short of a full scale solution.

I've just completed work on a full scale solution which I have working on my LG F6. For me there is not an internal/external debate anymore. The entire /data directory is routed to a 28 Gbyte partition. I have room from hundreds of applications and download space. I'm preparing a means of installing the solution for F6 devices by minimally experienced owners. Unfortunately it wasn't as simple as mounting external space over /data...that is basically the goal, but the obstacles in the way required that I recompiled a small binary file that is part of the Android operating system. /data is too "top level" to be mounted over once Android is running. It has to be done before Android takes over, but after Linux is up.

I have a short thread on the F3 forum pointing to a technical discussion on the subject on the F6, which documents the theory and discusses my experiments leading to a complete solution to the storage problem.

Well, as complete as the size of an external storage device.

That is my caution to you. Some applications just don't like being messed with, and Google is one of them. This cache directory never caused it a problem, but anything above the cache directory caused Google to repeatedly complain, virtually disabling the phone until I disabled Google.

One can only discover through experiment under these conditions (virtually zero documentation regarding our targets).

thanks for explaining the mystery ( how the whole things works) , was really helpful for me to understand !
but I think it is bit technical and needs lions's heart to try these steps ( if one doesnt know what he/she is trying to do, few wrong delete command can get you some trouble )
 
Upvote 0
1) Download Uni-init v1.0.apk

2) Install like a regular apk and open it

3) Click on Activate and allow with super user

4) Click on Verify to make sure init.d is enabled

5) Reboot your device

6) Download any Root Browser you like from the play store

7) Download 11extsd2internalsd and copy it to your sd card

8) Open Root Browser and copy 11extsd2internalsd and paste it /system/etc/init.d folder

9) Hold click 11extsd2internalsd and set permissions and make sure everything is checked as far as Read, Write, and Execute

10) Download Smanager from the google play store and open and allow with root access

11) Go to /system/etc/init.d and click on 11extsd2internalsd

12) Click at the top where it has Su and Boot and hit save and then exit

13) Reboot your device and your all done!


Did all of those but didnt realize until after that i had to change the .txt on it. i redid all the steps again when i did it.
I did steps 1- 13 nothing happened after rebooted it.
Still the internal memory is 1.2 in my lg f6 with a 32 gb external s-d card.
What should i do?
 
Upvote 0
I did steps 1- 13 nothing happened after rebooted it.
Still the internal memory is 1.2 in my lg f6 with a 32 gb external s-d card.
What should i do?

Did you uninstall SManager after you were all done, because you aren't supposed to. It has to stay on the internal phone storage to initiate the script at boot, or else you will be left with your stock storage setup, because there's nothing telling it to remount.

I followed each step accordingly and had no issues, worked beautifully on first attempt.
 
  • Like
Reactions: Mac09
Upvote 0
I repeated all the steps an still i can't get it. My lg f6 is rooted I stared in step 7 to 13 but it did not work. Them I stared from 1 to 13 and still it did not worked. Would give me another solution o can you give me more details. on how to do it. I do not have experience about these issues. Should I install smanager again after reboot? I will really appreciate. Thanks
 
Upvote 0
If you uninstalled the Smanager after doing all the steps, then you need to redownload it and install it again.

One thing I know I didn't do during this process was download the file with any sort of file association. I didn't add a .txt to the 11extsd2internalsd or anything when I saved it to my desktop. I just download the file as is and saved it as is. It's still sitting in my documents unassociated, with no file extension. In the description it just says "File". Maybe adding a file extension to it messes up the encoding on the file?

And again I repeat,

YOU CAN NOT DELETE OR UNINSTALL SMANAGER AFTER YOU DO THIS MOD!!!

It has to remain installed on the internal memory of the phone the entire time you use this mod, or else there will be nothing telling the script to remount the storage after boot!!!! Leaving you with your standard storage. As long as you use this mod you will have to keep the SManager app installed. Do not Link2SD it, do not Move to SD Card it. Leave it on the internal storage. It has to be able to be read as quickly as possible at boot, the system boots internal storage first, then scans the media on your sd card and mounts it after its all done. So you want the system finding SManager (It is set to launch on boot) as soon as it can so it can swap the mounts before the phone scans the external SD Card. It will pop up in your notification bar for a moment, then disappear and you will never see it again.

I went into my launcher and removed the SManager Icon from my app list, so in essence since I turn my screen off on boot and let it do its thing, I never see it! Unless looking at my app list in the settings menu.
 
Upvote 0
If you uninstalled the Smanager after doing all the steps, then you need to redownload it and install it again.

One thing I know I didn't do during this process was download the file with any sort of file association. I didn't add a .txt to the 11extsd2internalsd or anything when I saved it to my desktop. I just download the file as is and saved it as is. It's still sitting in my documents unassociated, with no file extension. In the description it just says "File". Maybe adding a file extension to it messes up the encoding on the file?

And again I repeat,

YOU CAN NOT DELETE OR UNINSTALL SMANAGER AFTER YOU DO THIS MOD!!!

It has to remain installed on the internal memory of the phone the entire time you use this mod, or else there will be nothing telling the script to remount the storage after boot!!!! Leaving you with your standard storage. As long as you use this mod you will have to keep the SManager app installed. Do not Link2SD it, do not Move to SD Card it. Leave it on the internal storage. It has to be able to be read as quickly as possible at boot, the system boots internal storage first, then scans the media on your sd card and mounts it after its all done. So you want the system finding SManager (It is set to launch on boot) as soon as it can so it can swap the mounts before the phone scans the external SD Card. It will pop up in your notification bar for a moment, then disappear and you will never see it again.

I went into my launcher and removed the SManager Icon from my app list, so in essence since I turn my screen off on boot and let it do its thing, I never see it! Unless looking at my app list in the settings menu.
Thanks for replay.
I did it again following every step but if a just turn off the phone, the smanager app take action and the external s d card of 32 gb become the internal memory but i f I reboot it application does not work it goes back to the normal internal memory which is 1.2 gb. What can I do to prevent this. Do you have any specific website that allows me to download the 11extesd2internalsd with out the ext extension.?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones