yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
In that case my phone would have almost no RAM that could be used by applications. The memory is not used unless something is using it.

The mount order is no problem. sd-ext is mounted first. I am working on letting M2SD use sd-ext or data (Depending on which has most available space) as cache and then use tmpfs as fallback.

I have replaced some. More will properly come, but the other thing works and changing it would require lot's of extra testing (You always has to test when changing something). Also this script is not only made for ICS nor CM ROM's.

Are we talking about BCM now or?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Okay update released. Cache will now be mounted at either /data or /sd-ext (Depending on which has most available space) or on a tmpfs if both are to low on remaining space.

Also I added an option to disable safe-mode (m2sd safemode disable) for people that wants the extra options on ROM's not using proper sysinit. However, if things goes wrong after disabling this, don't complain here. There is a reason why I added the safe-mode do begin with. You are on your own on this one. It either works for you or it doesn't.
[Android Software/Hacking General [Developers Only]] DarkIceGB:
[Q] M2SD SD Card Issue + Insufficient storage available

I selected to move everything to sd-ext with this script.

Problem 1: After installing about 100 apps, it says, "Insufficient storage available" when I try to install a new app (however, in the list it cycles through, only 1 or 2 small apps install successfully).

In Titanium Backup, it says:

Partition: Total: Free:

System ROM 262 MB 43.3 MB

Internal: 154 MB 150 MB

SD Card 14.0 GB 12.0 GB

SD Card (a2sd) 2.11 GB 1.68 GB

In 4ext Recovery it says:

Partition: Total: Free:

system 250.0MiB 41.3MiB

data 147.6MiB 143.3MiB

cache 40.0MiB 38.MiB

sdcard 13.1GiB 11.2GiB

sd-ext 2049MiB 1.6GiB

Setting the script to move the cache makes no difference and clearing both caches (dalvik cache and cache) also makes no difference.

Problem 2: After restoring apps with Titanium Backup, in android "Manage apps" showed some on the SD card and when I mounted my SD card to my PC, it warned about apps not working when I mount.

After running the script again, it didn't warn about it. However, in both cases, "Manage apps" shows some apps on the SD card and after unmounting my SD card, it takes AGES before I can see all apps (this is the same after booting) - only some apps (some 3rd party and all system) are there. Directly after unmounting and going to "Manage apps", the apps that it says are on the SD card say "com.amazon.kindle..." for example, then return to normal when they appear in the menu.

If I go to Titanium Backup straight after booting, it says that the external storage is not mounted and the backup directory is not available. Yet apps continue to try and install (and fail with insufficient space).

Also, it keeps saying "Process system is not responding." (said this after running the script).

Do I need to run the script every time I install a new app and after restoring apps with Titanium Backup?

Any ideas why this is happening?

Thanks.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Try enabling the cache option for the first problem (Update to latest version first).

The second problem is not the script. Some apps are by default installed on the sdcard (The Fat32 partion, NOT sd-ext which is handled by the script). All you can do here is select each app placed on the sdcard (Fat32) and move them to "internal storage (sd-ext)"
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Thanks, but I tried that and it made no difference (forgot to mention it).

