yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] hgmichna:
Thanks for the information. Where is the script? How can it be deleted?

I could probably find out, but I would think that a normal user may not be able to do this if it is not properly documented.

How can I do that?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I would say that anyone that starts flashing custom ROM's and Linux shell scripts should know a little (or learn/read) about what they are doing.

So when flashing things like Mounts2SD, one should know the fallowing:

What is Mounts2SD? What does A2SD means? Because if you don't know what this is (Not an app), why do you even need it?

What is a script?

What is init.d? Here also lies the question to where init.d scripts are stored (/system/etc/init.d) which makes it easier deleting them.

Installing apps (Real apps) from Android Market is one thing, but when people is running around xda-DEVELOPERS, downloading and flashing things via recovery or adb, one would think that they know a little bit more than the average user.

About how to check a ROM for init.d support? Just ask the dev making the ROM.
[Android Software/Hacking General [Developers Only]] hgmichna:
If that is so, then you should obviously add a warning with the above text to the installer or to the documentation. That would be fair and honest.

For example: "You should only attempt to install this script after you have asked the dev making the ROM whether it has init.d support and the dev said yes."

Could the script not find out about init.d support on its own?

I think though that the script may be good enough, or could be made safe enough, for a less knowledgeable user. How about adding an uninstall function, for example? Something that disables all functions, then deletes the script.
[Android Software/Hacking General [Developers Only]] Robobob1221:
It does. It has a safe mode if your Rom doesn't have init.d enabled properly. Its all there in the op. Read and reread. If something goes wrong read all the posts. Everything you've said here i believe has been talked about in this thread.
[Android Software/Hacking General [Developers Only]] hgmichna:
Some potential problems and questions:

Backup

I assume that everyone wants to back up his SD card content. However, with an ext partition that contains essential data like installed apps, those users who have a Windows computer can no longer completely back up their SD card.

Is there any convenient way to back up the ext partition to a Windows computer?

The only solution I can see is to put only the Dalvik cache on the ext partition, because that can be rebuilt automatically.

ROM Upgrade

What happens when somebody has mounts2sd installed and then upgrades, say, from CM 7.1 to CM 7.2? As far as I can see, CM 7.2 would have severe problems with insufficient internal memory space, because Mounts2sd would not be there after the ROM upgrade. This would be a problem even if only the Dalvik cache has been moved to ext.

Uninstall

It would be really nice to have complete instructions on how to safely uninstall mounts2sd. Where does it put its scripts, folders, and files that should be deleted? I guess that not every potential user is conversant enough with Linux to guess all this correctly.
[Android Software/Hacking General [Developers Only]] ganjar1989:
missing apps

help me...

missing apps after reboot and sd-ext cannot be mount after next reboot....

my devices is xperia mini pro sk17i

my rom is MiniCMSandwich AOSP Lite

and my kernel is kamarush v.3

my structure sd card is :

transcend 16Gb Class 10

partition info

11.90Gb FAT32

2.00Gb Ext4

1.0Gb Linux Swap...

help me please how to install...

i have try to install with aroma version but still have this problem....

:)
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
What in gods name are you talking about? You have just as much access to /sd-ext from your PC as you have to /data. For apps backup, use a backup tool like you would in any other cases. Most of them works with sd-ext, and those that don't, will just use the /data location which will also work fine seen as the locations are linked in order for android to be able to use it.

/data/app and /sd-ext/app are the same location. They both link to the same folder on your sd-ext partition. The same goes for dalvik-cache, cache, data and other folders handled by the script.

Also Android uses the file system yaffs2 (Ext4 on newer devices) for internal partitions. Windows does not support any of them. So why would it be any different for a windows user if the apps are located on the yaffs2 or the ext(2/3/4) partition on /sd-ext? All you have access to from UMS is the sdcard partition (Fat32). That's the same whether you use sd-ext or not.

Again, if you don't know what this script is or what it does, please do not make comments about it that does not make any sense.