Just before you replied I modified my post (below I've copied part of the section and underlined the changes):

Problem 1: After installing about 100 apps, it says, "Insufficient storage available" when I try to install a new app

(however, in the list it cycles through, only 1 or 2 small apps install successfully)

.

Problem 2: After restoring apps with Titanium Backup, in android "Manage apps" showed some on the SD card and when I mounted my SD card to my PC, it warned about apps not working when I mount.

After running the script again, it didn't warn about it. However, in both cases, "Manage apps" shows some apps on the SD card and after unmounting my SD card, it takes AGES before I can see all apps (this is the same after booting) - only some apps (some 3rd party and all system) are there. Directly after unmounting and going to "Manage apps", the apps that it says are on the SD card say "com.amazon.kindle..." for example, then return to normal when they appear in the menu.

If I go to Titanium Backup straight after booting, it says that the external storage is not mounted and the backup directory is not available. Yet apps continue to try and install (and fail with insufficient space).

Also, it keeps saying "Process system is not responding." (said this after running the script).
[Android Software/Hacking General [Developers Only]] guy_smiley:
Problem 1: Is a cache issue, try clearing it either via TB or Recovery.

Problem 2: There is an option in TB to restore apps to ... make sure you select Internal Storage and not the original location (as if they existed on SD card this is where TB will place them again)
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Problem 1: Already tried doing that via recovery (TB only shows the dalvik cache as an option and not the cache) and it didn't do anything. Forgot to mention that.

Problem 2: But I don't want them on the internal storage, I want them on the sd-ext partition.

---------- Post added at 01:02 AM ---------- Previous post was at 12:31 AM ----------

I used alogcat when installing an app and after loads of lines that look fine, it says:

W/Finsky (2246): [1] FinskyApp.getDfeApi: Fall back to primary account.

Then loads more of lines that look fine, after which it says:

W/NetworkManegmentSocketTagger( 1056): untagSocket)53_ failed with errno -22

W/NetworkManegmentSocketTagger( 935): No content provider found for permission revoke: file///data/data/com.android.providers.downloads/cache/downloadfile-2.apk
[Android Software/Hacking General [Developers Only]] Robobob1221:
Prob 1:Have you tried manually deleting the cache of each app individually in the manage application menu? I found that the xda app had a cache of 170mb that wasn't being cleared by TiB or recovery.

Prob 2:You need to place the app in internal storage for it to be moved to your sd-ext.

If all else fails back up all your apps and data and then wipe data in recovery! That's another thing I tried that worked. A pain yes, but...
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Problem 1: I have about 100 apps so it would take ages! If I back up will it take the caches with it?

I don't understand why it says there isn't enough space when everything is on the sd-ext partition with over half of the free space!

Problem 2: Thanks.

Also, straight after installing the rom, should I then install the script and after that restore with TB?
[Android Software/Hacking General [Developers Only]] guy_smiley:
Problem 1: Unfortunately that's the only option, the alogcat you stated before also shows cache being the issue.

Problem 2:Hit the thanks button for him!

Yes, after installing the ROM, install the script then boot into the ROM. Check the Titanium Backup website, I just did and there are heaps of amazing tips. But yes, as mentioned above, you need to tell TiBu to restore to Internal and that will put your apps on sd-ext.
[Android Software/Hacking General [Developers Only]] Robobob1221:
An app you can download which will delete all the cache in one go is Elixir2 in the PlayStore. Has a load of widgets one of which monitors your cache and can be used to clear all cache, amongst other things. Its pretty useful.

@guy_smiley you beat me to it!! lol
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Thanks to both for the replies!

Can I use Elixir2 instead of clearing 100 apps manually if TB didn't work? The problem is I can't install anything! It will download fine, but the error appears when it tries to install. Will backing up the apps also backup the cache and if it doesn't can I do that instead and then start a fresh and restore?

Why does it say there isn't enough space when everything is on the sd-ext partition with over half of the free space, and how did this even happen and could it happen again?
[Android Software/Hacking General [Developers Only]] Robobob1221:
Yeah Elixir should clear all your cache if its on internal storage. However as you can't install anything that would be a problem. You're gonna have to go in and clear some manually. If you use the xda app check that one first. As I said in a previous post that took up an amazing amount of MBs.

Clear the cache before backing up your apps. Or in TiB preferences uncheck backup app cache if you've got it ticked.

Also check for any duplicate apps. Its possible that you have some stored in both internal storage and sd-ext, but different locations.
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Can the issue be fixed by just backing with TB (without cache) and then restoring after installing the rom and script instead of using Elixir?
[Android Software/Hacking General [Developers Only]] guy_smiley:
Yes, you can still keep the cache in TB but just make sure that when you restore, you tell it to restore all to internal (if you move cache again via m2sd)
[Android Software/Hacking General [Developers Only]] Robobob1221:
Only one way to find out!! ;)

Make a nandroid just in case
[Android Software/Hacking General [Developers Only]] DarkIceGB:
But won't restoring the cache recreate the problems?

Can no one answer why it says there isn't enough space when everything is on the sd-ext partition with over half of the free space, and how it happened and if could it happen again? :P
[Android Software/Hacking General [Developers Only]] Robobob1221:
Just don't restore it. Cache gets rebuilt.

There could be a problem with your store app. Try this: clear all store data. Also clear download manager and Google services framework data. Not just cache but data. It will be restored after reboot. Do that in manage applications. Reboot your phone and then try d/l again.

I have a question related to the actual script. I had it recently where I rebooted after restoring some apps and after reboot all my data had been reset not just the restored ones but all apps.

Will this happen everytime I restore or have I missed something out of the init.rc which would cause this to happen? I made the change to how sysinit is executed, does there need to be some command for not resetting data?
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Thanks but I already tried that and it did nothing.

Also, will I have to run the script each time I install a new app?
[Android Software/Hacking General [Developers Only]] guy_smiley:
No. It automatically mounts the partition so you don't have to worry again :)
[Android Software/Hacking General [Developers Only]] DarkIceGB:
After starting a fresh and restoring everything with TB to "internal", nothing from the Play Store would install, so I started again fresh and now nothing will install at all from TB or Google Play!!! The error it gave both times was: "app could not be downloaded due to an error. (921)".

I can't stand this stupidity with android any more.
[Android Software/Hacking General [Developers Only]] guy_smiley:
Can you give us the options that you chose when installing m2sd and your hboot?
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Wow that was so clever I'm in such awe. Take a look at all the other issues I've had before commenting next time.

What makes you think I have a different hboot to stock?

Like I said in my previous posts, I put everything on the sd-ext. Try reading my posts next time.

Edit: Did another fresh install, but this time didn't install TB. Just tried to update Maps in Google Play and "Insufficient Storage Available" error appears. I set everything to sd-ext and in terminal moved the cache too.

In the installer, each time I've said ext 4 and class 10.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Strange. Here I really could use the debug log :)

What options did you activate?

Backup all of the sd-ext and all of the sdcard (Fat32) partitions to your computer

Download and flash 4EXT Recovery

Boot into 4EXT Recovery

Change your sd-ext from 2GB to 1.5GB MAX

Format sd-ext and sdcard (Fat32)

Restore your apps and sdcard (Fat32) data

This has a 95% chance of working. The issue is to large sd-ext partition and bad partitioned/formated sd-ext and sdcard (Fat32) partitions.
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Thanks for the steps. Do I need to format the sd-ext to ext 4 or fat 32, and do I restore the apps with data in TB or just the apps?
[Android Software/Hacking General [Developers Only]] Robobob1221:
You sd-ext is ext4. Your external storage is FAT32.

Try just apps first. Then try restoring data one by one after.

私はローボーボブ。 Haro！！

I can't seem to find my log file! And I've changed back to a different script as it was a minor annoyance. I'm gonna run it again later this weekend and if I run into the same problem I will get the debug log, and provide my setup options.

Have to say this is a much more efficient script when it comes to managing the sd-ext. Just a nuisance at the time with the data. Hopefully next time there won't be any issues :)
[Android Software/Hacking General [Developers Only]] GabrielSousa:
i dont have m2sd bin or script, why ?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Well the installer cannot to more than ask m2sd to move over to the phone. But if you don't keep your phone clean, m2sd might not want to live there and that would explain why it is missing. Try cleaning your phone and then see if m2sd changes it's mind :)

Or you could provide me with some information that might actually help be debug your issue.