First of all, you ALWAYS ALWAYS ALWAYS delete dalvik-cache and cache when updating a ROM or install another one. That is the first rule of flashing ROM. You do the flash, then you wipe cache and dalvik-cache (or before flashing).

Second, you flash the ROM, then you re-flash the script. That could not be more simple.

Since it is an init.d script, I would start by looking in /system/etc/init.d
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I need a startup logcat
[Android Software/Hacking General [Developers Only]] hgmichna:
Yes, you are right. I did not think properly.

OK, that should work. Before I boot into Android, I would have to re-enter the same settings that I had before, right?

How about the script's settings? Where does it keep them?

The thought went through my mind that the script could keep its settings, perhaps a duplicate of them, on the SD card. Then it could automatically restore them from there, if the main settings are missing, like after flashing a new ROM.
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Any ideas about my issue?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Sorry but I fallow a lot of threads which makes it difficult keeping up some times. Which issue are we talking about?

There is a new update coming (A couple of hours). Maybe that will fix it for you
[Android Software/Hacking General [Developers Only]] DarkIceGB:
That's OK, I've quoted it below. You last asked how I was installing apps; it's through Google Play.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Ahh yes this I remember. I already made changes in M2SD on behalf of your issue. Will upload new release in a couple of hours, then you can see if it worked :)
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Awesome, thanks. :)
[Android Software/Hacking General [Developers Only]] adell_:
Hi dk_zero-cool,

When I update a ROM, do I need to re-flash this script? Also, could you please provide an option to disable safe mode in the installation?
[Android Software/Hacking General [Developers Only]] DarkIceGB:
You need to reflash if you install a new rom; your settings will have been saved too.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
New release is out
[Android Software/Hacking General [Developers Only]] colin.jones:
Hangs during first boot image (BCM-RC4.0U1)

Dear dk_zero-cool

I'm struggling getting Mounts2SD working on my N1 with your BCM RC4.0U1 ROM. Initially I couldn't get the ROM to work - it just hung during boot (at the first, static boot image). After much messing around I got it working as long as I didn't use the Mounts2SD scripts.

I have partitioned (BlackRose) the NAND to /system 180M. I think the Cache was 10M, as I remember seeing that number somewhere, so remainder for data. I used CWM to partition the sd card (8G Class 4) so that I had a 0.5G sd-ext. Then tried again with 4EXT, with a 1G sd-ext (ext4), and first partition FAT. And again, the same, but with a SWAP as well.

When I got BCM working without Mounts2SD, I then came here, and tried flashing it after the fact. But it just crashes again at the first boot image. As soon as I go back to BCM without it, it works fine. But without the Mounts2SD the ROM is almost useless because I have so little space to install apps! (and I really want your ROM because its VERY cool!)

Each time, I always wipe cache/dalvik-cache (although it looks like Aroma does this anyway), and I have tried numerous times doing a full factory/data reset first, and manually wiping system/cache/dalvik/sd-ext. The only thing I haven't wiped in these flashes is hboot, recovery and the sd card main partition (the first two seem self defeating, as I'm likely to end up with a brick! And the main sd partition has the images I'm flashing and some other data I don't want to loose)

So it seems to be directly related to Mounts2SD - so many people seem to have this working, so I'm obviously doing something really stupid, but I just can't for the life of me work out what.

I know you are going to ask for the debug logs.... in /data/m2sd.log?? But I can't work out how to get that file off the device within CWM recovery without flashing back to a backup, which surely will wipe that log file?

Is there anything you get suggest where I am going wrong? (also waiting for your RC4.1U1 mirrors to go up, but I believe the Mounts2SD update is just to the latest very on this thread, which as I've already mentioned, I've tried independently over a basic BCM install)

Rgds

Colin
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
The next ROM version is out now with this newest M2SD Version. I suggest that you make a full nandroid backup, do a complete wipe, data included (Not the Fat32 of course), flash the new ROM with the M2SD Debug option enabled. If you phone still have problems, reboot into recovery and grep the file /data/m2sd/m2sd.debug. This can be done using ADB (Search google if you don't know how), the basic command would be "adb pull /data/m2sd/m2sd.debug" when you have ADB setup and running.
[Android Software/Hacking General [Developers Only]] colin.jones:
Thanks for the speedy reply:

1. When you say wipe data as well (not Fat32), you mean /data? You don't mean the sd card's data partition? I'm using CWM recovery's backup (which is Nandroid isn't it? But doesn't back up the sd data partition I believe) let me know if I do need to wipe sd data as well...

2. Just saw the Sourgeforge mirror come up - grabbing now - is this Mounts2SD version different from the 4.5 version I manually installed from this thread? Or is there some other improvement in the integration to BCM you have done that might help?

3. If it fails again, will try to grab that file - I've used adb before, but my IT environment is a mess at the moment - this PC's SSD failed so I'm running Ubuntu Live boot from a USB stick (in desperation!) and its v slow! I'll have to track down the ADB drivers for Linux again and re-install. So will post back with results if it fails, but will take longer for the log file, sorry :)

Thx so much for your help so far!

Col.
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Big problem with the new release: Just installed it and moved everything to the sd-ext partition and after rebooting and optimizing apps, I get a slew of "Unfortunately app has stopped" messages until it freezes then reboots. It says it's optimizing apps again and then reboots again - stuck in a boot loop. Clearing caches and reinstalling does nothing.

Great, now I'm stuck with a brick!
[Android Software/Hacking General [Developers Only]] ganjar1989:
ask

how to get startup logcat?

and where the location about logcat?

thx....
[Android Software/Hacking General [Developers Only]] colin.jones:
Hi! I just tried the new ROM the Aroma installer does its job then just before the final confirmation the please wait comes up and doesn't seem to ever finish. Tried flashing twice but the same behaviour. Previously this went through in no time. How long should I wait for that? From memory the only thing after it was just the confirm to reboot.
[Android Software/Hacking General [Developers Only]] adell_:
Have you tried to fix permissions?

---------- Post added at 02:09 PM ---------- Previous post was at 02:07 PM ----------

Many thanks. Does this mean if I disable safemode it will still be disabled when I update the script (like from version 4.5 to 4.6)?

---------- Post added at 02:12 PM ---------- Previous post was at 02:09 PM ----------

Hi dk_zero-cool,

If my ROM doesn't use a correct sysinit method, can I modify it myself and how to do that?
[Android Software/Hacking General [Developers Only]] Robobob1221:
You need to decompile the boot.img. Then go into the RamDisk folder and edit the init.rc. You will need to find the line that starts sysinit. It about half way down after the chown scripts. Then replace with 'exec /system/bin/sysinit'. Then you need to rebuild your boot.img All can be done in dsixda's kitchen

This used to be in the OP but I can't see it
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Yes it should still be disabled, but you can always check it by opening the terminal emulator and typing the following:

su
m2sd safemode
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Everything from three posts into one:

Big problem with the new release: Just installed it and moved everything to the sd-ext partition and after rebooting and optimizing apps, I get a slew of "Unfortunately app has stopped" messages until it freezes then reboots. It says it's optimizing apps again and then reboots again - stuck in a boot loop. Clearing caches and reinstalling does nothing.

Disabling safe mode when installing allowed my phone to boot, but with settings restored to default! After moving everything to the sd-ext partition, I could install a few more apps but after that the same insufficient storage error appeared. I'm going to start a fresh with the rom and see if that fixes it.

Just installed the ROM fresh and the new version of your script. Whatever you did it's now considerably worse. Moved everything to sd-ext, rebooted, installed about 15 apps and BAM! No space left. I double checked and everything I can move is definitely on the sd-ext partition according to m2sd. Now it says low space and internal storage has 2MB free.

Sorry but I'm not using this script any more.
[Android Software/Hacking General [Developers Only]] ynotkg3:
Test

Yeah I got it .