As an example, you could write the make of your phone, which ROM you are using, whether or not you used the aroma installer or the legacy, maybe even provide a log of the installation and so on.
[Android Software/Hacking General [Developers Only]] AlxMAX:
Actually both CM7 and BCM use vold as volume manager and /system/etc/vold. fstab as config file. Putting 1 instead of auto makes vold share only the first SD card partition, not all. Sharing all the partitions with the phone connected to a Linux PC makes the PC mount all the partitions, including the /sd-ext one and I did not like that, especially when the phone used it for a bind mount of /data/app from a directory of /sd-ext! Now, the CM7 source tree already has this fix.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
This I know. What I was wondering was the BCM question within the M2SD thread :)

The problem with setting it to 1 is that some people might like the auto. I have used it myself to backup sd-ext to the PC. Also Android does not unmount the sd-ext because android does not even know that it is there and thereby does not set it to be unmounted. All it does it unmount the fat32 and then announce mmcblk0 via the usb. sd-ext will be kept mounted on the phone as well.
[Android Software/Hacking General [Developers Only]] AlxMAX:
I didn't want to be off topic. I've just wanted to ensure the mechanism implemented by m2sd works without interferences.

That's exactly the weak point: the partition is mounted both on the phone and on the PC and I see there a conflict. That's why I prefer to set it on 1 to make it a phone dedicated partition. But that's just a matter of opinion! ;) I didn't know there were people using this ... feature? Anyway, I consider this subject closed.
[Android Software/Hacking General [Developers Only]] Robobob1221:
Does this m2sd have any script that conflicts with any tweaks such as smurfed out 6.6?

My current problem seems to be that I'm stuck on the boot animation. For about 20minutes now!
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Did everything you said exactly as you said but it made no difference. I get the same errors in alogcat.

I've tried everything but nothing makes a difference.

Edit: TB says the internal memory is full. I set TB to install to the internal memory as was suggested so that it would restore to the sd-ext. I set the script to move everything to the sd-ext before installing anything.

Any ideas?
[Android Software/Hacking General [Developers Only]] Robobob1221:
Have you tried it with a different sd card?

私はローボーボブ。 Haro！！
[Android Software/Hacking General [Developers Only]] DarkIceGB:
No. The SD card is only a month or so old though.

TB says the internal memory is full. I set TB to install to the internal memory as was suggested so that it would restore to the sd-ext. I set the script to move everything to the sd-ext before installing anything.

Any ideas?
[Android Software/Hacking General [Developers Only]] Robobob1221:
Did you have those problem using any other a2sd script? Also are you running any other init.d script? I found that this m2sd didn't play nicely with Papa Smurf151 smurfed out script for me.

When you run m2sd in terminal does it tells you its running in safe mode?

私はローボーボブ。 Haro！！
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Yes, I had the same problem, but it wasn't caused by the scripts (I only use one a2sd script at a time, and no others). The problems I had before when using other scripts were because the cache (not dalvik) was too full, and this is the only script I've found that can move the cache.

It doesn't say anything about safe mode.
[Android Software/Hacking General [Developers Only]] eoghan2t7:
For users getting market bugs I have narrowed it down to the cache partition and that the users must be mounting the cache to the SD if so the download folder is not being created on installing the script and because the download folder is not present the market will ether give an error code or fc there are two ways to fix this:

1. The script maker updates the script to make sure the folder is being created with the correct permissions I.e chmod 771 and chown 1000:2001

2. The users manually makes the folder after a reboot with the permissions stated above or they can add a file to the init.d folder with the following in it and name it 99zdir so it get run after the mount script also give the script full permissions and change the owner permissions to root:root

#!/system/bin/sh
DIR=/cache/download

if [ -d $DIR ];
then
echo "$DIR exists"
else
echo "$DIR does not exists"
sleep 2
echo "Creating $DIR"
mkdir /cache/download
sleep 2
echo "$DIR Created"
sleep 2
echo "Setting permissions on $DIR"
chmod 771 /cache/download
chown 1000:2001 /cache/download
sleep 2
echo "$DIR permissions set"
sleep 2
fi
[Android Software/Hacking General [Developers Only]] nqkoidrug:
sense 3.5

Hi all,

sorry for my question (I'm new and I'm not very clear) but the read me of comments I could not tell if this works in sense 3.5 ROM `s for HD2 (sorry for bad English)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
@eoghan2t7

The download folder does get created within script, but for some reason android is deleting it again according to logcat.

Also market does not use the download folder. It uses a folder in /data/data owned by download manager. And during install it uses /data/local/tmp.

@DarkIceGB

Have you tried the new version which mounts cache to the biggest partition?

@nqkoidrug

If it supports init.d, it should work.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Could you give me a link to that script?
[Android Software/Hacking General [Developers Only]] Robobob1221:
Here is the link to the script.

http://xdaforums.com/showthread.php?t=1517632

I dunno if its something in the init.d script irself or the build.prop edits. My phone booted up but hung at the animation. The screen would time out and also there was haptic feedback when I touched the screen but the home launcher wouldn't start.

私はローボーボブ。 Haro！！
[Android Software/Hacking General [Developers Only]] zagzag99:
Since 4.4.6 I get errors with the legacy package, but it does work with the Aroma.

-- Installing: /sdcard/mounts2sd-4.5.0_legacy.zip

mtd: successfully wrote block at 0

I:Set boot command "boot-recovery"

Finding update package...

I:Update location: /sdcard/mounts2sd-4.5.0_legacy.zip

Opening update package...

Installing update...

2 parse errors

line 48 col 18: unknown function "umount"

line 49 col 16: unknown function "umount"

E:Error in /sdcard/mounts2sd-4.5.0_legacy.zip

(Status 6)

Installation aborted.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Thanks. Will get that fixed :)
[Android Software/Hacking General [Developers Only]] eoghan2t7:
The market does use the /cache/download folder I can bet you if you use root explorer and delete the download folder the market will error out when downloading an application.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Android 2.x?

Most of my work is done on ICS, and I never have any download folder in cache and no market issues.
[Android Software/Hacking General [Developers Only]] eoghan2t7:
I'm on cm7 android 2.3.7 maybe its a gingerbread issue which has changed in ics.
[Android Software/Hacking General [Developers Only]] nqkoidrug:
init.d

Thanks, but how do I know if I use ROM supports init.d script. Let RootExplorer to search and find a folder with that name \ etc \ init.d that you should be?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Just type "grep sysinit /init.rc" in adb shell. If you don't get any output, then it's most likely not supported.
[Android Software/Hacking General [Developers Only]] nqkoidrug:
grep

Output is:
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Yep init.d will work. But M2SD will only work with some of the option do to old init.d implementation.
[Android Software/Hacking General [Developers Only]] MarcoToo:
2 little problems here:

1. My busybox does not support readlink. But that should be OK, right? Or is finding symlinks a vital part of m2sd?

2. When I tell m2sd to move /data/data to /sd-ext/data the startup log will just tell me that /data/data is too big to be moved to /sd-ext/data which is kinda funny because my /sd-ext is (supposed to be) 2GB and my /data partition only 190 MB with /data/data only occupying 21.19MB of it. Any idea what went wrong?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Readlinks is very important as this is used to find out whether to execute the script, or change settings (m2sd command). But if you can use the script, then readlink is supported.

About issue 2, you properly have r-mount enabled which means that /data/data is already moved to sd-ext. This option reverses the mount points and thereby the options.
[Android Software/Hacking General [Developers Only]] MarcoToo:
Fixed it by setting extfs to ext2 manually (maybe I forgot auto fs detection when compiling my kernel :D) and disabling rmount (don't think it was ever enabled; I didn't enable it, and it's off by default, right?). Just what did the script possibly mount before? :D

Many thanks for the quick reply!
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Well if r-mount was on (Off by default) then it would move data from /data to /sd-ext and mount the sd-ext partition on /data.

And since the options in M2SD is based on mount points and not devices, the options will be reversed as enabling things like data will move data from /data to /sd-ext (External to Internal with r-mount and Internal to External without r-mount)
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Yes. :(
[Android Software/Hacking General [Developers Only]] nqkoidrug:
dk_zero-cool What should I do now?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Flash the script