And it work for my device (SS GS 3):laugh:
[Android Software/Hacking General [Developers Only]] adell_:
Is the correct way to execute init.d is for this script only or is it also useful for something else?
[Android Software/Hacking General [Developers Only]] Robobob1221:
It works with other a2sd script. If I remember dk-zero_cool posted that this way prevents a2sd conflicting with any other script running, in particular dexopt. Can't remember whether thats a recent post, but its in this thread somewhere
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Kind of depends on the type of script which is why I made the Enhanced init.d system. However in most cases that would be the best option as it executes all scripts before starting to boot. This is good when moving apps, handling different settings and such.
[Android Software/Hacking General [Developers Only]] nscxp2005:
Does anybody know how to get Titanium Backup working with this script when restoring Apps and Data?

When I restore Apps and Data it just sits there working and does not finish.

Please can somebody advise me.
[Android Software/Hacking General [Developers Only]] adell_:
It works fine for me.
[Android Software/Hacking General [Developers Only]] Robobob1221:
Where are you restoring your apps/data to?

Best thing to do is set the TB restore point to internal storage and that should sort you out.
[Android Software/Hacking General [Developers Only]] colin.jones:
@dk_zero-cool - any pointers?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Just do it as you normally would. No need to select specific locations or anything, just add them to /data/app

To what?
[Android Software/Hacking General [Developers Only]] nscxp2005:
EDIT

I managed to fix the error.

I reflashed my .62 firmware for my Xperia Play, then flashed the custom ROM and then your script.

The only problem I have now is after I have installed some apps and restart my phone the apps disappear.

Do you know how this can be fixed?

I am using the Aroma Installer with data and dalvik selected.

I hope you can help.

Thank you for your time.

All the best,

NSCXP2005
[Android Software/Hacking General [Developers Only]] mattisebastian:
I just installed the BCM ICS CM9 rom which includes this script and was wondering because the apps take some time to load and my internal storage is full now. Still, I dont get any errors referring disk space capacity.

Can you help me with this information or do you need a logcat?

Greetings,

Matti
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Actually I need the M2SD debug Log. Enable debug, Type "m2sd debug enable" in terminal (Has not been added to the Settings part yet). Reboot the phone and attach /data/m2sd/m2sd.debug
[Android Software/Hacking General [Developers Only]] nscxp2005:
Hi dk_zero-cool,

I keep getting a problem happening. Every time I install any apps and if I have to restart my phone, once it comes back on all the apps I have installed have disappeared.

Do you have any idea why this is happening?
[Android Software/Hacking General [Developers Only]] DarkIceGB:
dk_zero-cool, since you missed my post, it's below:

Big problem with the new release:

I installed it and moved everything to the sd-ext partition and after rebooting and optimizing apps, I got a slew of "Unfortunately app has stopped" messages until it froze and rebooted. It said it was optimizing apps again and then reboots again - stuck in a boot loop. Clearing caches and reinstalling did nothing.

Disabling safe mode when installing allowed my phone to boot, but with settings restored to default! After moving everything to the sd-ext partition, I could install a few more apps but after that the same insufficient storage error appeared.

Just installed the ROM fresh and your script. It's now much worse. Moved everything to sd-ext, rebooted, installed about 15 apps and BAM! No space left. I double checked and everything I can move is definitely on the sd-ext partition according to m2sd. Now it says low space and internal storage has 2MB free.

I can install a two or three more after rebooting but that's it.

Any ideas?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Hmm it seam that my telepathic connection to your phones has been closed for some reason, can't seam to get it re-connected. Could you try manually uploading the m2sd log and debug file?
[Android Software/Hacking General [Developers Only]] DarkIceGB:
Sorry, it was me that closed your connection. Perhaps you'd like to get lost because I'm not uploading anything.

I'm switching to 69a2sd, which has a lot more customisability than yours, like being able to keep system apps on nand and third party on sd-ext. Oh, and I heard that it actually works first time too.
[Android Software/Hacking General [Developers Only]] nscxp2005:
Why shouldn't the ed-ext partition be any more than 1.4gb?

Mine is 6gb for my Xperia Play.

Can you please advise me.

Also I managed to get it working but, then after I install some apps it says insufficient space.

Please can you help.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
That is a good question which no one seams to know the answer to. People just seams to have a lot more issues with sd-ext when the size get's above 1.5gb.
[Android Software/Hacking General [Developers Only]] nscxp2005:
But, I need to have mine at that size or I run out of space on my internal memory.

I am having some issues with your script.

I keep getting insufficient space when trying to install apps. It seems to take my Internal Memory up even though it is supposed to be on the sd-ext partition.

Also I have tried the m2sd status command in Android Terminal but it says I need root to change the configuration files even though I type SU and gave it Superuser permissions.

Please can you help me with the issues I am getting.

Thanks

Here is what I get when I run the command:

# su
# m2sd status
m2sd status
--list: applet not found
id: applet not found
You need to be root to access m2sd configurations.
Type 'su' in console to gain
superuser privileges!
#
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
What ROM are you using? It seams it is using an exreme limited busybox version since it does not even support listing it's options. Never seen a busybox that did not support that. Properly a lot more that is not supported and needed by M2SD.
[Android Software/Hacking General [Developers Only]] nscxp2005:
I am using TrueAncestor 1.5b on my Xperia Play
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Okay, will have a look at it.
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
I think you need to check your installation of the ROM. Just downloaded it myself, pulled the busybox from it and pushed it to my phone and it works fine. Not only is that busybox version not limited, it got more features than most versions. There is something wrong with your installation of the ROM, either you ran out of space while flashing the ROM, or you have changed something yourself. Never the less, TrueAncestor 1.5b should have no problems running this script, and others with the same ROM seams to do okay also.

Busybox has the "--list" option which will provide a list of all the binaries within it. The error you get is from busybox missing that option. The default busybox in TrueAncestor 1.5b does not lack this option. So you are either running a different one than provided by the ROM, or yours is broken do to bad installation.
[Android Software/Hacking General [Developers Only]] nscxp2005:
The way Installed the ROM was first flash the .62 firmware file, then a ftf file that increases the internal space to over 400MB and then finally the ROM.

I'll try again.

I'll report back.

EDIT

I've just ran the m2SD status command in terminal a got the following

# m2sd status

Status:
-------
* Mounts2SD [safe-mode]
- Apps []
- Data []
- Dalvik []
- CmDalvik []
- Cache []
- SWAP []
- RMount []

Device info:
------------
* SD-EXT device [/dev/block/mmcblk0p2]
* Swap device []

Locations:
------------
* Cache []

Does this mean it works?
[Android Software/Hacking General [Developers Only]] dk_zero-cool:
Now it seams to work, but you have no options enabled.

Try running "m2sd apps enable" and reboot. That will move all APK's (Applications) to the sd-ext.

If you need more space than that, you need to run "m2sd safemode disable" in order to enable dalvik and/or data. But that is done at your own risk. Safe mode is on because of the way init.d scripts is handled in your ROM which is not always good when moving data and dalvik-cache.

But run "m2sd help" to see the options you have.
[Android Software/Hacking General [Developers Only]] nscxp2005:
When I run m2SD get the following system the end.

Mounts2SD is currently running in safe-mode and some options is therefore hidden/disabled. In order to use all of the options of the script, your ROM must use the sysinit execute method of handling init.d scripts. Your ROM is currently using the sysinit service method which is highly unstable.

Does this mean everything is OK?
[Android Software/Hacking General [Developers Only]] Mr.Mefisto:
Thanks for the last update!
[Android Software/Hacking General [Developers Only]] vertigo888:
youtube videos are stuttering for me, I flashed mounts2sd 4.6.0 using the defaults but enabling SWAP. I did not move data, only apps.

currenty using build 40, also experiencing random hot reboots once in a while.

anybody know how to fix the stuttering issue? maybe it has something to do with the new youtube app for android 3+

edit: whoops wrong thread, was supposed to post this on desire AOKP, now how do i delete this...